From 5fc046579ab90d453763bdc3177e537e002e5c07 Mon Sep 17 00:00:00 2001 From: Frederik Gartenmeister Date: Tue, 21 May 2024 20:53:13 +0200 Subject: [PATCH 01/21] feat: add oracle key (#1841) --- libs/types/src/oracles.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libs/types/src/oracles.rs b/libs/types/src/oracles.rs index 7e6252591c..4beba3e804 100644 --- a/libs/types/src/oracles.rs +++ b/libs/types/src/oracles.rs @@ -1,3 +1,4 @@ +use cfg_primitives::{LoanId, PoolId}; use frame_support::pallet_prelude::RuntimeDebug; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; @@ -26,10 +27,18 @@ pub type Isin = [u8; 12]; #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub enum OracleKey { /// Identify a Isin price + #[codec(index = 0)] Isin(Isin), /// Identify a conversion from the first currency to the second one + #[codec(index = 1)] ConversionRatio(CurrencyId, CurrencyId), + + /// Identifies a single pool-loan-id combination. + /// This key is a fallback solution if no other keys are applicable for the + /// given oracle. + #[codec(index = 2)] + PoolLoanId(PoolId, LoanId), } impl From<(CurrencyId, CurrencyId)> for OracleKey { From 1570c34671ec58bcc0cfc7150633ddcf98b1f73b Mon Sep 17 00:00:00 2001 From: Frederik Gartenmeister Date: Fri, 24 May 2024 14:16:38 +0200 Subject: [PATCH 02/21] Fix/linear pricing (#1812) * feat: restrict epoch closing to liquiduty admin * fix: linear pricing * proof: type unsafety * revert: type unsafety * fix: tests and adapt logic to allow dyanmic input * chore: generic removal --- pallets/loans/src/entities/input.rs | 3 +- pallets/loans/src/entities/loans.rs | 101 ++++++++- .../loans/src/entities/pricing/external.rs | 160 +++++++++++++-- pallets/loans/src/lib.rs | 12 +- pallets/loans/src/tests/mock.rs | 2 +- pallets/loans/src/tests/mod.rs | 7 +- .../loans/src/tests/portfolio_valuation.rs | 56 ++++- pallets/loans/src/tests/repay_loan.rs | 155 ++++++++++++++ pallets/loans/src/tests/util.rs | 1 + pallets/pool-registry/src/mock.rs | 19 +- pallets/pool-system/src/benchmarking.rs | 15 +- pallets/pool-system/src/lib.rs | 8 +- pallets/pool-system/src/mock.rs | 28 ++- pallets/pool-system/src/tests/mod.rs | 57 +++-- runtime/altair/src/lib.rs | 1 + runtime/centrifuge/src/lib.rs | 1 + runtime/centrifuge/src/migrations.rs | 1 + runtime/common/src/lib.rs | 10 +- runtime/common/src/migrations/loans.rs | 194 ++++++++++++++++++ runtime/common/src/migrations/mod.rs | 1 + runtime/common/src/pool.rs | 59 ++++++ runtime/development/src/lib.rs | 1 + runtime/development/src/migrations.rs | 1 + .../src/generic/cases/loans.rs | 17 +- .../integration-tests/src/generic/config.rs | 1 + 25 files changed, 822 insertions(+), 89 deletions(-) create mode 100644 runtime/common/src/migrations/loans.rs create mode 100644 runtime/common/src/pool.rs diff --git a/pallets/loans/src/entities/input.rs b/pallets/loans/src/entities/input.rs index a858250de4..4e5fe975e0 100644 --- a/pallets/loans/src/entities/input.rs +++ b/pallets/loans/src/entities/input.rs @@ -7,6 +7,7 @@ use crate::{ entities::pricing::external::ExternalAmount, pallet::{Config, Error}, types::RepaidAmount, + PriceOf, }; #[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo, RuntimeDebugNoBound, MaxEncodedLen)] @@ -61,6 +62,6 @@ impl RepaidInput { #[scale_info(skip_type_params(T))] pub enum PriceCollectionInput { Empty, - Custom(BoundedBTreeMap), + Custom(BoundedBTreeMap, T::MaxActiveLoansPerPool>), FromRegistry, } diff --git a/pallets/loans/src/entities/loans.rs b/pallets/loans/src/entities/loans.rs index 0489f22cf7..0077121f9a 100644 --- a/pallets/loans/src/entities/loans.rs +++ b/pallets/loans/src/entities/loans.rs @@ -31,6 +31,7 @@ use crate::{ BorrowLoanError, BorrowRestrictions, CloseLoanError, CreateLoanError, LoanRestrictions, MutationError, RepaidAmount, RepayLoanError, RepayRestrictions, RepaymentSchedule, }, + PriceOf, }; /// Loan information. @@ -290,7 +291,7 @@ impl ActiveLoan { pub fn present_value_by( &self, rates: &Rates, - prices: &BTreeMap, + prices: &BTreeMap>, ) -> Result where Rates: RateCollection, @@ -581,3 +582,101 @@ impl TryFrom<(T::PoolId, ActiveLoan)> for ActiveLoanInfo { }) } } + +/// Adds `with_linear_pricing` to ExternalPricing struct for migration to v4 +pub mod v3 { + use cfg_traits::{interest::InterestRate, Seconds}; + use parity_scale_codec::{Decode, Encode}; + + use crate::{ + entities::{ + loans::BlockNumberFor, + pricing::external::v3::{ActivePricing, Pricing}, + }, + types::{LoanRestrictions, RepaidAmount, RepaymentSchedule}, + AssetOf, Config, + }; + + #[derive(Encode, Decode)] + pub struct ActiveLoan { + schedule: RepaymentSchedule, + collateral: AssetOf, + restrictions: LoanRestrictions, + borrower: T::AccountId, + write_off_percentage: T::Rate, + origination_date: Seconds, + pricing: ActivePricing, + total_borrowed: T::Balance, + total_repaid: RepaidAmount, + repayments_on_schedule_until: Seconds, + } + + impl ActiveLoan { + pub fn migrate(self, with_linear_pricing: bool) -> super::ActiveLoan { + super::ActiveLoan { + schedule: self.schedule, + collateral: self.collateral, + restrictions: self.restrictions, + borrower: self.borrower, + write_off_percentage: self.write_off_percentage, + origination_date: self.origination_date, + pricing: self.pricing.migrate(with_linear_pricing), + total_borrowed: self.total_borrowed, + total_repaid: self.total_repaid, + repayments_on_schedule_until: self.repayments_on_schedule_until, + } + } + } + + #[derive(Encode, Decode)] + pub struct CreatedLoan { + info: LoanInfo, + borrower: T::AccountId, + } + + impl CreatedLoan { + pub fn migrate(self, with_linear_pricing: bool) -> super::CreatedLoan { + super::CreatedLoan::::new(self.info.migrate(with_linear_pricing), self.borrower) + } + } + + #[derive(Encode, Decode)] + pub struct ClosedLoan { + closed_at: BlockNumberFor, + info: LoanInfo, + total_borrowed: T::Balance, + total_repaid: RepaidAmount, + } + + impl ClosedLoan { + pub fn migrate(self, with_linear_pricing: bool) -> super::ClosedLoan { + super::ClosedLoan:: { + closed_at: self.closed_at, + info: self.info.migrate(with_linear_pricing), + total_borrowed: self.total_borrowed, + total_repaid: self.total_repaid, + } + } + } + + #[derive(Encode, Decode)] + pub struct LoanInfo { + pub schedule: RepaymentSchedule, + pub collateral: AssetOf, + pub interest_rate: InterestRate, + pub pricing: Pricing, + pub restrictions: LoanRestrictions, + } + + impl LoanInfo { + pub fn migrate(self, with_linear_pricing: bool) -> super::LoanInfo { + super::LoanInfo:: { + pricing: self.pricing.migrate(with_linear_pricing), + schedule: self.schedule, + collateral: self.collateral, + interest_rate: self.interest_rate, + restrictions: self.restrictions, + } + } + } +} diff --git a/pallets/loans/src/entities/pricing/external.rs b/pallets/loans/src/entities/pricing/external.rs index d0ecc8e897..3730c6d4fc 100644 --- a/pallets/loans/src/entities/pricing/external.rs +++ b/pallets/loans/src/entities/pricing/external.rs @@ -9,11 +9,12 @@ use sp_runtime::{ traits::{EnsureAdd, EnsureFixedPointNumber, EnsureSub, Zero}, ArithmeticError, DispatchError, DispatchResult, FixedPointNumber, }; -use sp_std::collections::btree_map::BTreeMap; +use sp_std::{cmp::min, collections::btree_map::BTreeMap}; use crate::{ entities::interest::ActiveInterestRate, pallet::{Config, Error}, + PriceOf, }; #[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo, RuntimeDebugNoBound, MaxEncodedLen)] @@ -76,6 +77,9 @@ pub struct ExternalPricing { /// borrow/repay and the current oracle price. /// See [`ExternalAmount::settlement_price`]. pub max_price_variation: T::Rate, + + /// If the pricing is estimated with a linear pricing model. + pub with_linear_pricing: bool, } impl ExternalPricing { @@ -150,12 +154,27 @@ impl ExternalActivePricing { } } - fn linear_accrual_price(&self, maturity: Seconds) -> Result { - Ok(cfg_utils::math::y_coord_in_rect( - (self.settlement_price_updated, self.latest_settlement_price), - (maturity, self.info.notional), - T::Time::now(), - )?) + fn maybe_with_linear_accrual_price( + &self, + maturity: Seconds, + price: T::Balance, + price_last_updated: Seconds, + ) -> Result { + if self.info.with_linear_pricing { + if min(price_last_updated, maturity) == maturity { + // We can not have 2 'xs' with different 'y' in a rect. + // That only happens at maturity + return Ok(self.info.notional); + } + + Ok(cfg_utils::math::y_coord_in_rect( + (min(price_last_updated, maturity), price), + (maturity, self.info.notional), + min(T::Time::now(), maturity), + )?) + } else { + Ok(price) + } } pub fn current_price( @@ -163,10 +182,30 @@ impl ExternalActivePricing { pool_id: T::PoolId, maturity: Seconds, ) -> Result { - Ok(match T::PriceRegistry::get(&self.info.price_id, &pool_id) { - Ok(data) => data.0, - Err(_) => self.linear_accrual_price(maturity)?, - }) + self.current_price_inner( + maturity, + T::PriceRegistry::get(&self.info.price_id, &pool_id).ok(), + ) + } + + fn current_price_inner( + &self, + maturity: Seconds, + oracle: Option>, + ) -> Result { + if let Some((oracle_price, oracle_provided_at)) = oracle { + self.maybe_with_linear_accrual_price( + maturity, + oracle_price, + oracle_provided_at.into_seconds(), + ) + } else { + self.maybe_with_linear_accrual_price( + maturity, + self.latest_settlement_price, + self.settlement_price_updated, + ) + } } pub fn outstanding_principal( @@ -197,13 +236,10 @@ impl ExternalActivePricing { pub fn present_value_cached( &self, - cache: &BTreeMap, + cache: &BTreeMap>, maturity: Seconds, ) -> Result { - let price = match cache.get(&self.info.price_id) { - Some(data) => *data, - None => self.linear_accrual_price(maturity)?, - }; + let price = self.current_price_inner(maturity, cache.get(&self.info.price_id).copied())?; Ok(self.outstanding_quantity.ensure_mul_int(price)?) } @@ -288,3 +324,95 @@ impl ExternalActivePricing { Ok(()) } } + +/// Adds `with_linear_pricing` to ExternalPricing struct for migration to v4 +pub mod v3 { + use cfg_traits::Seconds; + use parity_scale_codec::{Decode, Encode}; + + use crate::{ + entities::{ + interest::ActiveInterestRate, + pricing::{external::MaxBorrowAmount, internal, internal::InternalActivePricing}, + }, + Config, + }; + + #[derive(Encode, Decode)] + pub enum Pricing { + Internal(internal::InternalPricing), + External(ExternalPricing), + } + + impl Pricing { + pub fn migrate(self, with_linear_pricing: bool) -> crate::entities::pricing::Pricing { + match self { + Pricing::Internal(i) => crate::entities::pricing::Pricing::Internal(i), + Pricing::External(e) => { + crate::entities::pricing::Pricing::External(e.migrate(with_linear_pricing)) + } + } + } + } + + #[derive(Encode, Decode)] + pub struct ExternalPricing { + pub price_id: T::PriceId, + pub max_borrow_amount: MaxBorrowAmount, + pub notional: T::Balance, + pub max_price_variation: T::Rate, + } + + #[derive(Encode, Decode)] + pub enum ActivePricing { + Internal(InternalActivePricing), + External(ExternalActivePricing), + } + + impl ActivePricing { + pub fn migrate( + self, + with_linear_pricing: bool, + ) -> crate::entities::pricing::ActivePricing { + match self { + ActivePricing::Internal(i) => crate::entities::pricing::ActivePricing::Internal(i), + ActivePricing::External(e) => crate::entities::pricing::ActivePricing::External( + e.migrate(with_linear_pricing), + ), + } + } + } + + #[derive(Encode, Decode)] + pub struct ExternalActivePricing { + info: ExternalPricing, + outstanding_quantity: T::Quantity, + pub interest: ActiveInterestRate, + latest_settlement_price: T::Balance, + settlement_price_updated: Seconds, + } + + impl ExternalActivePricing { + pub fn migrate(self, with_linear_pricing: bool) -> super::ExternalActivePricing { + super::ExternalActivePricing { + info: self.info.migrate(with_linear_pricing), + outstanding_quantity: self.outstanding_quantity, + interest: self.interest, + latest_settlement_price: self.latest_settlement_price, + settlement_price_updated: self.settlement_price_updated, + } + } + } + + impl ExternalPricing { + pub fn migrate(self, with_linear_pricing: bool) -> super::ExternalPricing { + super::ExternalPricing { + price_id: self.price_id, + max_borrow_amount: self.max_borrow_amount, + notional: self.notional, + max_price_variation: self.max_price_variation, + with_linear_pricing, + } + } + } +} diff --git a/pallets/loans/src/lib.rs b/pallets/loans/src/lib.rs index 7283fc62ad..ee49c8a378 100644 --- a/pallets/loans/src/lib.rs +++ b/pallets/loans/src/lib.rs @@ -118,7 +118,7 @@ pub mod pallet { pub type AssetOf = (::CollectionId, ::ItemId); pub type PriceOf = (::Balance, ::Moment); - const STORAGE_VERSION: StorageVersion = StorageVersion::new(3); + const STORAGE_VERSION: StorageVersion = StorageVersion::new(4); #[pallet::pallet] #[pallet::storage_version(STORAGE_VERSION)] @@ -169,7 +169,7 @@ pub mod pallet { type Time: TimeAsSecs; /// Generic time type - type Moment: Parameter + Member + IntoSeconds; + type Moment: Parameter + Member + Copy + IntoSeconds; /// Used to mint, transfer, and inspect assets. type NonFungible: Transfer @@ -232,7 +232,7 @@ pub mod pallet { /// Storage for loans that has been created but are not still active. #[pallet::storage] - pub(crate) type CreatedLoan = StorageDoubleMap< + pub type CreatedLoan = StorageDoubleMap< _, Blake2_128Concat, T::PoolId, @@ -259,7 +259,7 @@ pub mod pallet { /// No mutations are expected in this storage. /// Loans are stored here for historical purposes. #[pallet::storage] - pub(crate) type ClosedLoan = StorageDoubleMap< + pub type ClosedLoan = StorageDoubleMap< _, Blake2_128Concat, T::PoolId, @@ -1050,7 +1050,7 @@ pub mod pallet { pub fn registered_prices( pool_id: T::PoolId, - ) -> Result, DispatchError> { + ) -> Result>, DispatchError> { let collection = T::PriceRegistry::collection(&pool_id)?; Ok(ActiveLoans::::get(pool_id) .iter() @@ -1058,7 +1058,7 @@ pub mod pallet { .filter_map(|price_id| { collection .get(&price_id) - .map(|price| (price_id, price.0)) + .map(|price| (price_id, (price.0, price.1))) .ok() }) .collect::>()) diff --git a/pallets/loans/src/tests/mock.rs b/pallets/loans/src/tests/mock.rs index c2cc4e8ce3..c0238546a6 100644 --- a/pallets/loans/src/tests/mock.rs +++ b/pallets/loans/src/tests/mock.rs @@ -68,7 +68,7 @@ pub const POLICY_PERCENTAGE: f64 = 0.5; pub const POLICY_PENALTY: f64 = 0.5; pub const REGISTER_PRICE_ID: PriceId = 42; pub const UNREGISTER_PRICE_ID: PriceId = 88; -pub const PRICE_VALUE: Balance = 998; +pub const PRICE_VALUE: Balance = 980; pub const NOTIONAL: Balance = 1000; pub const QUANTITY: Quantity = Quantity::from_rational(12, 1); pub const CHANGE_ID: ChangeId = H256::repeat_byte(0x42); diff --git a/pallets/loans/src/tests/mod.rs b/pallets/loans/src/tests/mod.rs index 05349a47dc..13605dde37 100644 --- a/pallets/loans/src/tests/mod.rs +++ b/pallets/loans/src/tests/mod.rs @@ -5,13 +5,16 @@ use cfg_primitives::SECONDS_PER_DAY; use cfg_traits::interest::{CompoundingSchedule, InterestRate}; use cfg_types::permissions::{PermissionScope, PoolRole, Role}; use frame_support::{assert_noop, assert_ok, storage::bounded_vec::BoundedVec}; -use sp_runtime::{traits::BadOrigin, DispatchError, FixedPointNumber}; +use sp_runtime::{ + traits::{BadOrigin, One}, + DispatchError, FixedPointNumber, +}; use super::{ entities::{ changes::{Change, InternalMutation, LoanMutation}, input::{PrincipalInput, RepaidInput}, - loans::{ActiveLoan, LoanInfo}, + loans::{ActiveLoan, ActiveLoanInfo, LoanInfo}, pricing::{ external::{ExternalAmount, ExternalPricing, MaxBorrowAmount as ExtMaxBorrowAmount}, internal::{InternalPricing, MaxBorrowAmount as IntMaxBorrowAmount}, diff --git a/pallets/loans/src/tests/portfolio_valuation.rs b/pallets/loans/src/tests/portfolio_valuation.rs index af1b548723..86b63a558d 100644 --- a/pallets/loans/src/tests/portfolio_valuation.rs +++ b/pallets/loans/src/tests/portfolio_valuation.rs @@ -198,14 +198,16 @@ fn with_unregister_price_id_and_oracle_not_required() { expected_portfolio(QUANTITY.saturating_mul_int(price_value_after_half_year)); // Suddenty, the oracle set a value + const MARKET_PRICE_VALUE: Balance = 999; MockPrices::mock_collection(|_| { Ok(MockDataCollection::new(|_| { - Ok((PRICE_VALUE * 8, BLOCK_TIME_MS)) + Ok((MARKET_PRICE_VALUE, BLOCK_TIME_MS)) })) }); + let price_value_after_half_year = MARKET_PRICE_VALUE + (NOTIONAL - MARKET_PRICE_VALUE) / 2; update_portfolio(); - expected_portfolio(QUANTITY.saturating_mul_int(PRICE_VALUE * 8)); + expected_portfolio(QUANTITY.saturating_mul_int(price_value_after_half_year)); }); } @@ -218,3 +220,53 @@ fn empty_portfolio_with_current_timestamp() { ); }); } + +#[test] +fn no_linear_pricing_either_settlement_or_oracle() { + new_test_ext().execute_with(|| { + let mut external_pricing = util::base_external_pricing(); + external_pricing.with_linear_pricing = false; + external_pricing.max_price_variation = Rate::one(); + let loan = LoanInfo { + pricing: Pricing::External(ExternalPricing { + price_id: UNREGISTER_PRICE_ID, + ..external_pricing + }), + ..util::base_external_loan() + }; + let loan_1 = util::create_loan(loan); + const SETTLEMENT_PRICE: Balance = 970; + let amount = ExternalAmount::new(QUANTITY, SETTLEMENT_PRICE); + config_mocks(); + + util::borrow_loan(loan_1, PrincipalInput::External(amount.clone())); + + advance_time(YEAR / 2); + + const MARKET_PRICE_VALUE: Balance = 999; + MockPrices::mock_collection(|_| { + Ok(MockDataCollection::new(|_| { + Ok((MARKET_PRICE_VALUE, BLOCK_TIME_MS)) + })) + }); + + update_portfolio(); + expected_portfolio(QUANTITY.saturating_mul_int(MARKET_PRICE_VALUE)); + + MockPrices::mock_collection(|pool_id| { + assert_eq!(*pool_id, POOL_A); + Ok(MockDataCollection::new(|_| Err(PRICE_ID_NO_FOUND))) + }); + + update_portfolio(); + expected_portfolio(QUANTITY.saturating_mul_int(SETTLEMENT_PRICE)); + + MockPrices::mock_collection(|_| { + Ok(MockDataCollection::new(|_| { + Ok((MARKET_PRICE_VALUE, BLOCK_TIME_MS)) + })) + }); + update_portfolio(); + expected_portfolio(QUANTITY.saturating_mul_int(MARKET_PRICE_VALUE)); + }); +} diff --git a/pallets/loans/src/tests/repay_loan.rs b/pallets/loans/src/tests/repay_loan.rs index 3e5fa8be08..87d88ba7c2 100644 --- a/pallets/loans/src/tests/repay_loan.rs +++ b/pallets/loans/src/tests/repay_loan.rs @@ -1,3 +1,5 @@ +use sp_arithmetic::traits::Saturating; + use super::*; pub fn config_mocks(deposit_amount: Balance) { @@ -270,6 +272,82 @@ fn with_more_than_required() { }); } +#[test] +fn with_more_than_required_external() { + new_test_ext().execute_with(|| { + let variation = Rate::one(); + let mut pricing = util::base_external_pricing(); + pricing.max_price_variation = variation; + let mut info = util::base_external_loan(); + info.pricing = Pricing::External(pricing); + + let loan_id = util::create_loan(info); + let amount = ExternalAmount::new(QUANTITY, PRICE_VALUE); + util::borrow_loan(loan_id, PrincipalInput::External(amount)); + + let amount = ExternalAmount::new( + QUANTITY.saturating_mul(Quantity::from_rational(2, 1)), + PRICE_VALUE + variation.checked_mul_int(PRICE_VALUE).unwrap(), + ); + config_mocks_with_price(amount.balance().unwrap(), PRICE_VALUE); + + assert_noop!( + Loans::repay( + RuntimeOrigin::signed(BORROWER), + POOL_A, + loan_id, + RepaidInput { + principal: PrincipalInput::External(amount), + interest: 0, + unscheduled: 0, + }, + ), + Error::::from(RepayLoanError::MaxPrincipalAmountExceeded) + ); + + let amount = ExternalAmount::new(QUANTITY, PRICE_VALUE * 2); + config_mocks_with_price(amount.balance().unwrap(), PRICE_VALUE); + + assert_ok!(Loans::repay( + RuntimeOrigin::signed(BORROWER), + POOL_A, + loan_id, + RepaidInput { + principal: PrincipalInput::External(amount.clone()), + interest: 0, + unscheduled: 0, + }, + )); + + config_mocks_with_price(0, PRICE_VALUE); + assert_noop!( + Loans::repay( + RuntimeOrigin::signed(BORROWER), + POOL_A, + loan_id, + RepaidInput { + principal: PrincipalInput::External(amount), + interest: 0, + unscheduled: 0, + } + ), + Error::::from(RepayLoanError::MaxPrincipalAmountExceeded) + ); + + MockPrices::mock_unregister_id(move |id, pool_id| { + assert_eq!(*pool_id, POOL_A); + assert_eq!(*id, REGISTER_PRICE_ID); + Ok(()) + }); + + assert_ok!(Loans::close( + RuntimeOrigin::signed(BORROWER), + POOL_A, + loan_id, + )); + }); +} + #[test] fn with_restriction_full_once() { new_test_ext().execute_with(|| { @@ -823,3 +901,80 @@ fn with_unregister_price_id_and_oracle_not_required() { ); }); } + +#[test] +fn with_external_pricing() { + new_test_ext().execute_with(|| { + let loan_id = util::create_loan(LoanInfo { + pricing: Pricing::External(ExternalPricing { + price_id: UNREGISTER_PRICE_ID, + ..util::base_external_pricing() + }), + ..util::base_external_loan() + }); + + let amount = ExternalAmount::new(QUANTITY, PRICE_VALUE); + util::borrow_loan(loan_id, PrincipalInput::External(amount)); + + let amount = ExternalAmount::new(Quantity::one(), PRICE_VALUE); + config_mocks(amount.balance().unwrap()); + + let repay_amount = RepaidInput { + principal: PrincipalInput::External(amount), + interest: 0, + unscheduled: 0, + }; + + let current_price = || { + ActiveLoanInfo::try_from((POOL_A, util::get_loan(loan_id))) + .unwrap() + .current_price + .unwrap() + }; + + // Repay and check time without advance time + assert_ok!(Loans::repay( + RuntimeOrigin::signed(BORROWER), + POOL_A, + loan_id, + repay_amount.clone() + )); + assert_eq!(current_price(), PRICE_VALUE); + + // In the middle of the line + advance_time(YEAR / 2); + assert_eq!(current_price(), PRICE_VALUE + (NOTIONAL - PRICE_VALUE) / 2); + + // BEFORE: the loan not yet overdue + advance_time(YEAR / 2 - DAY); + assert_ok!(Loans::repay( + RuntimeOrigin::signed(BORROWER), + POOL_A, + loan_id, + repay_amount.clone() + )); + assert!(current_price() < NOTIONAL); + + // EXACT: the loan is just at matuyrity date + advance_time(DAY); + + assert_ok!(Loans::repay( + RuntimeOrigin::signed(BORROWER), + POOL_A, + loan_id, + repay_amount.clone() + )); + assert_eq!(current_price(), NOTIONAL); + + // AFTER: the loan overpassing maturity date + advance_time(DAY); + + assert_ok!(Loans::repay( + RuntimeOrigin::signed(BORROWER), + POOL_A, + loan_id, + repay_amount.clone() + )); + assert_eq!(current_price(), NOTIONAL); + }); +} diff --git a/pallets/loans/src/tests/util.rs b/pallets/loans/src/tests/util.rs index 086d4c6a3a..a089150882 100644 --- a/pallets/loans/src/tests/util.rs +++ b/pallets/loans/src/tests/util.rs @@ -110,6 +110,7 @@ pub fn base_external_pricing() -> ExternalPricing { max_borrow_amount: ExtMaxBorrowAmount::Quantity(QUANTITY), notional: NOTIONAL, max_price_variation: MAX_PRICE_VARIATION, + with_linear_pricing: true, } } diff --git a/pallets/pool-registry/src/mock.rs b/pallets/pool-registry/src/mock.rs index 895ff43d84..dd8915028a 100644 --- a/pallets/pool-registry/src/mock.rs +++ b/pallets/pool-registry/src/mock.rs @@ -30,10 +30,10 @@ use cfg_types::{ }; use frame_support::{ derive_impl, - dispatch::DispatchResult, + dispatch::{DispatchResult, RawOrigin}, pallet_prelude::DispatchError, parameter_types, - traits::{Contains, Hooks, PalletInfoAccess, SortedMembers}, + traits::{Contains, EnsureOriginWithArg, Hooks, PalletInfoAccess, SortedMembers}, PalletId, }; use frame_system::EnsureSigned; @@ -115,7 +115,22 @@ impl cfg_test_utils::mocks::nav::Config for Test { type PoolId = PoolId; } +pub struct All; +impl EnsureOriginWithArg for All { + type Success = (); + + fn try_origin(_: RuntimeOrigin, _: &PoolId) -> Result { + Ok(()) + } + + #[cfg(feature = "runtime-benchmarks")] + fn try_successful_origin(_: &PoolId) -> Result { + Ok(RawOrigin::Root.into()) + } +} + impl pallet_pool_system::Config for Test { + type AdminOrigin = All; type AssetRegistry = RegistryMock; type AssetsUnderManagementNAV = FakeNav; type Balance = Balance; diff --git a/pallets/pool-system/src/benchmarking.rs b/pallets/pool-system/src/benchmarking.rs index 96996f3036..086a24cd45 100644 --- a/pallets/pool-system/src/benchmarking.rs +++ b/pallets/pool-system/src/benchmarking.rs @@ -73,12 +73,10 @@ benchmarks! { let m in 0..T::PoolFees::get_max_fees_per_bucket(); let admin: T::AccountId = create_admin::(0); - let caller: T::AccountId = create_admin::(1); let max_reserve = MAX_RESERVE / 2; prepare_asset_registry::(); create_pool::(1, m, admin.clone())?; - set_liquidity_admin::(caller.clone())?; - }: set_max_reserve(RawOrigin::Signed(caller), POOL, max_reserve) + }: set_max_reserve(RawOrigin::Signed(admin), POOL, max_reserve) verify { assert_eq!(get_pool::().reserve.max, max_reserve); } @@ -125,9 +123,9 @@ benchmarks! { let admin: T::AccountId = create_admin::(0); prepare_asset_registry::(); create_pool::(n, m, admin.clone())?; - T::AssetsUnderManagementNAV::initialise(RawOrigin::Signed(admin.clone()).into(), POOL, 0.into())?; unrestrict_epoch_close::(); + let investment = MAX_RESERVE / 2; let investor = create_investor::(0, TRANCHE, None)?; let origin = RawOrigin::Signed(investor.clone()).into(); @@ -176,7 +174,6 @@ benchmarks! { let admin: T::AccountId = create_admin::(0); prepare_asset_registry::(); create_pool::(n, m, admin.clone())?; - T::AssetsUnderManagementNAV::initialise(RawOrigin::Signed(admin.clone()).into(), POOL, 0.into())?; unrestrict_epoch_close::(); @@ -293,13 +290,14 @@ where fn set_liquidity_admin>(target: T::AccountId) -> DispatchResult where - T::Permission: Permissions, + T::Permission: Permissions, { T::Permission::add( PermissionScope::Pool(POOL), target, Role::PoolRole(PoolRole::LiquidityAdmin), ) + .map(|_| ()) } pub fn create_pool(num_tranches: u32, num_pool_fees: u32, caller: T::AccountId) -> DispatchResult @@ -314,7 +312,7 @@ where let tranches = build_bench_input_tranches::(num_tranches); Pallet::::create( caller.clone(), - caller, + caller.clone(), POOL, tranches, AUSD_CURRENCY_ID, @@ -323,7 +321,8 @@ where .into_iter() .map(|fee| (PoolFeeBucket::Top, fee)) .collect(), - ) + )?; + set_liquidity_admin::(caller) } pub fn update_pool>( diff --git a/pallets/pool-system/src/lib.rs b/pallets/pool-system/src/lib.rs index 7a949ed3bc..cf4bba7567 100644 --- a/pallets/pool-system/src/lib.rs +++ b/pallets/pool-system/src/lib.rs @@ -184,7 +184,7 @@ pub mod pallet { use frame_support::{ pallet_prelude::*, sp_runtime::traits::Convert, - traits::{tokens::Preservation, Contains}, + traits::{tokens::Preservation, Contains, EnsureOriginWithArg}, PalletId, }; use sp_runtime::{traits::BadOrigin, ArithmeticError}; @@ -195,6 +195,8 @@ pub mod pallet { pub trait Config: frame_system::Config { type RuntimeEvent: From> + IsType<::RuntimeEvent>; + type AdminOrigin: EnsureOriginWithArg; + type Balance: Member + Parameter + AtLeast32BitUnsigned @@ -613,7 +615,7 @@ pub mod pallet { #[transactional] #[pallet::call_index(1)] pub fn close_epoch(origin: OriginFor, pool_id: T::PoolId) -> DispatchResultWithPostInfo { - ensure_signed(origin)?; + T::AdminOrigin::ensure_origin(origin, &pool_id)?; Pool::::try_mutate(pool_id, |pool| { let pool = pool.as_mut().ok_or(Error::::NoSuchPool)?; @@ -876,7 +878,7 @@ pub mod pallet { origin: OriginFor, pool_id: T::PoolId, ) -> DispatchResultWithPostInfo { - ensure_signed(origin)?; + T::AdminOrigin::ensure_origin(origin, &pool_id)?; EpochExecution::::try_mutate(pool_id, |epoch_info| { let epoch = epoch_info diff --git a/pallets/pool-system/src/mock.rs b/pallets/pool-system/src/mock.rs index c1d18709fc..6955679adb 100644 --- a/pallets/pool-system/src/mock.rs +++ b/pallets/pool-system/src/mock.rs @@ -27,8 +27,10 @@ use cfg_types::{ tokens::{CurrencyId, CustomMetadata, TrancheCurrency}, }; use frame_support::{ - assert_ok, derive_impl, parameter_types, - traits::{Contains, Hooks, PalletInfoAccess, SortedMembers}, + assert_ok, derive_impl, + dispatch::RawOrigin, + parameter_types, + traits::{Contains, EnsureOriginWithArg, Hooks, PalletInfoAccess, SortedMembers}, Blake2_128, PalletId, StorageHasher, }; use frame_system::{EnsureSigned, EnsureSignedBy}; @@ -37,11 +39,8 @@ use pallet_pool_fees::PoolFeeInfoOf; use pallet_restricted_tokens::TransferDetails; use parity_scale_codec::Encode; use sp_arithmetic::FixedPointNumber; -use sp_core::H256; -use sp_runtime::{ - traits::{ConstU128, Zero}, - BuildStorage, -}; +use sp_core::{ConstU128, H256}; +use sp_runtime::{traits::Zero, BuildStorage}; use sp_std::marker::PhantomData; use crate::{ @@ -385,7 +384,22 @@ parameter_types! { pub const PoolDeposit: Balance = 1 * CURRENCY; } +pub struct All; +impl EnsureOriginWithArg for All { + type Success = (); + + fn try_origin(_: RuntimeOrigin, _: &PoolId) -> Result { + Ok(()) + } + + #[cfg(feature = "runtime-benchmarks")] + fn try_successful_origin(_: &PoolId) -> Result { + Ok(RawOrigin::Root.into()) + } +} + impl Config for Runtime { + type AdminOrigin = All; type AssetRegistry = RegistryMock; type AssetsUnderManagementNAV = FakeNav; type Balance = Balance; diff --git a/pallets/pool-system/src/tests/mod.rs b/pallets/pool-system/src/tests/mod.rs index 6f25a25a24..077dd0e501 100644 --- a/pallets/pool-system/src/tests/mod.rs +++ b/pallets/pool-system/src/tests/mod.rs @@ -506,7 +506,7 @@ fn pool_constraints_pass() { #[test] fn epoch() { new_test_ext().execute_with(|| { - let pool_owner = 2_u64; + let pool_owner = DEFAULT_POOL_OWNER; let pool_owner_origin = RuntimeOrigin::signed(pool_owner); let borrower = 3; @@ -744,7 +744,7 @@ fn epoch() { #[test] fn submission_period() { new_test_ext().execute_with(|| { - let pool_owner = 2_u64; + let pool_owner = DEFAULT_POOL_OWNER; let pool_owner_origin = RuntimeOrigin::signed(pool_owner); // Initialize pool with initial investments @@ -932,7 +932,7 @@ fn submission_period() { #[test] fn execute_info_removed_after_epoch_execute() { new_test_ext().execute_with(|| { - let pool_owner = 2_u64; + let pool_owner = DEFAULT_POOL_OWNER; let pool_owner_origin = RuntimeOrigin::signed(pool_owner); // Initialize pool with initial investments @@ -1021,7 +1021,7 @@ fn execute_info_removed_after_epoch_execute() { #[test] fn pool_updates_should_be_constrained() { new_test_ext().execute_with(|| { - let pool_owner = 0_u64; + let pool_owner = DEFAULT_POOL_OWNER; let pool_owner_origin = RuntimeOrigin::signed(pool_owner); let pool_id = 0; @@ -1556,7 +1556,7 @@ fn valid_tranche_structure_is_enforced() { #[test] fn triger_challange_period_with_zero_solution() { new_test_ext().execute_with(|| { - let pool_owner = 2_u64; + let pool_owner = DEFAULT_POOL_OWNER; let pool_owner_origin = RuntimeOrigin::signed(pool_owner); // Initialize pool with initial investments @@ -1650,7 +1650,7 @@ fn triger_challange_period_with_zero_solution() { #[test] fn min_challenge_time_is_respected() { new_test_ext().execute_with(|| { - let pool_owner = 2_u64; + let pool_owner = DEFAULT_POOL_OWNER; let pool_owner_origin = RuntimeOrigin::signed(pool_owner); // Initialize pool with initial investments @@ -1747,7 +1747,7 @@ fn min_challenge_time_is_respected() { #[test] fn only_zero_solution_is_accepted_max_reserve_violated() { new_test_ext().execute_with(|| { - let pool_owner = 2_u64; + let pool_owner = DEFAULT_POOL_OWNER; let pool_owner_origin = RuntimeOrigin::signed(pool_owner); // Initialize pool with initial investments @@ -1948,7 +1948,7 @@ fn only_zero_solution_is_accepted_max_reserve_violated() { #[test] fn only_zero_solution_is_accepted_when_risk_buff_violated_else() { new_test_ext().execute_with(|| { - let pool_owner = 2_u64; + let pool_owner = DEFAULT_POOL_OWNER; let pool_owner_origin = RuntimeOrigin::signed(pool_owner); // Initialize pool with initial investments @@ -2138,7 +2138,7 @@ fn only_zero_solution_is_accepted_when_risk_buff_violated_else() { #[test] fn only_usd_as_pool_currency_allowed() { new_test_ext().execute_with(|| { - let pool_owner = 2_u64; + let pool_owner = DEFAULT_POOL_OWNER; // Initialize pool with initial investments let senior_interest_rate = Rate::saturating_from_rational(10, 100) @@ -2331,7 +2331,7 @@ fn creation_takes_deposit() { // Pool creation one: // Owner 2, first deposit // total deposit for this owner is 1 - let pool_owner = 2_u64; + let pool_owner = DEFAULT_POOL_OWNER; assert_ok!(PoolSystem::create( pool_owner.clone(), @@ -2742,7 +2742,6 @@ mod pool_fees { use super::*; use crate::{mock::default_pool_fees, Event}; - const POOL_OWNER: AccountId = 2; const INVESTMENT_AMOUNT: Balance = DEFAULT_POOL_MAX_RESERVE / 10; const NAV_AMOUNT: Balance = INVESTMENT_AMOUNT / 2 + 2_345_000; const FEE_AMOUNT_FIXED: Balance = NAV_AMOUNT / 10; @@ -2761,8 +2760,8 @@ mod pool_fees { let senior_interest_rate = interest_rate / Rate::saturating_from_integer(SECONDS_PER_YEAR) + One::one(); assert_ok!(PoolSystem::create( - POOL_OWNER, - POOL_OWNER, + DEFAULT_POOL_OWNER, + DEFAULT_POOL_OWNER, DEFAULT_POOL_ID, vec![ TrancheInput { @@ -2872,11 +2871,11 @@ mod pool_fees { INVESTMENT_AMOUNT )); assert_ok!(PoolSystem::close_epoch( - RuntimeOrigin::signed(POOL_OWNER), + RuntimeOrigin::signed(DEFAULT_POOL_OWNER), 0 )); assert_ok!(PoolSystem::submit_solution( - RuntimeOrigin::signed(POOL_OWNER), + RuntimeOrigin::signed(DEFAULT_POOL_OWNER), DEFAULT_POOL_ID, vec![ TrancheSolution { @@ -2892,7 +2891,7 @@ mod pool_fees { // Execute epoch 1 should reduce reserve due to redemption assert_ok!(PoolSystem::execute_epoch( - RuntimeOrigin::signed(POOL_OWNER), + RuntimeOrigin::signed(DEFAULT_POOL_OWNER), DEFAULT_POOL_ID )); assert!(!EpochExecution::::contains_key(DEFAULT_POOL_ID)); @@ -2920,7 +2919,7 @@ mod pool_fees { // Closing epoch 2 should not change anything but reserve.available next_block(); assert_ok!(PoolSystem::close_epoch( - RuntimeOrigin::signed(POOL_OWNER), + RuntimeOrigin::signed(DEFAULT_POOL_OWNER), 0 )); assert_eq!( @@ -3003,7 +3002,7 @@ mod pool_fees { )); next_block(); assert_ok!(PoolSystem::close_epoch( - RuntimeOrigin::signed(POOL_OWNER), + RuntimeOrigin::signed(DEFAULT_POOL_OWNER), 0 )); assert_eq!( @@ -3056,7 +3055,7 @@ mod pool_fees { // Executing epoch should reduce FeeNav by disbursement and transfer from // PoolFees account to destination assert_ok!(PoolSystem::submit_solution( - RuntimeOrigin::signed(POOL_OWNER), + RuntimeOrigin::signed(DEFAULT_POOL_OWNER), DEFAULT_POOL_ID, vec![ TrancheSolution { @@ -3070,7 +3069,7 @@ mod pool_fees { ] )); assert_ok!(PoolSystem::execute_epoch( - RuntimeOrigin::signed(POOL_OWNER), + RuntimeOrigin::signed(DEFAULT_POOL_OWNER), DEFAULT_POOL_ID )); assert!(!EpochExecution::::contains_key(DEFAULT_POOL_ID)); @@ -3105,7 +3104,7 @@ mod pool_fees { next_block(); test_nav_up(DEFAULT_POOL_ID, new_nav_amount - NAV_AMOUNT); assert_ok!(PoolSystem::close_epoch( - RuntimeOrigin::signed(POOL_OWNER), + RuntimeOrigin::signed(DEFAULT_POOL_OWNER), 0 )); @@ -3158,7 +3157,7 @@ mod pool_fees { // NAV = 0 + AUM - PoolFeesNAV = -AUM assert_ok!(PoolSystem::close_epoch( - RuntimeOrigin::signed(POOL_OWNER), + RuntimeOrigin::signed(DEFAULT_POOL_OWNER), 0 )); assert!(System::events().iter().any(|e| match e.event { @@ -3227,7 +3226,7 @@ mod pool_fees { // Closing should update fee nav next_block(); assert_ok!(PoolSystem::close_epoch( - RuntimeOrigin::signed(POOL_OWNER), + RuntimeOrigin::signed(DEFAULT_POOL_OWNER), 0 )); let fee_amount_from_charge = @@ -3259,7 +3258,7 @@ mod pool_fees { // Executin should reduce fee_nav by disbursement and transfer assert_ok!(PoolSystem::submit_solution( - RuntimeOrigin::signed(POOL_OWNER), + RuntimeOrigin::signed(DEFAULT_POOL_OWNER), DEFAULT_POOL_ID, vec![ TrancheSolution { @@ -3273,7 +3272,7 @@ mod pool_fees { ] )); assert_ok!(PoolSystem::execute_epoch( - RuntimeOrigin::signed(POOL_OWNER), + RuntimeOrigin::signed(DEFAULT_POOL_OWNER), DEFAULT_POOL_ID )); assert_eq!( @@ -3345,7 +3344,7 @@ mod pool_fees { // Closing should update fee nav next_block(); assert_ok!(PoolSystem::close_epoch( - RuntimeOrigin::signed(POOL_OWNER), + RuntimeOrigin::signed(DEFAULT_POOL_OWNER), 0 )); assert_eq!( @@ -3362,7 +3361,7 @@ mod pool_fees { // by fees assert_noop!( PoolSystem::submit_solution( - RuntimeOrigin::signed(POOL_OWNER), + RuntimeOrigin::signed(DEFAULT_POOL_OWNER), DEFAULT_POOL_ID, vec![ TrancheSolution { @@ -3378,7 +3377,7 @@ mod pool_fees { Error::::InsufficientCurrency ); assert_ok!(PoolSystem::submit_solution( - RuntimeOrigin::signed(POOL_OWNER), + RuntimeOrigin::signed(DEFAULT_POOL_OWNER), DEFAULT_POOL_ID, vec![ TrancheSolution { @@ -3392,7 +3391,7 @@ mod pool_fees { ] )); assert_ok!(PoolSystem::execute_epoch( - RuntimeOrigin::signed(POOL_OWNER), + RuntimeOrigin::signed(DEFAULT_POOL_OWNER), DEFAULT_POOL_ID )); assert_pending_fees(DEFAULT_POOL_ID, fees.clone(), vec![(fee_nav, 0, None)]); diff --git a/runtime/altair/src/lib.rs b/runtime/altair/src/lib.rs index 0a3e278011..f10ab5d54a 100644 --- a/runtime/altair/src/lib.rs +++ b/runtime/altair/src/lib.rs @@ -1419,6 +1419,7 @@ parameter_types! { } impl pallet_pool_system::Config for Runtime { + type AdminOrigin = runtime_common::pool::LiquidityAndPoolAdminOrRoot; type AssetRegistry = OrmlAssetRegistry; type AssetsUnderManagementNAV = Loans; type Balance = Balance; diff --git a/runtime/centrifuge/src/lib.rs b/runtime/centrifuge/src/lib.rs index 5b81a46983..44c518f855 100644 --- a/runtime/centrifuge/src/lib.rs +++ b/runtime/centrifuge/src/lib.rs @@ -1427,6 +1427,7 @@ impl pallet_pool_registry::Config for Runtime { } impl pallet_pool_system::Config for Runtime { + type AdminOrigin = runtime_common::pool::LiquidityAndPoolAdminOrRoot; type AssetRegistry = OrmlAssetRegistry; type AssetsUnderManagementNAV = Loans; type Balance = Balance; diff --git a/runtime/centrifuge/src/migrations.rs b/runtime/centrifuge/src/migrations.rs index ae20500a12..7bba719806 100644 --- a/runtime/centrifuge/src/migrations.rs +++ b/runtime/centrifuge/src/migrations.rs @@ -18,4 +18,5 @@ pub type UpgradeCentrifuge1029 = ( runtime_common::migrations::increase_storage_version::Migration, runtime_common::migrations::increase_storage_version::Migration, pallet_collator_selection::migration::v1::MigrateToV1, + runtime_common::migrations::loans::AddWithLinearPricing, ); diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 673b2bb54d..ebc4227130 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -23,6 +23,7 @@ pub mod fees; pub mod gateway; pub mod migrations; pub mod oracle; +pub mod pool; pub mod remarks; pub mod transfer_filter; pub mod xcm; @@ -112,12 +113,9 @@ where >, { let input_prices: PriceCollectionInput = - if let Ok(prices) = pallet_loans::Pallet::::registered_prices(pool_id) { - PriceCollectionInput::Custom(prices.try_into().map_err(|_| { - DispatchError::Other("Map expected to fit as it is coming from loans itself.") - })?) - } else { - PriceCollectionInput::Empty + match pallet_loans::Pallet::::registered_prices(pool_id) { + Ok(_) => PriceCollectionInput::FromRegistry, + Err(_) => PriceCollectionInput::Empty, }; update_nav_with_input::(pool_id, input_prices) diff --git a/runtime/common/src/migrations/loans.rs b/runtime/common/src/migrations/loans.rs new file mode 100644 index 0000000000..7291ae00a5 --- /dev/null +++ b/runtime/common/src/migrations/loans.rs @@ -0,0 +1,194 @@ +// Copyright 2024 Centrifuge Foundation (centrifuge.io). +// +// This file is part of the Centrifuge chain project. +// Centrifuge is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version (see http://www.gnu.org/licenses). +// Centrifuge is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +use cfg_traits::PoolNAV; +#[cfg(feature = "try-runtime")] +use frame_support::pallet_prelude::{Decode, Encode}; +use frame_support::{ + pallet_prelude::StorageVersion, + traits::{Get, GetStorageVersion, OnRuntimeUpgrade}, + weights::Weight, +}; +use pallet_loans::{pallet::Pallet as Loans, Config}; +#[cfg(feature = "try-runtime")] +use sp_arithmetic::traits::SaturatedConversion; +#[cfg(feature = "try-runtime")] +use sp_runtime::TryRuntimeError; +use sp_std::vec::Vec; + +const LOG_PREFIX: &str = "LoansMigrationToV4:"; + +mod v3 { + use frame_support::{ + pallet_prelude::{OptionQuery, ValueQuery}, + storage_alias, Blake2_128Concat, BoundedVec, + }; + pub use pallet_loans::entities::loans::v3::{ + ActiveLoan, ClosedLoan as ClosedLoanV3, CreatedLoan as CreatedLoanV3, + }; + use pallet_loans::Config; + + use super::Loans; + + pub type ActiveLoansVec = + BoundedVec<(::LoanId, ActiveLoan), ::MaxActiveLoansPerPool>; + + #[storage_alias] + pub type ActiveLoans = StorageMap< + Loans, + Blake2_128Concat, + ::PoolId, + ActiveLoansVec, + ValueQuery, + >; + + #[storage_alias] + pub type CreatedLoan = StorageDoubleMap< + Loans, + Blake2_128Concat, + ::PoolId, + Blake2_128Concat, + ::LoanId, + CreatedLoanV3, + OptionQuery, + >; + + #[storage_alias] + pub type ClosedLoan = StorageDoubleMap< + Loans, + Blake2_128Concat, + ::PoolId, + Blake2_128Concat, + ::LoanId, + ClosedLoanV3, + OptionQuery, + >; +} + +pub struct AddWithLinearPricing(sp_std::marker::PhantomData); +impl OnRuntimeUpgrade for AddWithLinearPricing +where + T: Config, +{ + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, TryRuntimeError> { + assert_eq!( + Loans::::on_chain_storage_version(), + StorageVersion::new(3) + ); + + let created_loans: u64 = v3::CreatedLoan::::iter_keys().count().saturated_into(); + let closed_loans: u64 = v3::ClosedLoan::::iter_keys().count().saturated_into(); + let active_loans: u64 = v3::ActiveLoans::::iter_values() + .map(|v| v.len()) + .sum::() + .saturated_into(); + + log::info!("{LOG_PREFIX} Pre checks done!"); + + Ok((created_loans, active_loans, closed_loans).encode()) + } + + fn on_runtime_upgrade() -> Weight { + let mut weight = T::DbWeight::get().reads(1); + if Loans::::on_chain_storage_version() == StorageVersion::new(3) { + log::info!("{LOG_PREFIX} Starting migration v3 -> v4"); + + pallet_loans::CreatedLoan::::translate::, _>(|_, _, loan| { + weight.saturating_accrue(T::DbWeight::get().reads_writes(1, 1)); + Some(loan.migrate(true)) + }); + + pallet_loans::ClosedLoan::::translate::, _>(|_, _, loan| { + weight.saturating_accrue(T::DbWeight::get().reads_writes(1, 1)); + Some(loan.migrate(true)) + }); + + let mut changed_pools = Vec::new(); + pallet_loans::ActiveLoans::::translate::, _>( + |pool_id, active_loans| { + changed_pools.push(pool_id); + weight.saturating_accrue(T::DbWeight::get().reads_writes(1, 1)); + Some( + active_loans + .into_iter() + .map(|(loan_id, active_loan)| (loan_id, active_loan.migrate(true))) + .collect::>() + .try_into() + .expect("size doesn't not change, qed"), + ) + }, + ); + + for pool_id in &changed_pools { + match Loans::::update_nav(*pool_id) { + Ok(_) => log::info!("{LOG_PREFIX} updated portfolio for pool_id: {pool_id:?}"), + Err(e) => { + log::error!( + "{LOG_PREFIX} error updating the portfolio for {pool_id:?}: {e:?}" + ) + } + } + } + + Loans::::current_storage_version().put::>(); + + let count = changed_pools.len() as u64; + weight.saturating_accrue(T::DbWeight::get().reads_writes(count, count + 1)); + log::info!("{LOG_PREFIX} Migrated {} pools", count); + + weight + } else { + log::info!( + "{LOG_PREFIX} Migration to v4 did not execute. This probably should be removed" + ); + weight + } + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(pre_state: Vec) -> Result<(), TryRuntimeError> { + assert_eq!( + Loans::::on_chain_storage_version(), + StorageVersion::new(4) + ); + + let (pre_created, pre_active, pre_closed) = + <(u64, u64, u64)>::decode(&mut pre_state.as_slice()).expect("Pre state valid; qed"); + let post_created: u64 = pallet_loans::CreatedLoan::::iter_keys() + .count() + .saturated_into(); + let post_closed: u64 = pallet_loans::ClosedLoan::::iter_keys() + .count() + .saturated_into(); + let post_active: u64 = pallet_loans::ActiveLoans::::iter_values() + .map(|v| v.len()) + .sum::() + .saturated_into(); + assert_eq!( + pre_created, post_created, + "Number of CreatedLoans mismatches: pre {pre_created} vs post {post_created}" + ); + assert_eq!( + pre_closed, post_closed, + "Number of ClosedLoans mismatches: pre {pre_closed} vs post {post_closed}" + ); + assert_eq!( + pre_active, post_active, + "Number of ActiveLoans mismatches: pre {pre_active} vs post {post_active}" + ); + + log::info!("{LOG_PREFIX} Post checks done!"); + + Ok(()) + } +} diff --git a/runtime/common/src/migrations/mod.rs b/runtime/common/src/migrations/mod.rs index 8e8cee67f5..b4bbaa8069 100644 --- a/runtime/common/src/migrations/mod.rs +++ b/runtime/common/src/migrations/mod.rs @@ -13,6 +13,7 @@ //! Centrifuge Runtime-Common Migrations pub mod increase_storage_version; +pub mod loans; pub mod nuke; pub mod precompile_account_codes; diff --git a/runtime/common/src/pool.rs b/runtime/common/src/pool.rs new file mode 100644 index 0000000000..6ab2c8ccb9 --- /dev/null +++ b/runtime/common/src/pool.rs @@ -0,0 +1,59 @@ +// Copyright 2021 Centrifuge Foundation (centrifuge.io). +// This file is part of Centrifuge chain project. + +// Centrifuge is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version (see http://www.gnu.org/licenses). + +// Centrifuge is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +use cfg_traits::Permissions; +use cfg_types::permissions::{PermissionScope, PoolRole, Role}; +use frame_support::{dispatch::RawOrigin, traits::EnsureOriginWithArg}; + +pub struct LiquidityAndPoolAdminOrRoot(sp_std::marker::PhantomData); + +impl< + T: frame_system::Config + + pallet_permissions::Config< + Scope = PermissionScope, + Role = Role, + > + pallet_pool_system::Config, + > EnsureOriginWithArg for LiquidityAndPoolAdminOrRoot +{ + type Success = (); + + fn try_origin( + o: T::RuntimeOrigin, + pool_id: &T::PoolId, + ) -> Result { + o.into().and_then(|r| match r { + RawOrigin::Root => Ok(()), + RawOrigin::Signed(by) => { + if as Permissions>::has( + PermissionScope::Pool(*pool_id), + by.clone(), + Role::PoolRole(PoolRole::PoolAdmin), + ) || as Permissions>::has( + PermissionScope::Pool(*pool_id), + by.clone(), + Role::PoolRole(PoolRole::LiquidityAdmin), + ) { + Ok(()) + } else { + Err(RawOrigin::Signed(by).into()) + } + } + RawOrigin::None => Err(RawOrigin::None.into()), + }) + } + + #[cfg(feature = "runtime-benchmarks")] + fn try_successful_origin(_: &T::PoolId) -> Result { + Ok(RawOrigin::Root.into()) + } +} diff --git a/runtime/development/src/lib.rs b/runtime/development/src/lib.rs index 72d939c146..7649078801 100644 --- a/runtime/development/src/lib.rs +++ b/runtime/development/src/lib.rs @@ -1036,6 +1036,7 @@ parameter_types! { } impl pallet_pool_system::Config for Runtime { + type AdminOrigin = runtime_common::pool::LiquidityAndPoolAdminOrRoot; type AssetRegistry = OrmlAssetRegistry; type AssetsUnderManagementNAV = Loans; type Balance = Balance; diff --git a/runtime/development/src/migrations.rs b/runtime/development/src/migrations.rs index 105b1ac17e..0f3d1912b6 100644 --- a/runtime/development/src/migrations.rs +++ b/runtime/development/src/migrations.rs @@ -49,6 +49,7 @@ pub type UpgradeDevelopment1047 = ( CollatorReward, AnnualTreasuryInflationPercent, >, + runtime_common::migrations::loans::AddWithLinearPricing, ); mod cleanup_foreign_investments { diff --git a/runtime/integration-tests/src/generic/cases/loans.rs b/runtime/integration-tests/src/generic/cases/loans.rs index dc9aaac873..00c3cdfe63 100644 --- a/runtime/integration-tests/src/generic/cases/loans.rs +++ b/runtime/integration-tests/src/generic/cases/loans.rs @@ -165,6 +165,7 @@ mod common { max_borrow_amount: ExtMaxBorrowAmount::Quantity(QUANTITY), notional: currency::price_to_currency(PRICE_VALUE_A, Usd6), max_price_variation: rate_from_percent(50), + with_linear_pricing: true, }) } @@ -504,11 +505,17 @@ fn fake_oracle_portfolio_api() { ); // Updating the portfolio with custom prices will use the overriden prices - let collection = [(PRICE_A, common::price_to_usd6(PRICE_VALUE_C))] - .into_iter() - .collect::>() - .try_into() - .unwrap(); + let collection = [( + PRICE_A, + ( + common::price_to_usd6(PRICE_VALUE_C), + pallet_timestamp::Pallet::::now(), + ), + )] + .into_iter() + .collect::>() + .try_into() + .unwrap(); assert_ok!( T::Api::portfolio_valuation(POOL_A, PriceCollectionInput::Custom(collection)), diff --git a/runtime/integration-tests/src/generic/config.rs b/runtime/integration-tests/src/generic/config.rs index ffc587c207..30ec4ff1b0 100644 --- a/runtime/integration-tests/src/generic/config.rs +++ b/runtime/integration-tests/src/generic/config.rs @@ -91,6 +91,7 @@ pub trait Runtime: Rate = Rate, Quantity = Quantity, PriceId = OracleKey, + Moment = Millis, > + orml_tokens::Config + orml_asset_registry::Config< AssetId = CurrencyId, From c83591deac9b17886fdf69fe04d2d405727b89f1 Mon Sep 17 00:00:00 2001 From: Guillermo Perez Date: Fri, 24 May 2024 15:38:00 +0200 Subject: [PATCH 03/21] try fix docs deploy (#1839) Co-authored-by: William Freudenberger --- .github/workflows/deploy-docs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 4b572a56c6..52ee539c27 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -60,7 +60,9 @@ jobs: - name: upload Docs files uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0 with: + name: github-pages path: ./target/doc + retention-days: 1 - name: Deploy Docs # if: github.ref == 'refs/heads/main' From a68b1d8bc45c658931087668a0a179db06cc4b77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Enrique=20Mu=C3=B1oz=20Mart=C3=ADn?= Date: Mon, 27 May 2024 12:19:40 +0200 Subject: [PATCH 04/21] IT: Add test_runtimes macro to liquidity_pools tests (#1845) * add test_runtimes macro to liquidity_pools tests * deprecate old macro usage --- .../integration-tests/procedural/src/lib.rs | 2 +- .../src/generic/cases/liquidity_pools.rs | 203 ++++++++---------- .../src/generic/envs/fudge_env.rs | 3 +- .../src/generic/envs/runtime_env.rs | 5 +- runtime/integration-tests/src/generic/mod.rs | 30 +-- 5 files changed, 93 insertions(+), 150 deletions(-) diff --git a/runtime/integration-tests/procedural/src/lib.rs b/runtime/integration-tests/procedural/src/lib.rs index 5eb07d3698..da8252ffd9 100644 --- a/runtime/integration-tests/procedural/src/lib.rs +++ b/runtime/integration-tests/procedural/src/lib.rs @@ -52,7 +52,7 @@ pub fn test_runtimes(args: TokenStream, input: TokenStream) -> TokenStream { let func_name = &func.sig.ident; quote! { - crate::test_for_runtimes!(#args, #func_name); + crate::__test_for_runtimes!(#args, #func_name); #func } .into() diff --git a/runtime/integration-tests/src/generic/cases/liquidity_pools.rs b/runtime/integration-tests/src/generic/cases/liquidity_pools.rs index 32ea52b414..e403b70ed9 100644 --- a/runtime/integration-tests/src/generic/cases/liquidity_pools.rs +++ b/runtime/integration-tests/src/generic/cases/liquidity_pools.rs @@ -867,6 +867,7 @@ mod development { use super::*; + #[test_runtimes([development])] fn add_pool() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -916,6 +917,7 @@ mod development { }); } + #[test_runtimes([development])] fn add_tranche() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -987,6 +989,7 @@ mod development { }); } + #[test_runtimes([development])] fn update_member() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -1071,6 +1074,7 @@ mod development { }); } + #[test_runtimes([development])] fn update_token_price() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -1102,6 +1106,7 @@ mod development { }); } + #[test_runtimes([development])] fn add_currency() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -1176,6 +1181,7 @@ mod development { .expect("expected RouterExecutionSuccess event"); } + #[test_runtimes([development])] fn add_currency_should_fail() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -1305,6 +1311,7 @@ mod development { }); } + #[test_runtimes([development])] fn allow_investment_currency() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -1369,6 +1376,7 @@ mod development { }); } + #[test_runtimes([development])] fn allow_investment_currency_should_fail() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -1498,6 +1506,7 @@ mod development { }); } + #[test_runtimes([development])] fn disallow_investment_currency() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -1562,6 +1571,7 @@ mod development { }); } + #[test_runtimes([development])] fn disallow_investment_currency_should_fail() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -1691,6 +1701,7 @@ mod development { }); } + #[test_runtimes([development])] fn schedule_upgrade() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -1724,6 +1735,7 @@ mod development { }); } + #[test_runtimes([development])] fn cancel_upgrade() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -1757,6 +1769,7 @@ mod development { }); } + #[test_runtimes([development])] fn update_tranche_token_metadata() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -1816,20 +1829,6 @@ mod development { ); }); } - - crate::test_for_runtimes!([development], add_pool); - crate::test_for_runtimes!([development], add_tranche); - crate::test_for_runtimes!([development], update_member); - crate::test_for_runtimes!([development], update_token_price); - crate::test_for_runtimes!([development], add_currency); - crate::test_for_runtimes!([development], add_currency_should_fail); - crate::test_for_runtimes!([development], allow_investment_currency); - crate::test_for_runtimes!([development], allow_investment_currency_should_fail); - crate::test_for_runtimes!([development], disallow_investment_currency); - crate::test_for_runtimes!([development], disallow_investment_currency_should_fail); - crate::test_for_runtimes!([development], schedule_upgrade); - crate::test_for_runtimes!([development], cancel_upgrade); - crate::test_for_runtimes!([development], update_tranche_token_metadata); } mod foreign_investments { @@ -1838,6 +1837,7 @@ mod development { mod same_currencies { use super::*; + #[test_runtimes([development])] fn increase_invest_order() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -1894,6 +1894,7 @@ mod development { }); } + #[test_runtimes([development])] fn decrease_invest_order() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -1986,6 +1987,7 @@ mod development { }); } + #[test_runtimes([development])] fn cancel_invest_order() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -2085,6 +2087,7 @@ mod development { }); } + #[test_runtimes([development])] fn collect_invest_order() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -2236,6 +2239,7 @@ mod development { }); } + #[test_runtimes([development])] fn partially_collect_investment_for_through_investments() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -2468,6 +2472,7 @@ mod development { }); } + #[test_runtimes([development])] fn increase_redeem_order() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -2525,6 +2530,7 @@ mod development { }); } + #[test_runtimes([development])] fn decrease_redeem_order() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -2644,6 +2650,7 @@ mod development { }); } + #[test_runtimes([development])] fn cancel_redeem_order() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -2741,6 +2748,7 @@ mod development { }); } + #[test_runtimes([development])] fn fully_collect_redeem_order() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -2895,6 +2903,7 @@ mod development { }); } + #[test_runtimes([development])] fn partially_collect_redemption_for_through_investments() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -3098,29 +3107,13 @@ mod development { }); } - crate::test_for_runtimes!([development], increase_invest_order); - crate::test_for_runtimes!([development], decrease_invest_order); - crate::test_for_runtimes!([development], cancel_invest_order); - crate::test_for_runtimes!([development], collect_invest_order); - crate::test_for_runtimes!( - [development], - partially_collect_investment_for_through_investments - ); - crate::test_for_runtimes!([development], increase_redeem_order); - crate::test_for_runtimes!([development], decrease_redeem_order); - crate::test_for_runtimes!([development], cancel_redeem_order); - crate::test_for_runtimes!([development], fully_collect_redeem_order); - crate::test_for_runtimes!( - [development], - partially_collect_redemption_for_through_investments - ); - mod should_fail { use super::*; mod decrease_should_underflow { use super::*; + #[test_runtimes([development])] fn invest_decrease_underflow() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -3170,6 +3163,7 @@ mod development { }); } + #[test_runtimes([development])] fn redeem_decrease_underflow() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -3217,14 +3211,12 @@ mod development { ); }); } - - crate::test_for_runtimes!([development], invest_decrease_underflow); - crate::test_for_runtimes!([development], redeem_decrease_underflow); } mod should_throw_requires_collect { use super::*; + #[test_runtimes([development])] fn invest_requires_collect() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -3308,6 +3300,7 @@ mod development { }); } + #[test_runtimes([development])] fn redeem_requires_collect() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -3397,14 +3390,12 @@ mod development { ); }); } - - crate::test_for_runtimes!([development], invest_requires_collect); - crate::test_for_runtimes!([development], redeem_requires_collect); } mod payment_payout_currency { use super::*; + #[test_runtimes([development])] fn invalid_invest_payment_currency() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -3484,6 +3475,7 @@ mod development { }); } + #[test_runtimes([development])] fn invalid_redeem_payout_currency() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -3567,6 +3559,7 @@ mod development { }); } + #[test_runtimes([development])] fn redeem_payout_currency_not_found() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -3636,10 +3629,6 @@ mod development { ); }); } - - crate::test_for_runtimes!([development], invalid_invest_payment_currency); - crate::test_for_runtimes!([development], invalid_redeem_payout_currency); - crate::test_for_runtimes!([development], redeem_payout_currency_not_found); } } } @@ -3647,6 +3636,7 @@ mod development { mod mismatching_currencies { use super::*; + #[test_runtimes([development])] fn collect_foreign_investment_for() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -3764,6 +3754,7 @@ mod development { /// Invest in pool currency, then increase in allowed foreign /// currency, then decrease in same foreign currency multiple times. + #[test_runtimes([development])] fn increase_fulfill_increase_decrease_decrease_partial() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -3902,6 +3893,7 @@ mod development { /// Propagate swaps only via OrderBook fulfillments. /// /// Flow: Increase, fulfill, decrease, fulfill + #[test_runtimes([development])] fn invest_swaps_happy_path() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -4024,6 +4016,7 @@ mod development { }); } + #[test_runtimes([development])] fn increase_fulfill_decrease_fulfill_partial_increase() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -4123,23 +4116,13 @@ mod development { })); }); } - - crate::test_for_runtimes!([development], collect_foreign_investment_for); - crate::test_for_runtimes!( - [development], - increase_fulfill_increase_decrease_decrease_partial - ); - crate::test_for_runtimes!( - [development], - increase_fulfill_decrease_fulfill_partial_increase - ); - crate::test_for_runtimes!([development], invest_swaps_happy_path); } } mod transfers { use super::*; + #[test_runtimes([development])] fn transfer_non_tranche_tokens_from_local() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -4245,6 +4228,7 @@ mod development { }); } + #[test_runtimes([development])] fn transfer_non_tranche_tokens_to_local() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -4303,6 +4287,7 @@ mod development { }); } + #[test_runtimes([development])] fn transfer_tranche_tokens_from_local() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -4403,6 +4388,7 @@ mod development { }); } + #[test_runtimes([development])] fn transfer_tranche_tokens_to_local() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -4493,6 +4479,7 @@ mod development { /// Try to transfer tranches for non-existing pools or invalid tranche /// ids for existing pools. + #[test_runtimes([development])] fn transferring_invalid_tranche_tokens_should_fail() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -4667,6 +4654,7 @@ mod development { }); } + #[test_runtimes([development])] fn transfer_cfg_to_and_from_sibling() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -4752,16 +4740,6 @@ mod development { ); }); } - - crate::test_for_runtimes!([development], transfer_non_tranche_tokens_from_local); - crate::test_for_runtimes!([development], transfer_non_tranche_tokens_to_local); - crate::test_for_runtimes!([development], transfer_tranche_tokens_from_local); - crate::test_for_runtimes!([development], transfer_tranche_tokens_to_local); - crate::test_for_runtimes!( - [development], - transferring_invalid_tranche_tokens_should_fail - ); - crate::test_for_runtimes!([development], transfer_cfg_to_and_from_sibling); } mod routers { @@ -4772,6 +4750,7 @@ mod development { use super::*; + #[test_runtimes([development])] fn test_via_outbound_queue() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -4925,8 +4904,6 @@ mod development { ); }); } - - crate::test_for_runtimes!([development], test_via_outbound_queue); } mod ethereum_xcm { @@ -5079,22 +5056,22 @@ mod development { const TEST_DOMAIN: Domain = Domain::EVM(1); + #[test_runtimes([development])] fn submit_ethereum_xcm() { submit_test_fn::(get_ethereum_xcm_router_fn::()); } + #[test_runtimes([development])] fn submit_axelar_xcm() { submit_test_fn::(get_axelar_xcm_router_fn::()); } - - crate::test_for_runtimes!([development], submit_ethereum_xcm); - crate::test_for_runtimes!([development], submit_axelar_xcm); } } mod gateway { use super::*; + #[test_runtimes([development])] fn set_domain_router() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -5164,6 +5141,7 @@ mod development { }); } + #[test_runtimes([development])] fn add_remove_instances() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -5220,6 +5198,7 @@ mod development { }); } + #[test_runtimes([development])] fn process_msg() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -5274,10 +5253,6 @@ mod development { ); }); } - - crate::test_for_runtimes!([development], set_domain_router); - crate::test_for_runtimes!([development], add_remove_instances); - crate::test_for_runtimes!([development], process_msg); } } @@ -5489,6 +5464,7 @@ mod altair { }); } + #[test_runtimes([altair])] fn test_air_transfers_to_and_from_sibling() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -5567,6 +5543,7 @@ mod altair { }); } + #[test_runtimes([altair])] fn transfer_ausd_to_altair() { let mut env = FudgeEnv::::default(); @@ -5726,6 +5703,7 @@ mod altair { }); } + #[test_runtimes([altair])] fn transfer_ksm_to_and_from_relay_chain() { let mut env = FudgeEnv::::default(); @@ -5785,6 +5763,7 @@ mod altair { }); } + #[test_runtimes([altair])] fn transfer_foreign_sibling_to_altair() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -5892,6 +5871,7 @@ mod altair { }); } + #[test_runtimes([altair])] fn transfer_wormhole_usdc_karura_to_altair() { let mut env = FudgeEnv::::from_storage( Default::default(), @@ -5993,17 +5973,12 @@ mod altair { assert_eq!(bob_balance, 11993571); }); } - - crate::test_for_runtimes!([altair], test_air_transfers_to_and_from_sibling); - crate::test_for_runtimes!([altair], transfer_ausd_to_altair); - crate::test_for_runtimes!([altair], transfer_ksm_to_and_from_relay_chain); - crate::test_for_runtimes!([altair], transfer_foreign_sibling_to_altair); - crate::test_for_runtimes!([altair], transfer_wormhole_usdc_karura_to_altair); } mod asset_registry { use super::*; + #[test_runtimes([altair])] fn register_air_works() { let mut env = FudgeEnv::::default(); @@ -6031,6 +6006,7 @@ mod altair { }); } + #[test_runtimes([altair])] fn register_foreign_asset_works() { let mut env = FudgeEnv::::default(); @@ -6062,6 +6038,7 @@ mod altair { } // Verify that registering tranche tokens is not allowed through extrinsics + #[test_runtimes([altair])] fn register_tranche_asset_blocked() { let mut env = FudgeEnv::::default(); @@ -6094,15 +6071,12 @@ mod altair { ); }); } - - crate::test_for_runtimes!([altair], register_air_works); - crate::test_for_runtimes!([altair], register_foreign_asset_works); - crate::test_for_runtimes!([altair], register_tranche_asset_blocked); } mod currency_id_convert { use super::*; + #[test_runtimes([altair])] fn convert_air() { let mut env = FudgeEnv::::default(); @@ -6139,6 +6113,7 @@ mod altair { /// Verify that Tranche tokens are not handled by the CurrencyIdConvert /// since we don't allow Tranche tokens to be transferable through XCM. + #[test_runtimes([altair])] fn convert_tranche() { let mut env = FudgeEnv::::default(); @@ -6172,6 +6147,7 @@ mod altair { }); } + #[test_runtimes([altair])] fn convert_ausd() { let mut env = FudgeEnv::::default(); @@ -6200,6 +6176,7 @@ mod altair { }); } + #[test_runtimes([altair])] fn convert_ksm() { let mut env = FudgeEnv::::default(); @@ -6220,6 +6197,7 @@ mod altair { }); } + #[test_runtimes([altair])] fn convert_unkown_multilocation() { let mut env = FudgeEnv::::default(); @@ -6233,6 +6211,7 @@ mod altair { }); } + #[test_runtimes([altair])] fn convert_unsupported_currency() { let mut env = FudgeEnv::::default(); @@ -6246,13 +6225,6 @@ mod altair { ) }); } - - crate::test_for_runtimes!([altair], convert_air); - crate::test_for_runtimes!([altair], convert_tranche); - crate::test_for_runtimes!([altair], convert_ausd); - crate::test_for_runtimes!([altair], convert_ksm); - crate::test_for_runtimes!([altair], convert_unkown_multilocation); - crate::test_for_runtimes!([altair], convert_unsupported_currency); } } @@ -6540,6 +6512,7 @@ mod centrifuge { mod asset_registry { use super::*; + #[test_runtimes([centrifuge])] fn register_cfg_works() { let mut env = FudgeEnv::::default(); @@ -6567,6 +6540,7 @@ mod centrifuge { }); } + #[test_runtimes([centrifuge])] fn register_foreign_asset_works() { let mut env = FudgeEnv::::default(); @@ -6598,6 +6572,7 @@ mod centrifuge { } // Verify that registering tranche tokens is not allowed through extrinsics + #[test_runtimes([centrifuge])] fn register_tranche_asset_blocked() { let mut env = FudgeEnv::::default(); @@ -6630,15 +6605,12 @@ mod centrifuge { ); }); } - - crate::test_for_runtimes!([centrifuge], register_cfg_works); - crate::test_for_runtimes!([centrifuge], register_foreign_asset_works); - crate::test_for_runtimes!([centrifuge], register_tranche_asset_blocked); } mod currency_id_convert { use super::*; + #[test_runtimes([centrifuge])] fn convert_cfg() { let mut env = FudgeEnv::::default(); @@ -6677,6 +6649,7 @@ mod centrifuge { /// Verify that even with CFG registered in the AssetRegistry with a XCM /// v2 MultiLocation, that `CurrencyIdConvert` can look it up given an /// identical location in XCM v3. + #[test_runtimes([centrifuge])] fn convert_cfg_xcm_v2() { let mut env = FudgeEnv::::default(); @@ -6715,6 +6688,7 @@ mod centrifuge { /// Verify that a registered token that is NOT XCM transferable is /// filtered out by CurrencyIdConvert as expected. + #[test_runtimes([centrifuge])] fn convert_no_xcm_token() { let mut env = FudgeEnv::::default(); @@ -6728,6 +6702,7 @@ mod centrifuge { }); } + #[test_runtimes([centrifuge])] fn convert_dot() { let mut env = FudgeEnv::::default(); @@ -6748,6 +6723,7 @@ mod centrifuge { }); } + #[test_runtimes([centrifuge])] fn convert_unknown_multilocation() { let mut env = FudgeEnv::::default(); @@ -6764,6 +6740,7 @@ mod centrifuge { }); } + #[test_runtimes([centrifuge])] fn convert_unsupported_currency() { let mut env = FudgeEnv::::default(); @@ -6777,13 +6754,6 @@ mod centrifuge { ) }); } - - crate::test_for_runtimes!([centrifuge], convert_cfg); - crate::test_for_runtimes!([centrifuge], convert_cfg_xcm_v2); - crate::test_for_runtimes!([centrifuge], convert_no_xcm_token); - crate::test_for_runtimes!([centrifuge], convert_dot); - crate::test_for_runtimes!([centrifuge], convert_unknown_multilocation); - crate::test_for_runtimes!([centrifuge], convert_unsupported_currency); } mod restricted_transfers { @@ -6818,6 +6788,7 @@ mod centrifuge { ); } + #[test_runtimes([centrifuge])] fn restrict_cfg_extrinsic() { let mut env = RuntimeEnv::::from_parachain_storage( Genesis::default() @@ -6884,6 +6855,7 @@ mod centrifuge { }); } + #[test_runtimes([centrifuge])] fn restrict_all() { let mut env = RuntimeEnv::::from_parachain_storage( Genesis::default() @@ -7013,6 +6985,7 @@ mod centrifuge { }); } + #[test_runtimes([centrifuge])] fn restrict_lp_eth_usdc_transfer() { let mut env = RuntimeEnv::::from_parachain_storage( Genesis::default() @@ -7103,6 +7076,7 @@ mod centrifuge { }); } + #[test_runtimes([centrifuge])] fn restrict_lp_eth_usdc_lp_transfer() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -7201,6 +7175,7 @@ mod centrifuge { }); } + #[test_runtimes([centrifuge])] fn restrict_usdc_transfer() { let mut env = RuntimeEnv::::from_parachain_storage( Genesis::default() @@ -7272,6 +7247,7 @@ mod centrifuge { }); } + #[test_runtimes([centrifuge])] fn restrict_usdc_xcm_transfer() { let mut env = FudgeEnv::::from_storage( paras::GenesisConfig::> { @@ -7390,6 +7366,7 @@ mod centrifuge { // transfer does not take place. } + #[test_runtimes([centrifuge])] fn restrict_dot_transfer() { let mut env = RuntimeEnv::::from_parachain_storage( Genesis::default() @@ -7477,6 +7454,7 @@ mod centrifuge { }); } + #[test_runtimes([centrifuge])] fn restrict_dot_xcm_transfer() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -7558,15 +7536,6 @@ mod centrifuge { ); }); } - - crate::test_for_runtimes!([centrifuge], restrict_lp_eth_usdc_transfer); - crate::test_for_runtimes!([centrifuge], restrict_lp_eth_usdc_lp_transfer); - crate::test_for_runtimes!([centrifuge], restrict_usdc_transfer); - crate::test_for_runtimes!([centrifuge], restrict_usdc_xcm_transfer); - crate::test_for_runtimes!([centrifuge], restrict_dot_transfer); - crate::test_for_runtimes!([centrifuge], restrict_dot_xcm_transfer); - crate::test_for_runtimes!([centrifuge], restrict_cfg_extrinsic); - crate::test_for_runtimes!([centrifuge], restrict_all); } mod transfers { @@ -7678,6 +7647,7 @@ mod centrifuge { }); } + #[test_runtimes([centrifuge])] fn test_cfg_transfers_to_and_from_sibling() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -7757,6 +7727,7 @@ mod centrifuge { }); } + #[test_runtimes([centrifuge])] fn transfer_ausd_to_centrifuge() { let mut env = FudgeEnv::::default(); @@ -7850,6 +7821,7 @@ mod centrifuge { }); } + #[test_runtimes([centrifuge])] fn transfer_dot_to_and_from_relay_chain() { let mut env = FudgeEnv::::default(); @@ -7900,6 +7872,7 @@ mod centrifuge { }); } + #[test_runtimes([centrifuge])] fn transfer_foreign_sibling_to_centrifuge() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -8008,6 +7981,7 @@ mod centrifuge { }); } + #[test_runtimes([centrifuge])] fn transfer_wormhole_usdc_acala_to_centrifuge() { let mut env = FudgeEnv::::from_storage( Default::default(), @@ -8107,12 +8081,6 @@ mod centrifuge { assert_eq!(bob_balance, 11993571); }); } - - crate::test_for_runtimes!([centrifuge], test_cfg_transfers_to_and_from_sibling); - crate::test_for_runtimes!([centrifuge], transfer_ausd_to_centrifuge); - crate::test_for_runtimes!([centrifuge], transfer_dot_to_and_from_relay_chain); - crate::test_for_runtimes!([centrifuge], transfer_foreign_sibling_to_centrifuge); - crate::test_for_runtimes!([centrifuge], transfer_wormhole_usdc_acala_to_centrifuge); } } @@ -8122,6 +8090,7 @@ mod all { mod restricted_calls { use super::*; + #[test_runtimes(all)] fn xtokens_transfer() { let mut env = FudgeEnv::::default(); @@ -8151,6 +8120,7 @@ mod all { }); } + #[test_runtimes(all)] fn xtokens_transfer_multiasset() { let mut env = FudgeEnv::::default(); @@ -8198,6 +8168,7 @@ mod all { }); } + #[test_runtimes(all)] fn xtokens_transfer_multiassets() { let mut env = FudgeEnv::::default(); @@ -8247,9 +8218,5 @@ mod all { ); }); } - - crate::test_for_runtimes!(all, xtokens_transfer); - crate::test_for_runtimes!(all, xtokens_transfer_multiasset); - crate::test_for_runtimes!(all, xtokens_transfer_multiassets); } } diff --git a/runtime/integration-tests/src/generic/envs/fudge_env.rs b/runtime/integration-tests/src/generic/envs/fudge_env.rs index ad7dc3dd60..fafa45e860 100644 --- a/runtime/integration-tests/src/generic/envs/fudge_env.rs +++ b/runtime/integration-tests/src/generic/envs/fudge_env.rs @@ -152,6 +152,7 @@ mod tests { use super::*; use crate::generic::{env::Blocks, utils::genesis::Genesis}; + #[test_runtimes(all)] fn correct_nonce_for_submit_later() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() @@ -181,6 +182,4 @@ mod tests { ) .unwrap(); } - - crate::test_for_runtimes!(all, correct_nonce_for_submit_later); } diff --git a/runtime/integration-tests/src/generic/envs/runtime_env.rs b/runtime/integration-tests/src/generic/envs/runtime_env.rs index 8b5720921b..1eb704939a 100644 --- a/runtime/integration-tests/src/generic/envs/runtime_env.rs +++ b/runtime/integration-tests/src/generic/envs/runtime_env.rs @@ -281,6 +281,7 @@ mod tests { use super::*; use crate::generic::{env::Blocks, utils::genesis::Genesis}; + #[test_runtimes(all)] fn correct_nonce_for_submit_now() { let mut env = RuntimeEnv::::from_parachain_storage( Genesis::default() @@ -303,6 +304,7 @@ mod tests { .unwrap(); } + #[test_runtimes(all)] fn correct_nonce_for_submit_later() { let mut env = RuntimeEnv::::from_parachain_storage( Genesis::default() @@ -332,7 +334,4 @@ mod tests { ) .unwrap(); } - - crate::test_for_runtimes!(all, correct_nonce_for_submit_now); - crate::test_for_runtimes!(all, correct_nonce_for_submit_later); } diff --git a/runtime/integration-tests/src/generic/mod.rs b/runtime/integration-tests/src/generic/mod.rs index 60bb9ff3f9..7a484368ed 100644 --- a/runtime/integration-tests/src/generic/mod.rs +++ b/runtime/integration-tests/src/generic/mod.rs @@ -23,33 +23,11 @@ mod cases { } /// Generate tests for the specified runtimes or all runtimes. -/// Usage +/// Usage. Used as building block for #[test_runtimes] procedural macro. /// -/// NOTE: Your probably want to use `#[test_runtimes]` proc macro instead -/// -/// ```rust -/// use crate::generic::config::Runtime; -/// -/// fn foo { -/// /// Your test here... -/// } -/// -/// crate::test_for_runtimes!([development, altair, centrifuge], foo); -/// ``` -/// For the following command: `cargo test -p runtime-integration-tests foo`, -/// it will generate the following output: -/// -/// ```text -/// test generic::foo::altair ... ok -/// test generic::foo::development ... ok -/// test generic::foo::centrifuge ... ok -/// ``` -/// -/// Available input for the first argument is: -/// - Any combination of `development`, `altair`, `centrifuge` inside `[]`. -/// - The world `all`. +/// NOTE: Do not use it direclty, use `#[test_runtimes]` proc macro instead #[macro_export] -macro_rules! test_for_runtimes { +macro_rules! __test_for_runtimes { ( [ $($runtime_name:ident),* ], $test_name:ident ) => { #[cfg(test)] mod $test_name { @@ -73,6 +51,6 @@ macro_rules! test_for_runtimes { } }; ( all , $test_name:ident ) => { - $crate::test_for_runtimes!([development, altair, centrifuge], $test_name); + $crate::__test_for_runtimes!([development, altair, centrifuge], $test_name); }; } From a87f4ca2d0efa26782bdb751d48ffda009ee2636 Mon Sep 17 00:00:00 2001 From: Frederik Gartenmeister Date: Wed, 29 May 2024 22:12:31 +0200 Subject: [PATCH 05/21] Feat: No maturity date (#1843) * feat: try no matirirty date * fix: wrongly using notional instead of given price * Revert "fix: wrongly using notional instead of given price" This reverts commit f3b5746e87d2cfc558e950ba7691b0711afd55ad. * fix: external pricing with no maturity * chore: better readability * chore: simpler test util * chore: cleaner error message * fix: tests --- pallets/loans/src/entities/loans.rs | 9 +-- .../loans/src/entities/pricing/external.rs | 22 +++---- .../loans/src/entities/pricing/internal.rs | 9 ++- pallets/loans/src/lib.rs | 4 ++ pallets/loans/src/tests/mock.rs | 3 + .../loans/src/tests/portfolio_valuation.rs | 59 +++++++++++++++++++ pallets/loans/src/tests/util.rs | 22 +++++++ pallets/loans/src/types/mod.rs | 17 ++++-- 8 files changed, 122 insertions(+), 23 deletions(-) diff --git a/pallets/loans/src/entities/loans.rs b/pallets/loans/src/entities/loans.rs index 0077121f9a..105ecd8ca0 100644 --- a/pallets/loans/src/entities/loans.rs +++ b/pallets/loans/src/entities/loans.rs @@ -223,7 +223,7 @@ impl ActiveLoan { &self.borrower } - pub fn maturity_date(&self) -> Seconds { + pub fn maturity_date(&self) -> Option { self.schedule.maturity.date() } @@ -260,9 +260,10 @@ impl ActiveLoan { ) -> Result { let now = T::Time::now(); match trigger { - WriteOffTrigger::PrincipalOverdue(overdue_secs) => { - Ok(now >= self.maturity_date().ensure_add(*overdue_secs)?) - } + WriteOffTrigger::PrincipalOverdue(overdue_secs) => match self.maturity_date() { + Some(maturity) => Ok(now >= maturity.ensure_add(*overdue_secs)?), + None => Ok(false), + }, WriteOffTrigger::PriceOutdated(secs) => match &self.pricing { ActivePricing::External(pricing) => { Ok(now >= pricing.last_updated(pool_id).ensure_add(*secs)?) diff --git a/pallets/loans/src/entities/pricing/external.rs b/pallets/loans/src/entities/pricing/external.rs index 3730c6d4fc..e9652ac518 100644 --- a/pallets/loans/src/entities/pricing/external.rs +++ b/pallets/loans/src/entities/pricing/external.rs @@ -156,31 +156,31 @@ impl ExternalActivePricing { fn maybe_with_linear_accrual_price( &self, - maturity: Seconds, + maturity: Option, price: T::Balance, price_last_updated: Seconds, ) -> Result { - if self.info.with_linear_pricing { + if let (Some(maturity), true) = (maturity, self.info.with_linear_pricing) { if min(price_last_updated, maturity) == maturity { // We can not have 2 'xs' with different 'y' in a rect. // That only happens at maturity return Ok(self.info.notional); } - Ok(cfg_utils::math::y_coord_in_rect( + return Ok(cfg_utils::math::y_coord_in_rect( (min(price_last_updated, maturity), price), (maturity, self.info.notional), min(T::Time::now(), maturity), - )?) - } else { - Ok(price) + )?); } + + Ok(price) } pub fn current_price( &self, pool_id: T::PoolId, - maturity: Seconds, + maturity: Option, ) -> Result { self.current_price_inner( maturity, @@ -190,7 +190,7 @@ impl ExternalActivePricing { fn current_price_inner( &self, - maturity: Seconds, + maturity: Option, oracle: Option>, ) -> Result { if let Some((oracle_price, oracle_provided_at)) = oracle { @@ -211,7 +211,7 @@ impl ExternalActivePricing { pub fn outstanding_principal( &self, pool_id: T::PoolId, - maturity: Seconds, + maturity: Option, ) -> Result { let price = self.current_price(pool_id, maturity)?; Ok(self.outstanding_quantity.ensure_mul_int(price)?) @@ -229,7 +229,7 @@ impl ExternalActivePricing { pub fn present_value( &self, pool_id: T::PoolId, - maturity: Seconds, + maturity: Option, ) -> Result { self.outstanding_principal(pool_id, maturity) } @@ -237,7 +237,7 @@ impl ExternalActivePricing { pub fn present_value_cached( &self, cache: &BTreeMap>, - maturity: Seconds, + maturity: Option, ) -> Result { let price = self.current_price_inner(maturity, cache.get(&self.info.price_id).copied())?; Ok(self.outstanding_quantity.ensure_mul_int(price)?) diff --git a/pallets/loans/src/entities/pricing/internal.rs b/pallets/loans/src/entities/pricing/internal.rs index 1c285ce261..10ea0d779a 100644 --- a/pallets/loans/src/entities/pricing/internal.rs +++ b/pallets/loans/src/entities/pricing/internal.rs @@ -90,10 +90,13 @@ impl InternalActivePricing { &self, debt: T::Balance, origination_date: Seconds, - maturity_date: Seconds, + maturity_date: Option, ) -> Result { match &self.info.valuation_method { ValuationMethod::DiscountedCashFlow(dcf) => { + let maturity_date = + maturity_date.ok_or(Error::::MaturityDateNeededForValuationMethod)?; + let now = T::Time::now(); Ok(dcf.compute_present_value( debt, @@ -110,7 +113,7 @@ impl InternalActivePricing { pub fn present_value( &self, origination_date: Seconds, - maturity_date: Seconds, + maturity_date: Option, ) -> Result { let debt = self.interest.current_debt()?; self.compute_present_value(debt, origination_date, maturity_date) @@ -120,7 +123,7 @@ impl InternalActivePricing { &self, cache: &Rates, origination_date: Seconds, - maturity_date: Seconds, + maturity_date: Option, ) -> Result where Rates: RateCollection, diff --git a/pallets/loans/src/lib.rs b/pallets/loans/src/lib.rs index ee49c8a378..8b592b2eab 100644 --- a/pallets/loans/src/lib.rs +++ b/pallets/loans/src/lib.rs @@ -398,6 +398,10 @@ pub mod pallet { TransferDebtToSameLoan, /// Emits when debt is transfered with different repaid/borrow amounts TransferDebtAmountMismatched, + /// Emits when the loan has no maturity date set, but the valuation + /// method needs one. Making valuation and maturity settings + /// incompatible. + MaturityDateNeededForValuationMethod, } impl From for Error { diff --git a/pallets/loans/src/tests/mock.rs b/pallets/loans/src/tests/mock.rs index c0238546a6..6bcdd32e2a 100644 --- a/pallets/loans/src/tests/mock.rs +++ b/pallets/loans/src/tests/mock.rs @@ -64,6 +64,9 @@ pub const POOL_OTHER_ACCOUNT: AccountId = 100; pub const COLLATERAL_VALUE: Balance = 10000; pub const DEFAULT_INTEREST_RATE: f64 = 0.5; +pub const DEFAULT_DISCOUNT_RATE: f64 = 0.02; +pub const DEFAULT_PROBABILITY_OF_DEFAULT: f64 = 0.1; +pub const DEFAULT_LOSS_GIVEN_DEFAULT: f64 = 0.5; pub const POLICY_PERCENTAGE: f64 = 0.5; pub const POLICY_PENALTY: f64 = 0.5; pub const REGISTER_PRICE_ID: PriceId = 42; diff --git a/pallets/loans/src/tests/portfolio_valuation.rs b/pallets/loans/src/tests/portfolio_valuation.rs index 86b63a558d..a6887adde4 100644 --- a/pallets/loans/src/tests/portfolio_valuation.rs +++ b/pallets/loans/src/tests/portfolio_valuation.rs @@ -270,3 +270,62 @@ fn no_linear_pricing_either_settlement_or_oracle() { expected_portfolio(QUANTITY.saturating_mul_int(MARKET_PRICE_VALUE)); }); } + +#[test] +fn internal_dcf_with_no_maturity() { + new_test_ext().execute_with(|| { + let mut internal = util::dcf_internal_loan(); + internal.schedule.maturity = Maturity::None; + + let loan_id = util::create_loan(LoanInfo { + collateral: ASSET_BA, + ..internal + }); + + MockPools::mock_withdraw(|_, _, _| Ok(())); + + assert_noop!( + Loans::borrow( + RuntimeOrigin::signed(util::borrower(loan_id)), + POOL_A, + loan_id, + PrincipalInput::Internal(COLLATERAL_VALUE), + ), + Error::::MaturityDateNeededForValuationMethod + ); + }); +} + +#[test] +fn internal_oustanding_debt_with_no_maturity() { + new_test_ext().execute_with(|| { + let mut internal = util::base_internal_loan(); + internal.schedule.maturity = Maturity::None; + + let loan_id = util::create_loan(LoanInfo { + collateral: ASSET_BA, + ..internal + }); + util::borrow_loan(loan_id, PrincipalInput::Internal(COLLATERAL_VALUE)); + + config_mocks(); + let pv = util::current_loan_pv(loan_id); + update_portfolio(); + expected_portfolio(pv); + + advance_time(YEAR); + + update_portfolio(); + expected_portfolio( + Rate::from_float(util::interest_for(DEFAULT_INTEREST_RATE, YEAR)) + .checked_mul_int(COLLATERAL_VALUE) + .unwrap(), + ); + + util::repay_loan(loan_id, PrincipalInput::Internal(COLLATERAL_VALUE)); + + config_mocks(); + update_portfolio(); + expected_portfolio(0); + }); +} diff --git a/pallets/loans/src/tests/util.rs b/pallets/loans/src/tests/util.rs index a089150882..c12c180bdc 100644 --- a/pallets/loans/src/tests/util.rs +++ b/pallets/loans/src/tests/util.rs @@ -81,6 +81,28 @@ pub fn base_internal_pricing() -> InternalPricing { } } +pub fn dcf_internal_pricing() -> InternalPricing { + InternalPricing { + collateral_value: COLLATERAL_VALUE, + max_borrow_amount: util::total_borrowed_rate(1.0), + valuation_method: ValuationMethod::DiscountedCashFlow(DiscountedCashFlow { + probability_of_default: Rate::from_float(DEFAULT_PROBABILITY_OF_DEFAULT), + loss_given_default: Rate::from_float(DEFAULT_LOSS_GIVEN_DEFAULT), + discount_rate: InterestRate::Fixed { + rate_per_year: Rate::from_float(DEFAULT_DISCOUNT_RATE), + compounding: CompoundingSchedule::Secondly, + }, + }), + } +} + +pub fn dcf_internal_loan() -> LoanInfo { + LoanInfo { + pricing: Pricing::Internal(dcf_internal_pricing()), + ..base_internal_loan() + } +} + pub fn base_internal_loan() -> LoanInfo { LoanInfo { schedule: RepaymentSchedule { diff --git a/pallets/loans/src/types/mod.rs b/pallets/loans/src/types/mod.rs index 922f3cda39..333b8ae0c9 100644 --- a/pallets/loans/src/types/mod.rs +++ b/pallets/loans/src/types/mod.rs @@ -19,7 +19,7 @@ use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; use sp_runtime::{ traits::{EnsureAdd, EnsureAddAssign, EnsureSubAssign}, - ArithmeticError, + ArithmeticError, DispatchError, }; pub mod policy; @@ -95,6 +95,8 @@ pub enum Maturity { /// Extension in secs, without special permissions extension: Seconds, }, + /// No Maturity date + None, } impl Maturity { @@ -102,24 +104,29 @@ impl Maturity { Self::Fixed { date, extension: 0 } } - pub fn date(&self) -> Seconds { + pub fn date(&self) -> Option { match self { - Maturity::Fixed { date, .. } => *date, + Maturity::Fixed { date, .. } => Some(*date), + Maturity::None => None, } } pub fn is_valid(&self, now: Seconds) -> bool { match self { Maturity::Fixed { date, .. } => *date > now, + Maturity::None => true, } } - pub fn extends(&mut self, value: Seconds) -> Result<(), ArithmeticError> { + pub fn extends(&mut self, value: Seconds) -> Result<(), DispatchError> { match self { Maturity::Fixed { date, extension } => { date.ensure_add_assign(value)?; - extension.ensure_sub_assign(value) + extension.ensure_sub_assign(value).map_err(Into::into) } + Maturity::None => Err(DispatchError::Other( + "No maturity date that could be extended.", + )), } } } From 2aac41b6f244d666d2b946c9fed030fc8b3e8333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Enrique=20Mu=C3=B1oz=20Mart=C3=ADn?= Date: Mon, 3 Jun 2024 10:31:30 +0200 Subject: [PATCH 06/21] add timer mock (#1848) --- pallets/loans/src/benchmarking.rs | 3 ++- pallets/loans/src/tests/mock.rs | 20 +++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/pallets/loans/src/benchmarking.rs b/pallets/loans/src/benchmarking.rs index d1b2f6ace0..e2d8c185de 100644 --- a/pallets/loans/src/benchmarking.rs +++ b/pallets/loans/src/benchmarking.rs @@ -61,7 +61,7 @@ type MaxRateCountOf = <::InterestAccrual as InterestAccrual< fn config_mocks() { use cfg_mocks::pallet_mock_data::util::MockDataCollection; - use crate::tests::mock::{MockChangeGuard, MockPermissions, MockPools, MockPrices}; + use crate::tests::mock::{MockChangeGuard, MockPermissions, MockPools, MockPrices, MockTimer}; MockPermissions::mock_add(|_, _, _| Ok(())); MockPermissions::mock_has(|_, _, _| true); @@ -75,6 +75,7 @@ fn config_mocks() { MockChangeGuard::mock_released(move |_, _| Ok(change.clone())); Ok(sp_core::H256::default()) }); + MockTimer::mock_now(|| 0); } struct Helper(sp_std::marker::PhantomData); diff --git a/pallets/loans/src/tests/mock.rs b/pallets/loans/src/tests/mock.rs index 6bcdd32e2a..ae472f73a5 100644 --- a/pallets/loans/src/tests/mock.rs +++ b/pallets/loans/src/tests/mock.rs @@ -22,7 +22,7 @@ use frame_support::{ derive_impl, traits::{ tokens::nonfungibles::{Create, Mutate}, - AsEnsureOriginWithArg, ConstU64, Hooks, UnixTime, + AsEnsureOriginWithArg, Hooks, UnixTime, }, }; use frame_system::{EnsureRoot, EnsureSigned}; @@ -96,7 +96,7 @@ pub type ChangeId = H256; frame_support::construct_runtime!( pub enum Runtime { System: frame_system, - Timer: pallet_timestamp, + MockTimer: cfg_mocks::time::pallet, Balances: pallet_balances, Uniques: pallet_uniques, InterestAccrual: pallet_interest_accrual, @@ -120,11 +120,8 @@ impl frame_system::Config for Runtime { type Block = frame_system::mocking::MockBlock; } -impl pallet_timestamp::Config for Runtime { - type MinimumPeriod = ConstU64; +impl cfg_mocks::time::pallet::Config for Runtime { type Moment = Millis; - type OnTimestampSet = (); - type WeightInfo = (); } #[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] @@ -162,7 +159,7 @@ impl pallet_interest_accrual::Config for Runtime { type MaxRateCount = MaxActiveLoansPerPool; type Rate = Rate; type RuntimeEvent = RuntimeEvent; - type Time = Timer; + type Time = MockTimer; type Weights = (); } @@ -215,14 +212,14 @@ impl pallet_loans::Config for Runtime { type Rate = Rate; type RuntimeChange = Change; type RuntimeEvent = RuntimeEvent; - type Time = Timer; + type Time = MockTimer; type WeightInfo = (); } pub fn new_test_ext() -> sp_io::TestExternalities { let mut ext = System::externalities(); ext.execute_with(|| { - advance_time(BLOCK_TIME); + MockTimer::mock_now(|| BLOCK_TIME.as_millis() as u64); Uniques::create_collection(&COLLECTION_A, &BORROWER, &ASSET_COLLECTION_OWNER).unwrap(); Uniques::mint_into(&COLLECTION_A, &ASSET_AA.1, &BORROWER).unwrap(); @@ -237,10 +234,11 @@ pub fn new_test_ext() -> sp_io::TestExternalities { } pub fn now() -> Duration { - ::now() + ::now() } pub fn advance_time(elapsed: Duration) { - Timer::set_timestamp(Timer::get() + elapsed.as_millis() as u64); + let before = now(); + MockTimer::mock_now(move || (before + elapsed).as_millis() as u64); InterestAccrual::on_initialize(0); } From c6dea28fecff9b6f28e2551d0f4a95ecd299bc0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Enrique=20Mu=C3=B1oz=20Mart=C3=ADn?= Date: Mon, 3 Jun 2024 16:09:20 +0200 Subject: [PATCH 07/21] Borrow proxy with PodOperation behavior (#1854) * add borrow behavior * reversing * fix compiling --- runtime/altair/src/lib.rs | 50 ++++++++++++++++++---------------- runtime/centrifuge/src/lib.rs | 50 ++++++++++++++++++---------------- runtime/development/src/lib.rs | 50 ++++++++++++++++++---------------- 3 files changed, 78 insertions(+), 72 deletions(-) diff --git a/runtime/altair/src/lib.rs b/runtime/altair/src/lib.rs index f10ab5d54a..ae3ddb8fe4 100644 --- a/runtime/altair/src/lib.rs +++ b/runtime/altair/src/lib.rs @@ -537,30 +537,32 @@ impl InstanceFilter for ProxyType { matches!(c, RuntimeCall::Proxy(pallet_proxy::Call::proxy { .. })) || !matches!(c, RuntimeCall::Proxy(..)) } - ProxyType::Borrow => matches!( - c, - RuntimeCall::Loans(pallet_loans::Call::create { .. }) | - RuntimeCall::Loans(pallet_loans::Call::borrow { .. }) | - RuntimeCall::Loans(pallet_loans::Call::repay { .. }) | - RuntimeCall::Loans(pallet_loans::Call::write_off { .. }) | - RuntimeCall::Loans(pallet_loans::Call::apply_loan_mutation { .. }) | - RuntimeCall::Loans(pallet_loans::Call::close { .. }) | - RuntimeCall::Loans(pallet_loans::Call::apply_write_off_policy { .. }) | - RuntimeCall::Loans(pallet_loans::Call::update_portfolio_valuation { .. }) | - RuntimeCall::Loans(pallet_loans::Call::propose_transfer_debt { .. }) | - RuntimeCall::Loans(pallet_loans::Call::apply_transfer_debt { .. }) | - // Borrowers should be able to close and execute an epoch - // in order to get liquidity from repayments in previous epochs. - RuntimeCall::PoolSystem(pallet_pool_system::Call::close_epoch{..}) | - RuntimeCall::PoolSystem(pallet_pool_system::Call::submit_solution{..}) | - RuntimeCall::PoolSystem(pallet_pool_system::Call::execute_epoch{..}) | - RuntimeCall::Utility(pallet_utility::Call::batch_all{..}) | - RuntimeCall::Utility(pallet_utility::Call::batch{..}) | - // Borrowers should be able to swap back and forth between local currencies and their variants - RuntimeCall::TokenMux(pallet_token_mux::Call::burn {..}) | - RuntimeCall::TokenMux(pallet_token_mux::Call::deposit {..}) | - RuntimeCall::TokenMux(pallet_token_mux::Call::match_swap {..}) - ), + ProxyType::Borrow => { + matches!( + c, + RuntimeCall::Loans(pallet_loans::Call::create { .. }) | + RuntimeCall::Loans(pallet_loans::Call::borrow { .. }) | + RuntimeCall::Loans(pallet_loans::Call::repay { .. }) | + RuntimeCall::Loans(pallet_loans::Call::write_off { .. }) | + RuntimeCall::Loans(pallet_loans::Call::apply_loan_mutation { .. }) | + RuntimeCall::Loans(pallet_loans::Call::close { .. }) | + RuntimeCall::Loans(pallet_loans::Call::apply_write_off_policy { .. }) | + RuntimeCall::Loans(pallet_loans::Call::update_portfolio_valuation { .. }) | + RuntimeCall::Loans(pallet_loans::Call::propose_transfer_debt { .. }) | + RuntimeCall::Loans(pallet_loans::Call::apply_transfer_debt { .. }) | + // Borrowers should be able to close and execute an epoch + // in order to get liquidity from repayments in previous epochs. + RuntimeCall::PoolSystem(pallet_pool_system::Call::close_epoch{..}) | + RuntimeCall::PoolSystem(pallet_pool_system::Call::submit_solution{..}) | + RuntimeCall::PoolSystem(pallet_pool_system::Call::execute_epoch{..}) | + RuntimeCall::Utility(pallet_utility::Call::batch_all{..}) | + RuntimeCall::Utility(pallet_utility::Call::batch{..}) | + // Borrowers should be able to swap back and forth between local currencies and their variants + RuntimeCall::TokenMux(pallet_token_mux::Call::burn {..}) | + RuntimeCall::TokenMux(pallet_token_mux::Call::deposit {..}) | + RuntimeCall::TokenMux(pallet_token_mux::Call::match_swap {..}) + ) | ProxyType::PodOperation.filter(c) + } ProxyType::Invest => matches!( c, RuntimeCall::Investments(pallet_investments::Call::update_invest_order{..}) | diff --git a/runtime/centrifuge/src/lib.rs b/runtime/centrifuge/src/lib.rs index 44c518f855..66e9996c31 100644 --- a/runtime/centrifuge/src/lib.rs +++ b/runtime/centrifuge/src/lib.rs @@ -671,30 +671,32 @@ impl InstanceFilter for ProxyType { matches!(c, RuntimeCall::Proxy(pallet_proxy::Call::proxy { .. })) || !matches!(c, RuntimeCall::Proxy(..)) } - ProxyType::Borrow => matches!( - c, - RuntimeCall::Loans(pallet_loans::Call::create { .. }) | - RuntimeCall::Loans(pallet_loans::Call::borrow { .. }) | - RuntimeCall::Loans(pallet_loans::Call::repay { .. }) | - RuntimeCall::Loans(pallet_loans::Call::write_off { .. }) | - RuntimeCall::Loans(pallet_loans::Call::apply_loan_mutation { .. }) | - RuntimeCall::Loans(pallet_loans::Call::close { .. }) | - RuntimeCall::Loans(pallet_loans::Call::apply_write_off_policy { .. }) | - RuntimeCall::Loans(pallet_loans::Call::update_portfolio_valuation { .. }) | - RuntimeCall::Loans(pallet_loans::Call::propose_transfer_debt { .. }) | - RuntimeCall::Loans(pallet_loans::Call::apply_transfer_debt { .. }) | - // Borrowers should be able to close and execute an epoch - // in order to get liquidity from repayments in previous epochs. - RuntimeCall::PoolSystem(pallet_pool_system::Call::close_epoch{..}) | - RuntimeCall::PoolSystem(pallet_pool_system::Call::submit_solution{..}) | - RuntimeCall::PoolSystem(pallet_pool_system::Call::execute_epoch{..}) | - RuntimeCall::Utility(pallet_utility::Call::batch_all{..}) | - RuntimeCall::Utility(pallet_utility::Call::batch{..}) | - // Borrowers should be able to swap back and forth between local currencies and their variants - RuntimeCall::TokenMux(pallet_token_mux::Call::burn {..}) | - RuntimeCall::TokenMux(pallet_token_mux::Call::deposit {..}) | - RuntimeCall::TokenMux(pallet_token_mux::Call::match_swap {..}) - ), + ProxyType::Borrow => { + matches!( + c, + RuntimeCall::Loans(pallet_loans::Call::create { .. }) | + RuntimeCall::Loans(pallet_loans::Call::borrow { .. }) | + RuntimeCall::Loans(pallet_loans::Call::repay { .. }) | + RuntimeCall::Loans(pallet_loans::Call::write_off { .. }) | + RuntimeCall::Loans(pallet_loans::Call::apply_loan_mutation { .. }) | + RuntimeCall::Loans(pallet_loans::Call::close { .. }) | + RuntimeCall::Loans(pallet_loans::Call::apply_write_off_policy { .. }) | + RuntimeCall::Loans(pallet_loans::Call::update_portfolio_valuation { .. }) | + RuntimeCall::Loans(pallet_loans::Call::propose_transfer_debt { .. }) | + RuntimeCall::Loans(pallet_loans::Call::apply_transfer_debt { .. }) | + // Borrowers should be able to close and execute an epoch + // in order to get liquidity from repayments in previous epochs. + RuntimeCall::PoolSystem(pallet_pool_system::Call::close_epoch{..}) | + RuntimeCall::PoolSystem(pallet_pool_system::Call::submit_solution{..}) | + RuntimeCall::PoolSystem(pallet_pool_system::Call::execute_epoch{..}) | + RuntimeCall::Utility(pallet_utility::Call::batch_all{..}) | + RuntimeCall::Utility(pallet_utility::Call::batch{..}) | + // Borrowers should be able to swap back and forth between local currencies and their variants + RuntimeCall::TokenMux(pallet_token_mux::Call::burn {..}) | + RuntimeCall::TokenMux(pallet_token_mux::Call::deposit {..}) | + RuntimeCall::TokenMux(pallet_token_mux::Call::match_swap {..}) + ) | ProxyType::PodOperation.filter(c) + } ProxyType::Invest => matches!( c, RuntimeCall::Investments(pallet_investments::Call::update_invest_order{..}) | diff --git a/runtime/development/src/lib.rs b/runtime/development/src/lib.rs index 7649078801..f062a08f47 100644 --- a/runtime/development/src/lib.rs +++ b/runtime/development/src/lib.rs @@ -545,30 +545,32 @@ impl InstanceFilter for ProxyType { matches!(c, RuntimeCall::Proxy(pallet_proxy::Call::proxy { .. })) || !matches!(c, RuntimeCall::Proxy(..)) } - ProxyType::Borrow => matches!( - c, - RuntimeCall::Loans(pallet_loans::Call::create { .. }) | - RuntimeCall::Loans(pallet_loans::Call::borrow { .. }) | - RuntimeCall::Loans(pallet_loans::Call::repay { .. }) | - RuntimeCall::Loans(pallet_loans::Call::write_off { .. }) | - RuntimeCall::Loans(pallet_loans::Call::apply_loan_mutation { .. }) | - RuntimeCall::Loans(pallet_loans::Call::close { .. }) | - RuntimeCall::Loans(pallet_loans::Call::apply_write_off_policy { .. }) | - RuntimeCall::Loans(pallet_loans::Call::update_portfolio_valuation { .. }) | - RuntimeCall::Loans(pallet_loans::Call::propose_transfer_debt { .. }) | - RuntimeCall::Loans(pallet_loans::Call::apply_transfer_debt { .. }) | - // Borrowers should be able to close and execute an epoch - // in order to get liquidity from repayments in previous epochs. - RuntimeCall::PoolSystem(pallet_pool_system::Call::close_epoch { .. }) | - RuntimeCall::PoolSystem(pallet_pool_system::Call::submit_solution { .. }) | - RuntimeCall::PoolSystem(pallet_pool_system::Call::execute_epoch { .. }) | - RuntimeCall::Utility(pallet_utility::Call::batch_all { .. }) | - RuntimeCall::Utility(pallet_utility::Call::batch { .. }) | - // Borrowers should be able to swap back and forth between local currencies and their variants - RuntimeCall::TokenMux(pallet_token_mux::Call::burn {..}) | - RuntimeCall::TokenMux(pallet_token_mux::Call::deposit {..}) | - RuntimeCall::TokenMux(pallet_token_mux::Call::match_swap {..}) - ), + ProxyType::Borrow => { + matches!( + c, + RuntimeCall::Loans(pallet_loans::Call::create { .. }) | + RuntimeCall::Loans(pallet_loans::Call::borrow { .. }) | + RuntimeCall::Loans(pallet_loans::Call::repay { .. }) | + RuntimeCall::Loans(pallet_loans::Call::write_off { .. }) | + RuntimeCall::Loans(pallet_loans::Call::apply_loan_mutation { .. }) | + RuntimeCall::Loans(pallet_loans::Call::close { .. }) | + RuntimeCall::Loans(pallet_loans::Call::apply_write_off_policy { .. }) | + RuntimeCall::Loans(pallet_loans::Call::update_portfolio_valuation { .. }) | + RuntimeCall::Loans(pallet_loans::Call::propose_transfer_debt { .. }) | + RuntimeCall::Loans(pallet_loans::Call::apply_transfer_debt { .. }) | + // Borrowers should be able to close and execute an epoch + // in order to get liquidity from repayments in previous epochs. + RuntimeCall::PoolSystem(pallet_pool_system::Call::close_epoch { .. }) | + RuntimeCall::PoolSystem(pallet_pool_system::Call::submit_solution { .. }) | + RuntimeCall::PoolSystem(pallet_pool_system::Call::execute_epoch { .. }) | + RuntimeCall::Utility(pallet_utility::Call::batch_all { .. }) | + RuntimeCall::Utility(pallet_utility::Call::batch { .. }) | + // Borrowers should be able to swap back and forth between local currencies and their variants + RuntimeCall::TokenMux(pallet_token_mux::Call::burn {..}) | + RuntimeCall::TokenMux(pallet_token_mux::Call::deposit {..}) | + RuntimeCall::TokenMux(pallet_token_mux::Call::match_swap {..}) + ) | ProxyType::PodOperation.filter(c) + } ProxyType::Invest => matches!( c, RuntimeCall::Investments(pallet_investments::Call::update_invest_order{..}) | From 4b9e47e8b15cc5471da9cf5ed5d8d2020012ce6d Mon Sep 17 00:00:00 2001 From: William Freudenberger Date: Mon, 3 Jun 2024 17:18:43 +0200 Subject: [PATCH 08/21] fix: allow root to propose and remove fees (#1855) --- pallets/pool-fees/src/lib.rs | 21 ++++++---- pallets/pool-fees/src/mock.rs | 10 +++++ pallets/pool-fees/src/tests.rs | 71 +++++++++++++++++++++++++++++++++- 3 files changed, 93 insertions(+), 9 deletions(-) diff --git a/pallets/pool-fees/src/lib.rs b/pallets/pool-fees/src/lib.rs index 5e1f4f2c0f..f7a167ef85 100644 --- a/pallets/pool-fees/src/lib.rs +++ b/pallets/pool-fees/src/lib.rs @@ -327,16 +327,18 @@ pub mod pallet { bucket: PoolFeeBucket, fee: PoolFeeInfoOf, ) -> DispatchResult { - let who = ensure_signed(origin)?; + let who = ensure_signed_or_root(origin)?; ensure!( T::PoolReserve::pool_exists(pool_id), Error::::PoolNotFound ); - ensure!( - T::IsPoolAdmin::check((who, pool_id)), - Error::::NotPoolAdmin - ); + if let Some(signer) = who { + ensure!( + T::IsPoolAdmin::check((signer, pool_id)), + Error::::NotPoolAdmin + ); + } let fee_id = Self::generate_fee_id()?; T::ChangeGuard::note( @@ -385,11 +387,16 @@ pub mod pallet { #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::remove_fee(T::MaxPoolFeesPerBucket::get()))] pub fn remove_fee(origin: OriginFor, fee_id: T::FeeId) -> DispatchResult { - let who = ensure_signed(origin)?; + let who = ensure_signed_or_root(origin)?; let fee = Self::get_active_fee(fee_id)?; + // ensure!( - matches!(fee.editor, PoolFeeEditor::Account(account) if account == who), + match (fee.editor, who) { + (PoolFeeEditor::Account(editor), Some(signer)) => editor == signer, + (PoolFeeEditor::Root, None) => true, + _ => false, + }, Error::::UnauthorizedEdit ); Self::do_remove_fee(fee_id)?; diff --git a/pallets/pool-fees/src/mock.rs b/pallets/pool-fees/src/mock.rs index 28da32d9b2..780f46668b 100644 --- a/pallets/pool-fees/src/mock.rs +++ b/pallets/pool-fees/src/mock.rs @@ -219,6 +219,16 @@ pub fn default_fixed_fee() -> PoolFeeInfoOf { }) } +pub fn root_editor_fee() -> PoolFeeInfoOf { + PoolFeeInfoOf:: { + destination: DESTINATION, + editor: PoolFeeEditor::Root, + fee_type: PoolFeeType::Fixed { + limit: PoolFeeAmount::ShareOfPortfolioValuation(Rate::saturating_from_rational(1, 10)), + }, + } +} + pub fn default_chargeable_fee() -> PoolFeeInfoOf { new_fee(PoolFeeType::ChargedUpTo { limit: PoolFeeAmount::AmountPerSecond(1), diff --git a/pallets/pool-fees/src/tests.rs b/pallets/pool-fees/src/tests.rs index 06285e0a4e..7a4ea0fbd6 100644 --- a/pallets/pool-fees/src/tests.rs +++ b/pallets/pool-fees/src/tests.rs @@ -16,9 +16,10 @@ mod extrinsics { mod should_work { use super::*; + use crate::mock::{default_chargeable_fee, root_editor_fee}; #[test] - fn propose_new_fee_works() { + fn propose_new_fee_works_signed() { ExtBuilder::default().build().execute_with(|| { let fees = default_fees(); @@ -49,6 +50,29 @@ mod extrinsics { }) } + #[test] + fn propose_new_fee_works_root() { + ExtBuilder::default().build().execute_with(|| { + let fee = default_chargeable_fee(); + + assert_ok!(PoolFees::propose_new_fee( + RuntimeOrigin::root(), + POOL, + BUCKET, + fee.clone() + )); + System::assert_last_event( + Event::::Proposed { + fee_id: 1u64, + pool_id: POOL, + bucket: BUCKET, + fee, + } + .into(), + ); + }) + } + #[test] fn apply_new_fee_works() { ExtBuilder::default().build().execute_with(|| { @@ -73,7 +97,7 @@ mod extrinsics { } #[test] - fn remove_only_fee_works() { + fn remove_single_account_editor_fee_works() { ExtBuilder::default().build().execute_with(|| { add_fees(vec![default_fixed_fee()]); @@ -90,6 +114,24 @@ mod extrinsics { }) } + #[test] + fn remove_single_root_editor_fee_works() { + ExtBuilder::default().build().execute_with(|| { + add_fees(vec![root_editor_fee()]); + + assert_ok!(PoolFees::remove_fee(RuntimeOrigin::root(), 1)); + + System::assert_last_event( + Event::::Removed { + pool_id: POOL, + bucket: BUCKET, + fee_id: 1, + } + .into(), + ); + }) + } + #[test] fn remove_fee_works() { ExtBuilder::default().build().execute_with(|| { @@ -257,6 +299,19 @@ mod extrinsics { }) } + #[test] + fn apply_new_fee_from_root() { + ExtBuilder::default().build().execute_with(|| { + config_change_mocks(&default_fixed_fee()); + + // Cannot be called from root + assert_noop!( + PoolFees::apply_new_fee(RuntimeOrigin::root(), POOL, CHANGE_ID), + DispatchError::BadOrigin + ); + }) + } + #[test] fn apply_new_fee_missing_pool() { ExtBuilder::default().build().execute_with(|| { @@ -280,6 +335,10 @@ mod extrinsics { Error::::UnauthorizedEdit ); } + assert_noop!( + PoolFees::remove_fee(RuntimeOrigin::root(), 1), + Error::::UnauthorizedEdit + ); }) } @@ -313,6 +372,10 @@ mod extrinsics { PoolFees::charge_fee(RuntimeOrigin::signed(account), 1, 1000), Error::::UnauthorizedCharge ); + assert_noop!( + PoolFees::charge_fee(RuntimeOrigin::root(), 1, 1000), + DispatchError::BadOrigin + ); } }) } @@ -364,6 +427,10 @@ mod extrinsics { PoolFees::uncharge_fee(RuntimeOrigin::signed(account), 1, 1000), Error::::UnauthorizedCharge ); + assert_noop!( + PoolFees::uncharge_fee(RuntimeOrigin::root(), 1, 1000), + DispatchError::BadOrigin + ); } }) } From 6e50915a100a919ef966411bdca1d196a4b41657 Mon Sep 17 00:00:00 2001 From: Frederik Gartenmeister Date: Wed, 5 Jun 2024 16:06:21 +0200 Subject: [PATCH 09/21] Feat: decrease debt (#1857) * feat: decrease debt * fix: wrong test borrow, add new test repay --- pallets/loans/src/lib.rs | 34 +++++++++++++++++++++ pallets/loans/src/tests/borrow_loan.rs | 17 +++++++++-- pallets/loans/src/tests/repay_loan.rs | 41 ++++++++++++++++++++++++++ 3 files changed, 90 insertions(+), 2 deletions(-) diff --git a/pallets/loans/src/lib.rs b/pallets/loans/src/lib.rs index 8b592b2eab..e79832ed7b 100644 --- a/pallets/loans/src/lib.rs +++ b/pallets/loans/src/lib.rs @@ -355,6 +355,12 @@ pub mod pallet { loan_id: T::LoanId, amount: PrincipalInput, }, + /// Debt of a loan has been decreased + DebtDecreased { + pool_id: T::PoolId, + loan_id: T::LoanId, + amount: RepaidInput, + }, } #[pallet::error] @@ -890,6 +896,34 @@ pub mod pallet { Ok(()) } + + /// Decrease debt for a loan. Similar to [`Pallet::repay()`] but + /// without transferring from the pool. + /// + /// The origin must be the borrower of the loan. + /// The decrease debt action should fulfill the repay restrictions + /// configured at [`types::LoanRestrictions`]. The portfolio valuation + /// of the pool is updated to reflect the new present value of the loan. + #[pallet::weight(T::WeightInfo::increase_debt(T::MaxActiveLoansPerPool::get()))] + #[pallet::call_index(14)] + pub fn decrease_debt( + origin: OriginFor, + pool_id: T::PoolId, + loan_id: T::LoanId, + amount: RepaidInput, + ) -> DispatchResult { + let who = ensure_signed(origin)?; + + let (amount, _count) = Self::repay_action(&who, pool_id, loan_id, &amount, false)?; + + Self::deposit_event(Event::::DebtDecreased { + pool_id, + loan_id, + amount, + }); + + Ok(()) + } } // Loan actions diff --git a/pallets/loans/src/tests/borrow_loan.rs b/pallets/loans/src/tests/borrow_loan.rs index 20f51c8ae3..c74281bb65 100644 --- a/pallets/loans/src/tests/borrow_loan.rs +++ b/pallets/loans/src/tests/borrow_loan.rs @@ -601,9 +601,22 @@ fn increase_debt_does_not_withdraw() { let loan_id = util::create_loan(loan); let amount = ExternalAmount::new(QUANTITY, PRICE_VALUE); - config_mocks(amount.balance().unwrap()); + MockPrices::mock_get(|id, pool_id| { + assert_eq!(*pool_id, POOL_A); + match *id { + REGISTER_PRICE_ID => Ok((PRICE_VALUE, BLOCK_TIME_MS)), + _ => Err(PRICE_ID_NO_FOUND), + } + }); + MockPrices::mock_register_id(|id, pool_id| { + assert_eq!(*pool_id, POOL_A); + match *id { + REGISTER_PRICE_ID => Ok(()), + _ => Err(PRICE_ID_NO_FOUND), + } + }); - assert_ok!(Loans::borrow( + assert_ok!(Loans::increase_debt( RuntimeOrigin::signed(BORROWER), POOL_A, loan_id, diff --git a/pallets/loans/src/tests/repay_loan.rs b/pallets/loans/src/tests/repay_loan.rs index 87d88ba7c2..7772b14849 100644 --- a/pallets/loans/src/tests/repay_loan.rs +++ b/pallets/loans/src/tests/repay_loan.rs @@ -978,3 +978,44 @@ fn with_external_pricing() { assert_eq!(current_price(), NOTIONAL); }); } + +#[test] +fn decrease_debt_does_not_deposit() { + new_test_ext().execute_with(|| { + MockPools::mock_deposit(|_, _, _| { + unreachable!("increase debt must not withdraw funds from the pool"); + }); + + let loan = LoanInfo { + pricing: Pricing::External(ExternalPricing { + max_borrow_amount: ExtMaxBorrowAmount::NoLimit, + ..util::base_external_pricing() + }), + ..util::base_external_loan() + }; + + let loan_id = util::create_loan(loan); + + let amount = ExternalAmount::new(QUANTITY, PRICE_VALUE); + util::borrow_loan(loan_id, PrincipalInput::External(amount.clone())); + + MockPrices::mock_get(move |id, pool_id| { + assert_eq!(*pool_id, POOL_A); + match *id { + REGISTER_PRICE_ID => Ok((PRICE_VALUE, BLOCK_TIME_MS)), + _ => Err(PRICE_ID_NO_FOUND), + } + }); + + assert_ok!(Loans::decrease_debt( + RuntimeOrigin::signed(BORROWER), + POOL_A, + loan_id, + RepaidInput { + principal: PrincipalInput::External(amount), + interest: 0, + unscheduled: 0, + } + )); + }); +} From 1e8c9949ba5cfac6f35d1e985a60d298e757dd42 Mon Sep 17 00:00:00 2001 From: Frederik Gartenmeister Date: Thu, 6 Jun 2024 11:32:10 +0200 Subject: [PATCH 10/21] Fix: `pallet-pool-system` - Ratio Calculation (#1856) * fix: fix wrong ratio calculation * fix: wrong calculation and add test * chore: address review comments * fix: tests failing due to missing import * chore: make cleaner? * fix: Perquintill default to 1, 1 tranche test * fix: last tests and risk buffer calc * fix: test missing rate check --- pallets/pool-system/src/lib.rs | 47 ++- pallets/pool-system/src/mock.rs | 7 +- pallets/pool-system/src/tests/mod.rs | 198 +++++++----- pallets/pool-system/src/tests/ratios.rs | 405 ++++++++++++++++++++++++ pallets/pool-system/src/tranches.rs | 13 +- 5 files changed, 583 insertions(+), 87 deletions(-) create mode 100644 pallets/pool-system/src/tests/ratios.rs diff --git a/pallets/pool-system/src/lib.rs b/pallets/pool-system/src/lib.rs index cf4bba7567..097c3ac4d5 100644 --- a/pallets/pool-system/src/lib.rs +++ b/pallets/pool-system/src/lib.rs @@ -187,6 +187,7 @@ pub mod pallet { traits::{tokens::Preservation, Contains, EnsureOriginWithArg}, PalletId, }; + use rev_slice::SliceExt; use sp_runtime::{traits::BadOrigin, ArithmeticError}; use super::*; @@ -1239,15 +1240,43 @@ pub mod pallet { let executed_amounts = epoch.tranches.fulfillment_cash_flows(solution)?; let total_assets = epoch.nav.total(pool.reserve.total)?; - let tranche_ratios = epoch.tranches.combine_with_residual_top( - &executed_amounts, - |tranche, &(invest, redeem)| { - Ok(Perquintill::from_rational( - tranche.supply.ensure_add(invest)?.ensure_sub(redeem)?, - total_assets, - )) - }, - )?; + + let tranche_ratios = { + let mut sum_non_residual_tranche_ratios = Perquintill::zero(); + let num_tranches = pool.tranches.num_tranches(); + let mut current_tranche = 1; + let mut ratios = epoch + .tranches + // NOTE: Reversing amounts, as residual amount is on top. + .combine_with_non_residual_top( + executed_amounts.rev(), + |tranche, &(invest, redeem)| { + // NOTE: Need to have this clause as the current Perquintill + // implementation defaults to 100% if the denominator is zero + let ratio = if total_assets.is_zero() { + Perquintill::zero() + } else if current_tranche < num_tranches { + Perquintill::from_rational( + tranche.supply.ensure_add(invest)?.ensure_sub(redeem)?, + total_assets, + ) + } else { + Perquintill::one().ensure_sub(sum_non_residual_tranche_ratios)? + }; + + sum_non_residual_tranche_ratios.ensure_add_assign(ratio)?; + current_tranche.ensure_add_assign(1)?; + + Ok(ratio) + }, + )?; + + // NOTE: We need to reverse the ratios here, as the residual tranche is on top + // all the time + ratios.reverse(); + + ratios + }; pool.tranches.rebalance_tranches( T::Time::now(), diff --git a/pallets/pool-system/src/mock.rs b/pallets/pool-system/src/mock.rs index 6955679adb..53748c57e1 100644 --- a/pallets/pool-system/src/mock.rs +++ b/pallets/pool-system/src/mock.rs @@ -26,10 +26,10 @@ use cfg_types::{ time::TimeProvider, tokens::{CurrencyId, CustomMetadata, TrancheCurrency}, }; +#[cfg(feature = "runtime-benchmarks")] +use frame_support::dispatch::RawOrigin; use frame_support::{ - assert_ok, derive_impl, - dispatch::RawOrigin, - parameter_types, + assert_ok, derive_impl, parameter_types, traits::{Contains, EnsureOriginWithArg, Hooks, PalletInfoAccess, SortedMembers}, Blake2_128, PalletId, StorageHasher, }; @@ -506,6 +506,7 @@ fn create_tranche_id(pool: u64, tranche: u64) -> [u8; 16] { parameter_types! { pub JuniorTrancheId: [u8; 16] = create_tranche_id(0, 0); pub SeniorTrancheId: [u8; 16] = create_tranche_id(0, 1); + pub SecondSeniorTrancheId: [u8; 16] = create_tranche_id(0, 2); } // Build genesis storage according to the mock runtime. diff --git a/pallets/pool-system/src/tests/mod.rs b/pallets/pool-system/src/tests/mod.rs index 077dd0e501..7054e0a7ae 100644 --- a/pallets/pool-system/src/tests/mod.rs +++ b/pallets/pool-system/src/tests/mod.rs @@ -42,6 +42,8 @@ use crate::{ UnhealthyState, }; +mod ratios; + const AUSD_CURRENCY_ID: CurrencyId = CurrencyId::ForeignAsset(1); pub mod util { @@ -56,34 +58,88 @@ pub mod util { pub mod default_pool { use super::*; + pub fn one_tranche_input() -> Vec> { + vec![TrancheInput { + tranche_type: TrancheType::Residual, + seniority: None, + metadata: TrancheMetadata { + token_name: BoundedVec::default(), + token_symbol: BoundedVec::default(), + }, + }] + } + + pub fn three_tranche_input() -> Vec> { + vec![ + TrancheInput { + tranche_type: TrancheType::Residual, + seniority: None, + metadata: TrancheMetadata { + token_name: BoundedVec::default(), + token_symbol: BoundedVec::default(), + }, + }, + TrancheInput { + tranche_type: TrancheType::NonResidual { + interest_rate_per_sec: Rate::default(), + min_risk_buffer: Perquintill::from_percent(20), + }, + seniority: None, + metadata: TrancheMetadata { + token_name: BoundedVec::default(), + token_symbol: BoundedVec::default(), + }, + }, + TrancheInput { + tranche_type: TrancheType::NonResidual { + interest_rate_per_sec: Rate::default(), + min_risk_buffer: Perquintill::from_percent(25), + }, + seniority: None, + metadata: TrancheMetadata { + token_name: BoundedVec::default(), + token_symbol: BoundedVec::default(), + }, + }, + ] + } + + pub fn two_tranche_input() -> Vec> { + vec![ + TrancheInput { + tranche_type: TrancheType::Residual, + seniority: None, + metadata: TrancheMetadata { + token_name: BoundedVec::default(), + token_symbol: BoundedVec::default(), + }, + }, + TrancheInput { + tranche_type: TrancheType::NonResidual { + interest_rate_per_sec: Rate::default(), + min_risk_buffer: Perquintill::from_percent(25), + }, + seniority: None, + metadata: TrancheMetadata { + token_name: BoundedVec::default(), + token_symbol: BoundedVec::default(), + }, + }, + ] + } + pub fn create() { + create_with_tranche_input(two_tranche_input()) + } + + pub fn create_with_tranche_input(input: Vec>) { PoolSystem::create( DEFAULT_POOL_OWNER, DEFAULT_POOL_OWNER, DEFAULT_POOL_ID, - vec![ - TrancheInput { - tranche_type: TrancheType::Residual, - seniority: None, - metadata: TrancheMetadata { - token_name: BoundedVec::default(), - token_symbol: BoundedVec::default(), - }, - }, - TrancheInput { - tranche_type: TrancheType::NonResidual { - interest_rate_per_sec: Rate::default(), - min_risk_buffer: Perquintill::default(), - }, - seniority: None, - metadata: TrancheMetadata { - token_name: BoundedVec::default(), - token_symbol: BoundedVec::default(), - }, - }, - ], + input, AUSD_CURRENCY_ID, - 0, + 10_000 * CURRENCY, vec![], ) .unwrap(); @@ -95,7 +151,7 @@ pub mod util { // forcing to call `execute_epoch()` later. Investments::update_invest_order( RuntimeOrigin::signed(0), - TrancheCurrency::generate(0, JuniorTrancheId::get()), + TrancheCurrency::generate(0, SeniorTrancheId::get()), 500 * CURRENCY, ) .unwrap(); @@ -818,63 +874,72 @@ fn submission_period() { // Not allowed as it breaks the min risk buffer, and the current state isn't // broken let epoch = >::try_get(0).unwrap(); + assert_err!( + PoolSystem::submit_solution( + pool_owner_origin.clone(), + 0, + vec![ + TrancheSolution { + invest_fulfillment: Perquintill::one(), + redeem_fulfillment: Perquintill::one(), + }, + TrancheSolution { + invest_fulfillment: Perquintill::one(), + redeem_fulfillment: Perquintill::one(), + } + ] + ), + Error::::InvalidSolution + ); + let existing_state_score = PoolSystem::score_solution( &crate::Pool::::try_get(0).unwrap(), &epoch, &epoch.clone().best_submission.unwrap().solution(), ) .unwrap(); + + let new_solution = vec![ + TrancheSolution { + invest_fulfillment: Perquintill::one(), + redeem_fulfillment: Perquintill::from_rational(9u64, 10), + }, + TrancheSolution { + invest_fulfillment: Perquintill::one(), + redeem_fulfillment: Perquintill::one(), + }, + ]; + let new_solution_score = PoolSystem::score_solution( &crate::Pool::::try_get(0).unwrap(), &epoch, - &vec![ - TrancheSolution { - invest_fulfillment: Perquintill::one(), - redeem_fulfillment: Perquintill::one(), - }, - TrancheSolution { - invest_fulfillment: Perquintill::one(), - redeem_fulfillment: Perquintill::one(), - }, - ], + &new_solution, ) .unwrap(); assert_eq!(existing_state_score.healthy(), true); assert_eq!(new_solution_score.healthy(), false); assert_eq!(new_solution_score < existing_state_score, true); + // Is error as would put pool in unhealthy state assert_err!( - PoolSystem::submit_solution( - pool_owner_origin.clone(), - 0, - vec![ - TrancheSolution { - invest_fulfillment: Perquintill::one(), - redeem_fulfillment: Perquintill::one(), - }, - TrancheSolution { - invest_fulfillment: Perquintill::one(), - redeem_fulfillment: Perquintill::one(), - } - ] - ), + PoolSystem::submit_solution(pool_owner_origin.clone(), 0, new_solution,), Error::::NotNewBestSubmission ); - // Allowed as 1% redemption keeps the risk buffer healthy + let new_solution = vec![ + TrancheSolution { + invest_fulfillment: Perquintill::one(), + redeem_fulfillment: Perquintill::from_rational(7u64, 10), + }, + TrancheSolution { + invest_fulfillment: Perquintill::one(), + redeem_fulfillment: Perquintill::one(), + }, + ]; let partial_fulfilment_solution = PoolSystem::score_solution( &crate::Pool::::try_get(0).unwrap(), &epoch, - &vec![ - TrancheSolution { - invest_fulfillment: Perquintill::one(), - redeem_fulfillment: Perquintill::from_float(0.01), - }, - TrancheSolution { - invest_fulfillment: Perquintill::one(), - redeem_fulfillment: Perquintill::one(), - }, - ], + &new_solution, ) .unwrap(); assert_eq!(partial_fulfilment_solution.healthy(), true); @@ -883,16 +948,7 @@ fn submission_period() { assert_ok!(PoolSystem::submit_solution( pool_owner_origin.clone(), 0, - vec![ - TrancheSolution { - invest_fulfillment: Perquintill::one(), - redeem_fulfillment: Perquintill::from_float(0.01), - }, - TrancheSolution { - invest_fulfillment: Perquintill::one(), - redeem_fulfillment: Perquintill::one(), - } - ] + new_solution )); // Can submit the same solution twice @@ -902,7 +958,7 @@ fn submission_period() { vec![ TrancheSolution { invest_fulfillment: Perquintill::one(), - redeem_fulfillment: Perquintill::from_float(0.01), + redeem_fulfillment: Perquintill::from_rational(7u64, 10), }, TrancheSolution { invest_fulfillment: Perquintill::one(), @@ -911,14 +967,14 @@ fn submission_period() { ] )); - // Slight risk buffer improvement + // Risk buffer not touched, so increase in redemption is better assert_ok!(PoolSystem::submit_solution( pool_owner_origin.clone(), 0, vec![ TrancheSolution { invest_fulfillment: Perquintill::one(), - redeem_fulfillment: Perquintill::from_float(0.10), + redeem_fulfillment: Perquintill::from_rational(8u64, 10), }, TrancheSolution { invest_fulfillment: Perquintill::one(), diff --git a/pallets/pool-system/src/tests/ratios.rs b/pallets/pool-system/src/tests/ratios.rs new file mode 100644 index 0000000000..0e90611b19 --- /dev/null +++ b/pallets/pool-system/src/tests/ratios.rs @@ -0,0 +1,405 @@ +// Copyright 2021 Centrifuge Foundation (centrifuge.io). +// +// This file is part of the Centrifuge chain project. +// Centrifuge is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version (see http://www.gnu.org/licenses). +// Centrifuge is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +use sp_arithmetic::{traits::EnsureSub, PerThing, Rounding}; + +use super::*; + +#[test] +fn ensure_ratios_are_distributed_correctly_2_tranches() { + new_test_ext().execute_with(|| { + let pool_owner = DEFAULT_POOL_OWNER; + let pool_owner_origin = RuntimeOrigin::signed(pool_owner); + + util::default_pool::create(); + + // Assert ratios are all zero + Pool::::get(0) + .unwrap() + .tranches + .residual_top_slice() + .iter() + .for_each(|tranche| { + assert_eq!(tranche.ratio, Perquintill::from_percent(0)); + }); + + // Force min_epoch_time to 0 without using update + // as this breaks the runtime-defined pool + // parameter bounds and update will not allow this. + Pool::::try_mutate(0, |maybe_pool| -> Result<(), ()> { + maybe_pool.as_mut().unwrap().parameters.min_epoch_time = 0; + maybe_pool.as_mut().unwrap().parameters.max_nav_age = u64::MAX; + Ok(()) + }) + .unwrap(); + + invest_close_and_collect( + 0, + vec![ + (0, JuniorTrancheId::get(), 500 * CURRENCY), + (0, SeniorTrancheId::get(), 500 * CURRENCY), + ], + ); + + // Ensure ratios are 50/50 + Pool::::get(0) + .unwrap() + .tranches + .residual_top_slice() + .iter() + .for_each(|tranche| { + assert_eq!(tranche.ratio, Perquintill::from_percent(50)); + }); + + // Attempt to redeem 40% + assert_ok!(Investments::update_redeem_order( + RuntimeOrigin::signed(0), + TrancheCurrency::generate(0, SeniorTrancheId::get()), + 200 * CURRENCY + )); + assert_ok!(PoolSystem::close_epoch(pool_owner_origin.clone(), 0)); + assert_ok!(Investments::collect_redemptions( + RuntimeOrigin::signed(0), + TrancheCurrency::generate(0, SeniorTrancheId::get()), + )); + + let new_residual_ratio = Perquintill::from_rational(5u64, 8u64); + let mut next_ratio = new_residual_ratio; + + // Ensure ratios are 500/800 and 300/800 + Pool::::get(0) + .unwrap() + .tranches + .residual_top_slice() + .iter() + .for_each(|tranche| { + assert_eq!(tranche.ratio, next_ratio); + next_ratio = Perquintill::one().ensure_sub(next_ratio).unwrap(); + }); + + // Attempt to redeem everything + assert_ok!(Investments::update_redeem_order( + RuntimeOrigin::signed(0), + TrancheCurrency::generate(0, SeniorTrancheId::get()), + 300 * CURRENCY + )); + assert_ok!(PoolSystem::close_epoch(pool_owner_origin.clone(), 0)); + assert_ok!(Investments::collect_redemptions( + RuntimeOrigin::signed(0), + TrancheCurrency::generate(0, SeniorTrancheId::get()), + )); + + let new_residual_ratio = Perquintill::one(); + let mut next_ratio = new_residual_ratio; + + // Ensure ratios are 100/0 + Pool::::get(0) + .unwrap() + .tranches + .residual_top_slice() + .iter() + .for_each(|tranche| { + assert_eq!(tranche.ratio, next_ratio); + next_ratio = Perquintill::one().ensure_sub(next_ratio).unwrap(); + }); + + // Ensure ratio goes up again + invest_close_and_collect(0, vec![(0, SeniorTrancheId::get(), 300 * CURRENCY)]); + let new_residual_ratio = Perquintill::from_rational(5u64, 8u64); + let mut next_ratio = new_residual_ratio; + + // Ensure ratios are 500/800 and 300/800 + Pool::::get(0) + .unwrap() + .tranches + .residual_top_slice() + .iter() + .for_each(|tranche| { + assert_eq!(tranche.ratio, next_ratio); + next_ratio = Perquintill::one().ensure_sub(next_ratio).unwrap(); + }); + }); +} + +#[test] +fn ensure_ratios_are_distributed_correctly_1_tranche() { + new_test_ext().execute_with(|| { + let pool_owner = DEFAULT_POOL_OWNER; + let pool_owner_origin = RuntimeOrigin::signed(pool_owner); + + util::default_pool::create_with_tranche_input(util::default_pool::one_tranche_input()); + + // Assert ratios are all zero + Pool::::get(0) + .unwrap() + .tranches + .residual_top_slice() + .iter() + .for_each(|tranche| { + assert_eq!(tranche.ratio, Perquintill::from_percent(0)); + }); + + // Force min_epoch_time to 0 without using update + // as this breaks the runtime-defined pool + // parameter bounds and update will not allow this. + Pool::::try_mutate(0, |maybe_pool| -> Result<(), ()> { + maybe_pool.as_mut().unwrap().parameters.min_epoch_time = 0; + maybe_pool.as_mut().unwrap().parameters.max_nav_age = u64::MAX; + Ok(()) + }) + .unwrap(); + + invest_close_and_collect(0, vec![(0, JuniorTrancheId::get(), 500 * CURRENCY)]); + + // Ensure ratios are 100 + Pool::::get(0) + .unwrap() + .tranches + .residual_top_slice() + .iter() + .for_each(|tranche| { + assert_eq!(tranche.ratio, Perquintill::from_percent(100)); + }); + + // Attempt to redeem 40% + assert_ok!(Investments::update_redeem_order( + RuntimeOrigin::signed(0), + TrancheCurrency::generate(0, JuniorTrancheId::get()), + 200 * CURRENCY + )); + assert_ok!(PoolSystem::close_epoch(pool_owner_origin.clone(), 0)); + assert_ok!(Investments::collect_redemptions( + RuntimeOrigin::signed(0), + TrancheCurrency::generate(0, JuniorTrancheId::get()), + )); + + // Ensure ratio is 100 + Pool::::get(0) + .unwrap() + .tranches + .residual_top_slice() + .iter() + .for_each(|tranche| { + assert_eq!(tranche.ratio, Perquintill::from_percent(100)); + }); + + // Attempt to redeem everything + assert_ok!(Investments::update_redeem_order( + RuntimeOrigin::signed(0), + TrancheCurrency::generate(0, JuniorTrancheId::get()), + 300 * CURRENCY + )); + assert_ok!(PoolSystem::close_epoch(pool_owner_origin.clone(), 0)); + assert_ok!(Investments::collect_redemptions( + RuntimeOrigin::signed(0), + TrancheCurrency::generate(0, JuniorTrancheId::get()), + )); + + // Ensure ratio is 0 + Pool::::get(0) + .unwrap() + .tranches + .residual_top_slice() + .iter() + .for_each(|tranche| { + assert_eq!(tranche.ratio, Perquintill::from_percent(0)); + }); + + // Ensure ratio goes up again + invest_close_and_collect(0, vec![(0, JuniorTrancheId::get(), 300 * CURRENCY)]); + + // Ensure ratio 100 + Pool::::get(0) + .unwrap() + .tranches + .residual_top_slice() + .iter() + .for_each(|tranche| { + assert_eq!(tranche.ratio, Perquintill::from_percent(100)); + }); + }); +} + +#[test] +fn ensure_ratios_are_distributed_correctly_3_tranches() { + new_test_ext().execute_with(|| { + let pool_owner = DEFAULT_POOL_OWNER; + let pool_owner_origin = RuntimeOrigin::signed(pool_owner); + + util::default_pool::create_with_tranche_input(util::default_pool::three_tranche_input()); + + // Assert ratios are all zero + Pool::::get(0) + .unwrap() + .tranches + .residual_top_slice() + .iter() + .for_each(|tranche| { + assert_eq!(tranche.ratio, Perquintill::from_percent(0)); + }); + + // Force min_epoch_time to 0 without using update + // as this breaks the runtime-defined pool + // parameter bounds and update will not allow this. + Pool::::try_mutate(0, |maybe_pool| -> Result<(), ()> { + maybe_pool.as_mut().unwrap().parameters.min_epoch_time = 0; + maybe_pool.as_mut().unwrap().parameters.max_nav_age = u64::MAX; + Ok(()) + }) + .unwrap(); + + invest_close_and_collect( + 0, + vec![ + (0, JuniorTrancheId::get(), 500 * CURRENCY), + (0, SeniorTrancheId::get(), 500 * CURRENCY), + (0, SecondSeniorTrancheId::get(), 500 * CURRENCY), + ], + ); + + let check_ratios = [ + Perquintill::from_rational_with_rounding(1u64, 3, Rounding::Up).unwrap(), + Perquintill::from_rational(1u64, 3), + Perquintill::from_rational(1u64, 3), + ]; + + // Ensure ratios are 100 + Pool::::get(0) + .unwrap() + .tranches + .residual_top_slice() + .iter() + .zip(check_ratios.into_iter()) + .for_each(|(tranche, check)| { + assert_eq!(tranche.ratio, check); + }); + + assert_ok!(Investments::update_redeem_order( + RuntimeOrigin::signed(0), + TrancheCurrency::generate(0, JuniorTrancheId::get()), + 250 * CURRENCY + )); + assert_ok!(PoolSystem::close_epoch(pool_owner_origin.clone(), 0)); + assert_ok!(Investments::collect_redemptions( + RuntimeOrigin::signed(0), + TrancheCurrency::generate(0, JuniorTrancheId::get()), + )); + + let check_ratios = [ + Perquintill::from_rational(1u64, 5), + Perquintill::from_rational(2u64, 5), + Perquintill::from_rational(2u64, 5), + ]; + + // Ensure ratios are 100 + Pool::::get(0) + .unwrap() + .tranches + .residual_top_slice() + .iter() + .zip(check_ratios.into_iter()) + .for_each(|(tranche, check)| { + assert_eq!(tranche.ratio, check); + }); + + assert_ok!(Investments::update_redeem_order( + RuntimeOrigin::signed(0), + TrancheCurrency::generate(0, SecondSeniorTrancheId::get()), + 250 * CURRENCY + )); + assert_ok!(PoolSystem::close_epoch(pool_owner_origin.clone(), 0)); + assert_ok!(Investments::collect_redemptions( + RuntimeOrigin::signed(0), + TrancheCurrency::generate(0, SecondSeniorTrancheId::get()), + )); + + let check_ratios = [ + Perquintill::from_rational(1u64, 4), + Perquintill::from_rational(2u64, 4), + Perquintill::from_rational(1u64, 4), + ]; + + // Ensure ratios are 100 + Pool::::get(0) + .unwrap() + .tranches + .residual_top_slice() + .iter() + .zip(check_ratios.into_iter()) + .for_each(|(tranche, check)| { + assert_eq!(tranche.ratio, check); + }); + + // Ensure ratio goes up again + invest_close_and_collect(0, vec![(0, JuniorTrancheId::get(), 250 * CURRENCY)]); + + let check_ratios = [ + Perquintill::from_rational(2u64, 5), + Perquintill::from_rational(2u64, 5), + Perquintill::from_rational(1u64, 5), + ]; + + // Ensure ratios are 100 + Pool::::get(0) + .unwrap() + .tranches + .residual_top_slice() + .iter() + .zip(check_ratios.into_iter()) + .for_each(|(tranche, check)| { + assert_eq!(tranche.ratio, check); + }); + + // Redeem everything + assert_ok!(Investments::update_redeem_order( + RuntimeOrigin::signed(0), + TrancheCurrency::generate(0, SecondSeniorTrancheId::get()), + 250 * CURRENCY + )); + assert_ok!(PoolSystem::close_epoch(pool_owner_origin.clone(), 0)); + assert_ok!(Investments::collect_redemptions( + RuntimeOrigin::signed(0), + TrancheCurrency::generate(0, SecondSeniorTrancheId::get()), + )); + + assert_ok!(Investments::update_redeem_order( + RuntimeOrigin::signed(0), + TrancheCurrency::generate(0, SeniorTrancheId::get()), + 500 * CURRENCY + )); + assert_ok!(PoolSystem::close_epoch(pool_owner_origin.clone(), 0)); + assert_ok!(Investments::collect_redemptions( + RuntimeOrigin::signed(0), + TrancheCurrency::generate(0, SeniorTrancheId::get()), + )); + + assert_ok!(Investments::update_redeem_order( + RuntimeOrigin::signed(0), + TrancheCurrency::generate(0, JuniorTrancheId::get()), + 500 * CURRENCY + )); + assert_ok!(PoolSystem::close_epoch(pool_owner_origin.clone(), 0)); + assert_ok!(Investments::collect_redemptions( + RuntimeOrigin::signed(0), + TrancheCurrency::generate(0, JuniorTrancheId::get()), + )); + + // Ensure ratios are 0 + Pool::::get(0) + .unwrap() + .tranches + .residual_top_slice() + .iter() + .for_each(|tranche| { + assert_eq!(tranche.ratio, Perquintill::zero()); + }); + }); +} diff --git a/pallets/pool-system/src/tranches.rs b/pallets/pool-system/src/tranches.rs index ff285ecc02..2cd337bf0b 100644 --- a/pallets/pool-system/src/tranches.rs +++ b/pallets/pool-system/src/tranches.rs @@ -1347,12 +1347,17 @@ where // previous more senior tranche - this tranche value. let mut remaining_subordinate_value = pool_value; let mut risk_buffers: Vec = tranche_values - .iter() + .into_iter() .rev() .map(|tranche_value| { - remaining_subordinate_value = - remaining_subordinate_value.saturating_sub(*tranche_value); - Perquintill::from_rational(remaining_subordinate_value, pool_value) + remaining_subordinate_value = remaining_subordinate_value.saturating_sub(tranche_value); + if tranche_value.is_zero() { + Perquintill::one() + } else if pool_value.is_zero() { + Perquintill::zero() + } else { + Perquintill::from_rational(remaining_subordinate_value, pool_value) + } }) .collect::>(); From 3769a0ba4d6c5feeea5b57d83a94fe8e372874c8 Mon Sep 17 00:00:00 2001 From: Frederik Gartenmeister Date: Thu, 6 Jun 2024 16:42:48 +0200 Subject: [PATCH 11/21] Feat: Liquidity pools inter domain tranche token transfer (#1860) --- pallets/liquidity-pools/src/inbound.rs | 30 ++++-- pallets/liquidity-pools/src/lib.rs | 11 +- runtime/altair/src/lib.rs | 1 + runtime/altair/src/liquidity_pools.rs | 99 ------------------ runtime/centrifuge/src/lib.rs | 1 + runtime/centrifuge/src/liquidity_pools.rs | 116 --------------------- runtime/common/src/account_conversion.rs | 21 +++- runtime/development/src/lib.rs | 1 + runtime/development/src/liquidity_pools.rs | 101 ------------------ 9 files changed, 51 insertions(+), 330 deletions(-) delete mode 100644 runtime/altair/src/liquidity_pools.rs delete mode 100644 runtime/centrifuge/src/liquidity_pools.rs delete mode 100644 runtime/development/src/liquidity_pools.rs diff --git a/pallets/liquidity-pools/src/inbound.rs b/pallets/liquidity-pools/src/inbound.rs index 573bce07c1..3386fddff4 100644 --- a/pallets/liquidity-pools/src/inbound.rs +++ b/pallets/liquidity-pools/src/inbound.rs @@ -20,7 +20,7 @@ use cfg_types::{ }; use frame_support::{ ensure, - traits::{fungibles::Mutate, tokens::Preservation}, + traits::{fungibles::Mutate, tokens::Preservation, OriginTrait}, }; use sp_core::Get; use sp_runtime::{ @@ -32,7 +32,7 @@ use crate::{pallet::Error, Config, GeneralCurrencyIndexOf, Message, MessageOf, P impl Pallet where - T::AccountId: Into<[u8; 32]>, + ::AccountId: From<[u8; 32]> + Into<[u8; 32]>, { /// Executes a transfer from another domain exclusively for /// non-tranche-tokens. @@ -59,16 +59,19 @@ where pub fn handle_tranche_tokens_transfer( pool_id: T::PoolId, tranche_id: T::TrancheId, - sending_domain: DomainAddress, - receiver: T::AccountId, + sending_domain: Domain, + receiver: DomainAddress, amount: ::Balance, ) -> DispatchResult { ensure!(!amount.is_zero(), Error::::InvalidTransferAmount); + let local_representation_of_receiver = + T::DomainAddressToAccountId::convert(receiver.clone()); + ensure!( T::Permission::has( PermissionScope::Pool(pool_id), - receiver.clone(), + local_representation_of_receiver.clone(), Role::PoolRole(PoolRole::TrancheInvestor(tranche_id, T::Time::now())), ), Error::::UnauthorizedTransfer @@ -78,12 +81,25 @@ where T::Tokens::transfer( invest_id.into(), - &Domain::convert(sending_domain.domain()), - &receiver, + &Domain::convert(sending_domain), + &local_representation_of_receiver, amount, Preservation::Expendable, )?; + // If the receiver is not on the Centrifuge domain we need to forward it now + // to the right domain from the holdings of the receiver we just transferred + // them to. + if receiver.domain() != Domain::Centrifuge { + Pallet::::transfer_tranche_tokens( + T::RuntimeOrigin::signed(local_representation_of_receiver), + pool_id, + tranche_id, + receiver, + amount, + )?; + } + Ok(()) } diff --git a/pallets/liquidity-pools/src/lib.rs b/pallets/liquidity-pools/src/lib.rs index 1041ca87c4..bb39c1e95a 100644 --- a/pallets/liquidity-pools/src/lib.rs +++ b/pallets/liquidity-pools/src/lib.rs @@ -258,9 +258,13 @@ pub mod pallet { /// The converter from a DomainAddress to a Substrate AccountId. type DomainAddressToAccountId: Convert; - /// The converter from a Domain 32 byte array to Substrate AccountId. + /// The converter from a Domain and 32 byte array to Substrate + /// AccountId. type DomainAccountToAccountId: Convert<(Domain, [u8; 32]), Self::AccountId>; + /// The converter from a Domain and a 32 byte array to DomainAddress. + type DomainAccountToDomainAddress: Convert<(Domain, [u8; 32]), DomainAddress>; + /// The type for processing outgoing messages. type OutboundQueue: OutboundQueue< Sender = Self::AccountId, @@ -973,14 +977,15 @@ pub mod pallet { Message::TransferTrancheTokens { pool_id, tranche_id, + domain, receiver, amount, .. } => Self::handle_tranche_tokens_transfer( pool_id, tranche_id, - sender, - receiver.into(), + sender.domain(), + T::DomainAccountToDomainAddress::convert((domain, receiver)), amount, ), Message::IncreaseInvestOrder { diff --git a/runtime/altair/src/lib.rs b/runtime/altair/src/lib.rs index ae3ddb8fe4..98f08d9eda 100644 --- a/runtime/altair/src/lib.rs +++ b/runtime/altair/src/lib.rs @@ -1726,6 +1726,7 @@ impl pallet_liquidity_pools::Config for Runtime { type BalanceRatio = Ratio; type CurrencyId = CurrencyId; type DomainAccountToAccountId = AccountConverter; + type DomainAccountToDomainAddress = AccountConverter; type DomainAddressToAccountId = AccountConverter; type ForeignInvestment = ForeignInvestments; type GeneralCurrencyPrefix = GeneralCurrencyPrefix; diff --git a/runtime/altair/src/liquidity_pools.rs b/runtime/altair/src/liquidity_pools.rs deleted file mode 100644 index cd3aea4087..0000000000 --- a/runtime/altair/src/liquidity_pools.rs +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright 2023 Centrifuge Foundation (centrifuge.io). -// -// This file is part of the Centrifuge chain project. -// Centrifuge is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version (see http://www.gnu.org/licenses). -// Centrifuge is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -use cfg_primitives::{ - liquidity_pools::GeneralCurrencyPrefix, AccountId, Balance, OutboundMessageNonce, PalletIndex, - PoolId, TrancheId, -}; -use cfg_types::{ - fixed_point::Ratio, - tokens::{CurrencyId, TrancheCurrency}, -}; -use frame_support::{parameter_types, traits::PalletInfoAccess}; -use frame_system::EnsureRoot; -use pallet_liquidity_pools::hooks::{ - CollectedForeignInvestmentHook, CollectedForeignRedemptionHook, DecreasedForeignInvestOrderHook, -}; -use runtime_common::{ - account_conversion::AccountConverter, gateway, liquidity_pools::LiquidityPoolsMessage, - transfer_filter::PreLpTransfer, -}; - -use crate::{ - ForeignInvestments, Investments, LiquidityPools, LiquidityPoolsGateway, LocationToAccountId, - OrmlAssetRegistry, Permissions, PoolSystem, Runtime, RuntimeEvent, RuntimeOrigin, Swaps, - Timestamp, Tokens, TransferAllowList, TreasuryAccount, -}; - -impl pallet_foreign_investments::Config for Runtime { - type CollectedForeignInvestmentHook = CollectedForeignInvestmentHook; - type CollectedForeignRedemptionHook = CollectedForeignRedemptionHook; - type CurrencyId = CurrencyId; - type DecreasedForeignInvestOrderHook = DecreasedForeignInvestOrderHook; - type ForeignBalance = Balance; - type Investment = Investments; - type InvestmentId = TrancheCurrency; - type PoolBalance = Balance; - type PoolInspect = PoolSystem; - type SwapBalance = Balance; - type Swaps = Swaps; - type TrancheBalance = Balance; -} - -parameter_types! { - pub LiquidityPoolsPalletIndex: PalletIndex = ::index() as u8; -} - -impl pallet_liquidity_pools::Config for Runtime { - type AdminOrigin = EnsureRoot; - type AssetRegistry = OrmlAssetRegistry; - type Balance = Balance; - type BalanceRatio = Ratio; - type CurrencyId = CurrencyId; - type DomainAccountToAccountId = AccountConverter; - type DomainAddressToAccountId = AccountConverter; - type ForeignInvestment = ForeignInvestments; - type GeneralCurrencyPrefix = GeneralCurrencyPrefix; - type OutboundQueue = LiquidityPoolsGateway; - type Permission = Permissions; - type PoolId = PoolId; - type PoolInspect = PoolSystem; - type PreTransferFilter = PreLpTransfer; - type RuntimeEvent = RuntimeEvent; - type Time = Timestamp; - type Tokens = Tokens; - type TrancheCurrency = TrancheCurrency; - type TrancheId = TrancheId; - type TrancheTokenPrice = PoolSystem; - type TreasuryAccount = TreasuryAccount; - type WeightInfo = (); -} - -parameter_types! { - pub const MaxIncomingMessageSize: u32 = 1024; - pub Sender: AccountId = gateway::get_gateway_account::(); -} - -impl pallet_liquidity_pools_gateway::Config for Runtime { - type AdminOrigin = EnsureRoot; - type InboundQueue = crate::LiquidityPools; - type LocalEVMOrigin = pallet_liquidity_pools_gateway::EnsureLocal; - type MaxIncomingMessageSize = MaxIncomingMessageSize; - type Message = LiquidityPoolsMessage; - type OriginRecovery = crate::LiquidityPoolsAxelarGateway; - type OutboundMessageNonce = OutboundMessageNonce; - type Router = liquidity_pools_gateway_routers::DomainRouter; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type Sender = Sender; - type WeightInfo = (); -} diff --git a/runtime/centrifuge/src/lib.rs b/runtime/centrifuge/src/lib.rs index 66e9996c31..33135524d4 100644 --- a/runtime/centrifuge/src/lib.rs +++ b/runtime/centrifuge/src/lib.rs @@ -1824,6 +1824,7 @@ impl pallet_liquidity_pools::Config for Runtime { type BalanceRatio = Ratio; type CurrencyId = CurrencyId; type DomainAccountToAccountId = AccountConverter; + type DomainAccountToDomainAddress = AccountConverter; type DomainAddressToAccountId = AccountConverter; type ForeignInvestment = ForeignInvestments; type GeneralCurrencyPrefix = GeneralCurrencyPrefix; diff --git a/runtime/centrifuge/src/liquidity_pools.rs b/runtime/centrifuge/src/liquidity_pools.rs deleted file mode 100644 index 066fd0cd0b..0000000000 --- a/runtime/centrifuge/src/liquidity_pools.rs +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright 2023 Centrifuge Foundation (centrifuge.io). -// -// This file is part of the Centrifuge chain project. -// Centrifuge is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version (see http://www.gnu.org/licenses). -// Centrifuge is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -use cfg_primitives::{ - liquidity_pools::GeneralCurrencyPrefix, AccountId, Balance, EnsureRootOr, OutboundMessageNonce, - PalletIndex, PoolId, TrancheId, TwoThirdOfCouncil, -}; -use cfg_types::{ - fixed_point::Ratio, - tokens::{CurrencyId, TrancheCurrency}, -}; -use frame_support::{parameter_types, traits::PalletInfoAccess}; -use pallet_liquidity_pools::hooks::{ - CollectedForeignInvestmentHook, CollectedForeignRedemptionHook, DecreasedForeignInvestOrderHook, -}; -use runtime_common::{ - account_conversion::AccountConverter, gateway, liquidity_pools::LiquidityPoolsMessage, - origin::EnsureAccountOrRootOr, transfer_filter::PreLpTransfer, -}; - -use crate::{ - ForeignInvestments, Investments, LiquidityPools, LiquidityPoolsAxelarGateway, - LiquidityPoolsGateway, LocationToAccountId, OrmlAssetRegistry, Permissions, PoolSystem, - Runtime, RuntimeEvent, RuntimeOrigin, Swaps, Timestamp, Tokens, TransferAllowList, - TreasuryAccount, -}; - -impl pallet_foreign_investments::Config for Runtime { - type CollectedForeignInvestmentHook = CollectedForeignInvestmentHook; - type CollectedForeignRedemptionHook = CollectedForeignRedemptionHook; - type CurrencyId = CurrencyId; - type DecreasedForeignInvestOrderHook = DecreasedForeignInvestOrderHook; - type ForeignBalance = Balance; - type Investment = Investments; - type InvestmentId = TrancheCurrency; - type PoolBalance = Balance; - type PoolInspect = PoolSystem; - type SwapBalance = Balance; - type Swaps = Swaps; - type TrancheBalance = Balance; -} - -parameter_types! { - // To be used if we want to register a particular asset in the chain spec, when running the chain locally. - pub LiquidityPoolsPalletIndex: PalletIndex = ::index() as u8; -} - -impl pallet_liquidity_pools::Config for Runtime { - type AdminOrigin = EnsureRootOr; - type AssetRegistry = OrmlAssetRegistry; - type Balance = Balance; - type BalanceRatio = Ratio; - type CurrencyId = CurrencyId; - type DomainAccountToAccountId = AccountConverter; - type DomainAddressToAccountId = AccountConverter; - type ForeignInvestment = ForeignInvestments; - type GeneralCurrencyPrefix = GeneralCurrencyPrefix; - type OutboundQueue = LiquidityPoolsGateway; - type Permission = Permissions; - type PoolId = PoolId; - type PoolInspect = PoolSystem; - type PreTransferFilter = PreLpTransfer; - type RuntimeEvent = RuntimeEvent; - type Time = Timestamp; - type Tokens = Tokens; - type TrancheCurrency = TrancheCurrency; - type TrancheId = TrancheId; - type TrancheTokenPrice = PoolSystem; - type TreasuryAccount = TreasuryAccount; - type WeightInfo = (); -} - -parameter_types! { - pub const MaxIncomingMessageSize: u32 = 1024; - pub Sender: AccountId = gateway::get_gateway_account::(); -} - -parameter_types! { - // A temporary admin account for the LP logic - // This is a multi-sig controlled pure proxy on mainnet - // - address: "4eEqmbQMbFfNUg6bQnqi9zgUvQvSpNbUgstEM64Xq9FW58Xv" (on Centrifuge) - // (pub key 0x80339e91a87b9c082705fd1a6d39b3e00b46e445ad8c80c127f6a56941c6aa57) - // - // This account is besides Root and 2/3-council able to - // - add valid relayer contracts - // - rm valid relayer contracts - // - add valid LP instance contracts - // - rm valid LP instance contracts - // - add conversions from Axelar `sourceChain` strings to `DomainAddress` - // - set the Axelar gateway contract in the Axelar gateway precompile - pub LpAdminAccount: AccountId = AccountId::new(hex_literal::hex!("80339e91a87b9c082705fd1a6d39b3e00b46e445ad8c80c127f6a56941c6aa57")); -} - -impl pallet_liquidity_pools_gateway::Config for Runtime { - type AdminOrigin = EnsureAccountOrRootOr; - type InboundQueue = LiquidityPools; - type LocalEVMOrigin = pallet_liquidity_pools_gateway::EnsureLocal; - type MaxIncomingMessageSize = MaxIncomingMessageSize; - type Message = LiquidityPoolsMessage; - type OriginRecovery = LiquidityPoolsAxelarGateway; - type OutboundMessageNonce = OutboundMessageNonce; - type Router = liquidity_pools_gateway_routers::DomainRouter; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type Sender = Sender; - type WeightInfo = (); -} diff --git a/runtime/common/src/account_conversion.rs b/runtime/common/src/account_conversion.rs index 99061a6073..cdc209d040 100644 --- a/runtime/common/src/account_conversion.rs +++ b/runtime/common/src/account_conversion.rs @@ -13,7 +13,7 @@ use cfg_primitives::AccountId; use cfg_types::domain_address::{Domain, DomainAddress}; use pallet_evm::AddressMapping; -use sp_core::{Get, H160}; +use sp_core::{crypto::AccountId32, Get, H160}; use sp_runtime::traits::Convert; use staging_xcm::v3; use staging_xcm_executor::traits::ConvertLocation; @@ -77,10 +77,23 @@ impl Convert for AccountConverter { } } -impl Convert<(Domain, [u8; 32]), AccountId> for AccountConverter { - fn convert((domain, account): (Domain, [u8; 32])) -> AccountId { +impl Convert<(Domain, [u8; 32]), DomainAddress> for AccountConverter { + fn convert((domain, account): (Domain, [u8; 32])) -> DomainAddress { match domain { - Domain::Centrifuge => AccountId::new(account), + Domain::Centrifuge => DomainAddress::Centrifuge(account), + Domain::EVM(chain_id) => { + let mut bytes20 = [0; 20]; + bytes20.copy_from_slice(&account[..20]); + DomainAddress::EVM(chain_id, bytes20) + } + } + } +} + +impl Convert<(Domain, [u8; 32]), AccountId32> for AccountConverter { + fn convert((domain, account): (Domain, [u8; 32])) -> AccountId32 { + match domain { + Domain::Centrifuge => AccountId32::new(account), // EVM AccountId20 addresses are right-padded to 32 bytes Domain::EVM(chain_id) => { let mut bytes20 = [0; 20]; diff --git a/runtime/development/src/lib.rs b/runtime/development/src/lib.rs index f062a08f47..4d2205c972 100644 --- a/runtime/development/src/lib.rs +++ b/runtime/development/src/lib.rs @@ -1795,6 +1795,7 @@ impl pallet_liquidity_pools::Config for Runtime { type BalanceRatio = Ratio; type CurrencyId = CurrencyId; type DomainAccountToAccountId = AccountConverter; + type DomainAccountToDomainAddress = AccountConverter; type DomainAddressToAccountId = AccountConverter; type ForeignInvestment = ForeignInvestments; type GeneralCurrencyPrefix = GeneralCurrencyPrefix; diff --git a/runtime/development/src/liquidity_pools.rs b/runtime/development/src/liquidity_pools.rs deleted file mode 100644 index 34802614d2..0000000000 --- a/runtime/development/src/liquidity_pools.rs +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2023 Centrifuge Foundation (centrifuge.io). -// -// This file is part of the Centrifuge chain project. -// Centrifuge is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version (see http://www.gnu.org/licenses). -// Centrifuge is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -use cfg_primitives::{ - liquidity_pools::GeneralCurrencyPrefix, AccountId, Balance, EnsureRootOr, HalfOfCouncil, - OutboundMessageNonce, PalletIndex, PoolId, TrancheId, -}; -use cfg_types::{ - fixed_point::Ratio, - tokens::{CurrencyId, TrancheCurrency}, -}; -use frame_support::{parameter_types, traits::PalletInfoAccess}; -use frame_system::EnsureRoot; -use pallet_liquidity_pools::hooks::{ - CollectedForeignInvestmentHook, CollectedForeignRedemptionHook, DecreasedForeignInvestOrderHook, -}; -use runtime_common::{ - account_conversion::AccountConverter, gateway, liquidity_pools::LiquidityPoolsMessage, - transfer_filter::PreLpTransfer, -}; - -use crate::{ - ForeignInvestments, Investments, LiquidityPools, LiquidityPoolsAxelarGateway, - LiquidityPoolsGateway, LocationToAccountId, OrmlAssetRegistry, Permissions, PoolSystem, - Runtime, RuntimeEvent, RuntimeOrigin, Swaps, Timestamp, Tokens, TransferAllowList, - TreasuryAccount, -}; - -impl pallet_foreign_investments::Config for Runtime { - type CollectedForeignInvestmentHook = CollectedForeignInvestmentHook; - type CollectedForeignRedemptionHook = CollectedForeignRedemptionHook; - type CurrencyId = CurrencyId; - type DecreasedForeignInvestOrderHook = DecreasedForeignInvestOrderHook; - type ForeignBalance = Balance; - type Investment = Investments; - type InvestmentId = TrancheCurrency; - type PoolBalance = Balance; - type PoolInspect = PoolSystem; - type SwapBalance = Balance; - type Swaps = Swaps; - type TrancheBalance = Balance; -} - -parameter_types! { - // To be used if we want to register a particular asset in the chain spec, when running the chain locally. - pub LiquidityPoolsPalletIndex: PalletIndex = ::index() as u8; -} - -impl pallet_liquidity_pools::Config for Runtime { - type AdminOrigin = EnsureRoot; - type AssetRegistry = OrmlAssetRegistry; - type Balance = Balance; - type BalanceRatio = Ratio; - type CurrencyId = CurrencyId; - type DomainAccountToAccountId = AccountConverter; - type DomainAddressToAccountId = AccountConverter; - type ForeignInvestment = ForeignInvestments; - type GeneralCurrencyPrefix = GeneralCurrencyPrefix; - type OutboundQueue = LiquidityPoolsGateway; - type Permission = Permissions; - type PoolId = PoolId; - type PoolInspect = PoolSystem; - type PreTransferFilter = PreLpTransfer; - type RuntimeEvent = RuntimeEvent; - type Time = Timestamp; - type Tokens = Tokens; - type TrancheCurrency = TrancheCurrency; - type TrancheId = TrancheId; - type TrancheTokenPrice = PoolSystem; - type TreasuryAccount = TreasuryAccount; - type WeightInfo = (); -} - -parameter_types! { - pub const MaxIncomingMessageSize: u32 = 1024; - pub Sender: AccountId = gateway::get_gateway_account::(); -} - -impl pallet_liquidity_pools_gateway::Config for Runtime { - type AdminOrigin = EnsureRootOr; - type InboundQueue = LiquidityPools; - type LocalEVMOrigin = pallet_liquidity_pools_gateway::EnsureLocal; - type MaxIncomingMessageSize = MaxIncomingMessageSize; - type Message = LiquidityPoolsMessage; - type OriginRecovery = LiquidityPoolsAxelarGateway; - type OutboundMessageNonce = OutboundMessageNonce; - type Router = liquidity_pools_gateway_routers::DomainRouter; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type Sender = Sender; - type WeightInfo = (); -} From 2b4f94fd09924fca27e97ce3f768e748be1d4aa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Enrique=20Mu=C3=B1oz=20Mart=C3=ADn?= Date: Fri, 7 Jun 2024 12:46:53 +0200 Subject: [PATCH 12/21] Loans: cashflows simple version (#1867) * updated from #1408 * add testing * organize and polish cashflow module * add Runtime API * update types.md * make it works without chronoutils * minor changes * add borrow check * fix legacy increase_debt test * add loan cashflow tests * compute principal and interest * correct validation * add CashflowPayment type * add variant error * fix interest computation when months are partial * remove Rate usage and use weight * fix start date for cashflows * rename api name * fix benchmarks * taplo fmt * using a lower discount rate to simply benchmarking * rewrite doc line * interest computed at maturity * remove borrow support * fix compilation * None to OnceAtMaturity variant * compilation fixes * Loans: multi cashflows fix external loan (#1864) * correct principal/interest for both kind of loans * support for external prices * add external test * simplify implementation * start from repayments --- Cargo.lock | 1 + Cargo.toml | 1 + pallets/loans/Cargo.toml | 1 + pallets/loans/docs/types.md | 38 +-- pallets/loans/src/benchmarking.rs | 17 +- pallets/loans/src/entities/changes.rs | 5 +- pallets/loans/src/entities/loans.rs | 78 +++--- pallets/loans/src/entities/pricing.rs | 18 +- .../loans/src/entities/pricing/external.rs | 16 +- pallets/loans/src/lib.rs | 16 +- pallets/loans/src/tests/borrow_loan.rs | 101 +++++-- pallets/loans/src/tests/create_loan.rs | 2 +- pallets/loans/src/tests/mod.rs | 15 +- pallets/loans/src/tests/mutate_loan.rs | 5 +- pallets/loans/src/tests/repay_loan.rs | 13 +- pallets/loans/src/tests/util.rs | 28 +- pallets/loans/src/types/cashflow.rs | 254 ++++++++++++++++++ pallets/loans/src/types/mod.rs | 90 +------ runtime/altair/src/lib.rs | 8 +- runtime/centrifuge/src/lib.rs | 7 +- runtime/common/src/apis/loans.rs | 6 +- runtime/development/src/lib.rs | 7 +- .../src/generic/cases/loans.rs | 9 +- .../integration-tests/src/generic/config.rs | 2 +- 24 files changed, 524 insertions(+), 214 deletions(-) create mode 100644 pallets/loans/src/types/cashflow.rs diff --git a/Cargo.lock b/Cargo.lock index 5174d7d93f..5931ec30ff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8045,6 +8045,7 @@ dependencies = [ "cfg-traits", "cfg-types", "cfg-utils", + "chrono", "frame-benchmarking", "frame-support", "frame-system", diff --git a/Cargo.toml b/Cargo.toml index bd12d51f49..19c481087d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -82,6 +82,7 @@ rev_slice = { version = "0.1.5", default-features = false } impl-trait-for-tuples = "0.2.1" num-traits = { version = "0.2", default-features = false } num_enum = { version = "0.5.3", default-features = false } +chrono = { version = "0.4", default-features = false } # Cumulus cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } diff --git a/pallets/loans/Cargo.toml b/pallets/loans/Cargo.toml index 5934cd764e..3ad612a42f 100644 --- a/pallets/loans/Cargo.toml +++ b/pallets/loans/Cargo.toml @@ -43,6 +43,7 @@ pallet-timestamp = { workspace = true, default-features = true } pallet-uniques = { workspace = true, default-features = true } cfg-mocks = { workspace = true, default-features = true } +chrono = { workspace = true } [features] default = ["std"] diff --git a/pallets/loans/docs/types.md b/pallets/loans/docs/types.md index 3ec16a509c..745effae9d 100644 --- a/pallets/loans/docs/types.md +++ b/pallets/loans/docs/types.md @@ -4,28 +4,30 @@ set namespaceSeparator :: hide methods -enum Maturity { - Fixed::date: Seconds - Fixed::extension: Seconds -} +package cashflow { + enum Maturity { + Fixed::date: Seconds + Fixed::extension: Seconds + } -enum InterestPayments { - None -} + enum InterestPayments { + OnceAtMaturity + } -enum PayDownSchedule { - None -} + enum PayDownSchedule { + None + } -class RepaymentSchedule { - maturity: Maturity - interest_payments: InterestPayments - pay_down_schedule: PayDownSchedule -} + class RepaymentSchedule { + maturity: Maturity + interest_payments: InterestPayments + pay_down_schedule: PayDownSchedule + } -RepaymentSchedule *--> Maturity -RepaymentSchedule *---> PayDownSchedule -RepaymentSchedule *----> InterestPayments + RepaymentSchedule *--> Maturity + RepaymentSchedule *--> PayDownSchedule + RepaymentSchedule *--> InterestPayments +} enum BorrowRestrictions { NoWrittenOff diff --git a/pallets/loans/src/benchmarking.rs b/pallets/loans/src/benchmarking.rs index e2d8c185de..b893fef06c 100644 --- a/pallets/loans/src/benchmarking.rs +++ b/pallets/loans/src/benchmarking.rs @@ -16,7 +16,7 @@ use cfg_traits::{ benchmarking::FundedPoolBenchmarkHelper, changes::ChangeGuard, interest::{CompoundingSchedule, InterestAccrual, InterestRate}, - Permissions, PoolWriteOffPolicyMutate, Seconds, TimeAsSecs, ValueProvider, + Permissions, PoolWriteOffPolicyMutate, TimeAsSecs, ValueProvider, }; use cfg_types::{ adjustments::Adjustment, @@ -40,13 +40,12 @@ use crate::{ }, pallet::*, types::{ + cashflow::{InterestPayments, Maturity, PayDownSchedule, RepaymentSchedule}, valuation::{DiscountedCashFlow, ValuationMethod}, - BorrowRestrictions, InterestPayments, LoanRestrictions, Maturity, PayDownSchedule, - RepayRestrictions, RepaymentSchedule, + BorrowRestrictions, LoanRestrictions, RepayRestrictions, }, }; -const OFFSET: Seconds = 120; const COLLECION_ID: u16 = 42; const COLLATERAL_VALUE: u128 = 1_000_000; const FUNDS: u128 = 1_000_000_000; @@ -125,10 +124,12 @@ where } fn base_loan(item_id: T::ItemId) -> LoanInfo { + let maturity_offset = 40 * 365 * 24 * 3600; // 40 years + LoanInfo { schedule: RepaymentSchedule { - maturity: Maturity::fixed(T::Time::now() + OFFSET), - interest_payments: InterestPayments::None, + maturity: Maturity::fixed(T::Time::now() + maturity_offset), + interest_payments: InterestPayments::OnceAtMaturity, pay_down_schedule: PayDownSchedule::None, }, collateral: (COLLECION_ID.into(), item_id), @@ -145,7 +146,7 @@ where probability_of_default: T::Rate::zero(), loss_given_default: T::Rate::zero(), discount_rate: InterestRate::Fixed { - rate_per_year: T::Rate::one(), + rate_per_year: T::Rate::saturating_from_rational(1, 5000), compounding: CompoundingSchedule::Secondly, }, }), @@ -199,7 +200,7 @@ where } fn create_mutation() -> LoanMutation { - LoanMutation::InterestPayments(InterestPayments::None) + LoanMutation::InterestPayments(InterestPayments::OnceAtMaturity) } fn propose_mutation(pool_id: T::PoolId, loan_id: T::LoanId) -> T::Hash { diff --git a/pallets/loans/src/entities/changes.rs b/pallets/loans/src/entities/changes.rs index 1181f79da4..eff6cd3ee4 100644 --- a/pallets/loans/src/entities/changes.rs +++ b/pallets/loans/src/entities/changes.rs @@ -7,8 +7,9 @@ use crate::{ entities::input::{PrincipalInput, RepaidInput}, pallet::Config, types::{ - policy::WriteOffRule, valuation::ValuationMethod, InterestPayments, Maturity, - PayDownSchedule, + cashflow::{InterestPayments, Maturity, PayDownSchedule}, + policy::WriteOffRule, + valuation::ValuationMethod, }, }; diff --git a/pallets/loans/src/entities/loans.rs b/pallets/loans/src/entities/loans.rs index 105ecd8ca0..b9cb593740 100644 --- a/pallets/loans/src/entities/loans.rs +++ b/pallets/loans/src/entities/loans.rs @@ -14,7 +14,7 @@ use sp_runtime::{ }, DispatchError, }; -use sp_std::collections::btree_map::BTreeMap; +use sp_std::{collections::btree_map::BTreeMap, vec::Vec}; use crate::{ entities::{ @@ -27,9 +27,10 @@ use crate::{ }, pallet::{AssetOf, Config, Error}, types::{ + cashflow::{CashflowPayment, RepaymentSchedule}, policy::{WriteOffStatus, WriteOffTrigger}, BorrowLoanError, BorrowRestrictions, CloseLoanError, CreateLoanError, LoanRestrictions, - MutationError, RepaidAmount, RepayLoanError, RepayRestrictions, RepaymentSchedule, + MutationError, RepaidAmount, RepayLoanError, RepayRestrictions, }, PriceOf, }; @@ -71,7 +72,7 @@ impl LoanInfo { T::InterestAccrual::validate_rate(&self.interest_rate)?; ensure!( - self.schedule.is_valid(now), + self.schedule.is_valid(now)?, Error::::from(CreateLoanError::InvalidRepaymentSchedule) ); @@ -223,6 +224,10 @@ impl ActiveLoan { &self.borrower } + pub fn origination_date(&self) -> Seconds { + self.origination_date + } + pub fn maturity_date(&self) -> Option { self.schedule.maturity.date() } @@ -238,13 +243,28 @@ impl ActiveLoan { } } + pub fn principal(&self) -> Result { + Ok(self + .total_borrowed + .ensure_sub(self.total_repaid.principal)?) + } + + pub fn expected_cashflows(&self) -> Result>, DispatchError> { + self.schedule.generate_cashflows( + self.repayments_on_schedule_until, + self.principal()?, + match &self.pricing { + ActivePricing::Internal(_) => self.principal()?, + ActivePricing::External(inner) => inner.outstanding_notional_principal()?, + }, + self.pricing.interest().rate(), + ) + } + pub fn write_off_status(&self) -> WriteOffStatus { WriteOffStatus { percentage: self.write_off_percentage, - penalty: match &self.pricing { - ActivePricing::Internal(inner) => inner.interest.penalty(), - ActivePricing::External(inner) => inner.interest.penalty(), - }, + penalty: self.pricing.interest().penalty(), } } @@ -364,6 +384,8 @@ impl ActiveLoan { } } + self.repayments_on_schedule_until = T::Time::now(); + Ok(()) } @@ -380,11 +402,8 @@ impl ActiveLoan { ) -> Result, DispatchError> { let (max_repay_principal, outstanding_interest) = match &self.pricing { ActivePricing::Internal(inner) => { - amount.principal.internal()?; - - let principal = self - .total_borrowed - .ensure_sub(self.total_repaid.principal)?; + let _ = amount.principal.internal()?; + let principal = self.principal()?; (principal, inner.outstanding_interest(principal)?) } @@ -438,15 +457,15 @@ impl ActiveLoan { } } + self.repayments_on_schedule_until = T::Time::now(); + Ok(amount) } pub fn write_off(&mut self, new_status: &WriteOffStatus) -> DispatchResult { - let penalty = new_status.penalty; - match &mut self.pricing { - ActivePricing::Internal(inner) => inner.interest.set_penalty(penalty)?, - ActivePricing::External(inner) => inner.interest.set_penalty(penalty)?, - } + self.pricing + .interest_mut() + .set_penalty(new_status.penalty)?; self.write_off_percentage = new_status.percentage; @@ -454,12 +473,10 @@ impl ActiveLoan { } fn ensure_can_close(&self) -> DispatchResult { - let can_close = match &self.pricing { - ActivePricing::Internal(inner) => !inner.interest.has_debt(), - ActivePricing::External(inner) => !inner.interest.has_debt(), - }; - - ensure!(can_close, Error::::from(CloseLoanError::NotFullyRepaid)); + ensure!( + !self.pricing.interest().has_debt(), + Error::::from(CloseLoanError::NotFullyRepaid) + ); Ok(()) } @@ -502,10 +519,7 @@ impl ActiveLoan { .maturity .extends(extension) .map_err(|_| Error::::from(MutationError::MaturityExtendedTooMuch))?, - LoanMutation::InterestRate(rate) => match &mut self.pricing { - ActivePricing::Internal(inner) => inner.interest.set_base_rate(rate)?, - ActivePricing::External(inner) => inner.interest.set_base_rate(rate)?, - }, + LoanMutation::InterestRate(rate) => self.pricing.interest_mut().set_base_rate(rate)?, LoanMutation::InterestPayments(payments) => self.schedule.interest_payments = payments, LoanMutation::PayDownSchedule(schedule) => self.schedule.pay_down_schedule = schedule, LoanMutation::Internal(mutation) => match &mut self.pricing { @@ -521,7 +535,7 @@ impl ActiveLoan { #[cfg(feature = "runtime-benchmarks")] pub fn set_maturity(&mut self, duration: Seconds) { - self.schedule.maturity = crate::types::Maturity::fixed(duration); + self.schedule.maturity = crate::types::cashflow::Maturity::fixed(duration); } } @@ -557,9 +571,7 @@ impl TryFrom<(T::PoolId, ActiveLoan)> for ActiveLoanInfo { Ok(match &active_loan.pricing { ActivePricing::Internal(inner) => { - let principal = active_loan - .total_borrowed - .ensure_sub(active_loan.total_repaid.principal)?; + let principal = active_loan.principal()?; Self { present_value, @@ -574,7 +586,7 @@ impl TryFrom<(T::PoolId, ActiveLoan)> for ActiveLoanInfo { Self { present_value, - outstanding_principal: inner.outstanding_principal(pool_id, maturity)?, + outstanding_principal: inner.outstanding_priced_principal(pool_id, maturity)?, outstanding_interest: inner.outstanding_interest()?, current_price: Some(inner.current_price(pool_id, maturity)?), active_loan, @@ -594,7 +606,7 @@ pub mod v3 { loans::BlockNumberFor, pricing::external::v3::{ActivePricing, Pricing}, }, - types::{LoanRestrictions, RepaidAmount, RepaymentSchedule}, + types::{cashflow::RepaymentSchedule, LoanRestrictions, RepaidAmount}, AssetOf, Config, }; diff --git a/pallets/loans/src/entities/pricing.rs b/pallets/loans/src/entities/pricing.rs index 557b6b88a8..799feb35b8 100644 --- a/pallets/loans/src/entities/pricing.rs +++ b/pallets/loans/src/entities/pricing.rs @@ -2,7 +2,7 @@ use frame_support::RuntimeDebugNoBound; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; -use crate::pallet::Config; +use crate::{entities::interest::ActiveInterestRate, pallet::Config}; pub mod external; pub mod internal; @@ -28,3 +28,19 @@ pub enum ActivePricing { /// Internal attributes External(external::ExternalActivePricing), } + +impl ActivePricing { + pub fn interest(&self) -> &ActiveInterestRate { + match self { + Self::Internal(inner) => &inner.interest, + Self::External(inner) => &inner.interest, + } + } + + pub fn interest_mut(&mut self) -> &mut ActiveInterestRate { + match self { + Self::Internal(inner) => &mut inner.interest, + Self::External(inner) => &mut inner.interest, + } + } +} diff --git a/pallets/loans/src/entities/pricing/external.rs b/pallets/loans/src/entities/pricing/external.rs index e9652ac518..00d15a7532 100644 --- a/pallets/loans/src/entities/pricing/external.rs +++ b/pallets/loans/src/entities/pricing/external.rs @@ -208,7 +208,13 @@ impl ExternalActivePricing { } } - pub fn outstanding_principal( + pub fn outstanding_notional_principal(&self) -> Result { + Ok(self + .outstanding_quantity + .ensure_mul_int(self.info.notional)?) + } + + pub fn outstanding_priced_principal( &self, pool_id: T::PoolId, maturity: Option, @@ -218,12 +224,8 @@ impl ExternalActivePricing { } pub fn outstanding_interest(&self) -> Result { - let outstanding_notional = self - .outstanding_quantity - .ensure_mul_int(self.info.notional)?; - let debt = self.interest.current_debt()?; - Ok(debt.ensure_sub(outstanding_notional)?) + Ok(debt.ensure_sub(self.outstanding_notional_principal()?)?) } pub fn present_value( @@ -231,7 +233,7 @@ impl ExternalActivePricing { pool_id: T::PoolId, maturity: Option, ) -> Result { - self.outstanding_principal(pool_id, maturity) + self.outstanding_priced_principal(pool_id, maturity) } pub fn present_value_cached( diff --git a/pallets/loans/src/lib.rs b/pallets/loans/src/lib.rs index e79832ed7b..f3c3bceae7 100644 --- a/pallets/loans/src/lib.rs +++ b/pallets/loans/src/lib.rs @@ -107,6 +107,7 @@ pub mod pallet { use sp_std::{collections::btree_map::BTreeMap, vec, vec::Vec}; use types::{ self, + cashflow::CashflowPayment, policy::{self, WriteOffRule, WriteOffStatus}, BorrowLoanError, CloseLoanError, CreateLoanError, MutationError, RepayLoanError, WrittenOffError, @@ -1237,7 +1238,7 @@ pub mod pallet { ) -> Result, DispatchError> { ActiveLoans::::get(pool_id) .into_iter() - .map(|(loan_id, loan)| Ok((loan_id, (pool_id, loan).try_into()?))) + .map(|(loan_id, loan)| Ok((loan_id, ActiveLoanInfo::try_from((pool_id, loan))?))) .collect() } @@ -1248,9 +1249,20 @@ pub mod pallet { ActiveLoans::::get(pool_id) .into_iter() .find(|(id, _)| *id == loan_id) - .map(|(_, loan)| (pool_id, loan).try_into()) + .map(|(_, loan)| ActiveLoanInfo::try_from((pool_id, loan))) .transpose() } + + pub fn expected_cashflows( + pool_id: T::PoolId, + loan_id: T::LoanId, + ) -> Result>, DispatchError> { + ActiveLoans::::get(pool_id) + .into_iter() + .find(|(id, _)| *id == loan_id) + .map(|(_, loan)| loan.expected_cashflows()) + .ok_or(Error::::LoanNotActiveOrNotFound)? + } } // TODO: This implementation can be cleaned once #908 be solved diff --git a/pallets/loans/src/tests/borrow_loan.rs b/pallets/loans/src/tests/borrow_loan.rs index c74281bb65..ad3cf70651 100644 --- a/pallets/loans/src/tests/borrow_loan.rs +++ b/pallets/loans/src/tests/borrow_loan.rs @@ -586,10 +586,6 @@ fn twice_with_elapsed_time() { #[test] fn increase_debt_does_not_withdraw() { new_test_ext().execute_with(|| { - MockPools::mock_withdraw(|_, _, _| { - unreachable!("increase debt must not withdraw funds from the pool"); - }); - let loan = LoanInfo { pricing: Pricing::External(ExternalPricing { max_borrow_amount: ExtMaxBorrowAmount::NoLimit, @@ -601,19 +597,10 @@ fn increase_debt_does_not_withdraw() { let loan_id = util::create_loan(loan); let amount = ExternalAmount::new(QUANTITY, PRICE_VALUE); - MockPrices::mock_get(|id, pool_id| { - assert_eq!(*pool_id, POOL_A); - match *id { - REGISTER_PRICE_ID => Ok((PRICE_VALUE, BLOCK_TIME_MS)), - _ => Err(PRICE_ID_NO_FOUND), - } - }); - MockPrices::mock_register_id(|id, pool_id| { - assert_eq!(*pool_id, POOL_A); - match *id { - REGISTER_PRICE_ID => Ok(()), - _ => Err(PRICE_ID_NO_FOUND), - } + + config_mocks(amount.balance().unwrap()); + MockPools::mock_withdraw(|_, _, _| { + unreachable!("increase debt must not withdraw funds from the pool"); }); assert_ok!(Loans::increase_debt( @@ -624,3 +611,83 @@ fn increase_debt_does_not_withdraw() { )); }); } + +mod cashflow { + use super::*; + + #[test] + fn computed_correctly_internal_pricing() { + new_test_ext().execute_with(|| { + let loan_id = util::create_loan(util::base_internal_loan()); + + config_mocks(COLLATERAL_VALUE / 2); + assert_ok!(Loans::borrow( + RuntimeOrigin::signed(BORROWER), + POOL_A, + loan_id, + PrincipalInput::Internal(COLLATERAL_VALUE / 2) + )); + + let loan = util::get_loan(loan_id); + + let principal = COLLATERAL_VALUE / 2; + let acc_interest_rate_per_year = checked_pow( + util::default_interest_rate().per_sec().unwrap(), + SECONDS_PER_YEAR as usize, + ) + .unwrap(); + let interest = acc_interest_rate_per_year.saturating_mul_int(principal) - principal; + + assert_eq!( + loan.expected_cashflows() + .unwrap() + .into_iter() + .map(|payment| (payment.when, payment.principal, payment.interest)) + .collect::>(), + vec![(loan.maturity_date().unwrap(), principal, interest)] + ); + }); + } + + #[test] + fn computed_correctly_external_pricing() { + new_test_ext().execute_with(|| { + let loan_id = util::create_loan(util::base_external_loan()); + + let amount = ExternalAmount::new(QUANTITY / 2.into(), PRICE_VALUE); + config_mocks(amount.balance().unwrap()); + + assert_ok!(Loans::borrow( + RuntimeOrigin::signed(BORROWER), + POOL_A, + loan_id, + PrincipalInput::External(amount.clone()) + )); + + let loan = util::get_loan(loan_id); + + let principal = amount.balance().unwrap(); + let acc_interest_rate_per_year = checked_pow( + util::default_interest_rate().per_sec().unwrap(), + SECONDS_PER_YEAR as usize, + ) + .unwrap(); + + let outstanding_notional = util::current_extenal_pricing(loan_id) + .outstanding_notional_principal() + .unwrap(); + + let interest = + acc_interest_rate_per_year.saturating_mul_int(principal) - outstanding_notional; + + assert_eq!( + loan.expected_cashflows() + .unwrap() + .into_iter() + .map(|payment| (payment.when, payment.principal, payment.interest)) + .collect::>(), + vec![(loan.maturity_date().unwrap(), principal, interest)] + ); + }); + } +} diff --git a/pallets/loans/src/tests/create_loan.rs b/pallets/loans/src/tests/create_loan.rs index d74a7af815..37b87acdf9 100644 --- a/pallets/loans/src/tests/create_loan.rs +++ b/pallets/loans/src/tests/create_loan.rs @@ -92,7 +92,7 @@ fn with_wrong_schedule() { let loan = LoanInfo { schedule: RepaymentSchedule { maturity: Maturity::fixed(now().as_secs()), - interest_payments: InterestPayments::None, + interest_payments: InterestPayments::OnceAtMaturity, pay_down_schedule: PayDownSchedule::None, }, ..util::base_internal_loan() diff --git a/pallets/loans/src/tests/mod.rs b/pallets/loans/src/tests/mod.rs index 13605dde37..01ebc3b8ae 100644 --- a/pallets/loans/src/tests/mod.rs +++ b/pallets/loans/src/tests/mod.rs @@ -1,12 +1,12 @@ use std::time::Duration; use cfg_mocks::pallet_mock_data::util::MockDataCollection; -use cfg_primitives::SECONDS_PER_DAY; +use cfg_primitives::{SECONDS_PER_DAY, SECONDS_PER_YEAR}; use cfg_traits::interest::{CompoundingSchedule, InterestRate}; use cfg_types::permissions::{PermissionScope, PoolRole, Role}; use frame_support::{assert_noop, assert_ok, storage::bounded_vec::BoundedVec}; use sp_runtime::{ - traits::{BadOrigin, One}, + traits::{checked_pow, BadOrigin, One}, DispatchError, FixedPointNumber, }; @@ -16,18 +16,21 @@ use super::{ input::{PrincipalInput, RepaidInput}, loans::{ActiveLoan, ActiveLoanInfo, LoanInfo}, pricing::{ - external::{ExternalAmount, ExternalPricing, MaxBorrowAmount as ExtMaxBorrowAmount}, + external::{ + ExternalActivePricing, ExternalAmount, ExternalPricing, + MaxBorrowAmount as ExtMaxBorrowAmount, + }, internal::{InternalPricing, MaxBorrowAmount as IntMaxBorrowAmount}, ActivePricing, Pricing, }, }, pallet::{ActiveLoans, CreatedLoan, Error, Event, LastLoanId, PortfolioValuation}, types::{ + cashflow::{InterestPayments, Maturity, PayDownSchedule, RepaymentSchedule}, policy::{WriteOffRule, WriteOffStatus, WriteOffTrigger}, valuation::{DiscountedCashFlow, ValuationMethod}, - BorrowLoanError, BorrowRestrictions, CloseLoanError, CreateLoanError, InterestPayments, - LoanRestrictions, Maturity, MutationError, PayDownSchedule, RepayLoanError, - RepayRestrictions, RepaymentSchedule, WrittenOffError, + BorrowLoanError, BorrowRestrictions, CloseLoanError, CreateLoanError, LoanRestrictions, + MutationError, RepayLoanError, RepayRestrictions, WrittenOffError, }, }; diff --git a/pallets/loans/src/tests/mutate_loan.rs b/pallets/loans/src/tests/mutate_loan.rs index b85964c263..7f4d5f2e83 100644 --- a/pallets/loans/src/tests/mutate_loan.rs +++ b/pallets/loans/src/tests/mutate_loan.rs @@ -1,6 +1,7 @@ use super::*; -const DEFAULT_MUTATION: LoanMutation = LoanMutation::InterestPayments(InterestPayments::None); +const DEFAULT_MUTATION: LoanMutation = + LoanMutation::InterestPayments(InterestPayments::OnceAtMaturity); fn config_mocks(loan_id: LoanId, loan_mutation: &LoanMutation) { MockPermissions::mock_has(|scope, who, role| { @@ -213,7 +214,7 @@ fn with_successful_mutation_application() { date: (now() + YEAR).as_secs(), extension: YEAR.as_secs(), }, - interest_payments: InterestPayments::None, + interest_payments: InterestPayments::OnceAtMaturity, pay_down_schedule: PayDownSchedule::None, }, interest_rate: InterestRate::Fixed { diff --git a/pallets/loans/src/tests/repay_loan.rs b/pallets/loans/src/tests/repay_loan.rs index 7772b14849..5177a0dcdf 100644 --- a/pallets/loans/src/tests/repay_loan.rs +++ b/pallets/loans/src/tests/repay_loan.rs @@ -982,10 +982,6 @@ fn with_external_pricing() { #[test] fn decrease_debt_does_not_deposit() { new_test_ext().execute_with(|| { - MockPools::mock_deposit(|_, _, _| { - unreachable!("increase debt must not withdraw funds from the pool"); - }); - let loan = LoanInfo { pricing: Pricing::External(ExternalPricing { max_borrow_amount: ExtMaxBorrowAmount::NoLimit, @@ -999,12 +995,9 @@ fn decrease_debt_does_not_deposit() { let amount = ExternalAmount::new(QUANTITY, PRICE_VALUE); util::borrow_loan(loan_id, PrincipalInput::External(amount.clone())); - MockPrices::mock_get(move |id, pool_id| { - assert_eq!(*pool_id, POOL_A); - match *id { - REGISTER_PRICE_ID => Ok((PRICE_VALUE, BLOCK_TIME_MS)), - _ => Err(PRICE_ID_NO_FOUND), - } + config_mocks(amount.balance().unwrap()); + MockPools::mock_deposit(|_, _, _| { + unreachable!("decrease debt must not withdraw funds from the pool"); }); assert_ok!(Loans::decrease_debt( diff --git a/pallets/loans/src/tests/util.rs b/pallets/loans/src/tests/util.rs index c12c180bdc..4bd83467c6 100644 --- a/pallets/loans/src/tests/util.rs +++ b/pallets/loans/src/tests/util.rs @@ -27,6 +27,13 @@ pub fn current_loan_debt(loan_id: LoanId) -> Balance { } } +pub fn current_extenal_pricing(loan_id: LoanId) -> ExternalActivePricing { + match get_loan(loan_id).pricing() { + ActivePricing::Internal(_) => panic!("expected external pricing"), + ActivePricing::External(pricing) => pricing.clone(), + } +} + pub fn borrower(loan_id: LoanId) -> AccountId { match CreatedLoan::::get(POOL_A, loan_id) { Some(created_loan) => *created_loan.borrower(), @@ -103,6 +110,13 @@ pub fn dcf_internal_loan() -> LoanInfo { } } +pub fn default_interest_rate() -> InterestRate { + InterestRate::Fixed { + rate_per_year: Rate::from_float(DEFAULT_INTEREST_RATE), + compounding: CompoundingSchedule::Secondly, + } +} + pub fn base_internal_loan() -> LoanInfo { LoanInfo { schedule: RepaymentSchedule { @@ -110,13 +124,10 @@ pub fn base_internal_loan() -> LoanInfo { date: (now() + YEAR).as_secs(), extension: (YEAR / 2).as_secs(), }, - interest_payments: InterestPayments::None, + interest_payments: InterestPayments::OnceAtMaturity, pay_down_schedule: PayDownSchedule::None, }, - interest_rate: InterestRate::Fixed { - rate_per_year: Rate::from_float(DEFAULT_INTEREST_RATE), - compounding: CompoundingSchedule::Secondly, - }, + interest_rate: default_interest_rate(), collateral: ASSET_AA, pricing: Pricing::Internal(base_internal_pricing()), restrictions: LoanRestrictions { @@ -140,13 +151,10 @@ pub fn base_external_loan() -> LoanInfo { LoanInfo { schedule: RepaymentSchedule { maturity: Maturity::fixed((now() + YEAR).as_secs()), - interest_payments: InterestPayments::None, + interest_payments: InterestPayments::OnceAtMaturity, pay_down_schedule: PayDownSchedule::None, }, - interest_rate: InterestRate::Fixed { - rate_per_year: Rate::from_float(DEFAULT_INTEREST_RATE), - compounding: CompoundingSchedule::Secondly, - }, + interest_rate: default_interest_rate(), collateral: ASSET_AA, pricing: Pricing::External(base_external_pricing()), restrictions: LoanRestrictions { diff --git a/pallets/loans/src/types/cashflow.rs b/pallets/loans/src/types/cashflow.rs new file mode 100644 index 0000000000..4b5021a5c3 --- /dev/null +++ b/pallets/loans/src/types/cashflow.rs @@ -0,0 +1,254 @@ +// Copyright 2023 Centrifuge Foundation (centrifuge.io). +// This file is part of Centrifuge chain project. + +// Centrifuge is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version (see http://www.gnu.org/licenses). + +// Centrifuge is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +use cfg_traits::{interest::InterestRate, Seconds}; +use frame_support::pallet_prelude::RuntimeDebug; +use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; +use scale_info::TypeInfo; +use sp_runtime::{ + traits::{ + ensure_pow, EnsureAdd, EnsureAddAssign, EnsureFixedPointNumber, EnsureInto, EnsureSub, + EnsureSubAssign, + }, + DispatchError, FixedPointNumber, FixedPointOperand, FixedU128, +}; +use sp_std::{vec, vec::Vec}; + +/// Specify the expected repayments date +#[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo, RuntimeDebug, MaxEncodedLen)] +pub enum Maturity { + /// Fixed point in time, in secs + Fixed { + /// Secs when maturity ends + date: Seconds, + /// Extension in secs, without special permissions + extension: Seconds, + }, + /// No Maturity date + None, +} + +impl Maturity { + pub fn fixed(date: Seconds) -> Self { + Self::Fixed { date, extension: 0 } + } + + pub fn date(&self) -> Option { + match self { + Maturity::Fixed { date, .. } => Some(*date), + Maturity::None => None, + } + } + + pub fn is_valid(&self, now: Seconds) -> bool { + match self { + Maturity::Fixed { date, .. } => *date > now, + Maturity::None => true, + } + } + + pub fn extends(&mut self, value: Seconds) -> Result<(), DispatchError> { + match self { + Maturity::Fixed { date, extension } => { + date.ensure_add_assign(value)?; + extension.ensure_sub_assign(value)?; + Ok(()) + } + Maturity::None => Err(DispatchError::Other( + "No maturity date that could be extended.", + )), + } + } +} + +/// Interest payment periods +#[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo, RuntimeDebug, MaxEncodedLen)] +pub enum InterestPayments { + /// All interest is expected to be paid at the maturity date + OnceAtMaturity, +} + +/// Specify the paydown schedules of the loan +#[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo, RuntimeDebug, MaxEncodedLen)] +pub enum PayDownSchedule { + /// No restrictions on how the paydown should be done. + None, +} + +#[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo, RuntimeDebug, MaxEncodedLen)] +pub struct CashflowPayment { + pub when: Seconds, + pub principal: Balance, + pub interest: Balance, +} + +/// Specify the repayment schedule of the loan +#[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo, RuntimeDebug, MaxEncodedLen)] +pub struct RepaymentSchedule { + /// Expected repayments date for remaining debt + pub maturity: Maturity, + + /// Period at which interest is paid + pub interest_payments: InterestPayments, + + /// How much of the initially borrowed amount is paid back during interest + /// payments + pub pay_down_schedule: PayDownSchedule, +} + +impl RepaymentSchedule { + pub fn is_valid(&self, now: Seconds) -> Result { + let valid = match self.interest_payments { + InterestPayments::OnceAtMaturity => true, + }; + + Ok(valid && self.maturity.is_valid(now)) + } + + pub fn generate_cashflows( + &self, + origination_date: Seconds, + principal: Balance, + principal_base: Balance, + interest_rate: &InterestRate, + ) -> Result>, DispatchError> + where + Balance: FixedPointOperand + EnsureAdd + EnsureSub, + Rate: FixedPointNumber, + { + let Some(maturity) = self.maturity.date() else { + return Ok(Vec::new()); + }; + + let timeflow = match &self.interest_payments { + InterestPayments::OnceAtMaturity => vec![(maturity, 1)], + }; + + let total_weight = timeflow + .iter() + .map(|(_, weight)| weight) + .try_fold(0, |a, b| a.ensure_add(*b))?; + + let lifetime = maturity.ensure_sub(origination_date)?.ensure_into()?; + let interest_rate_per_lifetime = ensure_pow(interest_rate.per_sec()?, lifetime)?; + let interest_at_maturity = interest_rate_per_lifetime + .ensure_mul_int(principal)? + .ensure_sub(principal_base)?; + + timeflow + .into_iter() + .map(|(date, weight)| { + let proportion = FixedU128::ensure_from_rational(weight, total_weight)?; + let principal = proportion.ensure_mul_int(principal)?; + let interest = proportion.ensure_mul_int(interest_at_maturity)?; + + Ok(CashflowPayment { + when: date, + principal, + interest, + }) + }) + .collect() + } + + pub fn expected_payment( + &self, + origination_date: Seconds, + principal: Balance, + principal_base: Balance, + interest_rate: &InterestRate, + until: Seconds, + ) -> Result + where + Balance: FixedPointOperand + EnsureAdd + EnsureSub, + Rate: FixedPointNumber, + { + let cashflow = + self.generate_cashflows(origination_date, principal, principal_base, interest_rate)?; + + let total_amount = cashflow + .into_iter() + .take_while(|payment| payment.when < until) + .map(|payment| payment.principal.ensure_add(payment.interest)) + .try_fold(Balance::zero(), |a, b| a.ensure_add(b?))?; + + Ok(total_amount) + } +} + +#[cfg(test)] +pub mod tests { + use cfg_traits::interest::CompoundingSchedule; + use chrono::NaiveDate; + + use super::*; + + pub type Rate = sp_arithmetic::fixed_point::FixedU128; + + fn from_ymd(year: i32, month: u32, day: u32) -> NaiveDate { + NaiveDate::from_ymd_opt(year, month, day).unwrap() + } + + pub fn secs_from_ymdhms( + year: i32, + month: u32, + day: u32, + hour: u32, + min: u32, + sec: u32, + ) -> Seconds { + from_ymd(year, month, day) + .and_hms_opt(hour, min, sec) + .unwrap() + .and_utc() + .timestamp() as Seconds + } + + pub fn last_secs_from_ymd(year: i32, month: u32, day: u32) -> Seconds { + secs_from_ymdhms(year, month, day, 23, 59, 59) + } + + mod once_at_maturity { + use super::*; + + #[test] + fn correct_amounts() { + // To understand the expected interest amounts: + // A rate per year of 0.12 means each month you nearly pay with a rate of 0.01. + // 0.01 of the total principal is 25000 * 0.01 = 250 each month. + // A minor extra amount comes from the secondly compounding interest during 2.5 + // months. + assert_eq!( + RepaymentSchedule { + maturity: Maturity::fixed(last_secs_from_ymd(2022, 7, 1)), + interest_payments: InterestPayments::OnceAtMaturity, + pay_down_schedule: PayDownSchedule::None, + } + .generate_cashflows( + last_secs_from_ymd(2022, 4, 16), + 25000u128, /* principal */ + 25000u128, /* principal as base */ + &InterestRate::Fixed { + rate_per_year: Rate::from_float(0.12), + compounding: CompoundingSchedule::Secondly, + } + ) + .unwrap() + .into_iter() + .map(|payment| (payment.principal, payment.interest)) + .collect::>(), + vec![(25000, 632)] + ) + } + } +} diff --git a/pallets/loans/src/types/mod.rs b/pallets/loans/src/types/mod.rs index 333b8ae0c9..2d279fb9e9 100644 --- a/pallets/loans/src/types/mod.rs +++ b/pallets/loans/src/types/mod.rs @@ -13,15 +13,12 @@ //! Contains base types without Config references -use cfg_traits::Seconds; use frame_support::{pallet_prelude::RuntimeDebug, PalletError}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; -use sp_runtime::{ - traits::{EnsureAdd, EnsureAddAssign, EnsureSubAssign}, - ArithmeticError, DispatchError, -}; +use sp_runtime::{traits::EnsureAdd, ArithmeticError}; +pub mod cashflow; pub mod policy; pub mod valuation; @@ -47,6 +44,8 @@ pub enum BorrowLoanError { Restriction, /// Emits when maturity has passed and borrower tried to borrow more MaturityDatePassed, + /// Emits when the cashflow payment is overdue + PaymentOverdue, } /// Error related to loan borrowing @@ -85,87 +84,6 @@ pub enum MutationError { MaturityExtendedTooMuch, } -/// Specify the expected repayments date -#[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo, RuntimeDebug, MaxEncodedLen)] -pub enum Maturity { - /// Fixed point in time, in secs - Fixed { - /// Secs when maturity ends - date: Seconds, - /// Extension in secs, without special permissions - extension: Seconds, - }, - /// No Maturity date - None, -} - -impl Maturity { - pub fn fixed(date: Seconds) -> Self { - Self::Fixed { date, extension: 0 } - } - - pub fn date(&self) -> Option { - match self { - Maturity::Fixed { date, .. } => Some(*date), - Maturity::None => None, - } - } - - pub fn is_valid(&self, now: Seconds) -> bool { - match self { - Maturity::Fixed { date, .. } => *date > now, - Maturity::None => true, - } - } - - pub fn extends(&mut self, value: Seconds) -> Result<(), DispatchError> { - match self { - Maturity::Fixed { date, extension } => { - date.ensure_add_assign(value)?; - extension.ensure_sub_assign(value).map_err(Into::into) - } - Maturity::None => Err(DispatchError::Other( - "No maturity date that could be extended.", - )), - } - } -} - -/// Interest payment periods -#[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo, RuntimeDebug, MaxEncodedLen)] -pub enum InterestPayments { - /// All interest is expected to be paid at the maturity date - None, -} - -/// Specify the paydown schedules of the loan -#[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo, RuntimeDebug, MaxEncodedLen)] -pub enum PayDownSchedule { - /// The entire borrowed amount is expected to be paid back at the maturity - /// date - None, -} - -/// Specify the repayment schedule of the loan -#[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo, RuntimeDebug, MaxEncodedLen)] -pub struct RepaymentSchedule { - /// Expected repayments date for remaining debt - pub maturity: Maturity, - - /// Period at which interest is paid - pub interest_payments: InterestPayments, - - /// How much of the initially borrowed amount is paid back during interest - /// payments - pub pay_down_schedule: PayDownSchedule, -} - -impl RepaymentSchedule { - pub fn is_valid(&self, now: Seconds) -> bool { - self.maturity.is_valid(now) - } -} - /// Specify how offer a loan can be borrowed #[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] pub enum BorrowRestrictions { diff --git a/runtime/altair/src/lib.rs b/runtime/altair/src/lib.rs index 98f08d9eda..60459973f5 100644 --- a/runtime/altair/src/lib.rs +++ b/runtime/altair/src/lib.rs @@ -77,6 +77,7 @@ use pallet_investments::OrderType; use pallet_liquidity_pools::hooks::{ CollectedForeignInvestmentHook, CollectedForeignRedemptionHook, DecreasedForeignInvestOrderHook, }; +use pallet_loans::types::cashflow::CashflowPayment; use pallet_pool_system::{ pool_types::{PoolDetails, ScheduledUpdateDetails}, tranches::{TrancheIndex, TrancheLoc, TrancheSolution}, @@ -121,7 +122,7 @@ use sp_runtime::{ ApplyExtrinsicResult, DispatchError, DispatchResult, FixedI128, Perbill, Permill, Perquintill, }; use sp_staking::currency_to_vote::U128CurrencyToVote; -use sp_std::{marker::PhantomData, prelude::*}; +use sp_std::{marker::PhantomData, prelude::*, vec::Vec}; use sp_version::RuntimeVersion; use staging_xcm_executor::XcmExecutor; use static_assertions::const_assert; @@ -2322,8 +2323,11 @@ impl_runtime_apis! { ) -> Result { Ok(runtime_common::update_nav_with_input(pool_id, input_prices)?.nav_aum) } - } + fn expected_cashflows(pool_id: PoolId, loan_id: LoanId) -> Result>, DispatchError> { + Loans::expected_cashflows(pool_id, loan_id) + } + } // Investment Runtime APIs impl runtime_common::apis::InvestmentsApi> for Runtime { diff --git a/runtime/centrifuge/src/lib.rs b/runtime/centrifuge/src/lib.rs index 33135524d4..9bcc090d2d 100644 --- a/runtime/centrifuge/src/lib.rs +++ b/runtime/centrifuge/src/lib.rs @@ -78,6 +78,7 @@ use pallet_investments::OrderType; use pallet_liquidity_pools::hooks::{ CollectedForeignInvestmentHook, CollectedForeignRedemptionHook, DecreasedForeignInvestOrderHook, }; +use pallet_loans::types::cashflow::CashflowPayment; use pallet_pool_system::{ pool_types::{PoolDetails, ScheduledUpdateDetails}, tranches::{TrancheIndex, TrancheLoc, TrancheSolution}, @@ -124,7 +125,7 @@ use sp_runtime::{ ApplyExtrinsicResult, FixedI128, Perbill, Permill, Perquintill, }; use sp_staking::currency_to_vote::U128CurrencyToVote; -use sp_std::{marker::PhantomData, prelude::*}; +use sp_std::{marker::PhantomData, prelude::*, vec::Vec}; use sp_version::RuntimeVersion; use staging_xcm_executor::XcmExecutor; use static_assertions::const_assert; @@ -2370,6 +2371,10 @@ impl_runtime_apis! { ) -> Result { Ok(runtime_common::update_nav_with_input(pool_id, input_prices)?.nav_aum) } + + fn expected_cashflows(pool_id: PoolId, loan_id: LoanId) -> Result>, DispatchError> { + Loans::expected_cashflows(pool_id, loan_id) + } } // Investment Runtime APIs diff --git a/runtime/common/src/apis/loans.rs b/runtime/common/src/apis/loans.rs index def6a6759a..82a2e970f6 100644 --- a/runtime/common/src/apis/loans.rs +++ b/runtime/common/src/apis/loans.rs @@ -11,6 +11,7 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. +use pallet_loans::types::cashflow::CashflowPayment; use parity_scale_codec::Codec; use sp_api::decl_runtime_apis; use sp_runtime::DispatchError; @@ -18,17 +19,18 @@ use sp_std::vec::Vec; decl_runtime_apis! { /// Runtime API for the rewards pallet. - #[api_version(2)] + #[api_version(3)] pub trait LoansApi where PoolId: Codec, LoanId: Codec, Loan: Codec, Balance: Codec, - PriceCollectionInput: Codec + PriceCollectionInput: Codec, { fn portfolio(pool_id: PoolId) -> Vec<(LoanId, Loan)>; fn portfolio_loan(pool_id: PoolId, loan_id: LoanId) -> Option; fn portfolio_valuation(pool_id: PoolId, input_prices: PriceCollectionInput) -> Result; + fn expected_cashflows(pool_id: PoolId, loan_id: LoanId) -> Result>, DispatchError>; } } diff --git a/runtime/development/src/lib.rs b/runtime/development/src/lib.rs index 4d2205c972..5427d12d86 100644 --- a/runtime/development/src/lib.rs +++ b/runtime/development/src/lib.rs @@ -82,6 +82,7 @@ use pallet_investments::OrderType; use pallet_liquidity_pools::hooks::{ CollectedForeignInvestmentHook, CollectedForeignRedemptionHook, DecreasedForeignInvestOrderHook, }; +use pallet_loans::types::cashflow::CashflowPayment; use pallet_pool_system::{ pool_types::{PoolDetails, ScheduledUpdateDetails}, tranches::{TrancheIndex, TrancheLoc, TrancheSolution}, @@ -128,7 +129,7 @@ use sp_runtime::{ ApplyExtrinsicResult, FixedI128, Perbill, Permill, Perquintill, }; use sp_staking::currency_to_vote::U128CurrencyToVote; -use sp_std::{marker::PhantomData, prelude::*}; +use sp_std::{marker::PhantomData, prelude::*, vec::Vec}; use sp_version::RuntimeVersion; use staging_xcm_executor::XcmExecutor; use static_assertions::const_assert; @@ -2409,6 +2410,10 @@ impl_runtime_apis! { ) -> Result { Ok(runtime_common::update_nav_with_input(pool_id, input_prices)?.nav_aum) } + + fn expected_cashflows(pool_id: PoolId, loan_id: LoanId) -> Result>, DispatchError> { + Loans::expected_cashflows(pool_id, loan_id) + } } // Investment Runtime APIs diff --git a/runtime/integration-tests/src/generic/cases/loans.rs b/runtime/integration-tests/src/generic/cases/loans.rs index 00c3cdfe63..dc995d7b6e 100644 --- a/runtime/integration-tests/src/generic/cases/loans.rs +++ b/runtime/integration-tests/src/generic/cases/loans.rs @@ -21,12 +21,13 @@ use pallet_loans::{ }, }, types::{ - valuation::ValuationMethod, BorrowLoanError, BorrowRestrictions, InterestPayments, - LoanRestrictions, Maturity, PayDownSchedule, RepayRestrictions, RepaymentSchedule, + cashflow::{InterestPayments, Maturity, PayDownSchedule, RepaymentSchedule}, + valuation::ValuationMethod, + BorrowLoanError, BorrowRestrictions, LoanRestrictions, RepayRestrictions, }, }; use runtime_common::{ - apis::{runtime_decl_for_loans_api::LoansApiV2, runtime_decl_for_pools_api::PoolsApiV1}, + apis::{runtime_decl_for_loans_api::LoansApiV3, runtime_decl_for_pools_api::PoolsApiV1}, oracle::Feeder, }; use sp_runtime::FixedPointNumber; @@ -133,7 +134,7 @@ mod common { date: now + SECONDS_PER_MINUTE, extension: SECONDS_PER_MINUTE / 2, }, - interest_payments: InterestPayments::None, + interest_payments: InterestPayments::OnceAtMaturity, pay_down_schedule: PayDownSchedule::None, }, interest_rate: InterestRate::Fixed { diff --git a/runtime/integration-tests/src/generic/config.rs b/runtime/integration-tests/src/generic/config.rs index 30ec4ff1b0..ef2f6e568a 100644 --- a/runtime/integration-tests/src/generic/config.rs +++ b/runtime/integration-tests/src/generic/config.rs @@ -287,7 +287,7 @@ pub trait Runtime: /// You can extend this bounds to give extra API support type Api: sp_api::runtime_decl_for_core::CoreV4 + sp_block_builder::runtime_decl_for_block_builder::BlockBuilderV6 - + apis::runtime_decl_for_loans_api::LoansApiV2< + + apis::runtime_decl_for_loans_api::LoansApiV3< Self::BlockExt, PoolId, LoanId, From ccbe93d8a2da52cc62cf4f6107a2a52a859d5843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Enrique=20Mu=C3=B1oz=20Mart=C3=ADn?= Date: Fri, 7 Jun 2024 16:00:21 +0200 Subject: [PATCH 13/21] Upgrade to Polkadot-v1.7.2 (#1833) * set dependency versions * upgrade libs/* * upgrade pallet-anchors * upgrade pallet-fees * upgrade pallet-bridge * migrate simple pallets * migrate pallet-order-book * migrated collator-allowlist & swaps * upgrade rewards * upgraded pallet-mux * upgrade transfer-allowlist * fix hold reason in restricted tokens * simplify set_balance removing the holding part * upgrade restricted-xtokens * upgrade some pallets * upgrade pallet-ethereum-transaction * upgrade pallet-loans * upgrade pool-system * upgrade pool-fees * upgrade pool-registry * upgrade liquidity-pools stuffs * avoid duplicated polkadot-sdk repos * minor fixes * upgraded runtime-common * CfgLocation to RestrictedTransferLocation * restricted tokens with NativeIndex for native fungibles * rename dependency * upgraded development-runtime * fix partially benchmarks * fix benchmarks * overpass xcmp-queue integrity tests * minor coments * upgrade altair & centrifuge * remove some benchmarking pallets that are not needed * fix runtime upgrades * upgrade integration-test proc * upgrade integration-tests framework * upgraded all tests except liquidity pools * 99% upgraded liquidity-pools tests * fix lookup * cargo fmt * taplo fmt * using nightly cargo in CI * restore set_balance as it was * allow nightly support in CI * use restricted_tokens again to fetch from investement portfolio * Install rust-src for docs * fix tests * remove unused restricted tokens * fix block rewards * fix WrongWitness for some tests in IT * fix liquidity-pools * minor fixes * fix clippy * remove unneeded tests * feat: Update client to Polkadot v1.7.2 (#1844) * wip: update client * chore: update crate versions * chore: update anchor rpc api * chore: remove rewards, pools rpc * chore: compile with development runtime * fix: client for all runtimes * fix: build spec * feat: update relay docker images * fix: apply deprecation of export genesis state to scripts * fmt: taplo * refactor: use xcm v4 sugar * fix: revert tmp change in local para run * refactor: simplify xcm v4 locations in chain spec * cargo fmt * fix clippy * feat: Polkadot v1.7.2 migrations (#1849) * feat: add hold reason migration * feat: centrifuge migrations * feat: altair migrations * feat: dev + demo migrations * fix: clippy * fix: build * fmt: fix using nightly * last William iteration review * increase passed blocks * use rococo instead of polkadot-test-runtime * fix tests * remove line * dirty fix to fix Hrmp test issue * use default weights for treasury --------- Co-authored-by: William Freudenberger --- Cargo.lock | 5673 +++++++++-------- Cargo.toml | 502 +- ci/run-check.sh | 4 +- docker/docker-compose-local-relay.yml | 4 +- libs/mocks/Cargo.toml | 1 - libs/mocks/src/asset_registry.rs | 18 +- libs/mocks/src/lib.rs | 33 +- .../src/mocks/orml_asset_registry.rs | 27 +- libs/types/src/locations.rs | 67 +- libs/types/src/portfolio.rs | 2 +- node/Cargo.toml | 4 +- node/src/chain_spec.rs | 545 +- node/src/cli.rs | 4 +- node/src/command.rs | 30 +- node/src/rpc/anchors.rs | 6 +- node/src/rpc/evm.rs | 44 +- node/src/rpc/mod.rs | 58 +- node/src/rpc/pools.rs | 202 - node/src/rpc/rewards.rs | 91 - node/src/service.rs | 724 +-- node/src/service/evm.rs | 188 +- pallets/anchors/src/mock.rs | 14 +- pallets/block-rewards/src/benchmarking.rs | 1 - pallets/block-rewards/src/migrations.rs | 30 +- pallets/block-rewards/src/mock.rs | 3 +- pallets/bridge/src/mock.rs | 13 +- pallets/ethereum-transaction/src/lib.rs | 5 +- pallets/ethereum-transaction/src/mock.rs | 3 +- pallets/fees/Cargo.toml | 1 + pallets/fees/src/mock.rs | 22 +- pallets/investments/src/benchmarking.rs | 1 - .../routers/src/lib.rs | 8 +- .../routers/src/mock.rs | 86 +- .../routers/src/routers/axelar_evm.rs | 2 +- .../routers/src/routers/ethereum_xcm.rs | 2 +- .../routers/src/tests.rs | 67 +- pallets/liquidity-pools/src/contract.rs | 2 +- pallets/liquidity-pools/src/lib.rs | 41 +- pallets/liquidity-pools/src/routers.rs | 4 +- pallets/oracle-collection/src/benchmarking.rs | 1 - pallets/oracle-feed/src/benchmarking.rs | 1 - pallets/order-book/Cargo.toml | 1 - pallets/order-book/src/benchmarking.rs | 1 - pallets/order-book/src/mock.rs | 35 +- pallets/pool-fees/src/benchmarking.rs | 1 - pallets/pool-fees/src/lib.rs | 2 +- pallets/pool-registry/Cargo.toml | 1 - pallets/pool-registry/src/lib.rs | 6 +- pallets/pool-registry/src/mock.rs | 3 +- pallets/pool-registry/src/tests.rs | 40 +- pallets/pool-system/Cargo.toml | 2 - pallets/pool-system/src/mock.rs | 6 +- pallets/pool-system/src/tests/mod.rs | 12 +- pallets/restricted-tokens/src/benchmarking.rs | 27 +- .../restricted-tokens/src/impl_fungible.rs | 2 +- .../restricted-tokens/src/impl_fungibles.rs | 81 +- pallets/restricted-tokens/src/lib.rs | 33 +- pallets/restricted-tokens/src/mock.rs | 19 +- pallets/restricted-tokens/src/tests.rs | 84 +- pallets/restricted-xtokens/src/lib.rs | 106 +- pallets/rewards/src/issuance.rs | 6 +- pallets/token-mux/src/benchmarking.rs | 1 - .../transfer-allowlist/src/benchmarking.rs | 308 +- pallets/transfer-allowlist/src/lib.rs | 32 +- pallets/transfer-allowlist/src/mock.rs | 65 +- pallets/transfer-allowlist/src/tests.rs | 84 +- runtime/altair/Cargo.toml | 23 +- runtime/altair/src/lib.rs | 211 +- runtime/altair/src/migrations.rs | 15 + .../src/weights/cumulus_pallet_xcmp_queue.rs | 34 +- runtime/altair/src/weights/frame_system.rs | 8 + runtime/altair/src/weights/pallet_balances.rs | 4 + .../src/weights/pallet_collator_selection.rs | 12 +- runtime/altair/src/weights/pallet_identity.rs | 124 +- runtime/altair/src/weights/pallet_preimage.rs | 4 + runtime/altair/src/weights/pallet_treasury.rs | 16 + runtime/altair/src/weights/pallet_vesting.rs | 4 + runtime/altair/src/weights/pallet_xcm.rs | 12 + runtime/altair/src/xcm.rs | 73 +- runtime/centrifuge/Cargo.toml | 23 +- runtime/centrifuge/src/lib.rs | 181 +- runtime/centrifuge/src/migrations.rs | 32 + .../src/weights/cumulus_pallet_xcmp_queue.rs | 34 +- .../centrifuge/src/weights/frame_system.rs | 8 + .../centrifuge/src/weights/pallet_balances.rs | 4 + .../src/weights/pallet_collator_selection.rs | 12 +- .../centrifuge/src/weights/pallet_identity.rs | 124 +- .../centrifuge/src/weights/pallet_preimage.rs | 4 + .../centrifuge/src/weights/pallet_treasury.rs | 16 + .../centrifuge/src/weights/pallet_vesting.rs | 4 + runtime/centrifuge/src/weights/pallet_xcm.rs | 12 + runtime/centrifuge/src/xcm.rs | 73 +- runtime/common/Cargo.toml | 26 +- runtime/common/src/account_conversion.rs | 21 +- runtime/common/src/apis/account_conversion.rs | 4 +- runtime/common/src/fees.rs | 14 +- runtime/common/src/gateway.rs | 5 +- runtime/common/src/lib.rs | 206 +- runtime/common/src/migrations/hold_reason.rs | 151 + runtime/common/src/migrations/mod.rs | 2 + .../src/migrations/restricted_location.rs | 210 + runtime/common/src/transfer_filter.rs | 83 +- runtime/common/src/xcm.rs | 193 +- runtime/development/Cargo.toml | 17 +- runtime/development/src/lib.rs | 212 +- runtime/development/src/migrations.rs | 29 +- .../src/weights/cumulus_pallet_xcmp_queue.rs | 34 +- .../development/src/weights/frame_system.rs | 9 + .../src/weights/pallet_balances.rs | 4 + .../src/weights/pallet_collator_selection.rs | 12 +- .../src/weights/pallet_identity.rs | 124 +- .../src/weights/pallet_preimage.rs | 4 + .../src/weights/pallet_treasury.rs | 16 + .../development/src/weights/pallet_vesting.rs | 4 + runtime/development/src/weights/pallet_xcm.rs | 12 + runtime/development/src/xcm.rs | 73 +- runtime/integration-tests/Cargo.toml | 6 +- .../src/generic/cases/account_derivation.rs | 62 +- .../src/generic/cases/block_rewards.rs | 2 +- .../src/generic/cases/example.rs | 4 +- .../src/generic/cases/liquidity_pools.rs | 641 +- .../src/generic/cases/precompile.rs | 2 +- .../src/generic/cases/proxy.rs | 16 +- .../src/generic/cases/restricted_transfers.rs | 8 +- .../integration-tests/src/generic/config.rs | 12 +- .../src/generic/envs/fudge_env.rs | 2 + .../src/generic/envs/fudge_env/handle.rs | 64 +- .../integration-tests/src/generic/impls.rs | 36 +- .../src/generic/utils/currency.rs | 4 +- .../src/generic/utils/genesis.rs | 2 +- .../src/generic/utils/mod.rs | 1 + .../src/generic/utils/xcm.rs | 69 + rust-toolchain.toml | 2 +- scripts/export_parachain_files.sh | 2 +- scripts/init.sh | 4 +- scripts/install_toolchain.sh | 3 + scripts/runtime_benchmarks.sh | 2 +- scripts/update-parity-only-deps.sh | 36 - 138 files changed, 6532 insertions(+), 6472 deletions(-) delete mode 100644 node/src/rpc/pools.rs delete mode 100644 node/src/rpc/rewards.rs create mode 100644 runtime/common/src/migrations/hold_reason.rs create mode 100644 runtime/common/src/migrations/restricted_location.rs create mode 100644 runtime/integration-tests/src/generic/utils/xcm.rs delete mode 100755 scripts/update-parity-only-deps.sh diff --git a/Cargo.lock b/Cargo.lock index 5931ec30ff..b24b43185f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,11 +23,11 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ - "gimli 0.28.1", + "gimli 0.29.0", ] [[package]] @@ -53,7 +53,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", - "cipher", + "cipher 0.4.4", "cpufeatures", ] @@ -65,10 +65,10 @@ checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" dependencies = [ "aead", "aes", - "cipher", + "cipher 0.4.4", "ctr", "ghash", - "subtle", + "subtle 2.5.0", ] [[package]] @@ -86,7 +86,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.15", "once_cell", "version_check", ] @@ -98,7 +98,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom 0.2.12", + "getrandom 0.2.15", "once_cell", "version_check", "zerocopy", @@ -115,9 +115,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "altair-runtime" @@ -146,9 +146,8 @@ dependencies = [ "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", - "getrandom 0.2.12", "hex", - "hex-literal 0.3.4", + "hex-literal", "liquidity-pools-gateway-routers", "log", "orml-asset-registry", @@ -184,6 +183,7 @@ dependencies = [ "pallet-liquidity-rewards", "pallet-loans", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-oracle-collection", "pallet-oracle-feed", @@ -213,8 +213,7 @@ dependencies = [ "pallet-vesting", "pallet-xcm", "pallet-xcm-transactor", - "parachain-info", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-parachain-primitives", "polkadot-runtime-common", "runtime-common", @@ -224,15 +223,17 @@ dependencies = [ "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-offchain", "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-transaction-pool", "sp-version", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -273,47 +274,48 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.13" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -321,9 +323,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.81" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "approx" @@ -336,16 +338,39 @@ dependencies = [ [[package]] name = "aquamarine" -version = "0.3.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1da02abba9f9063d786eab1509833ebb2fac0f966862ca59439c76b9c566760" +checksum = "21cc1548309245035eb18aa7f0967da6bc65587005170c56e6ef2788a4cf3f4e" dependencies = [ "include_dir", "itertools 0.10.5", "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.66", +] + +[[package]] +name = "ark-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-bls12-377-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20c7021f180a0cbea0380eba97c2af3c57074cdaffe0eef7e840e1c9f2841e55" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-models-ext", + "ark-std", ] [[package]] @@ -360,6 +385,45 @@ dependencies = [ "ark-std", ] +[[package]] +name = "ark-bls12-381-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1dc4b3d08f19e8ec06e949712f95b8361e43f1391d94f65e4234df03480631c" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-models-ext", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-bw6-761" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e0605daf0cc5aa2034b78d008aaf159f56901d92a52ee4f6ecdfdac4f426700" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-bw6-761-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccee5fba47266f460067588ee1bf070a9c760bf2050c1c509982c5719aadb4f2" +dependencies = [ + "ark-bw6-761", + "ark-ec", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ec" version = "0.4.2" @@ -374,9 +438,35 @@ dependencies = [ "hashbrown 0.13.2", "itertools 0.10.5", "num-traits", + "rayon", "zeroize", ] +[[package]] +name = "ark-ed-on-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b10d901b9ac4b38f9c32beacedfadcdd64e46f8d7f8e88c1ae1060022cf6f6c6" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ed-on-bls12-377-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524a4fb7540df2e1a8c2e67a83ba1d1e6c3947f4f9342cc2359fc2e789ad731d" +dependencies = [ + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ed-on-bls12-381-bandersnatch" version = "0.4.0" @@ -389,6 +479,19 @@ dependencies = [ "ark-std", ] +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d15185f1acb49a07ff8cbe5f11a1adc5a93b19e211e325d826ae98e98e124346" +dependencies = [ + "ark-ec", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ff" version = "0.4.2" @@ -433,29 +536,29 @@ dependencies = [ ] [[package]] -name = "ark-poly" -version = "0.4.2" +name = "ark-models-ext" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +checksum = "3e9eab5d4b5ff2f228b763d38442adc9b084b0a465409b059fac5c2308835ec2" dependencies = [ + "ark-ec", "ark-ff", "ark-serialize", "ark-std", "derivative", - "hashbrown 0.13.2", ] [[package]] -name = "ark-scale" -version = "0.0.10" +name = "ark-poly" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b08346a3e38e2be792ef53ee168623c9244d968ff00cd70fb9932f6fe36393" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" dependencies = [ - "ark-ec", "ark-ff", "ark-serialize", "ark-std", - "parity-scale-codec 3.6.9", + "derivative", + "hashbrown 0.13.2", ] [[package]] @@ -468,14 +571,14 @@ dependencies = [ "ark-ff", "ark-serialize", "ark-std", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", ] [[package]] name = "ark-secret-scalar" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ "ark-ec", "ark-ff", @@ -483,7 +586,7 @@ dependencies = [ "ark-std", "ark-transcript", "digest 0.10.7", - "rand_core 0.6.4", + "getrandom_or_panic", "zeroize", ] @@ -517,27 +620,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ "num-traits", - "rand 0.8.5", + "rand", + "rayon", ] [[package]] name = "ark-transcript" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ "ark-ff", "ark-serialize", "ark-std", "digest 0.10.7", "rand_core 0.6.4", - "sha3 0.10.8", + "sha3", ] [[package]] name = "array-bytes" -version = "6.2.2" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" + +[[package]] +name = "array-bytes" +version = "6.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f840fb7195bcfc5e17ea40c26e5ce6d5b9ce5d584466e17703209657e459ae0" +checksum = "5d5dde061bd34119e902bbb2d9b90c5692635cf59fb91d582c2b68043f1b8293" [[package]] name = "arrayref" @@ -554,12 +664,6 @@ dependencies = [ "nodrop", ] -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "arrayvec" version = "0.7.4" @@ -591,7 +695,7 @@ dependencies = [ "proc-macro2", "quote", "syn 1.0.109", - "synstructure", + "synstructure 0.12.6", ] [[package]] @@ -624,27 +728,25 @@ dependencies = [ [[package]] name = "async-channel" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" dependencies = [ "concurrent-queue", - "event-listener 5.2.0", - "event-listener-strategy 0.5.1", + "event-listener-strategy", "futures-core", "pin-project-lite 0.2.14", ] [[package]] name = "async-executor" -version = "1.9.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10b3e585719c2358d2660232671ca8ca4ddb4be4ce8a1842d6c2dc8685303316" +checksum = "c8828ec6e544c02b0d6691d21ed9f9218d0384a82542855073c2a3f58304aaf0" dependencies = [ - "async-lock 3.3.0", "async-task", "concurrent-queue", - "fastrand 2.0.2", + "fastrand 2.1.0", "futures-lite 2.3.0", "slab", ] @@ -683,18 +785,18 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884" +checksum = "0d6baa8f0178795da0e71bc42c9e5d13261aac7ee549853162e66a241ba17964" dependencies = [ - "async-lock 3.3.0", + "async-lock 3.4.0", "cfg-if", "concurrent-queue", "futures-io", "futures-lite 2.3.0", "parking", - "polling 3.6.0", - "rustix 0.38.32", + "polling 3.7.1", + "rustix 0.38.34", "slab", "tracing", "windows-sys 0.52.0", @@ -711,12 +813,12 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ - "event-listener 4.0.3", - "event-listener-strategy 0.4.0", + "event-listener 5.3.1", + "event-listener-strategy", "pin-project-lite 0.2.14", ] @@ -744,54 +846,43 @@ dependencies = [ "cfg-if", "event-listener 3.1.0", "futures-lite 1.13.0", - "rustix 0.38.32", + "rustix 0.38.34", "windows-sys 0.48.0", ] -[[package]] -name = "async-recursion" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30c5ef0ede93efbf733c1a727f3b6b5a1060bbedd5600183e66f6e4be4af0ec5" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.57", -] - [[package]] name = "async-signal" -version = "0.2.5" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" +checksum = "329972aa325176e89114919f2a80fdae4f4c040f66a370b1a1159c6c0f94e7aa" dependencies = [ - "async-io 2.3.2", - "async-lock 2.8.0", + "async-io 2.3.3", + "async-lock 3.4.0", "atomic-waker", "cfg-if", "futures-core", "futures-io", - "rustix 0.38.32", + "rustix 0.38.34", "signal-hook-registry", "slab", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "async-task" -version = "4.7.0" +version = "4.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.79" +version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] @@ -819,17 +910,6 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "auto_impl" version = "1.2.0" @@ -838,14 +918,14 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] name = "autocfg" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "axelar-gateway-precompile" @@ -861,49 +941,50 @@ dependencies = [ "hex", "pallet-evm", "pallet-liquidity-pools-gateway", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "precompile-utils", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "17c6a35df3749d2e8bb1b7b21a976d82b15548788d2735b9d82f329268f71a11" dependencies = [ - "addr2line 0.21.0", + "addr2line 0.22.0", "cc", "cfg-if", "libc", "miniz_oxide", - "object 0.32.2", + "object 0.35.0", "rustc-demangle", ] [[package]] name = "bandersnatch_vrfs" -version = "0.0.1" -source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +version = "0.0.4" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ "ark-bls12-381", "ark-ec", "ark-ed-on-bls12-381-bandersnatch", "ark-ff", - "ark-scale 0.0.12", "ark-serialize", "ark-std", "dleq_vrf", "fflonk", - "merlin 3.0.0", + "merlin", "rand_chacha 0.3.1", "rand_core 0.6.4", "ring 0.1.0", "sha2 0.10.8", + "sp-ark-bls12-381", + "sp-ark-ed-on-bls12-381-bandersnatch", "zeroize", ] @@ -948,10 +1029,10 @@ dependencies = [ [[package]] name = "binary-merkle-tree" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "hash-db 0.16.0", + "hash-db", "log", ] @@ -976,13 +1057,13 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", - "prettyplease 0.2.17", + "prettyplease 0.2.20", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] @@ -992,6 +1073,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" dependencies = [ "bitcoin_hashes", + "rand", + "rand_core 0.6.4", + "serde", + "unicode-normalization", ] [[package]] @@ -1014,26 +1099,27 @@ checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "bitvec" -version = "0.20.4" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ - "funty 1.1.0", - "radium 0.6.2", + "funty", + "radium", + "serde", "tap", - "wyz 0.2.0", + "wyz", ] [[package]] -name = "bitvec" -version = "1.0.1" +name = "blake2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +checksum = "94cb07b0da6a73955f8fb85d24c466778e70cda767a568229b104f0264089330" dependencies = [ - "funty 2.0.0", - "radium 0.7.0", - "tap", - "wyz 0.5.1", + "byte-tools", + "crypto-mac 0.7.0", + "digest 0.8.1", + "opaque-debug 0.2.3", ] [[package]] @@ -1090,25 +1176,12 @@ dependencies = [ "constant_time_eq 0.3.0", ] -[[package]] -name = "block-buffer" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -dependencies = [ - "block-padding 0.1.5", - "byte-tools", - "byteorder", - "generic-array 0.12.4", -] - [[package]] name = "block-buffer" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "block-padding 0.2.1", "generic-array 0.14.7", ] @@ -1121,45 +1194,27 @@ dependencies = [ "generic-array 0.14.7", ] -[[package]] -name = "block-padding" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" -dependencies = [ - "byte-tools", -] - -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - [[package]] name = "blocking" -version = "1.5.1" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" dependencies = [ - "async-channel 2.2.0", - "async-lock 3.3.0", + "async-channel 2.3.1", "async-task", - "fastrand 2.0.2", "futures-io", "futures-lite 2.3.0", "piper", - "tracing", ] [[package]] name = "bounded-collections" -version = "0.1.9" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca548b6163b872067dc5eb82fd130c56881435e30367d2073594a3d9744120dd" +checksum = "d32385ecb91a31bddaf908e8dcf4a15aef1bcd3913cc03ebfad02ff6d568abc1" dependencies = [ "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", ] @@ -1173,6 +1228,17 @@ dependencies = [ "thiserror", ] +[[package]] +name = "bp-xcm-bridge-hub-router" +version = "0.6.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", +] + [[package]] name = "bs58" version = "0.4.0" @@ -1188,16 +1254,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "bstr" -version = "1.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" -dependencies = [ - "memchr", - "serde", -] - [[package]] name = "build-helper" version = "0.1.1" @@ -1209,9 +1265,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.4" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byte-slice-cast" @@ -1227,9 +1283,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" +checksum = "78834c15cb5d5efe3452d58b1e8ba890dd62d21907f867f383358198e56ebca5" [[package]] name = "byteorder" @@ -1254,11 +1310,21 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "c2-chacha" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27dae93fe7b1e0424dc57179ac396908c26b035a87234809f5c4dfd1b47dc80" +dependencies = [ + "cipher 0.2.5", + "ppv-lite86", +] + [[package]] name = "camino" -version = "1.1.6" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" dependencies = [ "serde", ] @@ -1280,7 +1346,7 @@ checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform", - "semver 1.0.22", + "semver 1.0.23", "serde", "serde_json", "thiserror", @@ -1294,12 +1360,13 @@ checksum = "fd6c0e7b807d60291f42f33f58480c0bfafe28ed08286446f45e463728cf9c1c" [[package]] name = "cc" -version = "1.0.90" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" dependencies = [ "jobserver", "libc", + "once_cell", ] [[package]] @@ -1326,6 +1393,7 @@ dependencies = [ "cumulus-relay-chain-inprocess-interface", "cumulus-relay-chain-interface", "development-runtime", + "fc-api", "fc-consensus", "fc-db", "fc-mapping-sync", @@ -1339,7 +1407,7 @@ dependencies = [ "frame-benchmarking", "frame-benchmarking-cli", "futures", - "hex-literal 0.3.4", + "hex-literal", "jsonrpsee", "log", "pallet-anchors", @@ -1347,7 +1415,8 @@ dependencies = [ "pallet-evm", "pallet-pool-system", "pallet-transaction-payment-rpc", - "parity-scale-codec 3.6.9", + "pallet-transaction-payment-rpc-runtime-api", + "parity-scale-codec", "polkadot-cli", "polkadot-primitives", "polkadot-service", @@ -1371,6 +1440,7 @@ dependencies = [ "sc-transaction-pool", "sc-transaction-pool-api", "serde", + "serde_json", "sp-api", "sp-block-builder", "sp-blockchain", @@ -1390,7 +1460,6 @@ dependencies = [ "substrate-frame-rpc-system", "substrate-prometheus-endpoint", "url", - "vergen", ] [[package]] @@ -1420,9 +1489,8 @@ dependencies = [ "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", - "getrandom 0.2.12", "hex", - "hex-literal 0.3.4", + "hex-literal", "liquidity-pools-gateway-routers", "log", "orml-asset-registry", @@ -1458,6 +1526,7 @@ dependencies = [ "pallet-liquidity-rewards", "pallet-loans", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-oracle-collection", "pallet-oracle-feed", @@ -1487,8 +1556,7 @@ dependencies = [ "pallet-vesting", "pallet-xcm", "pallet-xcm-transactor", - "parachain-info", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-parachain-primitives", "polkadot-runtime-common", "runtime-common", @@ -1498,15 +1566,17 @@ dependencies = [ "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-offchain", "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-transaction-pool", "sp-version", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -1526,9 +1596,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.15.7" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa50868b64a9a6fda9d593ce778849ea8715cd2a3d2cc17ffdb4a2f2f2f1961d" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" dependencies = [ "smallvec", ] @@ -1550,12 +1620,12 @@ dependencies = [ "frame-system", "mock-builder", "orml-traits", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "staging-xcm", ] @@ -1567,7 +1637,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-collective", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-arithmetic", @@ -1575,7 +1645,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-executor", ] @@ -1590,11 +1660,11 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "staging-xcm", ] @@ -1609,11 +1679,11 @@ dependencies = [ "impl-trait-for-tuples", "mock-builder", "orml-traits", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-arithmetic", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "strum 0.24.1", ] @@ -1627,15 +1697,15 @@ dependencies = [ "cfg-utils", "frame-support", "hex", - "hex-literal 0.3.4", + "hex-literal", "orml-traits", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-arithmetic", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "staging-xcm", ] @@ -1648,12 +1718,12 @@ dependencies = [ "hex", "pallet-aura", "pallet-timestamp", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-arithmetic", "sp-consensus-aura", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -1662,6 +1732,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "chacha" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddf3c081b5fba1e5615640aae998e0fbd10c24cbd897ee39ed754a77601a4862" +dependencies = [ + "byteorder", + "keystream", +] + [[package]] name = "chacha20" version = "0.9.1" @@ -1669,7 +1749,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" dependencies = [ "cfg-if", - "cipher", + "cipher 0.4.4", "cpufeatures", ] @@ -1681,7 +1761,7 @@ checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" dependencies = [ "aead", "chacha20", - "cipher", + "cipher 0.4.4", "poly1305", "zeroize", ] @@ -1689,34 +1769,34 @@ dependencies = [ [[package]] name = "chainbridge" version = "0.0.2" -source = "git+https://github.com/centrifuge/chainbridge-substrate.git?branch=polkadot-v1.1.0#da6e4f8255e292d32660902e545f16e1824ac5e2" +source = "git+https://github.com/centrifuge/chainbridge-substrate.git?branch=polkadot-v1.7.2#a04cc8feb89e18a64f910808e983546444c3477c" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", "sp-runtime", - "sp-std", - "substrate-wasm-builder", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "substrate-wasm-builder-runner", ] [[package]] name = "chrono" -version = "0.4.37" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -1727,11 +1807,20 @@ checksum = "b9b68e3193982cd54187d71afdb2a271ad4cf8af157858e9cb911b91321de143" dependencies = [ "core2", "multibase", - "multihash", + "multihash 0.17.0", "serde", "unsigned-varint", ] +[[package]] +name = "cipher" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" +dependencies = [ + "generic-array 0.14.7", +] + [[package]] name = "cipher" version = "0.4.4" @@ -1754,9 +1843,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", @@ -1765,9 +1854,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.4" +version = "4.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "a9689a29b593160de5bc4aacab7b5d54fb52231de70122626c178e6a368994c7" dependencies = [ "clap_builder", "clap_derive", @@ -1775,33 +1864,34 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "2e5387378c84f6faa26890ebf9f0a92989f8873d4d380467bcd0d8d8620424df" dependencies = [ "anstream", "anstyle", "clap_lex", "strsim", + "terminal_size", ] [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" [[package]] name = "coarsetime" @@ -1826,25 +1916,25 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" [[package]] name = "comfy-table" -version = "7.1.0" +version = "7.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c64043d6c7b7a4c58e39e7efccfdea7b93d885a795d0c054a69dbbf4dd52686" +checksum = "b34115915337defe99b2aff5c2ce6771e5fbc4079f4b506301f5cf394c8452f7" dependencies = [ - "strum 0.25.0", - "strum_macros 0.25.3", + "strum 0.26.2", + "strum_macros 0.26.4", "unicode-width", ] [[package]] name = "common" version = "0.1.0" -source = "git+https://github.com/w3f/ring-proof?rev=0e948f3#0e948f3c28cbacecdd3020403c4841c0eb339213" +source = "git+https://github.com/w3f/ring-proof#b273d33f9981e2bb3375ab45faeb537f7ee35224" dependencies = [ "ark-ec", "ark-ff", @@ -1852,7 +1942,9 @@ dependencies = [ "ark-serialize", "ark-std", "fflonk", - "merlin 3.0.0", + "getrandom_or_panic", + "merlin", + "rand_chacha 0.3.1", ] [[package]] @@ -1863,9 +1955,9 @@ checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" [[package]] name = "concurrent-queue" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ "crossbeam-utils", ] @@ -1904,7 +1996,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.15", "once_cell", "tiny-keccak", ] @@ -1921,6 +2013,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +[[package]] +name = "constcat" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd7e35aee659887cbfb97aaf227ac12cad1a9d7c71e55ff3376839ed4e282d08" + [[package]] name = "convert_case" version = "0.4.0" @@ -2086,9 +2184,9 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] @@ -2123,9 +2221,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -2141,7 +2239,7 @@ checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", - "subtle", + "subtle 2.5.0", "zeroize", ] @@ -2156,6 +2254,16 @@ dependencies = [ "typenum", ] +[[package]] +name = "crypto-mac" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" +dependencies = [ + "generic-array 0.12.4", + "subtle 1.0.0", +] + [[package]] name = "crypto-mac" version = "0.8.0" @@ -2163,17 +2271,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ "generic-array 0.14.7", - "subtle", + "subtle 2.5.0", ] [[package]] name = "crypto-mac" -version = "0.11.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e" dependencies = [ "generic-array 0.14.7", - "subtle", + "subtle 2.5.0", ] [[package]] @@ -2182,20 +2290,21 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ - "cipher", + "cipher 0.4.4", ] [[package]] name = "cumulus-client-cli" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "clap", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sc-chain-spec", "sc-cli", "sc-client-api", "sc-service", + "sp-blockchain", "sp-core", "sp-runtime", "url", @@ -2203,15 +2312,15 @@ dependencies = [ [[package]] name = "cumulus-client-collator" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", "cumulus-primitives-core", "futures", - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", + "parity-scale-codec", + "parking_lot 0.12.3", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-overseer", @@ -2226,19 +2335,19 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-aura" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "cumulus-client-collator", "cumulus-client-consensus-common", "cumulus-client-consensus-proposer", + "cumulus-client-parachain-inherent", "cumulus-primitives-aura", "cumulus-primitives-core", - "cumulus-primitives-parachain-inherent", "cumulus-relay-chain-interface", "futures", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-overseer", @@ -2268,8 +2377,8 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "cumulus-client-pov-recovery", @@ -2278,7 +2387,7 @@ dependencies = [ "dyn-clone", "futures", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-primitives", "sc-client-api", "sc-consensus", @@ -2297,8 +2406,8 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-proposer" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "anyhow", "async-trait", @@ -2312,15 +2421,15 @@ dependencies = [ [[package]] name = "cumulus-client-network" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "cumulus-relay-chain-interface", "futures", "futures-timer", - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", + "parity-scale-codec", + "parking_lot 0.12.3", "polkadot-node-primitives", "polkadot-parachain-primitives", "polkadot-primitives", @@ -2334,21 +2443,45 @@ dependencies = [ ] [[package]] -name = "cumulus-client-pov-recovery" +name = "cumulus-client-parachain-inherent" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" +dependencies = [ + "async-trait", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-relay-chain-interface", + "cumulus-test-relay-sproof-builder", + "parity-scale-codec", + "sc-client-api", + "scale-info", + "sp-api", + "sp-crypto-hashing", + "sp-inherents", + "sp-runtime", + "sp-state-machine", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-trie", + "tracing", +] + +[[package]] +name = "cumulus-client-pov-recovery" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", "futures", "futures-timer", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-overseer", "polkadot-primitives", - "rand 0.8.5", + "rand", "sc-client-api", "sc-consensus", "sp-consensus", @@ -2359,8 +2492,8 @@ dependencies = [ [[package]] name = "cumulus-client-service" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "cumulus-client-cli", "cumulus-client-collator", @@ -2368,6 +2501,7 @@ dependencies = [ "cumulus-client-network", "cumulus-client-pov-recovery", "cumulus-primitives-core", + "cumulus-primitives-proof-size-hostfunction", "cumulus-relay-chain-inprocess-interface", "cumulus-relay-chain-interface", "cumulus-relay-chain-minimal-node", @@ -2394,63 +2528,68 @@ dependencies = [ [[package]] name = "cumulus-pallet-aura-ext" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "cumulus-pallet-parachain-system", "frame-support", "frame-system", "pallet-aura", "pallet-timestamp", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-application-crypto", "sp-consensus-aura", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "cumulus-pallet-dmp-queue" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "cumulus-primitives-core", + "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "staging-xcm", ] [[package]] name = "cumulus-pallet-parachain-system" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", + "cumulus-primitives-proof-size-hostfunction", "environmental", + "frame-benchmarking", "frame-support", "frame-system", "impl-trait-for-tuples", "log", - "parity-scale-codec 3.6.9", + "pallet-message-queue", + "parity-scale-codec", "polkadot-parachain-primitives", + "polkadot-runtime-parachains", "scale-info", "sp-core", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-inherents", "sp-io", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-trie", "sp-version", "staging-xcm", @@ -2459,146 +2598,155 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system-proc-macro" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.6.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] name = "cumulus-pallet-session-benchmarking" -version = "3.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "9.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "pallet-session", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "cumulus-pallet-xcm" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "staging-xcm", ] [[package]] name = "cumulus-pallet-xcmp-queue" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ + "bounded-collections", + "bp-xcm-bridge-hub-router", "cumulus-primitives-core", "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.6.9", + "pallet-message-queue", + "parity-scale-codec", "polkadot-runtime-common", - "rand_chacha 0.3.1", + "polkadot-runtime-parachains", "scale-info", + "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-executor", ] [[package]] name = "cumulus-primitives-aura" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-core-primitives", "polkadot-primitives", "sp-api", "sp-consensus-aura", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "cumulus-primitives-core" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-primitives", "scale-info", "sp-api", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-trie", "staging-xcm", ] [[package]] name = "cumulus-primitives-parachain-inherent" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "cumulus-primitives-core", - "cumulus-relay-chain-interface", - "cumulus-test-relay-sproof-builder", - "parity-scale-codec 3.6.9", - "sc-client-api", + "parity-scale-codec", "scale-info", - "sp-api", "sp-core", "sp-inherents", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-storage", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-trie", +] + +[[package]] +name = "cumulus-primitives-proof-size-hostfunction" +version = "0.2.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" +dependencies = [ + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-trie", - "tracing", ] [[package]] name = "cumulus-primitives-timestamp" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "cumulus-primitives-core", "futures", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sp-inherents", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-timestamp", ] [[package]] name = "cumulus-primitives-utility" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "cumulus-primitives-core", "frame-support", "log", - "parity-scale-codec 3.6.9", + "pallet-asset-conversion", + "pallet-xcm-benchmarks", + "parity-scale-codec", "polkadot-runtime-common", + "polkadot-runtime-parachains", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -2606,8 +2754,8 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-inprocess-interface" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2630,14 +2778,14 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-interface" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "cumulus-primitives-core", "futures", "jsonrpsee-core", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-overseer", "sc-client-api", "sp-api", @@ -2648,43 +2796,49 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-minimal-node" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", "cumulus-relay-chain-rpc-interface", "futures", + "parking_lot 0.12.3", "polkadot-availability-recovery", "polkadot-collator-protocol", "polkadot-core-primitives", "polkadot-network-bridge", "polkadot-node-collation-generation", + "polkadot-node-core-chain-api", + "polkadot-node-core-prospective-parachains", "polkadot-node-core-runtime-api", "polkadot-node-network-protocol", "polkadot-node-subsystem-util", "polkadot-overseer", "polkadot-primitives", "sc-authority-discovery", + "sc-client-api", "sc-network", "sc-network-common", "sc-service", "sc-tracing", "sc-utils", - "schnellru", "sp-api", + "sp-blockchain", "sp-consensus", "sp-consensus-babe", "sp-runtime", + "substrate-prometheus-endpoint", + "tokio", "tracing", ] [[package]] name = "cumulus-relay-chain-rpc-interface" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2693,10 +2847,10 @@ dependencies = [ "futures", "futures-timer", "jsonrpsee", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "pin-project", "polkadot-overseer", - "rand 0.8.5", + "rand", "sc-client-api", "sc-rpc-api", "sc-service", @@ -2711,7 +2865,8 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", - "sp-storage", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-version", "thiserror", "tokio", "tokio-util", @@ -2721,31 +2876,18 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "cumulus-primitives-core", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-primitives", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-trie", ] -[[package]] -name = "curve25519-dalek" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" -dependencies = [ - "byteorder", - "digest 0.8.1", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - [[package]] name = "curve25519-dalek" version = "3.2.0" @@ -2755,7 +2897,7 @@ dependencies = [ "byteorder", "digest 0.9.0", "rand_core 0.5.1", - "subtle", + "subtle 2.5.0", "zeroize", ] @@ -2772,7 +2914,7 @@ dependencies = [ "fiat-crypto", "platforms", "rustc_version", - "subtle", + "subtle 2.5.0", "zeroize", ] @@ -2784,7 +2926,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] @@ -2802,9 +2944,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.120" +version = "1.0.123" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dc7287237dd438b926a81a1a5605dad33d286870e5eee2db17bf2bcd9e92a" +checksum = "8194f089b6da4751d6c1da1ef37c17255df51f9346cdb160f8b096562ae4a85c" dependencies = [ "cc", "cxxbridge-flags", @@ -2814,9 +2956,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.120" +version = "1.0.123" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f47c6c8ad7c1a10d3ef0fe3ff6733f4db0d78f08ef0b13121543163ef327058b" +checksum = "1e8df9a089caae66634d754672d5f909395f30f38af6ff19366980d8a8b57501" dependencies = [ "cc", "codespan-reporting", @@ -2824,37 +2966,37 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] name = "cxxbridge-flags" -version = "1.0.120" +version = "1.0.123" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "701a1ac7a697e249cdd8dc026d7a7dafbfd0dbcd8bd24ec55889f2bc13dd6287" +checksum = "25290be4751803672a70b98c68b51c1e7d0a640ab5a4377f240f9d2e70054cd1" [[package]] name = "cxxbridge-macro" -version = "1.0.120" +version = "1.0.123" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b404f596046b0bb2d903a9c786b875a126261b52b7c3a64bbb66382c41c771df" +checksum = "b8cb317cb13604b4752416783bb25070381c36e844743e4146b7f8e55de7d140" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] name = "data-encoding" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] name = "data-encoding-macro" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20c01c06f5f429efdf2bae21eb67c28b3df3cf85b7dd2d8ef09c0838dac5d33e" +checksum = "f1559b6cba622276d6d63706db152618eeb15b89b3e4041446b05876e352e639" dependencies = [ "data-encoding", "data-encoding-macro-internal", @@ -2862,9 +3004,9 @@ dependencies = [ [[package]] name = "data-encoding-macro-internal" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0047d07f2c89b17dd631c80450d69841a6b5d7fb17278cbc43d7e4cfcf2576f3" +checksum = "332d754c0af53bc87c108fed664d121ecf59207ec4196041f04d6ab9002ad33f" dependencies = [ "data-encoding", "syn 1.0.109", @@ -2933,7 +3075,7 @@ checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] @@ -2976,9 +3118,8 @@ dependencies = [ "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", - "getrandom 0.2.12", "hex", - "hex-literal 0.3.4", + "hex-literal", "liquidity-pools-gateway-routers", "log", "orml-asset-registry", @@ -3014,6 +3155,7 @@ dependencies = [ "pallet-liquidity-rewards", "pallet-loans", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-oracle-collection", "pallet-oracle-feed", @@ -3043,8 +3185,7 @@ dependencies = [ "pallet-vesting", "pallet-xcm", "pallet-xcm-transactor", - "parachain-info", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-parachain-primitives", "polkadot-runtime-common", "runtime-common", @@ -3054,15 +3195,17 @@ dependencies = [ "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-offchain", "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-transaction-pool", "sp-version", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -3104,14 +3247,14 @@ dependencies = [ "block-buffer 0.10.4", "const-oid", "crypto-common", - "subtle", + "subtle 2.5.0", ] [[package]] name = "directories" -version = "4.0.1" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51c5d4ddabd36886dd3e1438cb358cdcb0d7c499cb99cb4ac2e38e18b5cb210" +checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" dependencies = [ "dirs-sys", ] @@ -3128,13 +3271,14 @@ dependencies = [ [[package]] name = "dirs-sys" -version = "0.3.7" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" dependencies = [ "libc", + "option-ext", "redox_users", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -3156,23 +3300,22 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] name = "dleq_vrf" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ "ark-ec", "ark-ff", - "ark-scale 0.0.10", + "ark-scale", "ark-secret-scalar", "ark-serialize", "ark-std", "ark-transcript", "arrayvec 0.7.4", - "rand_core 0.6.4", "zeroize", ] @@ -3197,9 +3340,9 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.57", + "syn 2.0.66", "termcolor", - "toml 0.8.2", + "toml 0.8.14", "walkdir", ] @@ -3211,9 +3354,9 @@ checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" [[package]] name = "downcast-rs" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] name = "dtoa" @@ -3283,7 +3426,7 @@ dependencies = [ "rand_core 0.6.4", "serde", "sha2 0.10.8", - "subtle", + "subtle 2.5.0", "zeroize", ] @@ -3309,7 +3452,7 @@ checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" dependencies = [ "curve25519-dalek 4.1.2", "ed25519", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "hex", "rand_core 0.6.4", "sha2 0.10.8", @@ -3318,9 +3461,9 @@ dependencies = [ [[package]] name = "either" -version = "1.10.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" [[package]] name = "elliptic-curve" @@ -3337,7 +3480,7 @@ dependencies = [ "pkcs8", "rand_core 0.6.4", "sec1", - "subtle", + "subtle 2.5.0", "zeroize", ] @@ -3376,7 +3519,7 @@ checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] @@ -3387,20 +3530,7 @@ checksum = "6fd000fd6988e73bbe993ea3db9b1aa64906ab88766d654973924340c8cddb42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", -] - -[[package]] -name = "env_logger" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", + "syn 2.0.66", ] [[package]] @@ -3430,9 +3560,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -3440,28 +3570,18 @@ dependencies = [ [[package]] name = "ethabi" -version = "16.0.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c98847055d934070b90e806e12d3936b787d0a115068981c1d8dfd5dfef5a5" +checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" dependencies = [ - "ethereum-types 0.12.1", + "ethereum-types", "hex", - "sha3 0.9.1", + "serde", + "sha3", "thiserror", "uint", ] -[[package]] -name = "ethbloom" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb684ac8fa8f6c5759f788862bb22ec6fe3cb392f6bfd08e3c64b603661e3f8" -dependencies = [ - "crunchy", - "fixed-hash 0.7.0", - "tiny-keccak", -] - [[package]] name = "ethbloom" version = "0.13.0" @@ -3469,8 +3589,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ "crunchy", - "fixed-hash 0.8.0", - "impl-codec 0.6.0", + "fixed-hash", + "impl-codec", "impl-rlp", "impl-serde", "scale-info", @@ -3479,32 +3599,20 @@ dependencies = [ [[package]] name = "ethereum" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a89fb87a9e103f71b903b80b670200b54cc67a07578f070681f1fffb7396fb7" +checksum = "2e04d24d20b8ff2235cffbf242d5092de3aa45f77c5270ddbfadd2778ca13fea" dependencies = [ "bytes", - "ethereum-types 0.14.1", - "hash-db 0.15.2", + "ethereum-types", + "hash-db", "hash256-std-hasher", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "rlp", "scale-info", "serde", - "sha3 0.10.8", - "triehash", -] - -[[package]] -name = "ethereum-types" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05136f7057fe789f06e6d41d07b34e6f70d8c86e5693b60f97aaa6553553bdaf" -dependencies = [ - "ethbloom 0.11.1", - "fixed-hash 0.7.0", - "primitive-types 0.10.1", - "uint", + "sha3", + "trie-root", ] [[package]] @@ -3513,12 +3621,12 @@ version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" dependencies = [ - "ethbloom 0.13.0", - "fixed-hash 0.8.0", - "impl-codec 0.6.0", + "ethbloom", + "fixed-hash", + "impl-codec", "impl-rlp", "impl-serde", - "primitive-types 0.12.2", + "primitive-types", "scale-info", "uint", ] @@ -3542,20 +3650,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite 0.2.14", -] - -[[package]] -name = "event-listener" -version = "5.2.0" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b5fb89194fa3cad959b833185b3063ba881dbfc7030680b314250779fb4cc91" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" dependencies = [ "concurrent-queue", "parking", @@ -3564,28 +3661,18 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" -dependencies = [ - "event-listener 4.0.3", - "pin-project-lite 0.2.14", -] - -[[package]] -name = "event-listener-strategy" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "332f51cb23d20b0de8458b86580878211da09bcd4503cb579c225b3d124cabb3" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ - "event-listener 5.2.0", + "event-listener 5.3.1", "pin-project-lite 0.2.14", ] [[package]] name = "evm" -version = "0.39.1" -source = "git+https://github.com/moonbeam-foundation/evm?rev=a33ac87ad7462b7e7029d12c385492b2a8311d1c#a33ac87ad7462b7e7029d12c385492b2a8311d1c" +version = "0.41.1" +source = "git+https://github.com/moonbeam-foundation/evm?branch=moonbeam-polkadot-v1.7.2#fd602351387b3a3745110e93a66eab9be59fb801" dependencies = [ "auto_impl", "environmental", @@ -3594,46 +3681,46 @@ dependencies = [ "evm-gasometer", "evm-runtime", "log", - "parity-scale-codec 3.6.9", - "primitive-types 0.12.2", + "parity-scale-codec", + "primitive-types", "rlp", "scale-info", "serde", - "sha3 0.10.8", + "sha3", ] [[package]] name = "evm-core" -version = "0.39.0" -source = "git+https://github.com/moonbeam-foundation/evm?rev=a33ac87ad7462b7e7029d12c385492b2a8311d1c#a33ac87ad7462b7e7029d12c385492b2a8311d1c" +version = "0.41.0" +source = "git+https://github.com/moonbeam-foundation/evm?branch=moonbeam-polkadot-v1.7.2#fd602351387b3a3745110e93a66eab9be59fb801" dependencies = [ - "parity-scale-codec 3.6.9", - "primitive-types 0.12.2", + "parity-scale-codec", + "primitive-types", "scale-info", "serde", ] [[package]] name = "evm-gasometer" -version = "0.39.0" -source = "git+https://github.com/moonbeam-foundation/evm?rev=a33ac87ad7462b7e7029d12c385492b2a8311d1c#a33ac87ad7462b7e7029d12c385492b2a8311d1c" +version = "0.41.0" +source = "git+https://github.com/moonbeam-foundation/evm?branch=moonbeam-polkadot-v1.7.2#fd602351387b3a3745110e93a66eab9be59fb801" dependencies = [ "environmental", "evm-core", "evm-runtime", - "primitive-types 0.12.2", + "primitive-types", ] [[package]] name = "evm-runtime" -version = "0.39.0" -source = "git+https://github.com/moonbeam-foundation/evm?rev=a33ac87ad7462b7e7029d12c385492b2a8311d1c#a33ac87ad7462b7e7029d12c385492b2a8311d1c" +version = "0.41.0" +source = "git+https://github.com/moonbeam-foundation/evm?branch=moonbeam-polkadot-v1.7.2#fd602351387b3a3745110e93a66eab9be59fb801" dependencies = [ "auto_impl", "environmental", "evm-core", - "primitive-types 0.12.2", - "sha3 0.10.8", + "primitive-types", + "sha3", ] [[package]] @@ -3657,37 +3744,19 @@ dependencies = [ "quote", ] -[[package]] -name = "expander" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3774182a5df13c3d1690311ad32fbe913feef26baba609fa2dd5f72042bd2ab6" -dependencies = [ - "blake2", - "fs-err", - "proc-macro2", - "quote", -] - [[package]] name = "expander" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f86a749cf851891866c10515ef6c299b5c69661465e9c3bbe7e07a2b77fb0f7" dependencies = [ - "blake2", + "blake2 0.10.6", "fs-err", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] -[[package]] -name = "fake-simd" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" - [[package]] name = "fallible-iterator" version = "0.2.0" @@ -3711,9 +3780,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "fatality" @@ -3740,10 +3809,22 @@ dependencies = [ "thiserror", ] +[[package]] +name = "fc-api" +version = "1.0.0-dev" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" +dependencies = [ + "async-trait", + "fp-storage", + "parity-scale-codec", + "sp-core", + "sp-runtime", +] + [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" dependencies = [ "async-trait", "fp-consensus", @@ -3759,15 +3840,16 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" dependencies = [ "async-trait", + "fc-api", "fp-storage", "kvdb-rocksdb", "log", "parity-db", - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", + "parity-scale-codec", + "parking_lot 0.12.3", "sc-client-db", "smallvec", "sp-blockchain", @@ -3779,7 +3861,7 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" dependencies = [ "fc-db", "fc-storage", @@ -3788,7 +3870,7 @@ dependencies = [ "futures", "futures-timer", "log", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "sc-client-api", "sc-utils", "sp-api", @@ -3800,16 +3882,15 @@ dependencies = [ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" dependencies = [ "ethereum", - "ethereum-types 0.14.1", + "ethereum-types", "evm", - "fc-db", + "fc-api", "fc-mapping-sync", "fc-rpc-core", "fc-storage", - "fp-ethereum", "fp-evm", "fp-rpc", "fp-storage", @@ -3819,9 +3900,9 @@ dependencies = [ "libsecp256k1", "log", "pallet-evm", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "prometheus", - "rand 0.8.5", + "rand", "rlp", "sc-client-api", "sc-consensus-aura", @@ -3841,11 +3922,12 @@ dependencies = [ "sp-consensus", "sp-consensus-aura", "sp-core", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-inherents", "sp-io", "sp-runtime", "sp-state-machine", - "sp-storage", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-timestamp", "substrate-prometheus-endpoint", "thiserror", @@ -3855,41 +3937,44 @@ dependencies = [ [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" dependencies = [ "ethereum", - "ethereum-types 0.14.1", + "ethereum-types", "jsonrpsee", + "rlp", "rustc-hex", "serde", "serde_json", + "sp-core-hashing", ] [[package]] name = "fc-storage" version = "1.0.0-dev" -source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" dependencies = [ "ethereum", - "ethereum-types 0.14.1", + "ethereum-types", "fp-rpc", "fp-storage", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sc-client-api", "sp-api", "sp-blockchain", "sp-io", "sp-runtime", - "sp-storage", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "fdlimit" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c4c9e43643f5a3be4ca5b67d26b98031ff9db6806c3440ae32e02e3ceac3f1b" +checksum = "e182f7dbc2ef73d9ef67351c5fbbea084729c48362d3ce9dd44c28e32e277fe5" dependencies = [ "libc", + "thiserror", ] [[package]] @@ -3899,7 +3984,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "rand_core 0.6.4", - "subtle", + "subtle 2.5.0", ] [[package]] @@ -3912,14 +3997,14 @@ dependencies = [ "ark-poly", "ark-serialize", "ark-std", - "merlin 3.0.0", + "merlin", ] [[package]] name = "fiat-crypto" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c007b1ae3abe1cb6f85a16305acd418b7ca6343b953633fee2b76d8f108b830f" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" [[package]] name = "file-per-thread-logger" @@ -3927,7 +4012,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84f2e425d9790201ba4af4630191feac6dcc98765b118d4d18e91d23c2353866" dependencies = [ - "env_logger 0.10.2", + "env_logger", "log", ] @@ -3954,23 +4039,11 @@ dependencies = [ "futures-timer", "log", "num-traits", - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", + "parity-scale-codec", + "parking_lot 0.12.3", "scale-info", ] -[[package]] -name = "fixed-hash" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" -dependencies = [ - "byteorder", - "rand 0.8.5", - "rustc-hex", - "static_assertions", -] - [[package]] name = "fixed-hash" version = "0.8.0" @@ -3978,7 +4051,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand 0.8.5", + "rand", "rustc-hex", "static_assertions", ] @@ -3991,9 +4064,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" dependencies = [ "crc32fast", "libz-sys", @@ -4017,10 +4090,10 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" -version = "3.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "12.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "parity-scale-codec 3.6.9", + "parity-scale-codec", ] [[package]] @@ -4035,38 +4108,38 @@ dependencies = [ [[package]] name = "fp-account" version = "1.0.0-dev" -source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" dependencies = [ "hex", "impl-serde", "libsecp256k1", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", "sp-runtime", - "sp-runtime-interface", - "sp-std", + "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" dependencies = [ "ethereum", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "fp-dynamic-fee" version = "1.0.0" -source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" dependencies = [ "async-trait", "sp-core", @@ -4076,56 +4149,56 @@ dependencies = [ [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" dependencies = [ "ethereum", - "ethereum-types 0.14.1", + "ethereum-types", "fp-evm", "frame-support", - "num_enum 0.6.1", - "parity-scale-codec 3.6.9", - "sp-std", + "parity-scale-codec", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" dependencies = [ "evm", "frame-support", - "parity-scale-codec 3.6.9", + "num_enum 0.7.2", + "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" dependencies = [ "ethereum", - "ethereum-types 0.14.1", + "ethereum-types", "fp-evm", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-api", "sp-core", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" dependencies = [ "frame-support", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-runtime", @@ -4134,9 +4207,9 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" dependencies = [ - "parity-scale-codec 3.6.9", + "parity-scale-codec", "serde", ] @@ -4148,15 +4221,15 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-support", "frame-support-procedural", "frame-system", "linregress", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "paste", "scale-info", "serde", @@ -4165,19 +4238,19 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "static_assertions", ] [[package]] name = "frame-benchmarking-cli" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "32.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "Inflector", - "array-bytes", + "array-bytes 6.2.3", "chrono", "clap", "comfy-table", @@ -4190,8 +4263,8 @@ dependencies = [ "lazy_static", "linked-hash-map", "log", - "parity-scale-codec 3.6.9", - "rand 0.8.5", + "parity-scale-codec", + "rand", "rand_pcg", "sc-block-builder", "sc-cli", @@ -4206,63 +4279,63 @@ dependencies = [ "sp-blockchain", "sp-core", "sp-database", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-inherents", "sp-io", "sp-keystore", "sp-runtime", "sp-state-machine", - "sp-storage", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-trie", - "sp-wasm-interface", + "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "thiserror", "thousands", ] [[package]] name = "frame-election-provider-solution-type" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] name = "frame-election-provider-support" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-election-provider-solution-type", "frame-support", "frame-system", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-arithmetic", "sp-core", "sp-npos-elections", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "frame-executive" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-support", "frame-system", "frame-try-runtime", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", - "sp-tracing", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -4272,24 +4345,39 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87cf1549fba25a6fcac22785b61698317d958e96cac72a59102ea45b9ae64692" dependencies = [ "cfg-if", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", ] +[[package]] +name = "frame-metadata-hash-extension" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" +dependencies = [ + "array-bytes 6.2.3", + "docify", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime", +] + [[package]] name = "frame-remote-externalities" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.35.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "async-recursion", "futures", "indicatif", "jsonrpsee", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "serde", "sp-core", + "sp-crypto-hashing", "sp-io", "sp-runtime", "sp-state-machine", @@ -4301,10 +4389,11 @@ dependencies = [ [[package]] name = "frame-support" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "aquamarine", + "array-bytes 6.2.3", "bitflags 1.3.2", "docify", "environmental", @@ -4314,7 +4403,7 @@ dependencies = [ "k256", "log", "macro_magic", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "paste", "scale-info", "serde", @@ -4323,8 +4412,8 @@ dependencies = [ "sp-api", "sp-arithmetic", "sp-core", - "sp-core-hashing-proc-macro", - "sp-debug-derive", + "sp-crypto-hashing-proc-macro", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-genesis-builder", "sp-inherents", "sp-io", @@ -4332,8 +4421,8 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-state-machine", - "sp-std", - "sp-tracing", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-weights", "static_assertions", "tt-call", @@ -4341,8 +4430,8 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "Inflector", "cfg-expr", @@ -4354,84 +4443,86 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.57", + "sp-crypto-hashing", + "syn 2.0.66", ] [[package]] name = "frame-support-procedural-tools" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-support-procedural-tools-derive", - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] name = "frame-support-procedural-tools-derive" -version = "3.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] name = "frame-system" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "cfg-if", + "docify", "frame-support", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-version", "sp-weights", ] [[package]] name = "frame-system-benchmarking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "frame-system-rpc-runtime-api" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sp-api", ] [[package]] name = "frame-try-runtime" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-support", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sp-api", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -4455,18 +4546,18 @@ dependencies = [ [[package]] name = "fs4" -version = "0.6.6" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" +checksum = "29f9df8a11882c4e3335eb2d18a0137c505d9ca927470b0cac9c6f0ae07d28f7" dependencies = [ - "rustix 0.38.32", + "rustix 0.38.34", "windows-sys 0.48.0", ] [[package]] name = "fudge" version = "0.0.10" -source = "git+https://github.com/centrifuge/fudge?branch=polkadot-v1.1.0#043a7f77ab336acdf4208a7550b486947fb4c627" +source = "git+https://github.com/centrifuge/fudge?branch=polkadot-v1.7.2#356314d65f43519a6182fea1bf0befc196051b67" dependencies = [ "fudge-companion", "fudge-core", @@ -4479,7 +4570,7 @@ dependencies = [ [[package]] name = "fudge-companion" version = "0.0.7" -source = "git+https://github.com/centrifuge/fudge?branch=polkadot-v1.1.0#043a7f77ab336acdf4208a7550b486947fb4c627" +source = "git+https://github.com/centrifuge/fudge?branch=polkadot-v1.7.2#356314d65f43519a6182fea1bf0befc196051b67" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", @@ -4490,10 +4581,11 @@ dependencies = [ [[package]] name = "fudge-core" version = "0.0.10" -source = "git+https://github.com/centrifuge/fudge?branch=polkadot-v1.1.0#043a7f77ab336acdf4208a7550b486947fb4c627" +source = "git+https://github.com/centrifuge/fudge?branch=polkadot-v1.7.2#356314d65f43519a6182fea1bf0befc196051b67" dependencies = [ "async-trait", - "bitvec 1.0.1", + "bitvec", + "cumulus-client-parachain-inherent", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", "cumulus-relay-chain-interface", @@ -4505,16 +4597,17 @@ dependencies = [ "lazy_static", "node-primitives", "pallet-babe", - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", + "parity-scale-codec", + "parking_lot 0.12.3", "polkadot-cli", "polkadot-core-primitives", "polkadot-node-primitives", + "polkadot-overseer", "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-parachains", "polkadot-service", - "prioritized-metered-channel", + "prioritized-metered-channel 0.2.0", "sc-basic-authorship", "sc-block-builder", "sc-client-api", @@ -4536,14 +4629,14 @@ dependencies = [ "sp-consensus-grandpa", "sp-core", "sp-database", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-inherents", "sp-io", "sp-keystore", "sp-runtime", "sp-state-machine", - "sp-std", - "sp-storage", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-timestamp", "sp-transaction-pool", "thiserror", @@ -4551,12 +4644,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "funty" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" - [[package]] name = "funty" version = "2.0.0" @@ -4633,7 +4720,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ - "fastrand 2.0.2", + "fastrand 2.1.0", "futures-core", "futures-io", "parking", @@ -4648,7 +4735,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] @@ -4750,15 +4837,13 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", ] [[package]] @@ -4767,6 +4852,7 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ea1015b5a70616b688dc230cfe50c8af89d972cb132d5a622814d29773b10b9" dependencies = [ + "rand", "rand_core 0.6.4", ] @@ -4793,9 +4879,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "glob" @@ -4803,19 +4889,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "globset" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" -dependencies = [ - "aho-corasick", - "bstr", - "log", - "regex-automata 0.4.6", - "regex-syntax 0.8.3", -] - [[package]] name = "group" version = "0.13.0" @@ -4824,14 +4897,14 @@ checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", "rand_core 0.6.4", - "subtle", + "subtle 2.5.0", ] [[package]] name = "h2" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", @@ -4860,12 +4933,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "hash-db" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" - [[package]] name = "hash-db" version = "0.16.0" @@ -4901,15 +4968,24 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash 0.8.11", "allocator-api2", "serde", ] +[[package]] +name = "hashlink" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +dependencies = [ + "hashbrown 0.14.5", +] + [[package]] name = "heck" version = "0.4.1" @@ -4922,15 +4998,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.3.9" @@ -4943,12 +5010,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hex-literal" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" - [[package]] name = "hex-literal" version = "0.4.1" @@ -4980,7 +5041,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" dependencies = [ - "crypto-mac 0.11.1", + "crypto-mac 0.11.0", "digest 0.9.0", ] @@ -5072,9 +5133,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" dependencies = [ "bytes", "futures-channel", @@ -5087,7 +5148,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite 0.2.14", - "socket2 0.5.6", + "socket2 0.5.7", "tokio", "tower-service", "tracing", @@ -5104,11 +5165,10 @@ dependencies = [ "http", "hyper", "log", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-native-certs", "tokio", "tokio-rustls", - "webpki-roots 0.25.4", ] [[package]] @@ -5171,7 +5231,7 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6b0422c86d7ce0e97169cc42e04ae643caf278874a7a3c87b8150a220dc7e1e" dependencies = [ - "async-io 2.3.2", + "async-io 2.3.3", "core-foundation", "fnv", "futures", @@ -5184,22 +5244,13 @@ dependencies = [ "windows", ] -[[package]] -name = "impl-codec" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" -dependencies = [ - "parity-scale-codec 2.3.1", -] - [[package]] name = "impl-codec" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ - "parity-scale-codec 3.6.9", + "parity-scale-codec", ] [[package]] @@ -5268,7 +5319,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.14.5", ] [[package]] @@ -5301,9 +5352,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] @@ -5329,7 +5380,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", "windows-sys 0.48.0", ] @@ -5346,7 +5397,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.5.6", + "socket2 0.5.7", "widestring", "windows-sys 0.48.0", "winreg", @@ -5364,7 +5415,7 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", "windows-sys 0.52.0", ] @@ -5378,6 +5429,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + [[package]] name = "itertools" version = "0.10.5" @@ -5396,6 +5453,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" @@ -5404,9 +5470,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.28" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" dependencies = [ "libc", ] @@ -5422,9 +5488,9 @@ dependencies = [ [[package]] name = "jsonrpsee" -version = "0.16.3" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "367a292944c07385839818bb71c8d76611138e2dedb0677d035b8da21d29c78b" +checksum = "affdc52f7596ccb2d7645231fc6163bb314630c989b64998f3699a28b4d5d4dc" dependencies = [ "jsonrpsee-core", "jsonrpsee-http-client", @@ -5432,19 +5498,19 @@ dependencies = [ "jsonrpsee-server", "jsonrpsee-types", "jsonrpsee-ws-client", + "tokio", "tracing", ] [[package]] name = "jsonrpsee-client-transport" -version = "0.16.3" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8b3815d9f5d5de348e5f162b316dc9cdf4548305ebb15b4eb9328e66cf27d7a" +checksum = "b5b005c793122d03217da09af68ba9383363caa950b90d3436106df8cabce935" dependencies = [ "futures-util", "http", "jsonrpsee-core", - "jsonrpsee-types", "pin-project", "rustls-native-certs", "soketto", @@ -5453,28 +5519,25 @@ dependencies = [ "tokio-rustls", "tokio-util", "tracing", - "webpki-roots 0.25.4", + "url", ] [[package]] name = "jsonrpsee-core" -version = "0.16.3" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b5dde66c53d6dcdc8caea1874a45632ec0fcf5b437789f1e45766a1512ce803" +checksum = "da2327ba8df2fdbd5e897e2b5ed25ce7f299d345b9736b6828814c3dbd1fd47b" dependencies = [ "anyhow", - "arrayvec 0.7.4", "async-lock 2.8.0", "async-trait", "beef", - "futures-channel", "futures-timer", "futures-util", - "globset", "hyper", "jsonrpsee-types", - "parking_lot 0.12.1", - "rand 0.8.5", + "parking_lot 0.12.3", + "rand", "rustc-hash", "serde", "serde_json", @@ -5486,28 +5549,29 @@ dependencies = [ [[package]] name = "jsonrpsee-http-client" -version = "0.16.3" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e5f9fabdd5d79344728521bb65e3106b49ec405a78b66fbff073b72b389fa43" +checksum = "5f80c17f62c7653ce767e3d7288b793dfec920f97067ceb189ebdd3570f2bc20" dependencies = [ "async-trait", "hyper", "hyper-rustls", "jsonrpsee-core", "jsonrpsee-types", - "rustc-hash", "serde", "serde_json", "thiserror", "tokio", + "tower", "tracing", + "url", ] [[package]] name = "jsonrpsee-proc-macros" -version = "0.16.3" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" +checksum = "29110019693a4fa2dbda04876499d098fa16d70eba06b1e6e2b3f1b251419515" dependencies = [ "heck 0.4.1", "proc-macro-crate 1.3.1", @@ -5518,19 +5582,20 @@ dependencies = [ [[package]] name = "jsonrpsee-server" -version = "0.16.3" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4d945a6008c9b03db3354fb3c83ee02d2faa9f2e755ec1dfb69c3551b8f4ba" +checksum = "82c39a00449c9ef3f50b84fc00fc4acba20ef8f559f07902244abf4c15c5ab9c" dependencies = [ - "futures-channel", "futures-util", "http", "hyper", "jsonrpsee-core", "jsonrpsee-types", + "route-recognizer", "serde", "serde_json", "soketto", + "thiserror", "tokio", "tokio-stream", "tokio-util", @@ -5540,9 +5605,9 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.16.3" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245ba8e5aa633dd1c1e4fae72bce06e71f42d34c14a2767c6b4d173b57bee5e5" +checksum = "5be0be325642e850ed0bdff426674d2e66b2b7117c9be23a7caef68a2902b7d9" dependencies = [ "anyhow", "beef", @@ -5554,14 +5619,15 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.16.3" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e1b3975ed5d73f456478681a417128597acd6a2487855fdb7b4a3d4d195bf5e" +checksum = "bca9cb3933ccae417eb6b08c3448eb1cb46e39834e5b503e395e5e5bd08546c0" dependencies = [ "http", "jsonrpsee-client-transport", "jsonrpsee-core", "jsonrpsee-types", + "url", ] [[package]] @@ -5587,18 +5653,10 @@ dependencies = [ ] [[package]] -name = "kusama-runtime-constants" +name = "keystream" version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" -dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", - "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", -] +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" [[package]] name = "kvdb" @@ -5616,7 +5674,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf7a85fe66f9ff9cd74e169fdd2c94c6e1e74c412c99a73b4df3200b5d3760b2" dependencies = [ "kvdb", - "parking_lot 0.12.1", + "parking_lot 0.12.3", ] [[package]] @@ -5627,7 +5685,7 @@ checksum = "b644c70b92285f66bfc2032922a79000ea30af7bc2ab31902992a5dcb9b434f6" dependencies = [ "kvdb", "num_cpus", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "regex", "rocksdb", "smallvec", @@ -5635,9 +5693,9 @@ dependencies = [ [[package]] name = "landlock" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520baa32708c4e957d2fc3a186bc5bd8d26637c33137f399ddfc202adb240068" +checksum = "9baa9eeb6e315942429397e617a190f4fdc696ef1ee0342939d641029cbb4ea7" dependencies = [ "enumflags2", "libc", @@ -5661,9 +5719,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libloading" @@ -5672,7 +5730,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -5690,7 +5748,7 @@ dependencies = [ "bytes", "futures", "futures-timer", - "getrandom 0.2.12", + "getrandom 0.2.15", "instant", "libp2p-allow-block-list", "libp2p-connection-limits", @@ -5752,13 +5810,13 @@ dependencies = [ "libp2p-identity", "log", "multiaddr", - "multihash", + "multihash 0.17.0", "multistream-select", "once_cell", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "pin-project", "quick-protobuf", - "rand 0.8.5", + "rand", "rw-stream-sink", "smallvec", "thiserror", @@ -5775,7 +5833,7 @@ dependencies = [ "futures", "libp2p-core", "log", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "smallvec", "trust-dns-resolver", ] @@ -5812,9 +5870,9 @@ dependencies = [ "ed25519-dalek", "log", "multiaddr", - "multihash", + "multihash 0.17.0", "quick-protobuf", - "rand 0.8.5", + "rand", "sha2 0.10.8", "thiserror", "zeroize", @@ -5839,7 +5897,7 @@ dependencies = [ "libp2p-swarm", "log", "quick-protobuf", - "rand 0.8.5", + "rand", "sha2 0.10.8", "smallvec", "thiserror", @@ -5861,7 +5919,7 @@ dependencies = [ "libp2p-identity", "libp2p-swarm", "log", - "rand 0.8.5", + "rand", "smallvec", "socket2 0.4.10", "tokio", @@ -5897,7 +5955,7 @@ dependencies = [ "log", "once_cell", "quick-protobuf", - "rand 0.8.5", + "rand", "sha2 0.10.8", "snow", "static_assertions", @@ -5919,7 +5977,7 @@ dependencies = [ "libp2p-core", "libp2p-swarm", "log", - "rand 0.8.5", + "rand", "void", ] @@ -5937,9 +5995,9 @@ dependencies = [ "libp2p-identity", "libp2p-tls", "log", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "quinn-proto", - "rand 0.8.5", + "rand", "rustls 0.20.9", "thiserror", "tokio", @@ -5957,7 +6015,7 @@ dependencies = [ "libp2p-core", "libp2p-identity", "libp2p-swarm", - "rand 0.8.5", + "rand", "smallvec", ] @@ -5976,7 +6034,7 @@ dependencies = [ "libp2p-identity", "libp2p-swarm-derive", "log", - "rand 0.8.5", + "rand", "smallvec", "tokio", "void", @@ -6053,12 +6111,12 @@ dependencies = [ "futures-rustls", "libp2p-core", "log", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "quicksink", "rw-stream-sink", "soketto", "url", - "webpki-roots 0.22.6", + "webpki-roots", ] [[package]] @@ -6112,7 +6170,7 @@ dependencies = [ "libsecp256k1-core", "libsecp256k1-gen-ecmult", "libsecp256k1-gen-genmult", - "rand 0.8.5", + "rand", "serde", "sha2 0.9.9", "typenum", @@ -6126,7 +6184,7 @@ checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" dependencies = [ "crunchy", "digest 0.9.0", - "subtle", + "subtle 2.5.0", ] [[package]] @@ -6149,9 +6207,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.16" +version = "1.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e143b5e666b2695d28f6bca6497720813f699c9602dd7f5cac91008b8ada7f9" +checksum = "c15da26e5af7e25c90b37a2d75cdbf940cf4a55316de9d84c679c9b8bfabf82e" dependencies = [ "cc", "pkg-config", @@ -6205,9 +6263,21 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "lioness" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "4ae926706ba42c425c9457121178330d75e273df2e82e28b758faf3de3a9acb9" +dependencies = [ + "arrayref", + "blake2 0.8.1", + "chacha", + "keystream", +] [[package]] name = "liquidity-pools-gateway-routers" @@ -6233,12 +6303,12 @@ dependencies = [ "pallet-liquidity-pools-gateway", "pallet-timestamp", "pallet-xcm-transactor", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -6247,9 +6317,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -6316,50 +6386,50 @@ dependencies = [ [[package]] name = "macro_magic" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aee866bfee30d2d7e83835a4574aad5b45adba4cc807f2a3bbba974e5d4383c9" +checksum = "e03844fc635e92f3a0067e25fa4bf3e3dbf3f2927bf3aa01bb7bc8f1c428949d" dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] name = "macro_magic_core" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e766a20fd9c72bab3e1e64ed63f36bd08410e75803813df210d1ce297d7ad00" +checksum = "468155613a44cfd825f1fb0ffa532b018253920d404e6fca1e8d43155198a46d" dependencies = [ "const-random", "derive-syn-parse 0.1.5", "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] name = "macro_magic_core_macros" -version = "0.4.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d710e1214dffbab3b5dacb21475dde7d6ed84c69ff722b3a47a782668d44fbac" +checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] name = "macro_magic_macros" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" +checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] @@ -6411,7 +6481,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.32", + "rustix 0.38.34", ] [[package]] @@ -6423,6 +6493,15 @@ dependencies = [ "libc", ] +[[package]] +name = "memmap2" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" version = "0.8.0" @@ -6438,19 +6517,7 @@ version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "808b50db46293432a45e63bc15ea51e0ab4c0a1647b8eb114e31a3e698dd6fbe" dependencies = [ - "hash-db 0.16.0", -] - -[[package]] -name = "merlin" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42" -dependencies = [ - "byteorder", - "keccak", - "rand_core 0.5.1", - "zeroize", + "hash-db", ] [[package]] @@ -6472,7 +6539,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69672161530e8aeca1d1400fbf3f1a1747ff60ea604265a4e906c2442df20532" dependencies = [ "futures", - "rand 0.8.5", + "rand", "thrift", ] @@ -6484,9 +6551,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" dependencies = [ "adler", ] @@ -6502,14 +6569,39 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "mixnet" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daa3eb39495d8e2e2947a1d862852c90cc6a4a8845f8b41c8829cb9fcc047f4a" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "bitflags 1.3.2", + "blake2 0.10.6", + "c2-chacha", + "curve25519-dalek 4.1.2", + "either", + "hashlink", + "lioness", + "log", + "parking_lot 0.12.3", + "rand", + "rand_chacha 0.3.1", + "rand_distr", + "subtle 2.5.0", + "thiserror", + "zeroize", +] + [[package]] name = "mmr-gadget" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "futures", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sc-client-api", "sc-offchain", "sp-api", @@ -6523,12 +6615,11 @@ dependencies = [ [[package]] name = "mmr-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "anyhow", "jsonrpsee", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "serde", "sp-api", "sp-blockchain", @@ -6540,10 +6631,7 @@ dependencies = [ [[package]] name = "mock-builder" version = "0.2.0" -source = "git+https://github.com/foss3/runtime-pallet-library?branch=polkadot-v1.1.0#042820a379e12687572bebfb1d05406a649804b1" -dependencies = [ - "frame-support", -] +source = "git+https://github.com/foss3/runtime-pallet-library?branch=polkadot-v1.7.2#e27ed4ebffc8800683773aac686938fbbe0a67ef" [[package]] name = "mockall" @@ -6583,7 +6671,7 @@ dependencies = [ "data-encoding", "log", "multibase", - "multihash", + "multihash 0.17.0", "percent-encoding", "serde", "static_assertions", @@ -6613,12 +6701,55 @@ dependencies = [ "blake3", "core2", "digest 0.10.7", - "multihash-derive", + "multihash-derive 0.8.0", + "sha2 0.10.8", + "sha3", + "unsigned-varint", +] + +[[package]] +name = "multihash" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfd8a792c1694c6da4f68db0a9d707c72bd260994da179e6030a5dcee00bb815" +dependencies = [ + "core2", + "digest 0.10.7", + "multihash-derive 0.8.0", "sha2 0.10.8", - "sha3 0.10.8", "unsigned-varint", ] +[[package]] +name = "multihash" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076d548d76a0e2a0d4ab471d0b1c36c577786dfc4471242035d97a12a735c492" +dependencies = [ + "core2", + "unsigned-varint", +] + +[[package]] +name = "multihash-codetable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6d815ecb3c8238d00647f8630ede7060a642c9f704761cd6082cb4028af6935" +dependencies = [ + "blake2b_simd", + "blake2s_simd", + "blake3", + "core2", + "digest 0.10.7", + "multihash-derive 0.9.0", + "ripemd", + "serde", + "sha1", + "sha2 0.10.8", + "sha3", + "strobe-rs", +] + [[package]] name = "multihash-derive" version = "0.8.0" @@ -6630,7 +6761,32 @@ dependencies = [ "proc-macro2", "quote", "syn 1.0.109", - "synstructure", + "synstructure 0.12.6", +] + +[[package]] +name = "multihash-derive" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "890e72cb7396cb99ed98c1246a97b243cc16394470d94e0bc8b0c2c11d84290e" +dependencies = [ + "core2", + "multihash 0.19.1", + "multihash-derive-impl", +] + +[[package]] +name = "multihash-derive-impl" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3958713ce794e12f7c6326fac9aa274c68d74c4881dd37b3e2662b8a2046bb19" +dependencies = [ + "proc-macro-crate 2.0.0", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.66", + "synstructure 0.13.1", ] [[package]] @@ -6682,11 +6838,11 @@ dependencies = [ [[package]] name = "names" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d66043b25d4a6cccb23619d10c19c25304b355a7dccd4a8e11423dd2382146" +checksum = "7bddcd3bf5144b6392de80e04c347cd7fab2508f6df16a85fc496ecd5cec39bc" dependencies = [ - "rand 0.8.5", + "rand", ] [[package]] @@ -6750,9 +6906,9 @@ dependencies = [ [[package]] name = "netlink-sys" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411" +checksum = "416060d346fbaf1f23f9512963e3e878f1a78e707cb699ba9215761754244307" dependencies = [ "bytes", "futures", @@ -6772,6 +6928,17 @@ dependencies = [ "libc", ] +[[package]] +name = "nix" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" +dependencies = [ + "bitflags 2.5.0", + "cfg-if", + "libc", +] + [[package]] name = "no-std-net" version = "0.6.0" @@ -6781,7 +6948,7 @@ checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" [[package]] name = "node-primitives" version = "2.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "sp-core", "sp-runtime", @@ -6817,9 +6984,9 @@ checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[package]] name = "num" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ "num-bigint", "num-complex", @@ -6831,20 +6998,19 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" dependencies = [ - "autocfg", "num-integer", "num-traits", ] [[package]] name = "num-complex" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ "num-traits", ] @@ -6876,9 +7042,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -6887,11 +7053,10 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "autocfg", "num-bigint", "num-integer", "num-traits", @@ -6899,11 +7064,12 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", + "libm", ] [[package]] @@ -6912,7 +7078,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", ] @@ -6927,11 +7093,11 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.6.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" dependencies = [ - "num_enum_derive 0.6.1", + "num_enum_derive 0.7.2", ] [[package]] @@ -6947,14 +7113,14 @@ dependencies = [ [[package]] name = "num_enum_derive" -version = "0.6.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] @@ -6977,9 +7143,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "b8ec7ab813848ba4522158d5517a6093db1ded27575b070f4177b8d12b41db5e" dependencies = [ "memchr", ] @@ -7017,11 +7183,17 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + [[package]] name = "orchestra" -version = "0.0.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "227585216d05ba65c7ab0a0450a3cf2cbd81a98862a54c4df8e14d5ac6adb015" +checksum = "92829eef0328a3d1cd22a02c0e51deb92a5362df3e7d21a4e9bdc38934694e66" dependencies = [ "async-trait", "dyn-clonable", @@ -7029,21 +7201,22 @@ dependencies = [ "futures-timer", "orchestra-proc-macro", "pin-project", - "prioritized-metered-channel", + "prioritized-metered-channel 0.6.1", "thiserror", "tracing", ] [[package]] name = "orchestra-proc-macro" -version = "0.0.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2871aadd82a2c216ee68a69837a526dfe788ecbe74c4c5038a6acdbff6653066" +checksum = "1344346d5af32c95bbddea91b18a88cc83eac394192d20ef2fc4c40a74332355" dependencies = [ - "expander 0.0.6", - "itertools 0.10.5", + "expander 2.0.0", + "indexmap 2.2.6", + "itertools 0.11.0", "petgraph", - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 1.0.109", @@ -7060,20 +7233,21 @@ dependencies = [ [[package]] name = "orml-asset-registry" -version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#b3694e631df7f1ca16b1973122937753fcdee9d4" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/open-runtime-module-library?branch=moonbeam-polkadot-v1.7.2#f90f4de88986571e24ea3c027b9c09a4b732ee1f" dependencies = [ "frame-support", "frame-system", "log", "orml-traits", "pallet-xcm", - "parity-scale-codec 3.6.9", + "parity-scale-codec", + "polkadot-runtime-common", "scale-info", "serde", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -7081,102 +7255,101 @@ dependencies = [ [[package]] name = "orml-tokens" -version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#b3694e631df7f1ca16b1973122937753fcdee9d4" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/open-runtime-module-library?branch=moonbeam-polkadot-v1.7.2#f90f4de88986571e24ea3c027b9c09a4b732ee1f" dependencies = [ "frame-support", "frame-system", "log", "orml-traits", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-arithmetic", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "orml-traits" -version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#b3694e631df7f1ca16b1973122937753fcdee9d4" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/open-runtime-module-library?branch=moonbeam-polkadot-v1.7.2#f90f4de88986571e24ea3c027b9c09a4b732ee1f" dependencies = [ "frame-support", "impl-trait-for-tuples", "num-traits", "orml-utilities", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "paste", "scale-info", "serde", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "staging-xcm", ] [[package]] name = "orml-utilities" -version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#b3694e631df7f1ca16b1973122937753fcdee9d4" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/open-runtime-module-library?branch=moonbeam-polkadot-v1.7.2#f90f4de88986571e24ea3c027b9c09a4b732ee1f" dependencies = [ "frame-support", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "orml-xcm" -version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#b3694e631df7f1ca16b1973122937753fcdee9d4" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/open-runtime-module-library?branch=moonbeam-polkadot-v1.7.2#f90f4de88986571e24ea3c027b9c09a4b732ee1f" dependencies = [ "frame-support", "frame-system", "pallet-xcm", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "staging-xcm", ] [[package]] name = "orml-xcm-support" -version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#b3694e631df7f1ca16b1973122937753fcdee9d4" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/open-runtime-module-library?branch=moonbeam-polkadot-v1.7.2#f90f4de88986571e24ea3c027b9c09a4b732ee1f" dependencies = [ "frame-support", "orml-traits", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-executor", ] [[package]] name = "orml-xtokens" -version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#b3694e631df7f1ca16b1973122937753fcdee9d4" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/open-runtime-module-library?branch=moonbeam-polkadot-v1.7.2#f90f4de88986571e24ea3c027b9c09a4b732ee1f" dependencies = [ - "cumulus-primitives-core", "frame-support", "frame-system", "log", "orml-traits", "orml-xcm-support", "pallet-xcm", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-executor", ] @@ -7195,7 +7368,7 @@ dependencies = [ "pallet-authorship", "pallet-balances", "pallet-timestamp", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-arithmetic", @@ -7203,60 +7376,93 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] -name = "pallet-aura" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +name = "pallet-asset-conversion" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + +[[package]] +name = "pallet-asset-rate" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + +[[package]] +name = "pallet-aura" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-support", "frame-system", "log", "pallet-timestamp", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-application-crypto", "sp-consensus-aura", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-authority-discovery" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-support", "frame-system", "pallet-session", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-application-crypto", "sp-authority-discovery", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-authorship" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-babe" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", @@ -7265,7 +7471,7 @@ dependencies = [ "pallet-authorship", "pallet-session", "pallet-timestamp", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-application-crypto", "sp-consensus-babe", @@ -7274,13 +7480,13 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-bags-list" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "aquamarine", "docify", @@ -7290,39 +7496,40 @@ dependencies = [ "frame-system", "log", "pallet-balances", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", - "sp-tracing", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-balances" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-base-fee" version = "1.0.0" -source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" dependencies = [ "fp-evm", "frame-support", "frame-system", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-runtime", @@ -7330,30 +7537,30 @@ dependencies = [ [[package]] name = "pallet-beefy" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-support", "frame-system", "log", "pallet-authorship", "pallet-session", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-consensus-beefy", "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-beefy-mmr" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "binary-merkle-tree", "frame-support", "frame-system", @@ -7361,7 +7568,7 @@ dependencies = [ "pallet-beefy", "pallet-mmr", "pallet-session", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-api", @@ -7370,7 +7577,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -7393,31 +7600,31 @@ dependencies = [ "pallet-restricted-tokens", "pallet-rewards", "pallet-session", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-bounties" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", "pallet-treasury", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -7434,18 +7641,35 @@ dependencies = [ "pallet-balances", "pallet-fees", "pallet-timestamp", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + +[[package]] +name = "pallet-broker" +version = "0.6.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" +dependencies = [ + "bitvec", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-child-bounties" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", @@ -7453,12 +7677,12 @@ dependencies = [ "log", "pallet-bounties", "pallet-treasury", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -7469,89 +7693,90 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-collator-selection" -version = "3.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "9.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", "pallet-authorship", + "pallet-balances", "pallet-session", - "parity-scale-codec 3.6.9", - "rand 0.8.5", + "parity-scale-codec", + "rand", "scale-info", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-collective" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-conviction-voting" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "assert_matches", "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-democracy" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-election-provider-multi-phase" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7559,59 +7784,59 @@ dependencies = [ "frame-system", "log", "pallet-election-provider-support-benchmarking", - "parity-scale-codec 3.6.9", - "rand 0.8.5", + "parity-scale-codec", + "rand", "scale-info", "sp-arithmetic", "sp-core", "sp-io", "sp-npos-elections", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "strum 0.24.1", ] [[package]] name = "pallet-election-provider-support-benchmarking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-system", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sp-npos-elections", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-elections-phragmen" -version = "5.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-npos-elections", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" dependencies = [ "environmental", "ethereum", - "ethereum-types 0.14.1", + "ethereum-types", "evm", "fp-consensus", "fp-ethereum", @@ -7621,11 +7846,11 @@ dependencies = [ "frame-support", "frame-system", "pallet-evm", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -7644,18 +7869,18 @@ dependencies = [ "pallet-evm", "pallet-evm-precompile-simple", "pallet-timestamp", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" dependencies = [ "environmental", "evm", @@ -7664,35 +7889,35 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "hash-db", "hex", - "hex-literal 0.4.1", + "hex-literal", "impl-trait-for-tuples", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "rlp", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-evm-chain-id" version = "1.0.0-dev" -source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", - "sp-runtime", ] [[package]] name = "pallet-evm-precompile-balances-erc20" version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/moonbeam?tag=v0.34.1#29e8d79f1a7cdb195bd17b1788e9e613055c3575" +source = "git+https://github.com/moonbeam-foundation/moonbeam?tag=v0.37.3#8081fdffb4d3d294dc5bbbb0ae8f02c348619499" dependencies = [ "fp-evm", "frame-support", @@ -7702,19 +7927,20 @@ dependencies = [ "pallet-balances", "pallet-evm", "pallet-timestamp", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "paste", "precompile-utils", "slices", "sp-core", "sp-io", - "sp-std", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-evm-precompile-blake2" version = "2.0.0-dev" -source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" dependencies = [ "fp-evm", ] @@ -7722,7 +7948,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-bn128" version = "2.0.0-dev" -source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" dependencies = [ "fp-evm", "sp-core", @@ -7732,19 +7958,19 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-dispatch" version = "2.0.0-dev" -source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" dependencies = [ "fp-evm", "frame-support", "pallet-evm", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sp-runtime", ] [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" -source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" dependencies = [ "fp-evm", "num", @@ -7753,7 +7979,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-sha3fips" version = "2.0.0-dev" -source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" dependencies = [ "fp-evm", "tiny-keccak", @@ -7762,7 +7988,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/lemunozm/frontier?branch=moonbeam-polkadot-v1.1.0#5b253cc24f95d63d2a9d78f1c4e687727babfc19" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#7f424fb9fc1ca9158a59be54cb183beaff9f799a" dependencies = [ "fp-evm", "ripemd", @@ -7771,8 +7997,8 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "docify", "frame-benchmarking", @@ -7780,12 +8006,12 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -7799,12 +8025,12 @@ dependencies = [ "pallet-authorship", "pallet-balances", "pallet-treasury", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -7818,18 +8044,18 @@ dependencies = [ "frame-support", "frame-system", "pallet-swaps", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-grandpa" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", @@ -7837,7 +8063,7 @@ dependencies = [ "log", "pallet-authorship", "pallet-session", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-application-crypto", "sp-consensus-grandpa", @@ -7846,60 +8072,61 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-identity" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "enumflags2", "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.6.9", + "log", + "parity-scale-codec", "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-im-online" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", "pallet-authorship", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-application-crypto", "sp-core", "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-indices" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-keyring", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -7914,13 +8141,13 @@ dependencies = [ "frame-support", "frame-system", "pallet-timestamp", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -7938,14 +8165,14 @@ dependencies = [ "orml-traits", "pallet-balances", "pallet-restricted-tokens", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -7956,12 +8183,12 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -7984,12 +8211,12 @@ dependencies = [ "pallet-ethereum", "pallet-timestamp", "pallet-uniques", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "staging-xcm", "xcm-primitives", ] @@ -8007,15 +8234,15 @@ dependencies = [ "frame-support", "frame-system", "hex", - "hex-literal 0.3.4", + "hex-literal", "pallet-balances", - "parity-scale-codec 3.6.9", - "rand 0.8.5", + "parity-scale-codec", + "rand", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -8028,12 +8255,12 @@ dependencies = [ "frame-support", "frame-system", "num-traits", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -8054,125 +8281,126 @@ dependencies = [ "pallet-interest-accrual", "pallet-timestamp", "pallet-uniques", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "strum 0.24.1", ] [[package]] name = "pallet-membership" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-message-queue" -version = "7.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "31.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ + "environmental", "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-weights", ] [[package]] name = "pallet-mmr" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-mmr-primitives", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-multisig" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-nis" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-arithmetic", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-nomination-pools" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "25.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-support", "frame-system", "log", "pallet-balances", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", "sp-staking", - "sp-std", - "sp-tracing", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-nomination-pools-benchmarking" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8181,46 +8409,46 @@ dependencies = [ "pallet-bags-list", "pallet-nomination-pools", "pallet-staking", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-runtime", - "sp-runtime-interface", + "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-nomination-pools-runtime-api" -version = "1.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "pallet-nomination-pools", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sp-api", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-offences" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-support", "frame-system", "log", "pallet-balances", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-offences-benchmarking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8234,11 +8462,11 @@ dependencies = [ "pallet-offences", "pallet-session", "pallet-staking", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -8250,11 +8478,11 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -8266,11 +8494,11 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -8288,15 +8516,14 @@ dependencies = [ "orml-tokens", "orml-traits", "pallet-balances", - "pallet-restricted-tokens", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -8309,11 +8536,11 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -8332,14 +8559,14 @@ dependencies = [ "orml-traits", "pallet-balances", "pallet-timestamp", - "parity-scale-codec 3.6.9", - "rand 0.8.5", + "parity-scale-codec", + "rand", "scale-info", "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "strum 0.24.1", ] @@ -8364,14 +8591,13 @@ dependencies = [ "pallet-pool-fees", "pallet-pool-system", "pallet-timestamp", - "parachain-info", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "staging-xcm", ] @@ -8396,9 +8622,8 @@ dependencies = [ "pallet-pool-fees", "pallet-restricted-tokens", "pallet-timestamp", - "parachain-info", - "parity-scale-codec 3.6.9", - "rand 0.8.5", + "parity-scale-codec", + "rand", "rev_slice", "scale-info", "serde", @@ -8406,107 +8631,107 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "staging-xcm", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "strum 0.24.1", ] [[package]] name = "pallet-preimage" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-proxy" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-ranked-collective" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "impl-trait-for-tuples", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-recovery" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-referenda" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "assert_matches", "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-remarks" version = "0.0.1" -source = "git+https://github.com/foss3/runtime-pallet-library?branch=polkadot-v1.1.0#042820a379e12687572bebfb1d05406a649804b1" +source = "git+https://github.com/foss3/runtime-pallet-library?branch=polkadot-v1.7.2#e27ed4ebffc8800683773aac686938fbbe0a67ef" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -8523,12 +8748,12 @@ dependencies = [ "orml-traits", "pallet-balances", "pallet-permissions", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -8540,9 +8765,9 @@ dependencies = [ "frame-system", "orml-traits", "orml-xtokens", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "staging-xcm", ] @@ -8559,44 +8784,59 @@ dependencies = [ "num-traits", "orml-tokens", "orml-traits", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + +[[package]] +name = "pallet-root-testing" +version = "4.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-scheduler" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "docify", "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-weights", ] [[package]] name = "pallet-session" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", "log", "pallet-timestamp", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -8604,49 +8844,49 @@ dependencies = [ "sp-session", "sp-staking", "sp-state-machine", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-trie", ] [[package]] name = "pallet-session-benchmarking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "pallet-session", "pallet-staking", - "parity-scale-codec 3.6.9", - "rand 0.8.5", + "parity-scale-codec", + "rand", "sp-runtime", "sp-session", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-society" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-staking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8655,7 +8895,7 @@ dependencies = [ "log", "pallet-authorship", "pallet-session", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", "serde", @@ -8663,24 +8903,24 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-staking-reward-curve" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] name = "pallet-staking-reward-fn" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "19.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "log", "sp-arithmetic", @@ -8688,43 +8928,45 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sp-api", + "sp-staking", ] [[package]] name = "pallet-state-trie-migration" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-sudo" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -8735,49 +8977,50 @@ dependencies = [ "cfg-traits", "frame-support", "frame-system", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-timestamp" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-inherents", "sp-io", "sp-runtime", - "sp-std", - "sp-storage", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-timestamp", ] [[package]] name = "pallet-tips" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", "pallet-treasury", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -8795,40 +9038,40 @@ dependencies = [ "orml-tokens", "orml-traits", "pallet-restricted-tokens", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-transaction-payment" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-transaction-payment-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "30.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sp-api", "sp-blockchain", "sp-core", @@ -8839,11 +9082,11 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "pallet-transaction-payment", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sp-api", "sp-runtime", "sp-weights", @@ -8859,128 +9102,132 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-treasury" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", "impl-trait-for-tuples", "pallet-balances", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", + "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-uniques" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-utility" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-vesting" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-whitelist" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-api", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "pallet-xcm" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "bounded-collections", "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.6.9", + "pallet-balances", + "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "staging-xcm", + "staging-xcm-builder", "staging-xcm-executor", ] [[package]] name = "pallet-xcm-benchmarks" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -8989,7 +9236,7 @@ dependencies = [ [[package]] name = "pallet-xcm-transactor" version = "0.2.0" -source = "git+https://github.com/moonbeam-foundation/moonbeam?tag=v0.34.1#29e8d79f1a7cdb195bd17b1788e9e613055c3575" +source = "git+https://github.com/moonbeam-foundation/moonbeam?tag=v0.37.3#8081fdffb4d3d294dc5bbbb0ae8f02c348619499" dependencies = [ "cumulus-primitives-core", "frame-benchmarking", @@ -8997,48 +9244,34 @@ dependencies = [ "frame-system", "log", "orml-traits", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", "xcm-primitives", ] -[[package]] -name = "parachain-info" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" -dependencies = [ - "cumulus-primitives-core", - "frame-support", - "frame-system", - "parity-scale-codec 3.6.9", - "scale-info", - "sp-runtime", - "sp-std", -] - [[package]] name = "parity-db" version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "592a28a24b09c9dc20ac8afaa6839abc417c720afe42c12e1e4a9d6aa2508d2e" dependencies = [ - "blake2", + "blake2 0.10.6", "crc32fast", "fs2", "hex", "libc", "log", "lz4", - "memmap2", - "parking_lot 0.12.1", - "rand 0.8.5", + "memmap2 0.5.10", + "parking_lot 0.12.3", + "rand", "siphasher", "snap", "winapi", @@ -9046,52 +9279,26 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" -dependencies = [ - "arrayvec 0.7.4", - "bitvec 0.20.4", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive 2.3.1", - "serde", -] - -[[package]] -name = "parity-scale-codec" -version = "3.6.9" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ "arrayvec 0.7.4", - "bitvec 1.0.1", + "bitvec", "byte-slice-cast", "bytes", "impl-trait-for-tuples", - "parity-scale-codec-derive 3.6.9", + "parity-scale-codec-derive", "serde", ] [[package]] name = "parity-scale-codec-derive" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "parity-scale-codec-derive" -version = "3.6.9" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ - "proc-macro-crate 2.0.2", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 1.0.109", @@ -9128,12 +9335,12 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", - "parking_lot_core 0.9.9", + "parking_lot_core 0.9.10", ] [[package]] @@ -9152,15 +9359,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", + "redox_syscall 0.5.1", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.5", ] [[package]] @@ -9171,9 +9378,9 @@ checksum = "7924d1d0ad836f665c9065e26d016c673ece3993f30d340068b16f282afc1156" [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pbkdf2" @@ -9181,16 +9388,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" dependencies = [ - "crypto-mac 0.11.1", -] - -[[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest 0.10.7", + "crypto-mac 0.11.0", ] [[package]] @@ -9225,9 +9423,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.9" +version = "2.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "311fb059dee1a7b802f036316d790138c613a4e8b180c822e3925a662e9f0c95" +checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" dependencies = [ "memchr", "thiserror", @@ -9236,9 +9434,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.9" +version = "2.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f73541b156d32197eecda1a4014d7f868fd2bcb3c550d5386087cfba442bf69c" +checksum = "26293c9193fbca7b1a3bf9b79dc1e388e927e6cacaa78b4a3ab705a1d3d41459" dependencies = [ "pest", "pest_generator", @@ -9246,22 +9444,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.9" +version = "2.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c35eeed0a3fab112f75165fdc026b3913f4183133f19b49be773ac9ea966e8bd" +checksum = "3ec22af7d3fb470a85dd2ca96b7c577a1eb4ef6f1683a9fe9a8c16e136c04687" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] name = "pest_meta" -version = "2.7.9" +version = "2.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2adbf29bb9776f28caece835398781ab24435585fe0d4dc1374a61db5accedca" +checksum = "d7a240022f37c361ec1878d646fc5b7d7c4d28d5946e1a80ad5a7a4f4ca0bdcd" dependencies = [ "once_cell", "pest", @@ -9270,9 +9468,9 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", "indexmap 2.2.6", @@ -9295,7 +9493,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] @@ -9318,12 +9516,12 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +checksum = "ae1d5c74c9876f070d3e8fd503d748c7d974c3e48da8f41350fa5222ef9b4391" dependencies = [ "atomic-waker", - "fastrand 2.0.2", + "fastrand 2.1.0", "futures-io", ] @@ -9351,11 +9549,13 @@ checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7" [[package]] name = "polkadot-approval-distribution" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ + "bitvec", "futures", "futures-timer", + "itertools 0.10.5", "polkadot-node-jaeger", "polkadot-node-metrics", "polkadot-node-network-protocol", @@ -9363,14 +9563,14 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "rand 0.8.5", + "rand", "tracing-gum", ] [[package]] name = "polkadot-availability-bitfield-distribution" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "always-assert", "futures", @@ -9379,26 +9579,26 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "rand 0.8.5", + "rand", "tracing-gum", ] [[package]] name = "polkadot-availability-distribution" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "derive_more", "fatality", "futures", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "rand 0.8.5", + "rand", "schnellru", "sp-core", "sp-keystore", @@ -9408,36 +9608,39 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ + "async-trait", "fatality", "futures", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "rand 0.8.5", + "rand", "sc-network", "schnellru", "thiserror", + "tokio", "tracing-gum", ] [[package]] name = "polkadot-cli" -version = "1.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ + "cfg-if", "clap", "frame-benchmarking-cli", "futures", "log", "polkadot-node-metrics", - "polkadot-performance-test", + "polkadot-node-primitives", "polkadot-service", "sc-cli", "sc-executor", @@ -9456,10 +9659,10 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "bitvec 1.0.1", + "bitvec", "fatality", "futures", "futures-timer", @@ -9478,27 +9681,27 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "polkadot-dispute-distribution" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "derive_more", "fatality", "futures", "futures-timer", - "indexmap 1.9.3", - "parity-scale-codec 3.6.9", + "indexmap 2.2.6", + "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -9515,10 +9718,10 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-node-primitives", "polkadot-primitives", "reed-solomon-novelpoly", @@ -9529,8 +9732,8 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "futures", "futures-timer", @@ -9538,28 +9741,29 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "rand 0.8.5", + "rand", "rand_chacha 0.3.1", "sc-network", "sc-network-common", "sp-application-crypto", "sp-core", + "sp-crypto-hashing", "sp-keystore", "tracing-gum", ] [[package]] name = "polkadot-network-bridge" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "always-assert", "async-trait", "bytes", "fatality", "futures", - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", + "parity-scale-codec", + "parking_lot 0.12.3", "polkadot-node-metrics", "polkadot-node-network-protocol", "polkadot-node-subsystem", @@ -9573,11 +9777,11 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "futures", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -9591,25 +9795,29 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "bitvec 1.0.1", + "bitvec", "derive_more", "futures", "futures-timer", + "itertools 0.10.5", "kvdb", - "merlin 2.0.1", - "parity-scale-codec 3.6.9", + "merlin", + "parity-scale-codec", "polkadot-node-jaeger", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", "polkadot-primitives", + "rand", + "rand_chacha 0.3.1", + "rand_core 0.6.4", "sc-keystore", "schnellru", - "schnorrkel 0.9.1", + "schnorrkel 0.11.4", "sp-application-crypto", "sp-consensus", "sp-consensus-slots", @@ -9620,14 +9828,14 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "bitvec 1.0.1", + "bitvec", "futures", "futures-timer", "kvdb", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-jaeger", "polkadot-node-primitives", @@ -9642,10 +9850,10 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "bitvec 1.0.1", + "bitvec", "fatality", "futures", "polkadot-erasure-coding", @@ -9654,6 +9862,7 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-primitives", "polkadot-statement-table", + "schnellru", "sp-keystore", "thiserror", "tracing-gum", @@ -9661,8 +9870,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "futures", "polkadot-node-subsystem", @@ -9676,13 +9885,13 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "futures", "futures-timer", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-node-core-pvf", "polkadot-node-metrics", "polkadot-node-primitives", @@ -9697,28 +9906,27 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "futures", "polkadot-node-metrics", "polkadot-node-subsystem", - "polkadot-primitives", + "polkadot-node-subsystem-types", "sc-client-api", "sc-consensus-babe", - "sp-blockchain", "tracing-gum", ] [[package]] name = "polkadot-node-core-chain-selection" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "futures", "futures-timer", "kvdb", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", @@ -9729,13 +9937,13 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "fatality", "futures", "kvdb", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", @@ -9748,8 +9956,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "futures", @@ -9765,13 +9973,13 @@ dependencies = [ [[package]] name = "polkadot-node-core-prospective-parachains" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "6.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "bitvec 1.0.1", + "bitvec", "fatality", "futures", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", @@ -9782,10 +9990,10 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "bitvec 1.0.1", + "bitvec", "fatality", "futures", "futures-timer", @@ -9799,36 +10007,41 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "always-assert", + "array-bytes 6.2.3", + "blake3", + "cfg-if", "futures", "futures-timer", + "is_executable", "libc", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "pin-project", "polkadot-core-primitives", "polkadot-node-core-pvf-common", "polkadot-node-metrics", "polkadot-node-primitives", + "polkadot-node-subsystem", "polkadot-parachain-primitives", "polkadot-primitives", - "rand 0.8.5", + "rand", "slotmap", "sp-core", "sp-maybe-compressed-blob", - "sp-wasm-interface", - "substrate-build-script-utils", + "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "tempfile", + "thiserror", "tokio", "tracing-gum", ] [[package]] name = "polkadot-node-core-pvf-checker" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "futures", "polkadot-node-primitives", @@ -9843,54 +10056,35 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-common" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ + "cfg-if", "cpu-time", "futures", "landlock", "libc", - "parity-scale-codec 3.6.9", + "nix 0.27.1", + "parity-scale-codec", "polkadot-parachain-primitives", "polkadot-primitives", "sc-executor", "sc-executor-common", "sc-executor-wasmtime", + "seccompiler", "sp-core", - "sp-externalities", - "sp-io", - "sp-tracing", - "tokio", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-pvf-prepare-worker" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" -dependencies = [ - "futures", - "libc", - "parity-scale-codec 3.6.9", - "polkadot-node-core-pvf-common", - "polkadot-parachain-primitives", - "polkadot-primitives", - "rayon", - "sc-executor", - "sc-executor-common", - "sc-executor-wasmtime", + "sp-crypto-hashing", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-io", - "sp-maybe-compressed-blob", - "sp-tracing", - "tikv-jemalloc-ctl", - "tokio", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "thiserror", "tracing-gum", ] [[package]] name = "polkadot-node-core-runtime-api" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "futures", "polkadot-node-metrics", @@ -9904,14 +10098,14 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "lazy_static", "log", "mick-jaeger", - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", + "parity-scale-codec", + "parking_lot 0.12.3", "polkadot-node-primitives", "polkadot-primitives", "sc-network", @@ -9922,16 +10116,16 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "bs58 0.5.1", "futures", "futures-timer", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-primitives", - "prioritized-metered-channel", + "prioritized-metered-channel 0.6.1", "sc-cli", "sc-service", "sc-tracing", @@ -9941,21 +10135,21 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-channel 1.9.0", "async-trait", - "bitvec 1.0.1", + "bitvec", "derive_more", "fatality", "futures", "hex", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-node-jaeger", "polkadot-node-primitives", "polkadot-primitives", - "rand 0.8.5", + "rand", "sc-authority-discovery", "sc-network", "strum 0.24.1", @@ -9965,15 +10159,16 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ + "bitvec", "bounded-vec", "futures", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-parachain-primitives", "polkadot-primitives", - "schnorrkel 0.9.1", + "schnorrkel 0.11.4", "serde", "sp-application-crypto", "sp-consensus-babe", @@ -9987,8 +10182,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -9997,10 +10192,11 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", + "bitvec", "derive_more", "futures", "orchestra", @@ -10009,20 +10205,23 @@ dependencies = [ "polkadot-node-primitives", "polkadot-primitives", "polkadot-statement-table", + "sc-client-api", "sc-network", "sc-transaction-pool-api", "smallvec", "sp-api", "sp-authority-discovery", + "sp-blockchain", "sp-consensus-babe", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", ] [[package]] name = "polkadot-node-subsystem-util" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "derive_more", @@ -10032,18 +10231,20 @@ dependencies = [ "itertools 0.10.5", "kvdb", "parity-db", - "parity-scale-codec 3.6.9", - "parking_lot 0.11.2", + "parity-scale-codec", + "parking_lot 0.12.3", "pin-project", "polkadot-node-jaeger", "polkadot-node-metrics", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", + "polkadot-node-subsystem-types", "polkadot-overseer", "polkadot-primitives", - "prioritized-metered-channel", - "rand 0.8.5", + "prioritized-metered-channel 0.6.1", + "rand", + "sc-client-api", "schnellru", "sp-application-crypto", "sp-core", @@ -10054,21 +10255,20 @@ dependencies = [ [[package]] name = "polkadot-overseer" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "futures", "futures-timer", "orchestra", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "polkadot-node-metrics", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem-types", "polkadot-primitives", "sc-client-api", - "schnellru", "sp-api", "sp-core", "tikv-jemalloc-ctl", @@ -10077,47 +10277,30 @@ dependencies = [ [[package]] name = "polkadot-parachain-primitives" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "6.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "bounded-collections", "derive_more", - "frame-support", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-core-primitives", "scale-info", "serde", "sp-core", "sp-runtime", - "sp-std", -] - -[[package]] -name = "polkadot-performance-test" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" -dependencies = [ - "env_logger 0.9.3", - "log", - "polkadot-erasure-coding", - "polkadot-node-core-pvf-prepare-worker", - "polkadot-node-primitives", - "polkadot-primitives", - "quote", - "sc-executor-common", - "sp-maybe-compressed-blob", - "staging-kusama-runtime", - "thiserror", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-weights", ] [[package]] name = "polkadot-primitives" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "bitvec 1.0.1", - "hex-literal 0.4.1", - "parity-scale-codec 3.6.9", + "bitvec", + "hex-literal", + "log", + "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", "scale-info", @@ -10133,13 +10316,13 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "polkadot-rpc" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "jsonrpsee", "mmr-rpc", @@ -10155,6 +10338,7 @@ dependencies = [ "sc-consensus-grandpa", "sc-consensus-grandpa-rpc", "sc-rpc", + "sc-rpc-spec-v2", "sc-sync-state-rpc", "sc-transaction-pool-api", "sp-api", @@ -10168,109 +10352,12 @@ dependencies = [ "substrate-state-trie-migration-rpc", ] -[[package]] -name = "polkadot-runtime" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" -dependencies = [ - "bitvec 1.0.1", - "frame-benchmarking", - "frame-election-provider-support", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", - "hex-literal 0.4.1", - "log", - "pallet-authority-discovery", - "pallet-authorship", - "pallet-babe", - "pallet-bags-list", - "pallet-balances", - "pallet-bounties", - "pallet-child-bounties", - "pallet-collective", - "pallet-conviction-voting", - "pallet-democracy", - "pallet-election-provider-multi-phase", - "pallet-election-provider-support-benchmarking", - "pallet-elections-phragmen", - "pallet-fast-unstake", - "pallet-grandpa", - "pallet-identity", - "pallet-im-online", - "pallet-indices", - "pallet-membership", - "pallet-message-queue", - "pallet-multisig", - "pallet-nomination-pools", - "pallet-nomination-pools-benchmarking", - "pallet-nomination-pools-runtime-api", - "pallet-offences", - "pallet-offences-benchmarking", - "pallet-preimage", - "pallet-proxy", - "pallet-referenda", - "pallet-scheduler", - "pallet-session", - "pallet-session-benchmarking", - "pallet-staking", - "pallet-staking-reward-curve", - "pallet-staking-runtime-api", - "pallet-timestamp", - "pallet-tips", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-treasury", - "pallet-utility", - "pallet-vesting", - "pallet-whitelist", - "pallet-xcm", - "pallet-xcm-benchmarks", - "parity-scale-codec 3.6.9", - "polkadot-primitives", - "polkadot-runtime-common", - "polkadot-runtime-constants", - "polkadot-runtime-parachains", - "rustc-hex", - "scale-info", - "serde", - "serde_derive", - "smallvec", - "sp-api", - "sp-arithmetic", - "sp-authority-discovery", - "sp-block-builder", - "sp-consensus-babe", - "sp-consensus-beefy", - "sp-core", - "sp-inherents", - "sp-io", - "sp-mmr-primitives", - "sp-npos-elections", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", - "sp-storage", - "sp-transaction-pool", - "sp-version", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "static_assertions", - "substrate-wasm-builder", -] - [[package]] name = "polkadot-runtime-common" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "bitvec 1.0.1", + "bitvec", "frame-benchmarking", "frame-election-provider-support", "frame-support", @@ -10278,11 +10365,14 @@ dependencies = [ "impl-trait-for-tuples", "libsecp256k1", "log", + "pallet-asset-rate", "pallet-authorship", "pallet-babe", "pallet-balances", + "pallet-broker", "pallet-election-provider-multi-phase", "pallet-fast-unstake", + "pallet-identity", "pallet-session", "pallet-staking", "pallet-staking-reward-fn", @@ -10290,7 +10380,8 @@ dependencies = [ "pallet-transaction-payment", "pallet-treasury", "pallet-vesting", - "parity-scale-codec 3.6.9", + "pallet-xcm-benchmarks", + "parity-scale-codec", "polkadot-primitives", "polkadot-runtime-parachains", "rustc-hex", @@ -10306,45 +10397,33 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "static_assertions", ] -[[package]] -name = "polkadot-runtime-constants" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" -dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", - "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", -] - [[package]] name = "polkadot-runtime-metrics" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "bs58 0.5.1", "frame-benchmarking", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-primitives", - "sp-std", - "sp-tracing", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "polkadot-runtime-parachains" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "bitflags 1.3.2", - "bitvec 1.0.1", + "bitvec", "derive_more", "frame-benchmarking", "frame-support", @@ -10355,22 +10434,25 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", + "pallet-broker", "pallet-message-queue", "pallet-session", "pallet-staking", "pallet-timestamp", "pallet-vesting", - "parity-scale-codec 3.6.9", + "parity-scale-codec", + "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-metrics", - "rand 0.8.5", + "rand", "rand_chacha 0.3.1", "rustc-hex", "scale-info", "serde", "sp-api", "sp-application-crypto", + "sp-arithmetic", "sp-core", "sp-inherents", "sp-io", @@ -10378,7 +10460,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-executor", "static_assertions", @@ -10386,8 +10468,8 @@ dependencies = [ [[package]] name = "polkadot-service" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "frame-benchmarking", @@ -10396,7 +10478,7 @@ dependencies = [ "frame-system", "frame-system-rpc-runtime-api", "futures", - "hex-literal 0.4.1", + "hex-literal", "is_executable", "kvdb", "kvdb-rocksdb", @@ -10408,7 +10490,8 @@ dependencies = [ "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "parity-db", - "parity-scale-codec 3.6.9", + "parity-scale-codec", + "parking_lot 0.12.3", "polkadot-approval-distribution", "polkadot-availability-bitfield-distribution", "polkadot-availability-distribution", @@ -10442,8 +10525,6 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-rpc", - "polkadot-runtime", - "polkadot-runtime-common", "polkadot-runtime-parachains", "polkadot-statement-distribution", "rococo-runtime", @@ -10491,12 +10572,11 @@ dependencies = [ "sp-runtime", "sp-session", "sp-state-machine", - "sp-storage", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-timestamp", "sp-transaction-pool", "sp-version", "sp-weights", - "staging-kusama-runtime", "substrate-prometheus-endpoint", "thiserror", "tracing-gum", @@ -10505,20 +10585,19 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "arrayvec 0.7.4", - "bitvec 1.0.1", + "bitvec", "fatality", "futures", "futures-timer", - "indexmap 1.9.3", - "parity-scale-codec 3.6.9", + "indexmap 2.2.6", + "parity-scale-codec", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", - "polkadot-node-subsystem-types", "polkadot-node-subsystem-util", "polkadot-primitives", "sp-keystore", @@ -10529,12 +10608,13 @@ dependencies = [ [[package]] name = "polkadot-statement-table" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-primitives", "sp-core", + "tracing-gum", ] [[package]] @@ -10555,15 +10635,15 @@ dependencies = [ [[package]] name = "polling" -version = "3.6.0" +version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0c976a60b2d7e99d6f229e414670a9b85d13ac305cc6d1e9c134de58c5aaaf6" +checksum = "5e6a007746f34ed64099e88783b0ae369eaa3da6392868ba262e2af9b8fbaea1" dependencies = [ "cfg-if", "concurrent-queue", - "hermit-abi 0.3.9", + "hermit-abi", "pin-project-lite 0.2.14", - "rustix 0.38.32", + "rustix 0.38.34", "tracing", "windows-sys 0.52.0", ] @@ -10611,8 +10691,8 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "precompile-utils" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/moonbeam?tag=v0.34.1#29e8d79f1a7cdb195bd17b1788e9e613055c3575" +version = "0.1.1" +source = "git+https://github.com/moonbeam-foundation/moonbeam?tag=v0.37.3#8081fdffb4d3d294dc5bbbb0ae8f02c348619499" dependencies = [ "affix", "environmental", @@ -10625,28 +10705,28 @@ dependencies = [ "log", "num_enum 0.5.11", "pallet-evm", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "paste", "precompile-utils-macro", - "sha3 0.10.8", + "sha3", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-weights", ] [[package]] name = "precompile-utils-macro" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/moonbeam?tag=v0.34.1#29e8d79f1a7cdb195bd17b1788e9e613055c3575" +version = "0.1.1" +source = "git+https://github.com/moonbeam-foundation/moonbeam?tag=v0.37.3#8081fdffb4d3d294dc5bbbb0ae8f02c348619499" dependencies = [ "case", "num_enum 0.5.11", "prettyplease 0.1.25", "proc-macro2", "quote", - "sha3 0.10.8", + "sha3", "syn 1.0.109", ] @@ -10692,23 +10772,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d3928fb5db768cb86f891ff014f0144589297e3c6a1aba6ed7cecfdace270c7" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.57", -] - -[[package]] -name = "primitive-types" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" -dependencies = [ - "fixed-hash 0.7.0", - "impl-codec 0.5.1", - "uint", + "syn 2.0.66", ] [[package]] @@ -10717,8 +10786,8 @@ version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ - "fixed-hash 0.8.0", - "impl-codec 0.6.0", + "fixed-hash", + "impl-codec", "impl-rlp", "impl-serde", "scale-info", @@ -10741,6 +10810,22 @@ dependencies = [ "tracing", ] +[[package]] +name = "prioritized-metered-channel" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a172e6cc603231f2cf004232eabcecccc0da53ba576ab286ef7baa0cfc7927ad" +dependencies = [ + "coarsetime", + "crossbeam-queue", + "derive_more", + "futures", + "futures-timer", + "nanorand", + "thiserror", + "tracing", +] + [[package]] name = "proc-macro-crate" version = "1.3.1" @@ -10753,12 +10838,20 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" dependencies = [ - "toml_datetime", - "toml_edit 0.20.2", + "toml_edit 0.20.7", +] + +[[package]] +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +dependencies = [ + "toml_edit 0.21.1", ] [[package]] @@ -10787,35 +10880,35 @@ dependencies = [ [[package]] name = "proc-macro-warning" -version = "0.4.2" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" +checksum = "834da187cfe638ae8abb0203f0b33e5ccdb02a28e7199f2f47b3e2754f50edca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] name = "proc-macro2" -version = "1.0.79" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" dependencies = [ "unicode-ident", ] [[package]] name = "prometheus" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c" +checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" dependencies = [ "cfg-if", "fnv", "lazy_static", "memchr", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "thiserror", ] @@ -10827,7 +10920,7 @@ checksum = "5d6fa99d535dd930d1249e6c79cb3c2915f9172a540fe2b02a4c8f9ca954721e" dependencies = [ "dtoa", "itoa", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "prometheus-client-derive-encode", ] @@ -10839,7 +10932,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] @@ -10849,7 +10942,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ "bytes", - "prost-derive", + "prost-derive 0.11.9", +] + +[[package]] +name = "prost" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" +dependencies = [ + "bytes", + "prost-derive 0.12.6", ] [[package]] @@ -10866,7 +10969,7 @@ dependencies = [ "multimap", "petgraph", "prettyplease 0.1.25", - "prost", + "prost 0.11.9", "prost-types", "regex", "syn 1.0.109", @@ -10887,13 +10990,26 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "prost-derive" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" +dependencies = [ + "anyhow", + "itertools 0.12.1", + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "prost-types" version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" dependencies = [ - "prost", + "prost 0.11.9", ] [[package]] @@ -10951,7 +11067,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94b0b33c13a79f669c85defaf4c275dc86a0c0372807d0ca3d78e0bb87274863" dependencies = [ "bytes", - "rand 0.8.5", + "rand", "ring 0.16.20", "rustc-hash", "rustls 0.20.9", @@ -10964,38 +11080,19 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] -[[package]] -name = "radium" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" - [[package]] name = "radium" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - [[package]] name = "rand" version = "0.8.5" @@ -11042,16 +11139,17 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.15", ] [[package]] -name = "rand_hc" -version = "0.2.0" +name = "rand_distr" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" dependencies = [ - "rand_core 0.5.1", + "num-traits", + "rand", ] [[package]] @@ -11119,48 +11217,56 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +dependencies = [ + "bitflags 2.5.0", +] + [[package]] name = "redox_users" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.15", "libredox", "thiserror", ] [[package]] name = "reed-solomon-novelpoly" -version = "1.0.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58130877ca403ab42c864fbac74bb319a0746c07a634a92a5cfc7f54af272582" +checksum = "87413ebb313323d431e85d0afc5a68222aaed972843537cbfe5f061cf1b4bcab" dependencies = [ "derive_more", "fs-err", - "itertools 0.11.0", "static_init", "thiserror", ] [[package]] name = "ref-cast" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4846d4c50d1721b1a3bef8af76924eef20d5e723647333798c1b519b3a9473f" +checksum = "ccf0a6f84d5f1d581da8b41b47ec8600871962f2a528115b542b362d4b744931" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" +checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] @@ -11242,22 +11348,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ "hmac 0.12.1", - "subtle", + "subtle 2.5.0", ] [[package]] name = "ring" version = "0.1.0" -source = "git+https://github.com/w3f/ring-proof?rev=0e948f3#0e948f3c28cbacecdd3020403c4841c0eb339213" +source = "git+https://github.com/w3f/ring-proof#b273d33f9981e2bb3375ab45faeb537f7ee35224" dependencies = [ "ark-ec", "ark-ff", "ark-poly", "ark-serialize", "ark-std", + "blake2 0.10.6", "common", "fflonk", - "merlin 3.0.0", + "merlin", ] [[package]] @@ -11283,7 +11390,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.12", + "getrandom 0.2.15", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -11333,19 +11440,21 @@ dependencies = [ [[package]] name = "rococo-runtime" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "binary-merkle-tree", "frame-benchmarking", "frame-executive", + "frame-metadata-hash-extension", "frame-support", "frame-system", "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", - "hex-literal 0.4.1", + "hex-literal", "log", + "pallet-asset-rate", "pallet-authority-discovery", "pallet-authorship", "pallet-babe", @@ -11355,6 +11464,7 @@ dependencies = [ "pallet-bounties", "pallet-child-bounties", "pallet-collective", + "pallet-conviction-voting", "pallet-democracy", "pallet-elections-phragmen", "pallet-grandpa", @@ -11369,7 +11479,10 @@ dependencies = [ "pallet-offences", "pallet-preimage", "pallet-proxy", + "pallet-ranked-collective", "pallet-recovery", + "pallet-referenda", + "pallet-root-testing", "pallet-scheduler", "pallet-session", "pallet-society", @@ -11383,9 +11496,10 @@ dependencies = [ "pallet-treasury", "pallet-utility", "pallet-vesting", + "pallet-whitelist", "pallet-xcm", "pallet-xcm-benchmarks", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-common", @@ -11396,11 +11510,13 @@ dependencies = [ "serde_derive", "smallvec", "sp-api", + "sp-arithmetic", "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", "sp-consensus-beefy", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-mmr-primitives", @@ -11408,8 +11524,8 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", - "sp-storage", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-transaction-pool", "sp-version", "staging-xcm", @@ -11421,8 +11537,8 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-support", "polkadot-primitives", @@ -11431,8 +11547,16 @@ dependencies = [ "sp-core", "sp-runtime", "sp-weights", + "staging-xcm", + "staging-xcm-builder", ] +[[package]] +name = "route-recognizer" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afab94fb28594581f62d981211a9a4d53cc8130bbcbbb89a0440d9b8e81a7746" + [[package]] name = "rpassword" version = "7.3.1" @@ -11454,7 +11578,7 @@ dependencies = [ "log", "netlink-packet-route", "netlink-proto", - "nix", + "nix 0.24.3", "thiserror", "tokio", ] @@ -11481,14 +11605,15 @@ dependencies = [ "cfg-utils", "chainbridge", "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", "frame-benchmarking", "frame-support", "frame-system", - "hex-literal 0.3.4", + "hex", + "hex-literal", "log", "num_enum 0.5.11", "orml-asset-registry", @@ -11530,6 +11655,7 @@ dependencies = [ "pallet-liquidity-rewards", "pallet-loans", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-oracle-collection", "pallet-oracle-feed", @@ -11556,8 +11682,7 @@ dependencies = [ "pallet-vesting", "pallet-xcm", "pallet-xcm-transactor", - "parachain-info", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-parachain-primitives", "precompile-utils", "scale-info", @@ -11568,7 +11693,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -11588,7 +11714,6 @@ dependencies = [ "cfg-utils", "chainbridge", "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", @@ -11603,9 +11728,8 @@ dependencies = [ "frame-system", "fudge", "fudge-core", - "getrandom 0.2.12", "hex", - "hex-literal 0.3.4", + "hex-literal", "lazy_static", "liquidity-pools-gateway-routers", "orml-asset-registry", @@ -11669,13 +11793,11 @@ dependencies = [ "pallet-vesting", "pallet-xcm", "pallet-xcm-transactor", - "parachain-info", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-core-primitives", "polkadot-node-primitives", "polkadot-parachain-primitives", "polkadot-primitives", - "polkadot-runtime", "polkadot-runtime-common", "polkadot-runtime-parachains", "rococo-runtime", @@ -11696,11 +11818,11 @@ dependencies = [ "sp-inherents", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-timestamp", - "sp-tracing", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-transaction-pool", - "staging-kusama-runtime", + "staging-parachain-info", "staging-xcm", "staging-xcm-executor", "thiserror", @@ -11712,17 +11834,17 @@ dependencies = [ name = "runtime-integration-tests-proc-macro" version = "0.1.0" dependencies = [ - "prettyplease 0.2.17", + "prettyplease 0.2.20", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -11742,7 +11864,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.22", + "semver 1.0.23", ] [[package]] @@ -11784,14 +11906,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.32" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ "bitflags 2.5.0", "errno", "libc", - "linux-raw-sys 0.4.13", + "linux-raw-sys 0.4.14", "windows-sys 0.52.0", ] @@ -11809,9 +11931,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.10" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring 0.17.8", @@ -11852,9 +11974,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ruzstd" @@ -11880,9 +12002,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "safe_arch" @@ -11904,19 +12026,19 @@ dependencies = [ [[package]] name = "sc-allocator" -version = "4.1.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "log", "sp-core", - "sp-wasm-interface", + "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "thiserror", ] [[package]] name = "sc-authority-discovery" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "futures", @@ -11924,11 +12046,12 @@ dependencies = [ "ip_network", "libp2p", "log", - "multihash", - "parity-scale-codec 3.6.9", - "prost", + "multihash 0.18.1", + "multihash-codetable", + "parity-scale-codec", + "prost 0.12.6", "prost-build", - "rand 0.8.5", + "rand", "sc-client-api", "sc-network", "sp-api", @@ -11943,15 +12066,14 @@ dependencies = [ [[package]] name = "sc-basic-authorship" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "futures", "futures-timer", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sc-block-builder", - "sc-client-api", "sc-proposer-metrics", "sc-telemetry", "sc-transaction-pool-api", @@ -11966,25 +12088,29 @@ dependencies = [ [[package]] name = "sc-block-builder" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "parity-scale-codec 3.6.9", - "sc-client-api", + "parity-scale-codec", "sp-api", "sp-block-builder", "sp-blockchain", "sp-core", "sp-inherents", "sp-runtime", + "sp-trie", ] [[package]] name = "sc-chain-spec" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "memmap2", + "array-bytes 6.2.3", + "docify", + "log", + "memmap2 0.9.4", + "parity-scale-codec", "sc-chain-spec-derive", "sc-client-api", "sc-executor", @@ -11994,41 +12120,47 @@ dependencies = [ "serde_json", "sp-blockchain", "sp-core", + "sp-crypto-hashing", + "sp-genesis-builder", + "sp-io", "sp-runtime", "sp-state-machine", ] [[package]] name = "sc-chain-spec-derive" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] name = "sc-cli" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.36.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", + "bip39", "chrono", "clap", "fdlimit", "futures", + "itertools 0.10.5", "libp2p-identity", "log", "names", - "parity-scale-codec 3.6.9", - "rand 0.8.5", + "parity-scale-codec", + "rand", "regex", "rpassword", "sc-client-api", "sc-client-db", "sc-keystore", + "sc-mixnet", "sc-network", "sc-service", "sc-telemetry", @@ -12044,20 +12176,19 @@ dependencies = [ "sp-runtime", "sp-version", "thiserror", - "tiny-bip39", "tokio", ] [[package]] name = "sc-client-api" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "fnv", "futures", "log", - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", + "parity-scale-codec", + "parking_lot 0.12.3", "sc-executor", "sc-transaction-pool-api", "sc-utils", @@ -12066,28 +12197,29 @@ dependencies = [ "sp-consensus", "sp-core", "sp-database", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-runtime", "sp-state-machine", "sp-statement-store", - "sp-storage", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-trie", "substrate-prometheus-endpoint", ] [[package]] name = "sc-client-db" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.35.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "hash-db 0.16.0", + "hash-db", "kvdb", "kvdb-memorydb", "kvdb-rocksdb", "linked-hash-map", "log", "parity-db", - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", + "parity-scale-codec", + "parking_lot 0.12.3", "sc-client-api", "sc-state-db", "schnellru", @@ -12102,8 +12234,8 @@ dependencies = [ [[package]] name = "sc-consensus" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "futures", @@ -12111,7 +12243,7 @@ dependencies = [ "libp2p-identity", "log", "mockall", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "sc-client-api", "sc-utils", "serde", @@ -12127,13 +12259,13 @@ dependencies = [ [[package]] name = "sc-consensus-aura" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "futures", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sc-block-builder", "sc-client-api", "sc-consensus", @@ -12156,8 +12288,8 @@ dependencies = [ [[package]] name = "sc-consensus-babe" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "fork-tree", @@ -12166,15 +12298,14 @@ dependencies = [ "num-bigint", "num-rational", "num-traits", - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", + "parity-scale-codec", + "parking_lot 0.12.3", "sc-client-api", "sc-consensus", "sc-consensus-epochs", "sc-consensus-slots", "sc-telemetry", "sc-transaction-pool-api", - "scale-info", "sp-api", "sp-application-crypto", "sp-block-builder", @@ -12183,6 +12314,7 @@ dependencies = [ "sp-consensus-babe", "sp-consensus-slots", "sp-core", + "sp-crypto-hashing", "sp-inherents", "sp-keystore", "sp-runtime", @@ -12192,8 +12324,8 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "futures", "jsonrpsee", @@ -12214,17 +12346,17 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "async-channel 1.9.0", "async-trait", "fnv", "futures", "log", - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", + "parity-scale-codec", + "parking_lot 0.12.3", "sc-client-api", "sc-consensus", "sc-network", @@ -12238,24 +12370,26 @@ dependencies = [ "sp-consensus", "sp-consensus-beefy", "sp-core", + "sp-crypto-hashing", "sp-keystore", "sp-mmr-primitives", "sp-runtime", "substrate-prometheus-endpoint", "thiserror", + "tokio", "wasm-timer", ] [[package]] name = "sc-consensus-beefy-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "futures", "jsonrpsee", "log", - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", + "parity-scale-codec", + "parking_lot 0.12.3", "sc-consensus-beefy", "sc-rpc", "serde", @@ -12267,11 +12401,11 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "fork-tree", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sc-client-api", "sc-consensus", "sp-blockchain", @@ -12280,11 +12414,11 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.19.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "ahash 0.8.11", - "array-bytes", + "array-bytes 6.2.3", "async-trait", "dyn-clone", "finality-grandpa", @@ -12292,9 +12426,9 @@ dependencies = [ "futures", "futures-timer", "log", - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", - "rand 0.8.5", + "parity-scale-codec", + "parking_lot 0.12.3", + "rand", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -12302,6 +12436,7 @@ dependencies = [ "sc-network", "sc-network-common", "sc-network-gossip", + "sc-network-sync", "sc-telemetry", "sc-transaction-pool-api", "sc-utils", @@ -12313,6 +12448,7 @@ dependencies = [ "sp-consensus", "sp-consensus-grandpa", "sp-core", + "sp-crypto-hashing", "sp-keystore", "sp-runtime", "substrate-prometheus-endpoint", @@ -12321,14 +12457,14 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.19.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "finality-grandpa", "futures", "jsonrpsee", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sc-client-api", "sc-consensus-grandpa", "sc-rpc", @@ -12341,14 +12477,14 @@ dependencies = [ [[package]] name = "sc-consensus-slots" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "futures", "futures-timer", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sc-client-api", "sc-consensus", "sc-telemetry", @@ -12364,59 +12500,60 @@ dependencies = [ [[package]] name = "sc-executor" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", + "parity-scale-codec", + "parking_lot 0.12.3", "sc-executor-common", "sc-executor-wasmtime", "schnellru", "sp-api", "sp-core", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-io", "sp-panic-handler", - "sp-runtime-interface", + "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-trie", "sp-version", - "sp-wasm-interface", + "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "tracing", ] [[package]] name = "sc-executor-common" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.29.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", - "sp-wasm-interface", + "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "thiserror", "wasm-instrument", ] [[package]] name = "sc-executor-wasmtime" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.29.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "anyhow", "cfg-if", "libc", "log", + "parking_lot 0.12.3", "rustix 0.36.17", "sc-allocator", "sc-executor-common", - "sp-runtime-interface", - "sp-wasm-interface", + "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "wasmtime", ] [[package]] name = "sc-informant" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "ansi_term", "futures", @@ -12425,17 +12562,18 @@ dependencies = [ "sc-client-api", "sc-network", "sc-network-common", + "sc-network-sync", "sp-blockchain", "sp-runtime", ] [[package]] name = "sc-keystore" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "25.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "array-bytes", - "parking_lot 0.12.1", + "array-bytes 6.2.3", + "parking_lot 0.12.3", "serde_json", "sp-application-crypto", "sp-core", @@ -12443,12 +12581,41 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-mixnet" +version = "0.4.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" +dependencies = [ + "array-bytes 4.2.0", + "arrayvec 0.7.4", + "blake2 0.10.6", + "bytes", + "futures", + "futures-timer", + "libp2p-identity", + "log", + "mixnet", + "multiaddr", + "parity-scale-codec", + "parking_lot 0.12.3", + "sc-client-api", + "sc-network", + "sc-transaction-pool-api", + "sp-api", + "sp-consensus", + "sp-core", + "sp-keystore", + "sp-mixnet", + "sp-runtime", + "thiserror", +] + [[package]] name = "sc-network" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "async-channel 1.9.0", "async-trait", "asynchronous-codec", @@ -12462,11 +12629,11 @@ dependencies = [ "linked_hash_set", "log", "mockall", - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", + "parity-scale-codec", + "parking_lot 0.12.3", "partial_sort", "pin-project", - "rand 0.8.5", + "rand", "sc-client-api", "sc-network-common", "sc-utils", @@ -12479,6 +12646,8 @@ dependencies = [ "sp-runtime", "substrate-prometheus-endpoint", "thiserror", + "tokio", + "tokio-stream", "unsigned-varint", "wasm-timer", "zeroize", @@ -12486,15 +12655,15 @@ dependencies = [ [[package]] name = "sc-network-bitswap" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-channel 1.9.0", "cid", "futures", "libp2p-identity", "log", - "prost", + "prost 0.12.6", "prost-build", "sc-client-api", "sc-network", @@ -12506,14 +12675,14 @@ dependencies = [ [[package]] name = "sc-network-common" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "bitflags 1.3.2", "futures", "libp2p-identity", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "prost-build", "sc-consensus", "sp-consensus", @@ -12523,8 +12692,8 @@ dependencies = [ [[package]] name = "sc-network-gossip" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "ahash 0.8.11", "futures", @@ -12533,6 +12702,7 @@ dependencies = [ "log", "sc-network", "sc-network-common", + "sc-network-sync", "schnellru", "sp-runtime", "substrate-prometheus-endpoint", @@ -12541,16 +12711,16 @@ dependencies = [ [[package]] name = "sc-network-light" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "async-channel 1.9.0", "futures", "libp2p-identity", "log", - "parity-scale-codec 3.6.9", - "prost", + "parity-scale-codec", + "prost 0.12.6", "prost-build", "sc-client-api", "sc-network", @@ -12562,10 +12732,10 @@ dependencies = [ [[package]] name = "sc-network-sync" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "async-channel 1.9.0", "async-trait", "fork-tree", @@ -12574,8 +12744,8 @@ dependencies = [ "libp2p", "log", "mockall", - "parity-scale-codec 3.6.9", - "prost", + "parity-scale-codec", + "prost 0.12.6", "prost-build", "sc-client-api", "sc-consensus", @@ -12592,20 +12762,23 @@ dependencies = [ "sp-runtime", "substrate-prometheus-endpoint", "thiserror", + "tokio", + "tokio-stream", ] [[package]] name = "sc-network-transactions" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "futures", "libp2p", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sc-network", "sc-network-common", + "sc-network-sync", "sc-utils", "sp-consensus", "sp-runtime", @@ -12614,10 +12787,10 @@ dependencies = [ [[package]] name = "sc-offchain" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "bytes", "fnv", "futures", @@ -12628,9 +12801,9 @@ dependencies = [ "log", "num_cpus", "once_cell", - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", - "rand 0.8.5", + "parity-scale-codec", + "parking_lot 0.12.3", + "rand", "sc-client-api", "sc-network", "sc-network-common", @@ -12638,7 +12811,7 @@ dependencies = [ "sc-utils", "sp-api", "sp-core", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-keystore", "sp-offchain", "sp-runtime", @@ -12648,8 +12821,8 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -12657,17 +12830,18 @@ dependencies = [ [[package]] name = "sc-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "futures", "jsonrpsee", "log", - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", + "parity-scale-codec", + "parking_lot 0.12.3", "sc-block-builder", "sc-chain-spec", "sc-client-api", + "sc-mixnet", "sc-rpc-api", "sc-tracing", "sc-transaction-pool-api", @@ -12688,12 +12862,13 @@ dependencies = [ [[package]] name = "sc-rpc-api" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "jsonrpsee", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sc-chain-spec", + "sc-mixnet", "sc-transaction-pool-api", "scale-info", "serde", @@ -12707,8 +12882,8 @@ dependencies = [ [[package]] name = "sc-rpc-server" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "http", "jsonrpsee", @@ -12722,25 +12897,27 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "futures", "futures-util", "hex", "jsonrpsee", "log", - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", + "parity-scale-codec", + "parking_lot 0.12.3", "sc-chain-spec", "sc-client-api", + "sc-rpc", "sc-transaction-pool-api", "sc-utils", "serde", "sp-api", "sp-blockchain", "sp-core", + "sp-rpc", "sp-runtime", "sp-version", "thiserror", @@ -12750,8 +12927,8 @@ dependencies = [ [[package]] name = "sc-service" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.35.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "directories", @@ -12760,11 +12937,10 @@ dependencies = [ "futures-timer", "jsonrpsee", "log", - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", + "parity-scale-codec", + "parking_lot 0.12.3", "pin-project", - "rand 0.8.5", - "sc-block-builder", + "rand", "sc-chain-spec", "sc-client-api", "sc-client-db", @@ -12793,12 +12969,12 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-core", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-keystore", "sp-runtime", "sp-session", "sp-state-machine", - "sp-storage", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-transaction-pool", "sp-transaction-storage-proof", "sp-trie", @@ -12814,24 +12990,23 @@ dependencies = [ [[package]] name = "sc-state-db" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.30.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "log", - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", + "parity-scale-codec", + "parking_lot 0.12.3", "sp-core", ] [[package]] name = "sc-storage-monitor" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.16.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "clap", "fs4", "log", - "sc-client-db", "sp-core", "thiserror", "tokio", @@ -12839,11 +13014,11 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "jsonrpsee", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sc-chain-spec", "sc-client-api", "sc-consensus-babe", @@ -12858,35 +13033,37 @@ dependencies = [ [[package]] name = "sc-sysinfo" -version = "6.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ + "derive_more", "futures", "libc", "log", - "rand 0.8.5", + "rand", "rand_pcg", "regex", "sc-telemetry", "serde", "serde_json", "sp-core", + "sp-crypto-hashing", "sp-io", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "sc-telemetry" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "15.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "chrono", "futures", "libp2p", "log", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "pin-project", - "rand 0.8.5", + "rand", "sc-utils", "serde", "serde_json", @@ -12896,16 +13073,17 @@ dependencies = [ [[package]] name = "sc-tracing" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "ansi_term", - "atty", "chrono", + "is-terminal", "lazy_static", "libc", "log", - "parking_lot 0.12.1", + "parity-scale-codec", + "parking_lot 0.12.3", "regex", "rustc-hash", "sc-client-api", @@ -12916,7 +13094,7 @@ dependencies = [ "sp-core", "sp-rpc", "sp-runtime", - "sp-tracing", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "thiserror", "tracing", "tracing-log", @@ -12925,27 +13103,27 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] name = "sc-transaction-pool" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "futures", "futures-timer", "linked-hash-map", "log", - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", + "parity-scale-codec", + "parking_lot 0.12.3", "sc-client-api", "sc-transaction-pool-api", "sc-utils", @@ -12953,8 +13131,9 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-core", + "sp-crypto-hashing", "sp-runtime", - "sp-tracing", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-transaction-pool", "substrate-prometheus-endpoint", "thiserror", @@ -12962,13 +13141,13 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "futures", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "serde", "sp-blockchain", "sp-core", @@ -12978,40 +13157,40 @@ dependencies = [ [[package]] name = "sc-utils" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-channel 1.9.0", "futures", "futures-timer", "lazy_static", "log", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "prometheus", "sp-arithmetic", ] [[package]] name = "scale-info" -version = "2.11.1" +version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "788745a868b0e751750388f4e6546eb921ef714a4317fa6954f7cde114eb2eb7" +checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" dependencies = [ - "bitvec 1.0.1", + "bitvec", "cfg-if", "derive_more", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info-derive", "serde", ] [[package]] name = "scale-info-derive" -version = "2.11.1" +version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dc2f4e8bc344b9fc3d5f74f72c2e55bfc38d28dc2ebc69c194a3df424e4d9ac" +checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 1.0.109", @@ -13028,33 +13207,15 @@ dependencies = [ [[package]] name = "schnellru" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" +checksum = "c9a8ef13a93c54d20580de1e5c413e624e53121d42fc7e2c11d10ef7f8b02367" dependencies = [ "ahash 0.8.11", "cfg-if", "hashbrown 0.13.2", ] -[[package]] -name = "schnorrkel" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "021b403afe70d81eea68f6ea12f6b3c9588e5d536a94c3bf80f15e7faa267862" -dependencies = [ - "arrayref", - "arrayvec 0.5.2", - "curve25519-dalek 2.1.3", - "getrandom 0.1.16", - "merlin 2.0.1", - "rand 0.7.3", - "rand_core 0.5.1", - "sha2 0.8.2", - "subtle", - "zeroize", -] - [[package]] name = "schnorrkel" version = "0.10.2" @@ -13064,7 +13225,7 @@ dependencies = [ "arrayref", "arrayvec 0.7.4", "curve25519-dalek-ng", - "merlin 3.0.0", + "merlin", "rand_core 0.6.4", "sha2 0.9.9", "subtle-ng", @@ -13077,14 +13238,16 @@ version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" dependencies = [ + "aead", "arrayref", "arrayvec 0.7.4", "curve25519-dalek 4.1.2", "getrandom_or_panic", - "merlin 3.0.0", + "merlin", "rand_core 0.6.4", + "serde_bytes", "sha2 0.10.8", - "subtle", + "subtle 2.5.0", "zeroize", ] @@ -13120,24 +13283,33 @@ dependencies = [ "der", "generic-array 0.14.7", "pkcs8", - "subtle", + "subtle 2.5.0", "zeroize", ] +[[package]] +name = "seccompiler" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "345a3e4dddf721a478089d4697b83c6c0a8f5bf16086f6c13397e4534eb6e2e5" +dependencies = [ + "libc", +] + [[package]] name = "secp256k1" -version = "0.24.3" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" +checksum = "d24b59d129cdadea20aea4fb2352fa053712e5d713eee47d700cd4b2bc002f10" dependencies = [ "secp256k1-sys", ] [[package]] name = "secp256k1-sys" -version = "0.6.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b" +checksum = "e5d1746aae42c19d583c3c1a8c646bfad910498e2051c551a7f2e3c0c9fbb7eb" dependencies = [ "cc", ] @@ -13153,11 +13325,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" +checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.5.0", "core-foundation", "core-foundation-sys", "libc", @@ -13166,9 +13338,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" +checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" dependencies = [ "core-foundation-sys", "libc", @@ -13185,9 +13357,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" dependencies = [ "serde", ] @@ -13200,29 +13372,38 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.197" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" dependencies = [ "serde_derive", ] +[[package]] +name = "serde_bytes" +version = "0.11.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" +dependencies = [ + "serde", +] + [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] name = "serde_json" -version = "1.0.115" +version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" dependencies = [ "itoa", "ryu", @@ -13231,9 +13412,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" dependencies = [ "serde", ] @@ -13252,15 +13433,14 @@ dependencies = [ ] [[package]] -name = "sha2" -version = "0.8.2" +name = "sha1" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ - "block-buffer 0.7.3", - "digest 0.8.1", - "fake-simd", - "opaque-debug 0.2.3", + "cfg-if", + "cpufeatures", + "digest 0.10.7", ] [[package]] @@ -13287,18 +13467,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "sha3" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "keccak", - "opaque-debug 0.3.1", -] - [[package]] name = "sha3" version = "0.10.8" @@ -13326,9 +13494,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] @@ -13356,6 +13524,11 @@ dependencies = [ "wide", ] +[[package]] +name = "simple-mermaid" +version = "0.1.0" +source = "git+https://github.com/kianenigma/simple-mermaid.git?rev=e48b187bcfd5cc75111acd9d241f1bd36604344b#e48b187bcfd5cc75111acd9d241f1bd36604344b" + [[package]] name = "siphasher" version = "0.3.11" @@ -13391,14 +13564,14 @@ dependencies = [ [[package]] name = "slot-range-helper" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "enumn", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "paste", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -13455,12 +13628,12 @@ dependencies = [ "fnv", "futures-lite 1.13.0", "futures-util", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "hex", "hmac 0.12.1", "itertools 0.11.0", "libsecp256k1", - "merlin 3.0.0", + "merlin", "no-std-net", "nom", "num-bigint", @@ -13469,14 +13642,14 @@ dependencies = [ "pbkdf2 0.12.2", "pin-project", "poly1305", - "rand 0.8.5", + "rand", "rand_chacha 0.3.1", "ruzstd", "schnorrkel 0.10.2", "serde", "serde_json", "sha2 0.10.8", - "sha3 0.10.8", + "sha3", "siphasher", "slab", "smallvec", @@ -13504,15 +13677,15 @@ dependencies = [ "futures-channel", "futures-lite 1.13.0", "futures-util", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "hex", "itertools 0.11.0", "log", "lru 0.11.1", "no-std-net", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "pin-project", - "rand 0.8.5", + "rand", "rand_chacha 0.3.1", "serde", "serde_json", @@ -13536,14 +13709,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "850948bee068e713b8ab860fe1adc4d109676ab4c3b621fd8147f06b261f2f85" dependencies = [ "aes-gcm", - "blake2", + "blake2 0.10.6", "chacha20poly1305", "curve25519-dalek 4.1.2", "rand_core 0.6.4", "ring 0.17.8", "rustc_version", "sha2 0.10.8", - "subtle", + "subtle 2.5.0", ] [[package]] @@ -13558,9 +13731,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", "windows-sys 0.52.0", @@ -13579,26 +13752,26 @@ dependencies = [ "http", "httparse", "log", - "rand 0.8.5", + "rand", "sha-1", ] [[package]] name = "sp-api" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "hash-db 0.16.0", + "hash-db", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-api-proc-macro", "sp-core", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-metadata-ir", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-trie", "sp-version", "thiserror", @@ -13606,78 +13779,96 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "15.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "Inflector", - "blake2", + "blake2 0.10.6", "expander 2.0.0", - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] name = "sp-application-crypto" -version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "30.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "sp-arithmetic" -version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "integer-sqrt", "num-traits", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "static_assertions", ] +[[package]] +name = "sp-ark-bls12-381" +version = "0.4.2" +source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" +dependencies = [ + "ark-bls12-381-ext", + "sp-crypto-ec-utils", +] + +[[package]] +name = "sp-ark-ed-on-bls12-381-bandersnatch" +version = "0.4.2" +source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" +dependencies = [ + "ark-ed-on-bls12-381-bandersnatch-ext", + "sp-crypto-ec-utils", +] + [[package]] name = "sp-authority-discovery" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "sp-block-builder" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "sp-api", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "sp-blockchain" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "futures", "log", - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", + "parity-scale-codec", + "parking_lot 0.12.3", "schnellru", "sp-api", "sp-consensus", @@ -13689,8 +13880,8 @@ dependencies = [ [[package]] name = "sp-consensus" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "futures", @@ -13704,28 +13895,28 @@ dependencies = [ [[package]] name = "sp-consensus-aura" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", "sp-consensus-slots", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-timestamp", ] [[package]] name = "sp-consensus-babe" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-api", @@ -13734,37 +13925,38 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-timestamp", ] [[package]] name = "sp-consensus-beefy" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "lazy_static", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-api", "sp-application-crypto", "sp-core", + "sp-crypto-hashing", "sp-io", "sp-mmr-primitives", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "strum 0.24.1", ] [[package]] name = "sp-consensus-grandpa" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "finality-grandpa", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-api", @@ -13772,165 +13964,215 @@ dependencies = [ "sp-core", "sp-keystore", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "sp-consensus-slots" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-timestamp", ] [[package]] name = "sp-core" -version = "21.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "array-bytes", - "arrayvec 0.7.4", + "array-bytes 6.2.3", "bandersnatch_vrfs", + "bip39", "bitflags 1.3.2", - "blake2", + "blake2 0.10.6", "bounded-collections", "bs58 0.5.1", "dyn-clonable", "ed25519-zebra 3.1.0", "futures", - "hash-db 0.16.0", + "hash-db", "hash256-std-hasher", "impl-serde", - "lazy_static", + "itertools 0.10.5", "libsecp256k1", "log", - "merlin 2.0.1", - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", + "merlin", + "parity-scale-codec", + "parking_lot 0.12.3", "paste", - "primitive-types 0.12.2", - "rand 0.8.5", - "regex", + "primitive-types", + "rand", "scale-info", - "schnorrkel 0.9.1", + "schnorrkel 0.11.4", "secp256k1", "secrecy", "serde", - "sp-core-hashing", - "sp-debug-derive", - "sp-externalities", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "sp-crypto-hashing", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "ss58-registry", "substrate-bip39", "thiserror", - "tiny-bip39", "tracing", + "w3f-bls", "zeroize", ] [[package]] name = "sp-core-hashing" -version = "9.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "15.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" +dependencies = [ + "sp-crypto-hashing", +] + +[[package]] +name = "sp-crypto-ec-utils" +version = "0.10.0" +source = "git+https://github.com/paritytech//polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" +dependencies = [ + "ark-bls12-377", + "ark-bls12-377-ext", + "ark-bls12-381", + "ark-bls12-381-ext", + "ark-bw6-761", + "ark-bw6-761-ext", + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ed-on-bls12-377-ext", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ed-on-bls12-381-bandersnatch-ext", + "ark-scale", + "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech//polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-std 14.0.0 (git+https://github.com/paritytech//polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + +[[package]] +name = "sp-crypto-hashing" +version = "0.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "blake2b_simd", "byteorder", "digest 0.10.7", "sha2 0.10.8", - "sha3 0.10.8", + "sha3", "twox-hash", ] [[package]] -name = "sp-core-hashing-proc-macro" -version = "9.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +name = "sp-crypto-hashing-proc-macro" +version = "0.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "quote", - "sp-core-hashing", - "syn 2.0.57", + "sp-crypto-hashing", + "syn 2.0.66", ] [[package]] name = "sp-database" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "kvdb", - "parking_lot 0.12.1", + "parking_lot 0.12.3", +] + +[[package]] +name = "sp-debug-derive" +version = "14.0.0" +source = "git+https://github.com/paritytech//polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", ] [[package]] name = "sp-debug-derive" -version = "8.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] name = "sp-externalities" -version = "0.19.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.25.0" +source = "git+https://github.com/paritytech//polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "environmental", - "parity-scale-codec 3.6.9", - "sp-std", - "sp-storage", + "parity-scale-codec", + "sp-std 14.0.0 (git+https://github.com/paritytech//polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-storage 19.0.0 (git+https://github.com/paritytech//polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + +[[package]] +name = "sp-externalities" +version = "0.25.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "sp-genesis-builder" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "serde_json", "sp-api", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "sp-inherents" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "impl-trait-for-tuples", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "thiserror", ] [[package]] name = "sp-io" -version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "30.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "bytes", "ed25519-dalek", "libsecp256k1", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "rustversion", "secp256k1", "sp-core", - "sp-externalities", + "sp-crypto-hashing", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-keystore", - "sp-runtime-interface", + "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-state-machine", - "sp-std", - "sp-tracing", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-trie", "tracing", "tracing-core", @@ -13938,10 +14180,9 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "31.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "lazy_static", "sp-core", "sp-runtime", "strum 0.24.1", @@ -13949,20 +14190,20 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.27.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", + "parity-scale-codec", + "parking_lot 0.12.3", "sp-core", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "thiserror", ] [[package]] name = "sp-maybe-compressed-blob" -version = "4.1.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "thiserror", "zstd 0.12.4", @@ -13970,51 +14211,63 @@ dependencies = [ [[package]] name = "sp-metadata-ir" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.6.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-metadata", - "parity-scale-codec 3.6.9", + "parity-scale-codec", + "scale-info", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + +[[package]] +name = "sp-mixnet" +version = "0.4.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" +dependencies = [ + "parity-scale-codec", "scale-info", - "sp-std", + "sp-api", + "sp-application-crypto", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "sp-mmr-primitives" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "ckb-merkle-mountain-range", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-api", "sp-core", - "sp-debug-derive", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "thiserror", ] [[package]] name = "sp-npos-elections" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-arithmetic", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "sp-offchain" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "sp-api", "sp-core", @@ -14023,8 +14276,8 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "8.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "backtrace", "lazy_static", @@ -14033,8 +14286,8 @@ dependencies = [ [[package]] name = "sp-rpc" -version = "6.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "rustc-hash", "serde", @@ -14043,100 +14296,134 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "31.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ + "docify", "either", "hash256-std-hasher", "impl-trait-for-tuples", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "paste", - "rand 0.8.5", + "rand", "scale-info", "serde", + "simple-mermaid", "sp-application-crypto", "sp-arithmetic", "sp-core", "sp-io", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-weights", ] [[package]] name = "sp-runtime-interface" -version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "24.0.0" +source = "git+https://github.com/paritytech//polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "primitive-types", + "sp-externalities 0.25.0 (git+https://github.com/paritytech//polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-runtime-interface-proc-macro 17.0.0 (git+https://github.com/paritytech//polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-std 14.0.0 (git+https://github.com/paritytech//polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-storage 19.0.0 (git+https://github.com/paritytech//polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-tracing 16.0.0 (git+https://github.com/paritytech//polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech//polkadot-sdk?branch=release-polkadot-v1.7.2)", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "bytes", "impl-trait-for-tuples", - "parity-scale-codec 3.6.9", - "primitive-types 0.12.2", - "sp-externalities", - "sp-runtime-interface-proc-macro", - "sp-std", - "sp-storage", - "sp-tracing", - "sp-wasm-interface", + "parity-scale-codec", + "primitive-types", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-runtime-interface-proc-macro 17.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "static_assertions", ] [[package]] name = "sp-runtime-interface-proc-macro" -version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "17.0.0" +source = "git+https://github.com/paritytech//polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "Inflector", - "proc-macro-crate 1.3.1", + "expander 2.0.0", + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" +dependencies = [ + "Inflector", + "expander 2.0.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] name = "sp-session" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-api", "sp-core", "sp-keystore", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "sp-staking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "impl-trait-for-tuples", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "sp-state-machine" -version = "0.28.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.35.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "hash-db 0.16.0", + "hash-db", "log", - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", - "rand 0.8.5", + "parity-scale-codec", + "parking_lot 0.12.3", + "rand", "smallvec", "sp-core", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-panic-handler", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-trie", "thiserror", "tracing", @@ -14145,66 +14432,97 @@ dependencies = [ [[package]] name = "sp-statement-store" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "aes-gcm", "curve25519-dalek 4.1.2", "ed25519-dalek", "hkdf", - "parity-scale-codec 3.6.9", - "rand 0.8.5", + "parity-scale-codec", + "rand", "scale-info", "sha2 0.10.8", "sp-api", "sp-application-crypto", "sp-core", - "sp-externalities", + "sp-crypto-hashing", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-runtime", - "sp-runtime-interface", - "sp-std", + "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "thiserror", "x25519-dalek 2.0.1", ] [[package]] name = "sp-std" -version = "8.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "14.0.0" +source = "git+https://github.com/paritytech//polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" + +[[package]] +name = "sp-std" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" [[package]] name = "sp-storage" -version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "19.0.0" +source = "git+https://github.com/paritytech//polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech//polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-std 14.0.0 (git+https://github.com/paritytech//polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + +[[package]] +name = "sp-storage" +version = "19.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "impl-serde", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive", - "sp-std", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "sp-timestamp" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "thiserror", ] [[package]] name = "sp-tracing" -version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "16.0.0" +source = "git+https://github.com/paritytech//polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" +dependencies = [ + "parity-scale-codec", + "sp-std 14.0.0 (git+https://github.com/paritytech//polkadot-sdk?branch=release-polkadot-v1.7.2)", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "sp-tracing" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "parity-scale-codec 3.6.9", - "sp-std", + "parity-scale-codec", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "tracing", "tracing-core", "tracing-subscriber", @@ -14212,8 +14530,8 @@ dependencies = [ [[package]] name = "sp-transaction-pool" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "sp-api", "sp-runtime", @@ -14221,36 +14539,37 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "sp-core", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-trie", ] [[package]] name = "sp-trie" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "ahash 0.8.11", - "hash-db 0.16.0", - "hashbrown 0.13.2", + "hash-db", "lazy_static", "memory-db", "nohash-hasher", - "parity-scale-codec 3.6.9", - "parking_lot 0.12.1", + "parity-scale-codec", + "parking_lot 0.12.3", + "rand", "scale-info", "schnellru", "sp-core", - "sp-std", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "thiserror", "tracing", "trie-db", @@ -14259,58 +14578,71 @@ dependencies = [ [[package]] name = "sp-version" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "impl-serde", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "parity-wasm", "scale-info", "serde", - "sp-core-hashing-proc-macro", + "sp-crypto-hashing-proc-macro", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-version-proc-macro", "thiserror", ] [[package]] name = "sp-version-proc-macro" -version = "8.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "parity-scale-codec 3.6.9", + "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] name = "sp-wasm-interface" -version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "20.0.0" +source = "git+https://github.com/paritytech//polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "anyhow", "impl-trait-for-tuples", "log", - "parity-scale-codec 3.6.9", - "sp-std", + "parity-scale-codec", + "sp-std 14.0.0 (git+https://github.com/paritytech//polkadot-sdk?branch=release-polkadot-v1.7.2)", "wasmtime", ] [[package]] -name = "sp-weights" +name = "sp-wasm-interface" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "wasmtime", +] + +[[package]] +name = "sp-weights" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "parity-scale-codec 3.6.9", + "bounded-collections", + "parity-scale-codec", "scale-info", "serde", "smallvec", "sp-arithmetic", - "sp-core", - "sp-debug-derive", - "sp-std", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] @@ -14327,163 +14659,72 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "spinners" -version = "4.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0ef947f358b9c238923f764c72a4a9d42f2d637c46e059dbd319d6e7cfb4f82" -dependencies = [ - "lazy_static", - "maplit", - "strum 0.24.1", -] - -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - -[[package]] -name = "ss58-registry" -version = "1.47.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4743ce898933fbff7bbf414f497c459a782d496269644b3d650a398ae6a487ba" -dependencies = [ - "Inflector", - "num-format", - "proc-macro2", - "quote", - "serde", - "serde_json", - "unicode-xid", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "staging-kusama-runtime" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" -dependencies = [ - "binary-merkle-tree", - "bitvec 1.0.1", - "frame-benchmarking", - "frame-election-provider-support", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", - "hex-literal 0.4.1", - "kusama-runtime-constants", - "log", - "pallet-authority-discovery", - "pallet-authorship", - "pallet-babe", - "pallet-bags-list", - "pallet-balances", - "pallet-beefy", - "pallet-beefy-mmr", - "pallet-bounties", - "pallet-child-bounties", - "pallet-collective", - "pallet-conviction-voting", - "pallet-democracy", - "pallet-election-provider-multi-phase", - "pallet-election-provider-support-benchmarking", - "pallet-elections-phragmen", - "pallet-fast-unstake", - "pallet-grandpa", - "pallet-identity", - "pallet-im-online", - "pallet-indices", - "pallet-membership", - "pallet-message-queue", - "pallet-mmr", - "pallet-multisig", - "pallet-nis", - "pallet-nomination-pools", - "pallet-nomination-pools-benchmarking", - "pallet-nomination-pools-runtime-api", - "pallet-offences", - "pallet-offences-benchmarking", - "pallet-preimage", - "pallet-proxy", - "pallet-ranked-collective", - "pallet-recovery", - "pallet-referenda", - "pallet-scheduler", - "pallet-session", - "pallet-session-benchmarking", - "pallet-society", - "pallet-staking", - "pallet-staking-runtime-api", - "pallet-state-trie-migration", - "pallet-timestamp", - "pallet-tips", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-treasury", - "pallet-utility", - "pallet-vesting", - "pallet-whitelist", - "pallet-xcm", - "pallet-xcm-benchmarks", - "parity-scale-codec 3.6.9", - "polkadot-primitives", - "polkadot-runtime-common", - "polkadot-runtime-parachains", - "rustc-hex", - "scale-info", +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0ef947f358b9c238923f764c72a4a9d42f2d637c46e059dbd319d6e7cfb4f82" +dependencies = [ + "lazy_static", + "maplit", + "strum 0.24.1", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "ss58-registry" +version = "1.47.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4743ce898933fbff7bbf414f497c459a782d496269644b3d650a398ae6a487ba" +dependencies = [ + "Inflector", + "num-format", + "proc-macro2", + "quote", "serde", - "serde_derive", - "smallvec", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", - "sp-authority-discovery", - "sp-block-builder", - "sp-consensus-babe", - "sp-consensus-beefy", - "sp-core", - "sp-inherents", - "sp-io", - "sp-mmr-primitives", - "sp-npos-elections", - "sp-offchain", + "serde_json", + "unicode-xid", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "staging-parachain-info" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" +dependencies = [ + "cumulus-primitives-core", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", - "sp-storage", - "sp-transaction-pool", - "sp-version", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "static_assertions", - "substrate-wasm-builder", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] [[package]] name = "staging-xcm" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ + "array-bytes 6.2.3", "bounded-collections", "derivative", "environmental", "impl-trait-for-tuples", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "scale-info", "serde", "sp-weights", @@ -14492,21 +14733,21 @@ dependencies = [ [[package]] name = "staging-xcm-builder" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", "log", "pallet-transaction-payment", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-parachain-primitives", "scale-info", "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-weights", "staging-xcm", "staging-xcm-executor", @@ -14514,20 +14755,21 @@ dependencies = [ [[package]] name = "staging-xcm-executor" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "environmental", "frame-benchmarking", "frame-support", "impl-trait-for-tuples", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", + "scale-info", "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-weights", "staging-xcm", ] @@ -14566,11 +14808,24 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "strobe-rs" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fabb238a1cccccfa4c4fb703670c0d157e1256c1ba695abf1b93bd2bb14bab2d" +dependencies = [ + "bitflags 1.3.2", + "byteorder", + "keccak", + "subtle 2.5.0", + "zeroize", +] + [[package]] name = "strsim" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" @@ -14583,9 +14838,9 @@ dependencies = [ [[package]] name = "strum" -version = "0.25.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" [[package]] name = "strum_macros" @@ -14602,15 +14857,15 @@ dependencies = [ [[package]] name = "strum_macros" -version = "0.25.3" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "quote", "rustversion", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] @@ -14635,25 +14890,25 @@ dependencies = [ "byteorder", "crunchy", "lazy_static", - "rand 0.8.5", + "rand", "rustc-hex", ] [[package]] name = "substrate-build-script-utils" -version = "3.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" [[package]] name = "substrate-frame-rpc-system" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-system-rpc-runtime-api", "futures", "jsonrpsee", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sc-rpc-api", "sc-transaction-pool-api", "sp-api", @@ -14665,8 +14920,8 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "hyper", "log", @@ -14677,8 +14932,8 @@ dependencies = [ [[package]] name = "substrate-rpc-client" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "jsonrpsee", @@ -14690,11 +14945,11 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "jsonrpsee", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sc-client-api", "sc-rpc-api", "serde", @@ -14707,27 +14962,39 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" -version = "5.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ - "ansi_term", "build-helper", "cargo_metadata", + "console", "filetime", "parity-wasm", "sp-maybe-compressed-blob", "strum 0.24.1", "tempfile", - "toml 0.7.8", + "toml 0.8.14", "walkdir", "wasm-opt", ] +[[package]] +name = "substrate-wasm-builder-runner" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "316626afcac0219c95116e6a2518e622484c2814182bd225fbf4da4f67e27e8f" + +[[package]] +name = "subtle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" + [[package]] name = "subtle" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "subtle-ng" @@ -14748,9 +15015,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.57" +version = "2.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11a6ae1e52eb25aab8f3fb9fca13be982a373b8f1157ca14b897a825ba4a2d35" +checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" dependencies = [ "proc-macro2", "quote", @@ -14769,6 +15036,17 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "system-configuration" version = "0.5.1" @@ -14809,8 +15087,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", - "fastrand 2.0.2", - "rustix 0.38.32", + "fastrand 2.1.0", + "rustix 0.38.34", "windows-sys 0.52.0", ] @@ -14823,6 +15101,16 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "terminal_size" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" +dependencies = [ + "rustix 0.38.34", + "windows-sys 0.48.0", +] + [[package]] name = "termtree" version = "0.4.1" @@ -14831,9 +15119,9 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ "thiserror-impl", ] @@ -14855,18 +15143,18 @@ checksum = "e4c60d69f36615a077cc7663b9cb8e42275722d23e58a7fa3d2c7f2915d09d04" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] @@ -14930,9 +15218,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.34" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", @@ -14951,33 +15239,14 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ "num-conv", "time-core", ] -[[package]] -name = "tiny-bip39" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62cc94d358b5a1e84a5cb9109f559aa3c4d634d2b1b4de3d0fa4adc7c78e2861" -dependencies = [ - "anyhow", - "hmac 0.12.1", - "once_cell", - "pbkdf2 0.11.0", - "rand 0.8.5", - "rustc-hash", - "sha2 0.10.8", - "thiserror", - "unicode-normalization", - "wasm-bindgen", - "zeroize", -] - [[package]] name = "tiny-keccak" version = "2.0.2" @@ -15004,32 +15273,32 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" dependencies = [ "backtrace", "bytes", "libc", "mio", "num_cpus", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "pin-project-lite 0.2.14", "signal-hook-registry", - "socket2 0.5.6", + "socket2 0.5.7", "tokio-macros", "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] @@ -15039,7 +15308,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" dependencies = [ "pin-project", - "rand 0.8.5", + "rand", "tokio", ] @@ -15049,7 +15318,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.10", + "rustls 0.21.12", "tokio", ] @@ -15067,9 +15336,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", @@ -15077,7 +15346,6 @@ dependencies = [ "futures-sink", "pin-project-lite 0.2.14", "tokio", - "tracing", ] [[package]] @@ -15091,61 +15359,69 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.8" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.19.15", + "toml_edit 0.22.14", ] [[package]] -name = "toml" -version = "0.8.2" +name = "toml_datetime" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" dependencies = [ "serde", - "serde_spanned", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.2.6", "toml_datetime", - "toml_edit 0.20.2", + "winnow 0.5.40", ] [[package]] -name = "toml_datetime" -version = "0.6.3" +name = "toml_edit" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" dependencies = [ - "serde", + "indexmap 2.2.6", + "toml_datetime", + "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.19.15" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ "indexmap 2.2.6", - "serde", - "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.20.2" +version = "0.22.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" dependencies = [ "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.13", ] [[package]] @@ -15154,6 +15430,10 @@ version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite 0.2.14", "tower-layer", "tower-service", "tracing", @@ -15209,7 +15489,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] @@ -15234,11 +15514,10 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "coarsetime", - "polkadot-node-jaeger", "polkadot-primitives", "tracing", "tracing-gum-proc-macro", @@ -15246,14 +15525,14 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "5.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "expander 2.0.0", - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] @@ -15302,11 +15581,11 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.27.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "767abe6ffed88a1889671a102c2861ae742726f52e0a5a425b92c9fbfa7e9c85" +checksum = "ff28e0f815c2fea41ebddf148e008b077d2faddb026c9555b29696114d602642" dependencies = [ - "hash-db 0.16.0", + "hash-db", "hashbrown 0.13.2", "log", "rustc-hex", @@ -15319,17 +15598,7 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4ed310ef5ab98f5fa467900ed906cb9232dd5376597e00fd4cba2a449d06c0b" dependencies = [ - "hash-db 0.16.0", -] - -[[package]] -name = "triehash" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1631b201eb031b563d2e85ca18ec8092508e262a3196ce9bd10a67ec87b9f5c" -dependencies = [ - "hash-db 0.15.2", - "rlp", + "hash-db", ] [[package]] @@ -15348,7 +15617,7 @@ dependencies = [ "idna 0.2.3", "ipnet", "lazy_static", - "rand 0.8.5", + "rand", "smallvec", "socket2 0.4.10", "thiserror", @@ -15369,7 +15638,7 @@ dependencies = [ "ipconfig", "lazy_static", "lru-cache", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "resolv-conf", "smallvec", "thiserror", @@ -15386,8 +15655,8 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "try-runtime-cli" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "0.38.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "async-trait", "clap", @@ -15395,7 +15664,7 @@ dependencies = [ "frame-try-runtime", "hex", "log", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "sc-cli", "sc-executor", "serde", @@ -15404,8 +15673,8 @@ dependencies = [ "sp-consensus-aura", "sp-consensus-babe", "sp-core", - "sp-debug-derive", - "sp-externalities", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-inherents", "sp-io", "sp-keystore", @@ -15434,7 +15703,7 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", "digest 0.10.7", - "rand 0.8.5", + "rand", "static_assertions", ] @@ -15476,18 +15745,18 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" @@ -15502,7 +15771,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ "crypto-common", - "subtle", + "subtle 2.5.0", ] [[package]] @@ -15558,17 +15827,6 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" -[[package]] -name = "vergen" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7141e445af09c8919f1d5f8a20dae0b20c3b57a45dee0d5823c6ed5d237f15a" -dependencies = [ - "bitflags 1.3.2", - "chrono", - "rustc_version", -] - [[package]] name = "version_check" version = "0.9.4" @@ -15581,11 +15839,35 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +[[package]] +name = "w3f-bls" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c5da5fa2c6afa2c9158eaa7cd9aee249765eb32b5fb0c63ad8b9e79336a47ec" +dependencies = [ + "ark-bls12-377", + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-serialize-derive", + "arrayref", + "constcat", + "digest 0.10.7", + "rand", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "sha2 0.10.8", + "sha3", + "thiserror", + "zeroize", +] + [[package]] name = "waker-fn" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" +checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" [[package]] name = "walkdir" @@ -15648,7 +15930,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", "wasm-bindgen-shared", ] @@ -15682,7 +15964,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -15695,18 +15977,18 @@ checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "wasm-instrument" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa1dafb3e60065305741e83db35c6c2584bb3725b692b5b66148a38d72ace6cd" +checksum = "2a47ecb37b9734d1085eaa5ae1a81e60801fd8c28d4cabdd8aedb982021918bc" dependencies = [ "parity-wasm", ] [[package]] name = "wasm-opt" -version = "0.114.2" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "effbef3bd1dde18acb401f73e740a6f3d4a1bc651e9773bddc512fe4d8d68f67" +checksum = "2fd87a4c135535ffed86123b6fb0f0a5a0bc89e50416c942c5f0662c645f679c" dependencies = [ "anyhow", "libc", @@ -15720,9 +16002,9 @@ dependencies = [ [[package]] name = "wasm-opt-cxx-sys" -version = "0.114.2" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c09e24eb283919ace2ed5733bda4842a59ce4c8de110ef5c6d98859513d17047" +checksum = "8c57b28207aa724318fcec6575fe74803c23f6f266fce10cbc9f3f116762f12e" dependencies = [ "anyhow", "cxx", @@ -15732,9 +16014,9 @@ dependencies = [ [[package]] name = "wasm-opt-sys" -version = "0.114.2" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f2f817bed2e8d65eb779fa37317e74de15585751f903c9118342d1970703a4" +checksum = "8a1cce564dc768dacbdb718fc29df2dba80bd21cb47d8f77ae7e3d95ceb98cbe" dependencies = [ "anyhow", "cc", @@ -15800,9 +16082,9 @@ dependencies = [ [[package]] name = "wasmparser-nostd" -version = "0.100.1" +version = "0.100.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9157cab83003221bfd385833ab587a039f5d6fa7304854042ba358a3b09e0724" +checksum = "d5a015fe95f3504a94bb1462c717aae75253e39b9dd6c3fb1062c934535c64aa" dependencies = [ "indexmap-nostd", ] @@ -15982,7 +16264,7 @@ dependencies = [ "memfd", "memoffset", "paste", - "rand 0.8.5", + "rand", "rustix 0.36.17", "wasmtime-asm-macros", "wasmtime-environ", @@ -16031,29 +16313,25 @@ dependencies = [ "webpki", ] -[[package]] -name = "webpki-roots" -version = "0.25.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" - [[package]] name = "westend-runtime" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "binary-merkle-tree", - "bitvec 1.0.1", + "bitvec", "frame-benchmarking", "frame-election-provider-support", "frame-executive", + "frame-metadata-hash-extension", "frame-support", "frame-system", "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", - "hex-literal 0.4.1", + "hex-literal", "log", + "pallet-asset-rate", "pallet-authority-discovery", "pallet-authorship", "pallet-babe", @@ -16062,6 +16340,7 @@ dependencies = [ "pallet-beefy", "pallet-beefy-mmr", "pallet-collective", + "pallet-conviction-voting", "pallet-democracy", "pallet-election-provider-multi-phase", "pallet-election-provider-support-benchmarking", @@ -16083,6 +16362,8 @@ dependencies = [ "pallet-preimage", "pallet-proxy", "pallet-recovery", + "pallet-referenda", + "pallet-root-testing", "pallet-scheduler", "pallet-session", "pallet-session-benchmarking", @@ -16098,9 +16379,10 @@ dependencies = [ "pallet-treasury", "pallet-utility", "pallet-vesting", + "pallet-whitelist", "pallet-xcm", "pallet-xcm-benchmarks", - "parity-scale-codec 3.6.9", + "parity-scale-codec", "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-common", @@ -16112,11 +16394,13 @@ dependencies = [ "smallvec", "sp-api", "sp-application-crypto", + "sp-arithmetic", "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", "sp-consensus-beefy", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-mmr-primitives", @@ -16125,8 +16409,8 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", - "sp-storage", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-transaction-pool", "sp-version", "staging-xcm", @@ -16138,8 +16422,8 @@ dependencies = [ [[package]] name = "westend-runtime-constants" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "frame-support", "polkadot-primitives", @@ -16148,6 +16432,8 @@ dependencies = [ "sp-core", "sp-runtime", "sp-weights", + "staging-xcm", + "staging-xcm-builder", ] [[package]] @@ -16159,14 +16445,14 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.32", + "rustix 0.38.34", ] [[package]] name = "wide" -version = "0.7.15" +version = "0.7.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89beec544f246e679fc25490e3f8e08003bc4bf612068f325120dad4cea02c1c" +checksum = "1134eff459f1063780b94cc78b704e2212cac12abd554e4268f5b8f9dfcc1883" dependencies = [ "bytemuck", "safe_arch", @@ -16174,9 +16460,9 @@ dependencies = [ [[package]] name = "widestring" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8" +checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" [[package]] name = "winapi" @@ -16196,11 +16482,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" dependencies = [ - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -16234,7 +16520,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -16261,7 +16547,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -16296,17 +16582,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm 0.52.4", - "windows_aarch64_msvc 0.52.4", - "windows_i686_gnu 0.52.4", - "windows_i686_msvc 0.52.4", - "windows_x86_64_gnu 0.52.4", - "windows_x86_64_gnullvm 0.52.4", - "windows_x86_64_msvc 0.52.4", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] [[package]] @@ -16323,9 +16610,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" @@ -16341,9 +16628,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" @@ -16359,9 +16646,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.4" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" @@ -16377,9 +16670,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" @@ -16395,9 +16688,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" @@ -16413,9 +16706,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" @@ -16431,9 +16724,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" @@ -16444,6 +16737,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "winnow" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.50.0" @@ -16454,12 +16756,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "wyz" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" - [[package]] name = "wyz" version = "0.5.1" @@ -16513,11 +16809,11 @@ dependencies = [ [[package]] name = "xcm-primitives" version = "0.1.1" -source = "git+https://github.com/moonbeam-foundation/moonbeam?tag=v0.34.1#29e8d79f1a7cdb195bd17b1788e9e613055c3575" +source = "git+https://github.com/moonbeam-foundation/moonbeam?tag=v0.37.3#8081fdffb4d3d294dc5bbbb0ae8f02c348619499" dependencies = [ "cumulus-primitives-core", "ethereum", - "ethereum-types 0.14.1", + "ethereum-types", "frame-benchmarking", "frame-support", "frame-system", @@ -16526,13 +16822,14 @@ dependencies = [ "log", "orml-traits", "pallet-staking", - "parity-scale-codec 3.6.9", + "parity-scale-codec", + "polkadot-runtime-common", "scale-info", "serde", - "sha3 0.10.8", + "sha3", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -16540,13 +16837,13 @@ dependencies = [ [[package]] name = "xcm-procedural" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#c00ca35b403a95e344d03e229b3f85baa3b96c89" dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] @@ -16558,8 +16855,8 @@ dependencies = [ "futures", "log", "nohash-hasher", - "parking_lot 0.12.1", - "rand 0.8.5", + "parking_lot 0.12.3", + "rand", "static_assertions", ] @@ -16574,29 +16871,29 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" dependencies = [ "zeroize_derive", ] @@ -16609,7 +16906,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.66", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 19c481087d..03a3b0506a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,178 +54,165 @@ repository = "https://github.com/centrifuge/centrifuge-chain" documentation = "https://reference.centrifuge.io/centrifuge_chain/index.html" [workspace.dependencies] -hex-literal = { version = "0.3.4" } +hex-literal = { version = "0.4.1" } hex = { version = "0.4.3", default-features = false } -smallvec = "1.6.1" -serde = { version = "1.0.119", default-features = false, features = ["derive"] } -parity-scale-codec = { version = "3.0", default-features = false, features = ["derive"] } -scale-info = { version = "2.3.0", default-features = false, features = ["derive"] } -log = { version = "0.4", default-features = false } -getrandom = { version = "0.2", features = ["js"] } +smallvec = "1.11.0" +serde = { version = "1.0.195", default-features = false, features = ["derive"] } +serde_json = { version = "1.0.111" } +parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +log = { version = "0.4.20", default-features = false } static_assertions = "1.1.0" lazy_static = "1.4.0" thiserror = "1.0.30" -tokio = { version = "1.15", features = ["macros"] } -tracing-subscriber = "0.2" -ethabi = { version = "16.0", default-features = false } -ethereum = { version = "0.14.0", default-features = false } -async-trait = "0.1" -clap = { version = "4.0.9", features = ["derive"] } -futures = "0.3.25" -jsonrpsee = { version = "0.16.2", features = ["server", "macros"] } -url = "2.2.2" +tokio = { version = "1.32.0", features = ["macros"] } +tracing-subscriber = "0.2.25" +ethabi = { version = "18.0", default-features = false } +ethereum = { version = "0.15.0", default-features = false } +async-trait = "0.1.74" +clap = { version = "4.4.18", features = ["derive"] } +futures = "0.3.28" +jsonrpsee = { version = "0.20.3", features = ["server", "macros"] } +url = "2.4.0" tempfile = "3.1.0" -strum = { version = "0.24", default-features = false, features = ["derive"] } -bitflags = { version = "1.3" } +strum = { version = "0.24.1", default-features = false, features = ["derive"] } +bitflags = { version = "1.3.2" } rand = { version = "0.8.5", default-features = false } rev_slice = { version = "0.1.5", default-features = false } -impl-trait-for-tuples = "0.2.1" -num-traits = { version = "0.2", default-features = false } +impl-trait-for-tuples = "0.2.2" +num-traits = { version = "0.2.17", default-features = false } num_enum = { version = "0.5.3", default-features = false } chrono = { version = "0.4", default-features = false } # Cumulus -cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -cumulus-primitives-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -cumulus-client-consensus-proposer = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -cumulus-client-network = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +cumulus-primitives-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +cumulus-client-consensus-proposer = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +cumulus-client-network = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } -pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -parachain-info = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +staging-parachain-info = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } # Polkadot -pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -staging-xcm = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -staging-xcm-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -staging-xcm-executor = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -rococo-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -staging-kusama-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -polkadot-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -polkadot-node-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -polkadot-service = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +staging-xcm = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +staging-xcm-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +staging-xcm-executor = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +rococo-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +polkadot-node-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +polkadot-service = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } # Substrate -sc-service = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sc-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sc-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sc-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sc-network = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sc-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sc-tracing = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sp-arithmetic = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sp-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sp-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sp-consensus-beefy = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sp-consensus-slots = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sp-io = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sp-session = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sp-std = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sp-version = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sp-tracing = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sp-consensus = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sp-staking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -sp-trie = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sc-service = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sc-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sc-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sc-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sc-network = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sc-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sc-tracing = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-arithmetic = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-consensus-beefy = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-consensus-slots = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-core = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-io = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-session = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-std = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-version = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-tracing = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-consensus = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-staking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +sp-trie = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } frame-support = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, features = [ "tuples-96", -], branch = "release-polkadot-v1.1.0" } # Check when tuples-96 can be removed -frame-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -pallet-babe = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -pallet-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -pallet-im-online = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -pallet-collective = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -pallet-democracy = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -pallet-elections-phragmen = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -pallet-identity = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -pallet-membership = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, features = ["historical"], branch = "release-polkadot-v1.1.0" } -pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -pallet-uniques = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -pallet-vesting = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +], branch = "release-polkadot-v1.7.2" } # Check when tuples-96 can be removed +frame-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +pallet-babe = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +pallet-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +pallet-im-online = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +pallet-collective = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +pallet-democracy = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +pallet-elections-phragmen = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +pallet-identity = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +pallet-membership = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, features = ["historical"], branch = "release-polkadot-v1.7.2" } +pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +pallet-uniques = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +pallet-vesting = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +pallet-message-queue = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } -frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } -try-runtime-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } +try-runtime-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } -# Orml -orml-asset-registry = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v1.1.0" } -orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v1.1.0" } -orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v1.1.0" } -orml-xcm = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v1.1.0" } -orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v1.1.0" } -orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v1.1.0" } - -# Centrifuge organization -fudge = { git = "https://github.com/centrifuge/fudge", branch = "polkadot-v1.1.0" } -fudge-core = { git = "https://github.com/centrifuge/fudge", branch = "polkadot-v1.1.0" } -chainbridge = { git = "https://github.com/centrifuge/chainbridge-substrate.git", default-features = false, branch = "polkadot-v1.1.0" } - -# Foss3 -mock-builder = { git = "https://github.com/foss3/runtime-pallet-library", branch = "polkadot-v1.1.0" } -pallet-remarks = { git = "https://github.com/foss3/runtime-pallet-library", branch = "polkadot-v1.1.0", default-features = false } +# Build dependencies +substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } # Centrifuge pallets axelar-gateway-precompile = { path = "pallets/liquidity-pools-gateway/axelar-gateway-precompile", default-features = false } @@ -273,45 +260,60 @@ altair-runtime = { path = "runtime/altair", default-features = false } centrifuge-runtime = { path = "runtime/centrifuge", default-features = false } runtime-integration-tests-proc-macro = { path = "runtime/integration-tests/procedural" } -# Build dependencies -substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -vergen = "3.0.4" +# Orml +orml-asset-registry = { git = "https://github.com/moonbeam-foundation/open-runtime-module-library", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } +orml-tokens = { git = "https://github.com/moonbeam-foundation/open-runtime-module-library", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } +orml-traits = { git = "https://github.com/moonbeam-foundation/open-runtime-module-library", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } +orml-xcm = { git = "https://github.com/moonbeam-foundation/open-runtime-module-library", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } +orml-xcm-support = { git = "https://github.com/moonbeam-foundation/open-runtime-module-library", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } +orml-xtokens = { git = "https://github.com/moonbeam-foundation/open-runtime-module-library", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } + +# Centrifuge organization +fudge = { git = "https://github.com/centrifuge/fudge", branch = "polkadot-v1.7.2" } +fudge-core = { git = "https://github.com/centrifuge/fudge", branch = "polkadot-v1.7.2" } +chainbridge = { git = "https://github.com/centrifuge/chainbridge-substrate.git", default-features = false, branch = "polkadot-v1.7.2" } + +# Foss3 +mock-builder = { git = "https://github.com/foss3/runtime-pallet-library", branch = "polkadot-v1.7.2" } +pallet-remarks = { git = "https://github.com/foss3/runtime-pallet-library", branch = "polkadot-v1.7.2", default-features = false } # Moonbeam fork of polkadot-evm/frontier -fp-rpc = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } -fp-self-contained = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0", features = ["serde"] } -pallet-base-fee = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } -pallet-ethereum = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0", features = [ +fp-rpc = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } +fp-self-contained = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2", features = [ + "serde", +] } +pallet-base-fee = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } +pallet-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2", features = [ "forbid-evm-reentrancy", ] } -pallet-evm = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0", features = [ +pallet-evm = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2", features = [ "forbid-evm-reentrancy", ] } -pallet-evm-chain-id = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } -pallet-evm-precompile-blake2 = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } -pallet-evm-precompile-bn128 = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } -pallet-evm-precompile-dispatch = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } -pallet-evm-precompile-modexp = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } -pallet-evm-precompile-sha3fips = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } -pallet-evm-precompile-simple = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } -fc-consensus = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } -fc-db = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0", features = ["rocksdb"] } -fc-mapping-sync = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } -fc-rpc = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } -fc-rpc-core = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } -fp-consensus = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } -fp-evm = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } -fp-storage = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } -fp-dynamic-fee = { git = "https://github.com/lemunozm/frontier", default-features = false, branch = "moonbeam-polkadot-v1.1.0" } +pallet-evm-chain-id = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } +pallet-evm-precompile-blake2 = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } +pallet-evm-precompile-bn128 = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } +pallet-evm-precompile-dispatch = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } +pallet-evm-precompile-modexp = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } +pallet-evm-precompile-sha3fips = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } +pallet-evm-precompile-simple = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } +fc-api = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } +fc-consensus = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } +fc-db = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2", features = ["rocksdb"] } +fc-mapping-sync = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } +fc-rpc = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } +fc-rpc-core = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } +fp-consensus = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } +fp-evm = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } +fp-storage = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } +fp-dynamic-fee = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } -# Moonbeam (tag v0.34.1 => version using a moonbeam fork related to polkadot v1.1.0) +# Moonbeam (tag v0.34.1 => version using a moonbeam fork related to polkadot v1.3.0) # WARN: Moonbeam dependencies use forks of polkadot, orml and frontier repos. # We need to patch their dependencies to avoid duplicate same crates. -xcm-primitives = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, tag = "v0.34.1" } -pallet-xcm-transactor = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, tag = "v0.34.1" } -pallet-evm-precompile-balances-erc20 = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, tag = "v0.34.1" } -precompile-utils = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, tag = "v0.34.1" } +xcm-primitives = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, tag = "v0.37.3" } +pallet-xcm-transactor = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, tag = "v0.37.3" } +pallet-evm-precompile-balances-erc20 = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, tag = "v0.37.3" } +precompile-utils = { git = "https://github.com/moonbeam-foundation/moonbeam", default-features = false, tag = "v0.37.3" } # Cargo patch for moonbeam crates # @@ -323,85 +325,63 @@ precompile-utils = { git = "https://github.com/moonbeam-foundation/moonbeam", de # # How to know if we should add new patches? # - Do `cargo tree` -# - Search for `moonbeam-foundation/polkadot-sdk` or `moonbeam-foundation-open-runtime-module-library` +# - Search for `moonbeam-foundation/polkadot-sdk` or `moonbeam-foundation/open-runtime-module-library` # - For any occurence found, add here a patch. [patch."https://github.com/moonbeam-foundation/polkadot-sdk"] -frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -pallet-staking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-core-hashing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-debug-derive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-externalities = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-storage = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-runtime-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-runtime-interface-proc-macro = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-tracing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-wasm-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-weights = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-arithmetic = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-api-proc-macro = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-state-machine = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-panic-handler = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-trie = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-version = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-core-hashing-proc-macro = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-version-proc-macro = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -staging-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -staging-xcm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -staging-xcm-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-client-db = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-database = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-network-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } - -[patch."https://github.com/moonbeam-foundation/open-runtime-module-library"] -orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v1.1.0" } +frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +pallet-staking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-core-hashing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-debug-derive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-externalities = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-storage = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-runtime-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-runtime-interface-proc-macro = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-tracing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-wasm-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-weights = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-arithmetic = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-api-proc-macro = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-state-machine = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-panic-handler = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-trie = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-version = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-version-proc-macro = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +staging-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +staging-xcm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +staging-xcm-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sc-client-db = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sc-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sc-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sc-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-database = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sc-network-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } +polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } -# TODO: This patches can be removed when we get rid off `lemunozm` fork. -# We need to do this to avoid lemunozm/frontier dependencies to point to the original fork moonbeam-foundation/frontier which will fetch `evm-private` that we do not have git access. -[patch."https://github.com/moonbeam-foundation/frontier"] -fp-rpc = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } -fp-self-contained = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } -pallet-base-fee = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } -pallet-ethereum = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } -pallet-evm = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } -pallet-evm-chain-id = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } -pallet-evm-precompile-blake2 = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } -pallet-evm-precompile-bn128 = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } -pallet-evm-precompile-dispatch = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } -pallet-evm-precompile-modexp = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } -pallet-evm-precompile-sha3fips = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } -pallet-evm-precompile-simple = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } -fc-consensus = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } -fc-db = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } -fc-mapping-sync = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } -fc-rpc = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } -fc-rpc-core = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } -fp-consensus = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } -fp-evm = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } -fp-storage = { git = "https://github.com/lemunozm/frontier", branch = "moonbeam-polkadot-v1.1.0" } +# Check issue: https://github.com/paritytech/arkworks-substrate/issues/9 +[patch."https://github.com/paritytech/polkadot-sdk"] +sp-crypto-ec-utils = { git = "https://github.com/paritytech//polkadot-sdk", branch = "release-polkadot-v1.7.2" } diff --git a/ci/run-check.sh b/ci/run-check.sh index 167786a49f..0bc6dea814 100755 --- a/ci/run-check.sh +++ b/ci/run-check.sh @@ -22,7 +22,9 @@ case $TARGET in ;; lint-fmt) - cargo fmt -- --check + # We need the `+nightly` as long as the used toolchain is the stable version + # in order to allow using the formatter unstable options + cargo +nightly fmt -- --check ;; lint-taplo) diff --git a/docker/docker-compose-local-relay.yml b/docker/docker-compose-local-relay.yml index cf1afd7c18..69196bf790 100644 --- a/docker/docker-compose-local-relay.yml +++ b/docker/docker-compose-local-relay.yml @@ -4,7 +4,7 @@ version: '3.4' services: node_alice: container_name: alice - image: "parity/polkadot:v1.0.0" + image: "parity/polkadot:v1.7.2" platform: "linux/x86_64" ports: - "30333:30333" @@ -30,7 +30,7 @@ services: node_bob: container_name: bob - image: "parity/polkadot:v1.0.0" + image: "parity/polkadot:v1.7.2" platform: "linux/x86_64" ports: - "30344:30333" diff --git a/libs/mocks/Cargo.toml b/libs/mocks/Cargo.toml index e4ce69f4d5..5d0160bc2c 100644 --- a/libs/mocks/Cargo.toml +++ b/libs/mocks/Cargo.toml @@ -47,7 +47,6 @@ std = [ "sp-runtime/std", "orml-traits/std", "staging-xcm/std", - "mock-builder/std", ] runtime-benchmarks = [ "frame-support/runtime-benchmarks", diff --git a/libs/mocks/src/asset_registry.rs b/libs/mocks/src/asset_registry.rs index 195cba6a63..2f6f103df8 100644 --- a/libs/mocks/src/asset_registry.rs +++ b/libs/mocks/src/asset_registry.rs @@ -4,7 +4,7 @@ pub mod pallet { use mock_builder::{execute_call, register_call}; use orml_traits::asset_registry::{AssetMetadata, Inspect, Mutate}; use sp_std::fmt::Debug; - use staging_xcm::{v3::prelude::MultiLocation, VersionedMultiLocation}; + use staging_xcm::{v4::Location, VersionedLocation}; #[pallet::config] pub trait Config: frame_system::Config { @@ -21,7 +21,7 @@ pub mod pallet { type CallIds = StorageMap<_, _, String, mock_builder::CallId>; impl Pallet { - pub fn mock_asset_id(f: impl Fn(&MultiLocation) -> Option + 'static) { + pub fn mock_asset_id(f: impl Fn(&Location) -> Option + 'static) { register_call!(f); } @@ -36,7 +36,7 @@ pub mod pallet { pub fn mock_metadata_by_location( f: impl Fn( - &MultiLocation, + &Location, ) -> Option> + 'static, ) { @@ -44,7 +44,7 @@ pub mod pallet { } pub fn mock_location( - f: impl Fn(&T::AssetId) -> Result, DispatchError> + 'static, + f: impl Fn(&T::AssetId) -> Result, DispatchError> + 'static, ) { register_call!(f); } @@ -66,7 +66,7 @@ pub mod pallet { Option>, Option>, Option, - Option>, + Option>, Option, ) -> DispatchResult + 'static, @@ -81,7 +81,7 @@ pub mod pallet { type CustomMetadata = T::CustomMetadata; type StringLimit = T::StringLimit; - fn asset_id(a: &MultiLocation) -> Option { + fn asset_id(a: &Location) -> Option { execute_call!(a) } @@ -92,12 +92,12 @@ pub mod pallet { } fn metadata_by_location( - a: &MultiLocation, + a: &Location, ) -> Option> { execute_call!(a) } - fn location(a: &Self::AssetId) -> Result, DispatchError> { + fn location(a: &Self::AssetId) -> Result, DispatchError> { execute_call!(a) } } @@ -116,7 +116,7 @@ pub mod pallet { c: Option>, d: Option>, e: Option, - g: Option>, + g: Option>, h: Option, ) -> DispatchResult { execute_call!((a, b, c, d, e, g, h)) diff --git a/libs/mocks/src/lib.rs b/libs/mocks/src/lib.rs index af80943db1..eec8873049 100644 --- a/libs/mocks/src/lib.rs +++ b/libs/mocks/src/lib.rs @@ -57,11 +57,9 @@ macro_rules! make_runtime_for_mock { ($runtime_name:ident, $mock_name:ident, $pallet:ident, $externalities:ident) => { use $crate::reexport::{ frame_support, - frame_support::traits::{ConstU16, ConstU32, ConstU64, Everything}, + frame_support::derive_impl, frame_system, - sp_core::H256, sp_io, - sp_runtime::traits::{BlakeTwo256, IdentityLookup}, }; frame_support::construct_runtime!( @@ -71,31 +69,10 @@ macro_rules! make_runtime_for_mock { } ); - impl frame_system::Config for Runtime { - type AccountData = (); - type AccountId = u64; - type BaseCallFilter = Everything; - type Block = frame_system::mocking::MockBlock; - type BlockHashCount = ConstU64<250>; - type BlockLength = (); - type BlockWeights = (); - type DbWeight = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type Lookup = IdentityLookup; - type MaxConsumers = ConstU32<16>; - type Nonce = u64; - type OnKilledAccount = (); - type OnNewAccount = (); - type OnSetCode = (); - type PalletInfo = PalletInfo; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type SS58Prefix = ConstU16<42>; - type SystemWeightInfo = (); - type Version = (); - } + #[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] + impl frame_system::Config for Runtime { + type Block = frame_system::mocking::MockBlock; + } pub fn $externalities() -> sp_io::TestExternalities { sp_io::TestExternalities::default() diff --git a/libs/test-utils/src/mocks/orml_asset_registry.rs b/libs/test-utils/src/mocks/orml_asset_registry.rs index 84a150239d..1197214415 100644 --- a/libs/test-utils/src/mocks/orml_asset_registry.rs +++ b/libs/test-utils/src/mocks/orml_asset_registry.rs @@ -12,8 +12,8 @@ pub mod reexport { pub use staging_xcm::{ - v3::prelude::MultiLocation as __private_MultiLocation, - VersionedMultiLocation as __private_VersionedMultiLocation, + v4::prelude::Location as __private_Location, + VersionedLocation as __private_VersionedLocation, }; } @@ -36,7 +36,7 @@ macro_rules! impl_mock_registry { }; use sp_runtime::{BoundedVec, BuildStorage}; use $crate::mocks::orml_asset_registry::reexport::{ - __private_MultiLocation, __private_VersionedMultiLocation, + __private_Location, __private_VersionedLocation, }; use super::*; @@ -49,7 +49,7 @@ macro_rules! impl_mock_registry { type CustomMetadata = $custom_metadata; type StringLimit = $string_limit; - fn asset_id(location: &__private_MultiLocation) -> Option { + fn asset_id(location: &__private_Location) -> Option { __private::STATE.with(|s| s.borrow().get_asset_from_location(location)) } @@ -62,7 +62,7 @@ macro_rules! impl_mock_registry { } fn metadata_by_location( - location: &__private_MultiLocation, + location: &__private_Location, ) -> Option< __private_AssetMetadata, > { @@ -71,7 +71,7 @@ macro_rules! impl_mock_registry { fn location( asset_id: &Self::AssetId, - ) -> Result, __private_DispatchError> { + ) -> Result, __private_DispatchError> { let maybe_location = __private::STATE.with(|s| s.borrow().get_location(asset_id)); @@ -103,7 +103,7 @@ macro_rules! impl_mock_registry { name: Option>, symbol: Option>, existential_deposit: Option, - location: Option>, + location: Option>, additional: Option, ) -> __private_DispatchResult { __private::STATE.with(|s| { @@ -192,7 +192,7 @@ macro_rules! impl_mock_registry { use super::*; pub struct RegistryState { - pub location_to_asset: Vec<(__private_MultiLocation, $asset_id)>, + pub location_to_asset: Vec<(__private_Location, $asset_id)>, pub metadata: Vec<( $asset_id, __private_AssetMetadata<$balance, $custom_metadata, $string_limit>, @@ -230,10 +230,7 @@ macro_rules! impl_mock_registry { Ok(()) } - pub fn get_location( - &self, - asset_id: &$asset_id, - ) -> Option<__private_MultiLocation> { + pub fn get_location(&self, asset_id: &$asset_id) -> Option<__private_Location> { for (curr_id, meta) in &self.metadata { if curr_id == asset_id { return meta @@ -249,7 +246,7 @@ macro_rules! impl_mock_registry { pub fn get_asset_from_location( &self, - location: &__private_MultiLocation, + location: &__private_Location, ) -> Option<$asset_id> { for (curr_location, asset_id) in &self.location_to_asset { if curr_location == location { @@ -262,7 +259,7 @@ macro_rules! impl_mock_registry { pub fn get_meta_from_location( &self, - location: &__private_MultiLocation, + location: &__private_Location, ) -> Option<__private_AssetMetadata<$balance, $custom_metadata, $string_limit>> { let asset_id = self.get_asset_from_location(location)?; @@ -276,7 +273,7 @@ macro_rules! impl_mock_registry { name: Option>, symbol: Option>, existential_deposit: Option<$balance>, - location: Option>, + location: Option>, additional: Option<$custom_metadata>, ) -> __private_DispatchResult { for (curr_id, curr_meta) in &mut self.metadata { diff --git a/libs/types/src/locations.rs b/libs/types/src/locations.rs index cf8009965e..5427e1d5c8 100644 --- a/libs/types/src/locations.rs +++ b/libs/types/src/locations.rs @@ -14,76 +14,25 @@ use cfg_primitives::AccountId; use frame_support::RuntimeDebugNoBound; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; -use sp_core::{crypto::AccountId32, H256}; -use sp_runtime::traits::{BlakeTwo256, Hash}; -use staging_xcm::VersionedMultiLocation; +use sp_core::crypto::AccountId32; +use sp_std::boxed::Box; +use staging_xcm::VersionedLocation; use crate::domain_address::DomainAddress; + /// Location types for destinations that can receive restricted transfers #[derive(Clone, RuntimeDebugNoBound, Encode, Decode, Eq, PartialEq, MaxEncodedLen, TypeInfo)] -pub enum Location { +pub enum RestrictedTransferLocation { /// Local chain account sending destination. Local(AccountId), - /// XCM MultiLocation sending destinations. - /// Using hash value here as Multilocation is large -- v1 is 512 bytes, but - /// next largest is only 40 bytes other values aren't hashed as we have - /// blake2 hashing on storage map keys, and we don't want the extra overhead - XCM(H256), + /// XCM Location sending destinations. + Xcm(Box), /// DomainAddress sending location from a liquidity pools' instance Address(DomainAddress), } -impl From for Location { +impl From for RestrictedTransferLocation { fn from(value: AccountId32) -> Self { Self::Local(value) } } - -impl From for Location { - fn from(vml: VersionedMultiLocation) -> Self { - // using hash here as multilocation is significantly larger than any other enum - // type here -- 592 bytes, vs 40 bytes for domain address (next largest) - Self::XCM(BlakeTwo256::hash(&vml.encode())) - } -} - -impl From for Location { - fn from(da: DomainAddress) -> Self { - Self::Address(da) - } -} - -#[cfg(test)] -mod test { - - use hex::FromHex; - use staging_xcm::v3::MultiLocation; - - use super::*; - - #[test] - fn from_xcm_versioned_address_works() { - let xa = VersionedMultiLocation::V3(MultiLocation::default()); - let l = Location::from(xa.clone()); - assert_eq!( - l, - Location::XCM(sp_core::H256( - <[u8; 32]>::from_hex( - "a943e30c855a123a9506e69e678dc65ae9f5b70149cb6b26eb2ed58a59b4bf77" - ) - .unwrap() - )) - ); - } - - #[test] - fn from_domain_address_works() { - let da = DomainAddress::EVM( - 1284, - <[u8; 20]>::from_hex("1231231231231231231231231231231231231231").unwrap(), - ); - let l = Location::from(da.clone()); - - assert_eq!(l, Location::Address(da)) - } -} diff --git a/libs/types/src/portfolio.rs b/libs/types/src/portfolio.rs index a8a831598b..f7a8f877c7 100644 --- a/libs/types/src/portfolio.rs +++ b/libs/types/src/portfolio.rs @@ -25,7 +25,7 @@ use sp_std::{cmp::Ordering, marker::PhantomData, vec::Vec}; /// The total NAV is based on the reserve, the assets under management (AUM) and /// pool fees: /// -/// ```ignore +/// ```text /// NAV = PoolReserve + AUM - PoolFees /// ``` /// diff --git a/node/Cargo.toml b/node/Cargo.toml index 4a7166951d..774011eaa1 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -31,10 +31,12 @@ jsonrpsee = { workspace = true, default-features = true } log = { workspace = true, default-features = true } parity-scale-codec = { default-features = true, workspace = true } serde = { workspace = true, default-features = true } +serde_json = { workspace = true, default-features = true } url = { workspace = true, default-features = true } # client dependencies pallet-transaction-payment-rpc = { workspace = true, default-features = true } +pallet-transaction-payment-rpc-runtime-api = { workspace = true, default-features = true } sc-basic-authorship = { workspace = true, default-features = true } sc-chain-spec = { workspace = true, default-features = true } sc-cli = { workspace = true, default-features = true, features = ["rocksdb"] } @@ -106,6 +108,7 @@ pallet-pool-system = { workspace = true, default-features = true } runtime-common = { workspace = true, default-features = true } # frontier +fc-api = { workspace = true, default-features = true } fc-consensus = { workspace = true, default-features = true } fc-db = { workspace = true, default-features = true, features = ["rocksdb"] } fc-mapping-sync = { workspace = true, default-features = true } @@ -121,7 +124,6 @@ pallet-evm = { workspace = true, default-features = true } [build-dependencies] substrate-build-script-utils = { workspace = true, default-features = true } -vergen = { workspace = true, default-features = true } [features] default = [] diff --git a/node/src/chain_spec.rs b/node/src/chain_spec.rs index edcf584c96..dd7945d0ea 100644 --- a/node/src/chain_spec.rs +++ b/node/src/chain_spec.rs @@ -40,16 +40,14 @@ use runtime_common::{account_conversion::AccountConverter, evm::precompile::H160 use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup}; use sc_service::{ChainType, Properties}; use serde::{Deserialize, Serialize}; -use sp_core::{crypto::UncheckedInto, sr25519, Encode, Pair, Public, H160}; +use sp_core::{sr25519, Encode, Pair, Public, H160}; use sp_runtime::{ traits::{IdentifyAccount, Verify}, FixedPointNumber, }; use staging_xcm::{ - latest::{MultiLocation, NetworkId}, - prelude::{ - AccountKey20, GeneralIndex, GeneralKey, GlobalConsensus, PalletInstance, Parachain, X2, X3, - }, + latest::{Location, NetworkId}, + prelude::{AccountKey20, GeneralIndex, GeneralKey, GlobalConsensus, PalletInstance, Parachain}, }; /// Specialized `ChainSpec` instances for our runtimes. @@ -146,30 +144,26 @@ pub fn centrifuge_local(para_id: ParaId) -> CentrifugeChainSpec { properties.insert("tokenSymbol".into(), "DCFG".into()); properties.insert("tokenDecimals".into(), currency_decimals::NATIVE.into()); - CentrifugeChainSpec::from_genesis( - "Centrifuge Local", - "centrifuge_local", - ChainType::Local, - move || { - centrifuge_genesis( - vec![( - get_account_id_from_seed::("Alice"), - get_from_seed::("Alice"), - )], - endowed_accounts(), - endowed_evm_accounts(), - Some(100000000 * CFG), - para_id, - council_members_bootstrap(), - ) - }, - vec![], - None, - None, - None, - Some(properties), + CentrifugeChainSpec::builder( + centrifuge_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"), development_extensions(para_id.into()), ) + .with_name("Centrifuge Local") + .with_id("centrifuge_local") + .with_chain_type(ChainType::Local) + .with_genesis_config_patch(centrifuge_genesis( + vec![( + get_account_id_from_seed::("Alice"), + get_from_seed::("Alice"), + )], + endowed_accounts(), + endowed_evm_accounts(), + Some(100000000 * CFG), + para_id, + council_members_bootstrap(), + )) + .with_properties(properties) + .build() } pub fn catalyst_config() -> CentrifugeChainSpec { @@ -184,70 +178,35 @@ pub fn altair_config() -> AltairChainSpec { .unwrap() } -pub fn altair_local(para_id: ParaId) -> AltairChainSpec { - let mut properties = Properties::new(); - properties.insert("tokenSymbol".into(), "DAIR".into()); - properties.insert("tokenDecimals".into(), currency_decimals::NATIVE.into()); - - AltairChainSpec::from_genesis( - "Altair Local", - "altair_local", - ChainType::Local, - move || { - altair_genesis( - vec![( - get_account_id_from_seed::("Alice"), - get_from_seed::("Alice"), - )], - endowed_accounts(), - endowed_evm_accounts(), - Some(100000000 * AIR), - para_id, - council_members_bootstrap(), - ) - }, - vec![], - None, - None, - None, - Some(properties), - development_extensions(para_id.into()), - ) +pub fn demo_config() -> DevelopmentChainSpec { + DevelopmentChainSpec::from_json_bytes(&include_bytes!("../res/demo-spec-raw.json")[..]).unwrap() } -pub fn demo(para_id: ParaId) -> DevelopmentChainSpec { +pub fn altair_local(para_id: ParaId) -> AltairChainSpec { let mut properties = Properties::new(); - properties.insert("tokenSymbol".into(), "DEMO".into()); + properties.insert("tokenSymbol".into(), "DAIR".into()); properties.insert("tokenDecimals".into(), currency_decimals::NATIVE.into()); - DevelopmentChainSpec::from_genesis( - "Demo Live", - "demo_live", - ChainType::Live, - move || { - development_genesis( - // kANEUrMbi9xC16AfL5vSGwfvBVRoRdfWoQ8abPiXi5etFxpdP - hex!["e0c426785313bb7e712d66dce43ccb81a7eaef373784511fb508fff4b5df3305"].into(), - vec![( - // kAHJNhAragKRrAb9X8JxSNYoqPqv36TspSwdSuyMfxGKUmfdH - hex!["068f3bd4ed27bb83da8fdebbb4deba6b3b3b83ff47c8abad11e5c48c74c20b11"].into(), - // kAKXFWse8rghi8mbAFB4RaVyZu6XZXq5i9wv7uYakZ3vQcxMR - hex!["68d9baaa081802f8ec50d475b654810b158cdcb23e11c43815a6549f78f1b34f"] - .unchecked_into(), - )], - demo_endowed_accounts(), - vec![], - Some(100000000 * CFG), - para_id, - ) - }, - vec![], - None, - None, - None, - Some(properties), + AltairChainSpec::builder( + altair_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"), development_extensions(para_id.into()), ) + .with_name("Altair Local") + .with_id("altair_local") + .with_chain_type(ChainType::Local) + .with_genesis_config_patch(altair_genesis( + vec![( + get_account_id_from_seed::("Alice"), + get_from_seed::("Alice"), + )], + endowed_accounts(), + endowed_evm_accounts(), + Some(100000000 * AIR), + para_id, + council_members_bootstrap(), + )) + .with_properties(properties) + .build() } pub fn development(para_id: ParaId) -> DevelopmentChainSpec { @@ -255,51 +214,26 @@ pub fn development(para_id: ParaId) -> DevelopmentChainSpec { properties.insert("tokenSymbol".into(), "DEVEL".into()); properties.insert("tokenDecimals".into(), currency_decimals::NATIVE.into()); - DevelopmentChainSpec::from_genesis( - "Dev Live", - "devel_live", - ChainType::Live, - move || { - development_genesis( - get_account_id_from_seed::("Alice"), - vec![( - get_account_id_from_seed::("Alice"), - get_from_seed::("Alice"), - )], - endowed_accounts(), - endowed_evm_accounts(), - Some(10000000 * CFG), - para_id, - ) - }, - vec![], - None, - None, - None, - Some(properties), + DevelopmentChainSpec::builder( + development_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"), development_extensions(para_id.into()), ) -} - -fn demo_endowed_accounts() -> Vec { - vec![ - //kANEUrMbi9xC16AfL5vSGwfvBVRoRdfWoQ8abPiXi5etFxpdP - hex!["e0c426785313bb7e712d66dce43ccb81a7eaef373784511fb508fff4b5df3305"].into(), - // kAHJNhAragKRrAb9X8JxSNYoqPqv36TspSwdSuyMfxGKUmfdH - hex!["068f3bd4ed27bb83da8fdebbb4deba6b3b3b83ff47c8abad11e5c48c74c20b11"].into(), - // kAJ27MdBneY2U6QXvY3CmUE9btDmTvxSYfBd5qjw9U6oNZe2C - hex!["2663e968d484dc12c488a5b74107c0c3b6bcf21a6672923b153e4b5a9170a878"].into(), - // kAKq5N4wTcKU7qCCSzUqNcQQSMfPuN5k8tBafgoH9tpUgfVg2 - hex!["7671f8ee2c446ebd2b655ab5380b8004598d9663809cbb372f3de627a0e5eb32"].into(), - // kAJkDfWBaUSoavcbWc7m5skLsd5APLgqfr8YfgKEcBctccxTv - hex!["4681744964868d0f210b1161759958390a861b1733c65a6d04ac6b0ffe2f1e42"].into(), - // kAKZvAs9YpXMbZLNqrbu4rnqWDPVDEVVsDc6ngKtemEbqmQSk - hex!["6ae25829700ff7251861ac4a97235070b3e6e0883ce54ee53aa48400aa28d905"].into(), - // kAMBhYMypx5LGfEwBKDg42mBmymXEvU8TRHwoDMyGhY74oMf8 - hex!["b268e5eee003859659258de82991ce0dc47db15c5b3d32bd050f8b02d350530e"].into(), - // kANtu5pYcZ2TcutMAaeuxYgySzT1YH7y72h77rReLki24c33J - hex!["fe110c5ece58c80fc7fb740b95776f9b640ae1c9f0842895a55d2e582e4e1076"].into(), - ] + .with_name("Dev Live") + .with_id("devel_live") + .with_chain_type(ChainType::Live) + .with_genesis_config_patch(development_genesis( + get_account_id_from_seed::("Alice"), + vec![( + get_account_id_from_seed::("Alice"), + get_from_seed::("Alice"), + )], + endowed_accounts(), + endowed_evm_accounts(), + Some(10000000 * CFG), + para_id, + )) + .with_properties(properties) + .build() } fn endowed_accounts() -> Vec { @@ -328,7 +262,7 @@ fn endowed_evm_accounts() -> Vec<([u8; 20], Option)> { } fn council_members_bootstrap() -> Vec { - endowed_accounts().into_iter().take(4).collect() + endowed_accounts().into_iter().take(4).collect::>() } fn centrifuge_genesis( @@ -338,7 +272,7 @@ fn centrifuge_genesis( total_issuance: Option, id: ParaId, council_members: Vec, -) -> centrifuge_runtime::RuntimeGenesisConfig { +) -> serde_json::Value { let chain_id: u32 = id.into(); endowed_accounts.extend(endowed_evm_accounts.into_iter().map(|(addr, id)| { @@ -356,57 +290,35 @@ fn centrifuge_genesis( .iter() .cloned() .map(|k| (k, balance_per_endowed)) - .collect() + .collect::>() } None => vec![], }; - centrifuge_runtime::RuntimeGenesisConfig { - system: centrifuge_runtime::SystemConfig { - code: centrifuge_runtime::WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - ..Default::default() - }, - balances: centrifuge_runtime::BalancesConfig { balances }, - orml_asset_registry: Default::default(), - orml_tokens: centrifuge_runtime::OrmlTokensConfig { balances: vec![] }, - elections: centrifuge_runtime::ElectionsConfig { members: vec![] }, - council: centrifuge_runtime::CouncilConfig { - members: council_members, - phantom: Default::default(), + serde_json::json!({ + "balances": { "balances": balances }, + "council": { + "members": council_members, }, - fees: centrifuge_runtime::FeesConfig { - initial_fees: vec![( - // Anchoring state rent fee per day - // pre-image: 0xdb4faa73ca6d2016e53c7156087c176b79b169c409b8a0063a07964f3187f9e9 - // hash : 0x11da6d1f761ddf9bdb4c9d6e5303ebd41f61858d0a5647a1a7bfe089bf921be9 + "fees": { + "initialFees": vec![( FeeKey::AnchorsCommit, - // Daily state rent, defined such that it will amount to 0.00259.. RAD - // (2_590_000_000_000_040) over 3 years, which is the expected average anchor - // duration. The other fee components for anchors amount to about 0.00041.. RAD - // (410_000_000_000_000), such that the total anchor price for 3 years will be - // 0.003.. RAD - 2_365_296_803_653, + 2_365_296_803_653u128, )], }, - vesting: Default::default(), - parachain_info: centrifuge_runtime::ParachainInfoConfig { - parachain_id: id, - ..Default::default() + "parachainInfo": { + "parachainId": id, }, - collator_selection: centrifuge_runtime::CollatorSelectionConfig { - invulnerables: initial_authorities + "collatorSelection": { + "invulnerables": initial_authorities .iter() .cloned() .map(|(acc, _)| acc) - .collect(), - candidacy_bond: 1 * CFG, - ..Default::default() + .collect::>(), + "candidacyBond": 1 * CFG, }, - collator_allowlist: Default::default(), - session: centrifuge_runtime::SessionConfig { - keys: initial_authorities + "session": { + "keys": initial_authorities .iter() .cloned() .map(|(acc, aura)| { @@ -416,59 +328,41 @@ fn centrifuge_genesis( get_centrifuge_session_keys(aura), // session keys ) }) - .collect(), + .collect::>(), }, - aura_ext: Default::default(), - aura: Default::default(), - democracy: Default::default(), - parachain_system: Default::default(), - bridge: centrifuge_runtime::BridgeConfig { - // Whitelist chains Ethereum - 0 - chains: vec![0], - // Register resourceIDs - resources: vec![ - // xCFG ResourceID to PalletBridge.transfer method (for incoming txs) + "bridge": { + "chains": vec![0], + "resources": vec![ ( hex!["00000000000000000000000000000009e974040e705c10fb4de576d6cc261900"], hex!["50616c6c65744272696467652e7472616e73666572"].to_vec(), ), ], - // Dev Alice - 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY - // Sample Endowed1 - 5GVimUaccBq1XbjZ99Zmm8aytG6HaPCjkZGKSHC1vgrsQsLQ - relayers: vec![ - hex!["d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d"].into(), - hex!["c405224448dcd4259816b09cfedbd8df0e6796b16286ea18efa2d6343da5992e"].into(), + "relayers": vec![ + Into::::into(hex!["d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d"]), + Into::::into(hex!["c405224448dcd4259816b09cfedbd8df0e6796b16286ea18efa2d6343da5992e"]), ], - threshold: 1, + "threshold": 1, }, - treasury: Default::default(), - block_rewards: centrifuge_runtime::BlockRewardsConfig { - collators: initial_authorities + "blockRewards": { + "collators": initial_authorities .iter() .cloned() .map(|(acc, _)| acc) - .collect(), - collator_reward: 8_325 * MILLI_CFG, - treasury_inflation_rate: Rate::saturating_from_rational(3, 100), - last_update: Default::default(), + .collect::>(), + "collatorReward": 8_325 * MILLI_CFG, + "treasuryInflationRate": Rate::saturating_from_rational(3, 100), }, - block_rewards_base: Default::default(), - base_fee: Default::default(), - evm_chain_id: centrifuge_runtime::EVMChainIdConfig { - chain_id: chain_id.into(), - ..Default::default() + "evmChainId": { + "chainId": Into::::into(chain_id), }, - ethereum: Default::default(), - evm: centrifuge_runtime::EVMConfig { - accounts: precompile_account_genesis::(), - ..Default::default() + "evm": { + "accounts": precompile_account_genesis::(), }, - liquidity_rewards_base: Default::default(), - polkadot_xcm: centrifuge_runtime::PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - ..Default::default() + "polkadotXcm": { + "safeXcmVersion": Some(SAFE_XCM_VERSION), }, - } + }) } fn altair_genesis( @@ -478,7 +372,7 @@ fn altair_genesis( total_issuance: Option, id: ParaId, council_members: Vec, -) -> altair_runtime::RuntimeGenesisConfig { +) -> serde_json::Value { let chain_id: u32 = id.into(); endowed_accounts.extend(endowed_evm_accounts.into_iter().map(|(addr, id)| { @@ -496,29 +390,18 @@ fn altair_genesis( .iter() .cloned() .map(|k| (k, balance_per_endowed)) - .collect() + .collect::>() } None => vec![], }; - altair_runtime::RuntimeGenesisConfig { - system: altair_runtime::SystemConfig { - code: altair_runtime::WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - ..Default::default() - }, - balances: altair_runtime::BalancesConfig { balances }, - orml_asset_registry: Default::default(), - orml_tokens: altair_runtime::OrmlTokensConfig { balances: vec![] }, - elections: altair_runtime::ElectionsConfig { members: vec![] }, - council: altair_runtime::CouncilConfig { - members: council_members, - phantom: Default::default(), + serde_json::json!({ + "balances": { "balances": balances }, + "council": { + "members": council_members, }, - - fees: altair_runtime::FeesConfig { - initial_fees: vec![( + "fees": { + "initialFees": vec![( // Anchoring state rent fee per day // pre-image: 0xdb4faa73ca6d2016e53c7156087c176b79b169c409b8a0063a07964f3187f9e9 // hash : 0x11da6d1f761ddf9bdb4c9d6e5303ebd41f61858d0a5647a1a7bfe089bf921be9 @@ -528,37 +411,31 @@ fn altair_genesis( // duration. The other fee components for anchors amount to about 0.00041.. RAD // (410_000_000_000_000), such that the total anchor price for 3 years will be // 0.003.. RAD - 2_365_296_803_653, + 2_365_296_803_653u128, )], }, - vesting: Default::default(), - parachain_info: altair_runtime::ParachainInfoConfig { - parachain_id: id, - ..Default::default() + "parachainInfo": { + "parachainId": id, }, - collator_selection: altair_runtime::CollatorSelectionConfig { - invulnerables: initial_authorities + "collatorSelection": { + "invulnerables": initial_authorities .iter() .cloned() .map(|(acc, _)| acc) - .collect(), - candidacy_bond: 1 * AIR, - ..Default::default() + .collect::>(), + "candidacyBond": 1 * AIR, }, - block_rewards: altair_runtime::BlockRewardsConfig { - collators: initial_authorities + "blockRewards": { + "collators": initial_authorities .iter() .cloned() .map(|(acc, _)| acc) - .collect(), - collator_reward: 98_630 * MILLI_AIR, - treasury_inflation_rate: Rate::saturating_from_rational(3, 100), - last_update: Default::default(), + .collect::>(), + "collatorReward": 98_630 * MILLI_AIR, + "treasuryInflationRate": Rate::saturating_from_rational(3, 100), }, - block_rewards_base: Default::default(), - collator_allowlist: Default::default(), - session: altair_runtime::SessionConfig { - keys: initial_authorities + "session": { + "keys": initial_authorities .iter() .cloned() .map(|(acc, aura)| { @@ -568,29 +445,18 @@ fn altair_genesis( get_altair_session_keys(aura), // session keys ) }) - .collect(), + .collect::>(), }, - aura_ext: Default::default(), - aura: Default::default(), - democracy: Default::default(), - parachain_system: Default::default(), - treasury: Default::default(), - base_fee: Default::default(), - evm_chain_id: altair_runtime::EVMChainIdConfig { - chain_id: chain_id.into(), - ..Default::default() + "evmChainId": { + "chainId": Into::::into(chain_id), }, - ethereum: Default::default(), - evm: altair_runtime::EVMConfig { - accounts: precompile_account_genesis::(), - ..Default::default() + "evm": { + "accounts": precompile_account_genesis::(), }, - liquidity_rewards_base: Default::default(), - polkadot_xcm: altair_runtime::PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - ..Default::default() + "polkadotXcm": { + "safeXcmVersion": Some(SAFE_XCM_VERSION), }, - } + }) } /// The CurrencyId for the USDT asset on the development runtime @@ -604,7 +470,7 @@ fn development_genesis( endowed_evm_accounts: Vec<([u8; 20], Option)>, total_issuance: Option, id: ParaId, -) -> development_runtime::RuntimeGenesisConfig { +) -> serde_json::Value { let chain_id: u32 = id.into(); endowed_accounts.extend(endowed_evm_accounts.into_iter().map(|(addr, id)| { @@ -625,7 +491,7 @@ fn development_genesis( .iter() .cloned() .map(|x| (x, balance_per_endowed)) - .collect(), + .collect::>(), // orml_tokens balances // bootstrap each endowed accounts with 1 million of each the foreign assets. endowed_accounts @@ -635,88 +501,72 @@ fn development_genesis( // NOTE: We can only mint these foreign assets on development vec![ // USDT is a 6-decimal asset, so 1 million + 6 zeros - (x.clone(), DEV_USDT_CURRENCY_ID, 1_000_000_000_000), + (x.clone(), DEV_USDT_CURRENCY_ID, 1_000_000_000_000u128), // AUSD is a 12-decimal asset, so 1 million + 12 zeros - (x, DEV_AUSD_CURRENCY_ID, 1_000_000_000_000_000_000), + (x, DEV_AUSD_CURRENCY_ID, 1_000_000_000_000_000_000u128), ] }) - .collect(), + .collect::>(), ) } None => (vec![], vec![]), }; let chain_id: u32 = id.into(); - development_runtime::RuntimeGenesisConfig { - system: development_runtime::SystemConfig { - code: development_runtime::WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - ..Default::default() - }, - balances: development_runtime::BalancesConfig { balances }, - orml_asset_registry: development_runtime::OrmlAssetRegistryConfig { - assets: asset_registry_assets(), - last_asset_id: Default::default(), - }, - orml_tokens: development_runtime::OrmlTokensConfig { - balances: token_balances, + serde_json::json!({ + "balances": { "balances": balances }, + "ormlAssetRegistry": { + "assets": asset_registry_assets(), }, - elections: development_runtime::ElectionsConfig { members: vec![] }, - council: development_runtime::CouncilConfig { - members: Default::default(), - phantom: Default::default(), + "ormlTokens": { + "balances": token_balances, }, - fees: development_runtime::FeesConfig { - initial_fees: vec![( + "fees": { + "initialFees": vec![( // Anchoring state rent fee per day - // pre-image: 0xdb4faa73ca6d2016e53c7156087c176b79b169c409b8a0063a07964f3187f9e9 - // hash : 0x11da6d1f761ddf9bdb4c9d6e5303ebd41f61858d0a5647a1a7bfe089bf921be9 + // pre-"image": 0xdb4faa73ca6d2016e53c7156087c176b79b169c409b8a0063a07964f3187f9e9 + // "hash ": 0x11da6d1f761ddf9bdb4c9d6e5303ebd41f61858d0a5647a1a7bfe089bf921be9 FeeKey::AnchorsCommit, // Daily state rent, defined such that it will amount to 0.00259.. RAD // (2_590_000_000_000_040) over 3 years, which is the expected average anchor // duration. The other fee components for anchors amount to about 0.00041.. RAD // (410_000_000_000_000), such that the total anchor price for 3 years will be // 0.003.. RAD - 2_365_296_803_653, + 2_365_296_803_653u128, )], }, - vesting: Default::default(), - sudo: development_runtime::SudoConfig { - key: Some(root_key), + "sudo": { + "key": Some(root_key), }, - parachain_info: development_runtime::ParachainInfoConfig { - parachain_id: id, - ..Default::default() + "parachainInfo": { + "parachainId": id, }, - collator_selection: development_runtime::CollatorSelectionConfig { - invulnerables: initial_authorities + "collatorSelection": { + "invulnerables": initial_authorities .iter() .cloned() .map(|(acc, _)| acc) - .collect(), - candidacy_bond: 1 * CFG, - ..Default::default() + .collect::>(), + "candidacyBond": 1 * CFG, }, - collator_allowlist: Default::default(), - session: development_runtime::SessionConfig { - keys: initial_authorities + "session": { + "keys": initial_authorities .iter() .cloned() .map(|(acc, aura)| { ( acc.clone(), // account id - acc, // validator id + acc, // validator id get_development_session_keys(aura), // session keys ) }) - .collect(), + .collect::>(), }, - bridge: development_runtime::BridgeConfig { + "bridge": { // Whitelist chains Ethereum - 0 - chains: vec![0], + "chains": vec![0], // Register resourceIDs - resources: vec![ + "resources": vec![ // xCFG ResourceID to PalletBridge.transfer method (for incoming txs) ( hex!["00000000000000000000000000000009e974040e705c10fb4de576d6cc261900"], @@ -725,44 +575,31 @@ fn development_genesis( ], // Dev Alice - 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY // Sample Endowed1 - 5GVimUaccBq1XbjZ99Zmm8aytG6HaPCjkZGKSHC1vgrsQsLQ - relayers: vec![ - hex!["d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d"].into(), - hex!["c405224448dcd4259816b09cfedbd8df0e6796b16286ea18efa2d6343da5992e"].into(), + "relayers": vec![ + Into::::into(hex!["d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d"]), + Into::::into(hex!["c405224448dcd4259816b09cfedbd8df0e6796b16286ea18efa2d6343da5992e"]), ], - threshold: 1, + "threshold": 1, }, - aura_ext: Default::default(), - aura: Default::default(), - democracy: Default::default(), - parachain_system: Default::default(), - treasury: Default::default(), - block_rewards: development_runtime::BlockRewardsConfig { - collators: initial_authorities + "blockRewards": { + "collators": initial_authorities .iter() .cloned() .map(|(acc, _)| acc) - .collect(), - collator_reward: 8_325 * MILLI_CFG, - treasury_inflation_rate: Rate::saturating_from_rational(3, 100), - last_update: Default::default(), + .collect::>(), + "collatorReward": 8_325 * MILLI_CFG, + "treasuryInflationRate": Rate::saturating_from_rational(3, 100), }, - base_fee: Default::default(), - evm_chain_id: development_runtime::EVMChainIdConfig { - chain_id: chain_id.into(), - ..Default::default() + "evmChainId": { + "chainId": Into::::into(chain_id), }, - ethereum: Default::default(), - evm: development_runtime::EVMConfig { - accounts: precompile_account_genesis::(), - ..Default::default() + "evm": { + "accounts": precompile_account_genesis::(), }, - block_rewards_base: Default::default(), - liquidity_rewards_base: Default::default(), - polkadot_xcm: development_runtime::PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - ..Default::default() + "polkadotXcm": { + "safeXcmVersion": Some(SAFE_XCM_VERSION), }, - } + }) } fn asset_registry_assets() -> Vec<(CurrencyId, Vec)> { @@ -777,14 +614,14 @@ fn asset_registry_assets() -> Vec<(CurrencyId, Vec)> { .expect("fit in the BoundedVec"), symbol: b"USDT".to_vec().try_into().expect("fit in the BoundedVec"), existential_deposit: 0u128, - location: Some(staging_xcm::VersionedMultiLocation::V3(MultiLocation { - parents: 1, - interior: X3( + location: Some(staging_xcm::VersionedLocation::V4(Location::new( + 1, + [ Parachain(parachains::rococo::rocksmine::ID), PalletInstance(parachains::rococo::rocksmine::usdt::PALLET_INSTANCE), GeneralIndex(parachains::rococo::rocksmine::usdt::GENERAL_INDEX), - ), - })), + ], + ))), additional: CustomMetadata { mintable: false, permissioned: false, @@ -805,16 +642,16 @@ fn asset_registry_assets() -> Vec<(CurrencyId, Vec)> { .expect("fit in the BoundedVec"), symbol: b"AUSD".to_vec().try_into().expect("fit in the BoundedVec"), existential_deposit: 0u128, - location: Some(staging_xcm::VersionedMultiLocation::V3(MultiLocation { - parents: 1, - interior: X2( + location: Some(staging_xcm::VersionedLocation::V4(Location::new( + 1, + [ Parachain(parachains::rococo::acala::ID), GeneralKey { length: parachains::rococo::acala::AUSD_KEY.to_vec().len() as u8, data: vec_to_fixed_array(parachains::rococo::acala::AUSD_KEY.to_vec()), }, - ), - })), + ], + ))), additional: CustomMetadata { mintable: false, permissioned: false, @@ -862,9 +699,9 @@ fn asset_registry_assets() -> Vec<(CurrencyId, Vec)> { .try_into() .expect("fit in the BoundedVec"), existential_deposit: usdc::EXISTENTIAL_DEPOSIT, - location: Some(staging_xcm::VersionedMultiLocation::V3(MultiLocation { - parents: 0, - interior: staging_xcm::v3::Junctions::X3( + location: Some(staging_xcm::VersionedLocation::V4(Location::new( + 0, + [ PalletInstance(development_runtime::LiquidityPoolsPalletIndex::get()), GlobalConsensus(NetworkId::Ethereum { chain_id: usdc::CHAIN_ID_ETH_GOERLI_TESTNET, @@ -873,8 +710,8 @@ fn asset_registry_assets() -> Vec<(CurrencyId, Vec)> { network: None, key: usdc::CONTRACT_ETH_GOERLI, }, - ), - })), + ], + ))), additional: CustomMetadata { transferability: CrossChainTransferability::LiquidityPools, mintable: false, diff --git a/node/src/cli.rs b/node/src/cli.rs index 2e8249072e..14cc189bbd 100644 --- a/node/src/cli.rs +++ b/node/src/cli.rs @@ -23,8 +23,8 @@ use crate::{chain_spec, service::evm::EthConfiguration}; #[derive(Debug, Parser)] #[allow(clippy::large_enum_variant)] pub enum Subcommand { - /// Export the genesis state of the parachain. - ExportGenesisState(cumulus_client_cli::ExportGenesisStateCommand), + /// Export the genesis head of the parachain. + ExportGenesisHead(cumulus_client_cli::ExportGenesisHeadCommand), /// Export the genesis wasm of the parachain. ExportGenesisWasm(cumulus_client_cli::ExportGenesisWasmCommand), diff --git a/node/src/command.rs b/node/src/command.rs index 2e114a9f5d..15803399c7 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -67,10 +67,9 @@ fn load_spec(id: &str) -> std::result::Result, St "altair" => Ok(Box::new(chain_spec::altair_config())), "altair-local" => Ok(Box::new(chain_spec::altair_local(LOCAL_PARA_ID))), "catalyst" => Ok(Box::new(chain_spec::catalyst_config())), - "demo" => Ok(Box::new(chain_spec::demo(LOCAL_PARA_ID))), + "demo" => Ok(Box::new(chain_spec::demo_config())), "development" => Ok(Box::new(chain_spec::development(LOCAL_PARA_ID))), "" => Err(String::from("No Chain-id provided")), - path => { let chain_spec = chain_spec::CentrifugeChainSpec::from_json_file(path.into())?; Ok(match chain_spec.identify() { @@ -169,7 +168,7 @@ macro_rules! construct_async_run { let $components = evm::new_partial::( &$config, first_evm_block, - crate::service::build_altair_import_queue, + crate::service::build_import_queue:: )?; let task_manager = $components.task_manager; { $( $code )* }.map(|v| (v, task_manager)) @@ -178,7 +177,7 @@ macro_rules! construct_async_run { let $components = evm::new_partial::( &$config, first_evm_block, - crate::service::build_centrifuge_import_queue, + crate::service::build_import_queue::, )?; let task_manager = $components.task_manager; { $( $code )* }.map(|v| (v, task_manager)) @@ -187,11 +186,11 @@ macro_rules! construct_async_run { let $components = evm::new_partial::( &$config, first_evm_block, - crate::service::build_development_import_queue, + crate::service::build_import_queue::, )?; let task_manager = $components.task_manager; { $( $code )* }.map(|v| (v, task_manager)) - }) + }), } }} } @@ -253,9 +252,9 @@ pub fn run() -> Result<()> { }); Ok(cmd.run(components.client, components.backend, Some(aux_revert))) }), - Some(Subcommand::ExportGenesisState(cmd)) => { + Some(Subcommand::ExportGenesisHead(cmd)) => { construct_async_run!(|components, cli, cmd, config| { - Ok(async move { cmd.run(&*config.chain_spec, &*components.client) }) + Ok(async move { cmd.run(components.client) }) }) } Some(Subcommand::ExportGenesisWasm(cmd)) => { @@ -352,7 +351,10 @@ pub fn run() -> Result<()> { ); match config.chain_spec.identify() { - ChainIdentity::Altair => crate::service::start_altair_node( + ChainIdentity::Altair => crate::service::start_node::< + altair_runtime::RuntimeApi, + AltairRuntimeExecutor, + >( config, polkadot_config, cli.eth, @@ -364,7 +366,10 @@ pub fn run() -> Result<()> { .await .map(|r| r.0) .map_err(Into::into), - ChainIdentity::Centrifuge => crate::service::start_centrifuge_node( + ChainIdentity::Centrifuge => crate::service::start_node::< + centrifuge_runtime::RuntimeApi, + CentrifugeRuntimeExecutor, + >( config, polkadot_config, cli.eth, @@ -376,7 +381,10 @@ pub fn run() -> Result<()> { .await .map(|r| r.0) .map_err(Into::into), - ChainIdentity::Development => crate::service::start_development_node( + ChainIdentity::Development => crate::service::start_node::< + development_runtime::RuntimeApi, + DevelopmentRuntimeExecutor, + >( config, polkadot_config, cli.eth, diff --git a/node/src/rpc/anchors.rs b/node/src/rpc/anchors.rs index 9f8d449936..7f37688479 100644 --- a/node/src/rpc/anchors.rs +++ b/node/src/rpc/anchors.rs @@ -1,5 +1,6 @@ use std::sync::Arc; +use async_trait::async_trait; use cfg_primitives::BlockNumber; use jsonrpsee::{core::RpcResult, proc_macros::rpc}; use pallet_anchors::AnchorData; @@ -14,7 +15,7 @@ use crate::rpc::invalid_params_error; pub trait AnchorApi { /// Returns an anchor given an anchor id from the runtime storage #[method(name = "anchor_getAnchorById")] - fn get_anchor_by_id( + async fn get_anchor_by_id( &self, id: IdHash, at: Option, @@ -37,13 +38,14 @@ impl Anchors { } } +#[async_trait] impl AnchorApiServer for Anchors where Block: BlockT, C: Send + Sync + 'static + ProvideRuntimeApi + HeaderBackend, C::Api: AnchorRuntimeApi, { - fn get_anchor_by_id( + async fn get_anchor_by_id( &self, id: cfg_primitives::Hash, at: Option, diff --git a/node/src/rpc/evm.rs b/node/src/rpc/evm.rs index e95886d3c1..cc34d4e2e8 100644 --- a/node/src/rpc/evm.rs +++ b/node/src/rpc/evm.rs @@ -12,7 +12,7 @@ use std::{collections::BTreeMap, sync::Arc}; -use fc_rpc::pending::AuraConsensusDataProvider; +use fc_rpc::pending; pub use fc_rpc::{ EthBlockDataCacheTask, OverrideHandle, RuntimeApiStorageOverride, SchemaV1Override, SchemaV2Override, SchemaV3Override, StorageOverride, @@ -39,8 +39,26 @@ use sp_core::H256; use sp_inherents::CreateInherentDataProviders; use sp_runtime::traits::{BlakeTwo256, Block as BlockT}; +pub struct CentrifugeEthConfig(std::marker::PhantomData<(B, C, BE)>); +impl fc_rpc::EthConfig for CentrifugeEthConfig +where + B: BlockT, + C: sc_client_api::StorageProvider + Sync + Send + 'static, + BE: Backend + 'static, +{ + // This type is intended to override (i.e. adapt) evm calls to precompiles for + // proper gas estimation. + // + // NOTE: Not used by our precompiles right now. Therefore, no need to provide + // impl. + type EstimateGasAdapter = (); + // Assumes the use of HashedMapping for address mapping + type RuntimeStorageOverride = + fc_rpc::frontier_backend_client::SystemAccountId32StorageOverride; +} + /// Extra dependencies for Ethereum compatibility. -pub struct Deps { +pub struct EvmDeps { /// The client instance to use. pub client: Arc, /// Transaction pool instance. @@ -58,7 +76,7 @@ pub struct Deps { /// Chain syncing service pub sync: Arc>, /// Frontier Backend. - pub frontier_backend: Arc + Send + Sync>, + pub frontier_backend: Arc>, /// Ethereum data access overrides. pub overrides: Arc>, /// Cache for Ethereum block data. @@ -78,6 +96,8 @@ pub struct Deps { pub forced_parent_hashes: Option>, /// Something that can create the inherent data providers for pending state pub pending_create_inherent_data_providers: CIDP, + /// Something that can create the consensus data providers for pending state + pub pending_consensus_data_provider: Option>>, } pub fn overrides_handle, C, BE>(client: Arc) -> Arc> @@ -113,7 +133,7 @@ where pub fn create( mut io: RpcModule<()>, - deps: Deps, + deps: EvmDeps, subscription_task_executor: SubscriptionTaskExecutor, pubsub_notification_sinks: Arc< fc_mapping_sync::EthereumBlockNotificationSinks< @@ -149,25 +169,26 @@ where EthPubSubApiServer, EthSigner, Net, NetApiServer, Web3, Web3ApiServer, }; - let Deps { + let EvmDeps { client, pool, graph, converter: _converter, + sync, is_authority, enable_dev_signer, network, - sync, - frontier_backend, overrides, + frontier_backend, block_data_cache, - filter_pool, - max_past_logs, fee_history_cache, fee_history_cache_limit, execute_gas_limit_multiplier, + filter_pool, + max_past_logs, forced_parent_hashes, pending_create_inherent_data_providers, + pending_consensus_data_provider, } = deps; let mut signers = Vec::new(); @@ -187,7 +208,7 @@ where let convert_transaction: Option = None; io.merge( - Eth::new( + Eth::<_, _, _, _, _, _, _, ()>::new( Arc::clone(&client), Arc::clone(&pool), graph.clone(), @@ -203,8 +224,9 @@ where execute_gas_limit_multiplier, forced_parent_hashes, pending_create_inherent_data_providers, - Some(Box::new(AuraConsensusDataProvider::new(client.clone()))), + pending_consensus_data_provider, ) + .replace_config::>() .into_rpc(), )?; diff --git a/node/src/rpc/mod.rs b/node/src/rpc/mod.rs index 9c05615cce..ddd8f3495c 100644 --- a/node/src/rpc/mod.rs +++ b/node/src/rpc/mod.rs @@ -12,14 +12,12 @@ //! Centrifuge RPC endpoints (common endpoints across all environments) -use std::{fmt::Debug, sync::Arc}; +use std::sync::Arc; -use cfg_primitives::{AccountId, Balance, Nonce}; -use jsonrpsee::{ - core::Error as JsonRpseeError, - types::error::{CallError, ErrorCode, ErrorObject}, -}; +use cfg_primitives::{AccountId, Balance, Block, BlockNumber, Hash, Nonce}; +use jsonrpsee::types::error::{ErrorCode, ErrorObject}; use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; +use runtime_common::apis::AnchorApi; use sc_rpc_api::DenyUnsafe; use sc_service::TransactionPool; use sp_api::ProvideRuntimeApi; @@ -27,60 +25,42 @@ use sp_block_builder::BlockBuilder; use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; use substrate_frame_rpc_system::{System, SystemApiServer}; +use crate::rpc::anchors::{AnchorApiServer, Anchors}; + pub mod anchors; pub mod evm; -pub mod pools; -pub mod rewards; /// A type representing all RPC extensions. pub type RpcExtension = jsonrpsee::RpcModule<()>; /// Instantiate all Full RPC extensions. -pub fn create_full( +pub fn create_full( client: Arc, pool: Arc

, deny_unsafe: DenyUnsafe, ) -> Result> where - Block: sp_api::BlockT, - C: ProvideRuntimeApi, - C: HeaderBackend + HeaderMetadata, - C: Send + Sync + 'static, - C::Api: substrate_frame_rpc_system::AccountNonceApi, + C: ProvideRuntimeApi + + HeaderBackend + + HeaderMetadata + + Send + + Sync + + 'static, C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi, + C::Api: substrate_frame_rpc_system::AccountNonceApi, C::Api: BlockBuilder, + C::Api: AnchorApi, P: TransactionPool + Sync + Send + 'static, { let mut module = RpcExtension::new(()); module.merge(System::new(client.clone(), pool, deny_unsafe).into_rpc())?; - module.merge(TransactionPayment::new(client).into_rpc())?; + module.merge(TransactionPayment::new(client.clone()).into_rpc())?; + module.merge(Anchors::new(client.clone()).into_rpc())?; Ok(module) } -/// Our custom error type for RPC server errors -#[repr(i32)] -pub enum CustomServerError { - /// The call failed on the Runtime level - RuntimeError = 1, -} - -pub fn runtime_error( - message: &'static str, - inner_error: InnerError, -) -> JsonRpseeError { - JsonRpseeError::Call(CallError::Custom(ErrorObject::owned( - ErrorCode::ServerError(CustomServerError::RuntimeError as i32).code(), - message, - Some(format!("{inner_error:?}")), - ))) -} - -pub fn invalid_params_error(msg: &'static str) -> JsonRpseeError { - JsonRpseeError::Call(CallError::Custom(ErrorObject::owned( - ErrorCode::InvalidParams.code(), - msg, - Option::<()>::None, - ))) +pub fn invalid_params_error(msg: &'static str) -> ErrorObject { + ErrorObject::owned(ErrorCode::InvalidParams.code(), msg, Option::<()>::None) } diff --git a/node/src/rpc/pools.rs b/node/src/rpc/pools.rs deleted file mode 100644 index f411486357..0000000000 --- a/node/src/rpc/pools.rs +++ /dev/null @@ -1,202 +0,0 @@ -use std::{fmt::Debug, sync::Arc}; - -use jsonrpsee::{core::RpcResult, proc_macros::rpc}; -use pallet_pool_system::{ - tranches::{TrancheIndex, TrancheLoc, TrancheSolution}, - EpochSolution, -}; -use parity_scale_codec::Codec; -use runtime_common::apis::PoolsApi as PoolsRuntimeApi; -use sp_api::ProvideRuntimeApi; -use sp_blockchain::HeaderBackend; -use sp_runtime::traits::{Block as BlockT, Get}; - -use crate::rpc::{invalid_params_error, runtime_error}; - -#[rpc(client, server)] -pub trait PoolsApi -where - MaxTranches: Get, -{ - #[method(name = "pools_currency")] - fn currency(&self, poold_id: PoolId, at: Option) -> RpcResult; - - #[method(name = "pools_inspectEpochSolution")] - fn inspect_epoch_solution( - &self, - pool_id: PoolId, - solution: Vec, - at: Option, - ) -> RpcResult>; - - #[method(name = "pools_trancheTokenPrice")] - fn tranche_token_price( - &self, - pool_id: PoolId, - tranche: TrancheId, - at: Option, - ) -> RpcResult; - - #[method(name = "pools_trancheTokenPrices")] - fn tranche_token_prices( - &self, - pool_id: PoolId, - at: Option, - ) -> RpcResult>; - - #[method(name = "pools_trancheIds")] - fn tranche_ids(&self, pool_id: PoolId, at: Option) -> RpcResult>; - - #[method(name = "pools_trancheId")] - fn tranche_id( - &self, - pool_id: PoolId, - tranche_index: TrancheIndex, - at: Option, - ) -> RpcResult; - - #[method(name = "pools_trancheCurrency")] - fn tranche_currency( - &self, - pool_id: PoolId, - tranche_id: TrancheId, - at: Option, - ) -> RpcResult; -} - -pub struct Pools { - client: Arc, - _marker: std::marker::PhantomData

, -} - -impl Pools { - pub fn new(client: Arc) -> Self { - Pools { - client, - _marker: Default::default(), - } - } -} - -impl - PoolsApiServer - for Pools -where - Block: BlockT, - C: Send + Sync + 'static + ProvideRuntimeApi + HeaderBackend, - C::Api: PoolsRuntimeApi, - Balance: Codec + Copy, - PoolId: Codec + Copy + Debug, - TrancheId: Codec + Clone + Debug, - Currency: Codec, - BalanceRatio: Codec, - MaxTranches: Codec + Get, -{ - fn currency(&self, pool_id: PoolId, at: Option) -> RpcResult { - let api = self.client.runtime_api(); - let at = match at { - Some(hash) => hash, - None => self.client.info().best_hash, - }; - - api.currency(at, pool_id) - .map_err(|e| runtime_error("Unable to query pool currency", e))? - .ok_or_else(|| invalid_params_error("Pool not found")) - } - - fn inspect_epoch_solution( - &self, - pool_id: PoolId, - solution: Vec, - at: Option, - ) -> RpcResult> { - let api = self.client.runtime_api(); - let at = match at { - Some(hash) => hash, - None => self.client.info().best_hash, - }; - - api.inspect_epoch_solution(at, pool_id, solution) - .map_err(|e| runtime_error("Unable to query inspection for epoch solution", e))? - .ok_or_else(|| invalid_params_error("Pool not found or invalid solution")) - } - - fn tranche_token_price( - &self, - pool_id: PoolId, - tranche_id: TrancheId, - at: Option, - ) -> RpcResult { - let api = self.client.runtime_api(); - let at = match at { - Some(hash) => hash, - None => self.client.info().best_hash, - }; - - api.tranche_token_price(at, pool_id, TrancheLoc::Id(tranche_id)) - .map_err(|e| runtime_error("Unable to query tranche token price", e))? - .ok_or_else(|| invalid_params_error("Pool or tranche not found")) - } - - fn tranche_token_prices( - &self, - pool_id: PoolId, - at: Option, - ) -> RpcResult> { - let api = self.client.runtime_api(); - let at = match at { - Some(hash) => hash, - None => self.client.info().best_hash, - }; - - api.tranche_token_prices(at, pool_id) - .map_err(|e| runtime_error("Unable to query tranche token prices.", e))? - .ok_or_else(|| invalid_params_error("Pool not found.")) - } - - fn tranche_ids(&self, pool_id: PoolId, at: Option) -> RpcResult> { - let api = self.client.runtime_api(); - let at = match at { - Some(hash) => hash, - None => self.client.info().best_hash, - }; - - api.tranche_ids(at, pool_id) - .map_err(|e| runtime_error("Unable to query tranche ids.", e))? - .ok_or_else(|| invalid_params_error("Pool not found")) - } - - fn tranche_id( - &self, - pool_id: PoolId, - tranche_index: TrancheIndex, - at: Option, - ) -> RpcResult { - let api = self.client.runtime_api(); - let at = match at { - Some(hash) => hash, - None => self.client.info().best_hash, - }; - - api.tranche_id(at, pool_id, tranche_index) - .map_err(|e| runtime_error("Unable to query tranche ids.", e))? - .ok_or_else(|| invalid_params_error("Pool or tranche not found.")) - } - - fn tranche_currency( - &self, - pool_id: PoolId, - tranche_id: TrancheId, - at: Option, - ) -> RpcResult { - let api = self.client.runtime_api(); - let at = match at { - Some(hash) => hash, - None => self.client.info().best_hash, - }; - - api.tranche_currency(at, pool_id, TrancheLoc::Id(tranche_id)) - .map_err(|e| runtime_error("Unable to query tranche currency.", e))? - .ok_or_else(|| invalid_params_error("Pool or tranche not found.")) - } -} diff --git a/node/src/rpc/rewards.rs b/node/src/rpc/rewards.rs deleted file mode 100644 index 038b601640..0000000000 --- a/node/src/rpc/rewards.rs +++ /dev/null @@ -1,91 +0,0 @@ -use std::{fmt::Debug, sync::Arc}; - -use jsonrpsee::{core::RpcResult, proc_macros::rpc}; -use parity_scale_codec::Codec; -use runtime_common::apis::{RewardDomain, RewardsApi as RewardsRuntimeApi}; -use sp_api::ProvideRuntimeApi; -use sp_blockchain::HeaderBackend; -use sp_runtime::traits::Block as BlockT; - -use crate::rpc::{invalid_params_error, runtime_error}; - -#[rpc(client, server)] -pub trait RewardsApi { - #[method(name = "rewards_listCurrencies")] - fn list_currencies( - &self, - domain: RewardDomain, - account_id: AccountId, - at: Option, - ) -> RpcResult>; - - #[method(name = "rewards_computeReward")] - fn compute_reward( - &self, - domain: RewardDomain, - currency_id: CurrencyId, - account_id: AccountId, - at: Option, - ) -> RpcResult; -} - -pub struct Rewards { - client: Arc, - _marker: std::marker::PhantomData

, -} - -impl Rewards { - pub fn new(client: Arc) -> Self { - Rewards { - client, - _marker: Default::default(), - } - } -} - -impl - RewardsApiServer for Rewards -where - Block: BlockT, - C: Send + Sync + 'static + ProvideRuntimeApi + HeaderBackend, - C::Api: RewardsRuntimeApi, - AccountId: Codec, - Balance: Codec + Copy, - CurrencyId: Codec + Copy + Debug, -{ - fn list_currencies( - &self, - domain: RewardDomain, - account_id: AccountId, - at: Option, - ) -> RpcResult> { - let api = self.client.runtime_api(); - - let hash = match at { - Some(hash) => hash, - None => self.client.info().best_hash, - }; - - api.list_currencies(hash, domain, account_id) - .map_err(|e| runtime_error("Unable to list currencies", e)) - } - - fn compute_reward( - &self, - domain: RewardDomain, - currency_id: CurrencyId, - account_id: AccountId, - at: Option, - ) -> RpcResult { - let api = self.client.runtime_api(); - - let at = match at { - Some(hash) => hash, - None => self.client.info().best_hash, - }; - - api.compute_reward(at, domain, currency_id, account_id) - .map_err(|e| runtime_error("Unable to compute reward", e))? - .ok_or_else(|| invalid_params_error("Reward not found")) - } -} diff --git a/node/src/service.rs b/node/src/service.rs index 21e89f2c88..428b4f9a5e 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -14,28 +14,28 @@ // You should have received a copy of the GNU General Public License // along with Cumulus. If not, see . -// TODO: Please fix deprecated issues before/during polkadot-v1.3.0 upgrade -#![allow(deprecated)] +use std::{sync::Arc, time::Duration}; -use std::sync::Arc; - -use cfg_primitives::{Block, BlockNumber}; +use cfg_primitives::{AccountId, AuraId, Balance, Block, BlockNumber, Hash, Nonce}; use cumulus_client_cli::CollatorOptions; -use cumulus_client_consensus_aura::{AuraConsensus, BuildAuraConsensusParams, SlotProportion}; +use cumulus_client_collator::service::CollatorService; use cumulus_client_consensus_common::ParachainBlockImport as TParachainBlockImport; +use cumulus_client_consensus_proposer::Proposer; use cumulus_primitives_core::ParaId; +use cumulus_relay_chain_interface::{OverseerHandle, RelayChainInterface}; use fc_db::Backend as FrontierBackend; +use fc_rpc::pending::{AuraConsensusDataProvider, ConsensusDataProvider}; +use polkadot_primitives::CollatorPair; use sc_executor::NativeElseWasmExecutor; +use sc_network_sync::SyncingService; use sc_service::{Configuration, TFullBackend, TFullClient, TaskManager}; use sc_telemetry::TelemetryHandle; +use sp_api::ConstructRuntimeApi; use sp_core::U256; +use sp_keystore::KeystorePtr; +use substrate_prometheus_endpoint::Registry; -use crate::rpc::{ - self, - anchors::{AnchorApiServer, Anchors}, - pools::{Pools, PoolsApiServer}, - rewards::{Rewards, RewardsApiServer}, -}; +use crate::rpc::{self}; pub(crate) mod evm; use evm::EthConfiguration; @@ -48,6 +48,40 @@ type FullBackend = TFullBackend; type ParachainBlockImport = TParachainBlockImport>, FullBackend>; +pub trait RuntimeApiCollection: + sp_transaction_pool::runtime_api::TaggedTransactionQueue + + sp_api::ApiExt + + sp_block_builder::BlockBuilder + + substrate_frame_rpc_system::AccountNonceApi + + pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi + + sp_api::Metadata + + sp_offchain::OffchainWorkerApi + + sp_session::SessionKeys + + fp_rpc::ConvertTransactionRuntimeApi + + fp_rpc::EthereumRuntimeRPCApi + + sp_consensus_aura::AuraApi + + runtime_common::apis::AnchorApi + + cumulus_primitives_core::CollectCollationInfo +{ +} + +impl RuntimeApiCollection for Api where + Api: sp_transaction_pool::runtime_api::TaggedTransactionQueue + + sp_api::ApiExt + + sp_block_builder::BlockBuilder + + substrate_frame_rpc_system::AccountNonceApi + + pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi + + sp_api::Metadata + + sp_offchain::OffchainWorkerApi + + sp_session::SessionKeys + + fp_rpc::ConvertTransactionRuntimeApi + + fp_rpc::EthereumRuntimeRPCApi + + sp_consensus_aura::AuraApi + + runtime_common::apis::AnchorApi + + cumulus_primitives_core::CollectCollationInfo +{ +} + // Native Altair executor instance. pub struct AltairRuntimeExecutor; @@ -111,55 +145,8 @@ impl sc_executor::NativeExecutionDispatch for DevelopmentRuntimeExecutor { } } -/// Build the import queue for the "altair" runtime. -#[allow(clippy::type_complexity)] -pub fn build_altair_import_queue( - client: Arc>, - block_import: ParachainBlockImport, - config: &Configuration, - telemetry: Option, - task_manager: &TaskManager, - frontier_backend: FrontierBackend, - first_evm_block: BlockNumber, -) -> Result, sc_service::Error> { - let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; - let block_import = evm::BlockImport::new( - block_import, - first_evm_block, - client.clone(), - Arc::new(frontier_backend), - ); - - cumulus_client_consensus_aura::import_queue::< - sp_consensus_aura::sr25519::AuthorityPair, - _, - _, - _, - _, - _, - >(cumulus_client_consensus_aura::ImportQueueParams { - block_import, - client, - create_inherent_data_providers: move |_, _| async move { - let time = sp_timestamp::InherentDataProvider::from_system_time(); - - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *time, - slot_duration, - ); - - Ok((slot, time)) - }, - registry: config.prometheus_registry(), - spawner: &task_manager.spawn_essential_handle(), - telemetry, - }) - .map_err(Into::into) -} - -/// Start an altair parachain node. -pub async fn start_altair_node( +/// Start a generic parachain node. +pub async fn start_node( parachain_config: Configuration, polkadot_config: Configuration, eth_config: EthConfiguration, @@ -167,13 +154,16 @@ pub async fn start_altair_node( id: ParaId, hwbench: Option, first_evm_block: BlockNumber, -) -> sc_service::error::Result<( - TaskManager, - Arc>, -)> { +) -> sc_service::error::Result<(TaskManager, Arc>)> +where + RuntimeApi: + ConstructRuntimeApi> + Send + Sync + 'static, + RuntimeApi::RuntimeApi: RuntimeApiCollection, + Executor: sc_executor::NativeExecutionDispatch + 'static, +{ let is_authority = parachain_config.role.is_authority(); - evm::start_node_impl::( + evm::start_node_impl::( parachain_config, polkadot_config, eth_config, @@ -181,6 +171,7 @@ pub async fn start_altair_node( id, hwbench, first_evm_block, + // follows Moonbeam's create_full move |client, pool, deny_unsafe, @@ -207,15 +198,10 @@ pub async fn start_altair_node( let dynamic_fee = fp_dynamic_fee::InherentDataProvider(U256::from(target_gas_price)); Ok((slot, timestamp, dynamic_fee)) }; + let pending_consensus_data_provider = Some(Box::new(AuraConsensusDataProvider::new(client.clone())) as Box>); - let mut module = rpc::create_full(client.clone(), pool.clone(), deny_unsafe)?; - module - .merge(Anchors::new(client.clone()).into_rpc()) - .map_err(|e| sc_service::Error::Application(e.into()))?; - module - .merge(Pools::new(client.clone()).into_rpc()) - .map_err(|e| sc_service::Error::Application(e.into()))?; - let eth_deps = rpc::evm::Deps { + let module = rpc::create_full(client.clone(), pool.clone(), deny_unsafe)?; + let eth_deps = rpc::evm::EvmDeps { client, pool: pool.clone(), graph: pool.pool().clone(), @@ -238,6 +224,7 @@ pub async fn start_altair_node( execute_gas_limit_multiplier: eth_config.execute_gas_limit_multiplier, forced_parent_hashes: None, pending_create_inherent_data_providers, + pending_consensus_data_provider }; let module = rpc::evm::create( module, @@ -247,104 +234,30 @@ pub async fn start_altair_node( )?; Ok(module) }, - build_altair_import_queue, - |client, - block_import, - prometheus_registry, - telemetry, - task_manager, - relay_chain_interface, - transaction_pool, - sync_oracle, - keystore, - force_authoring| { - let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; - - let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording( - task_manager.spawn_handle(), - client.clone(), - transaction_pool, - prometheus_registry, - telemetry.clone(), - ); - - /* // TODO in v1.3.0 - let proposer = Proposer::new(proposer_factory); - - let collator_service = CollatorService::new( - client.clone(), - Arc::new(task_manager.spawn_handle()), - announce_block, - client.clone() - ); - */ - - Ok(AuraConsensus::build::< - sp_consensus_aura::sr25519::AuthorityPair, - _, - _, - _, - _, - _, - _, - >(BuildAuraConsensusParams { - proposer_factory, - create_inherent_data_providers: move |_, (relay_parent, validation_data)| { - let relay_chain_interface = relay_chain_interface.clone(); - async move { - let parachain_inherent = - cumulus_primitives_parachain_inherent::ParachainInherentData::create_at( - relay_parent, - &relay_chain_interface, - &validation_data, - id, - ).await; - - let time = sp_timestamp::InherentDataProvider::from_system_time(); - - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *time, - slot_duration, - ); - - let parachain_inherent = parachain_inherent.ok_or_else(|| { - Box::::from( - "Failed to create parachain inherent", - ) - })?; - Ok((slot, time, parachain_inherent)) - } - }, - block_import, - para_client: client, - backoff_authoring_blocks: Option::<()>::None, - sync_oracle, - keystore, - force_authoring, - slot_duration, - telemetry, - // We got around 500ms for proposing - block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32), - // And a maximum of 750ms if slots are skipped - max_block_proposal_slot_portion: Some(SlotProportion::new(1f32 / 16f32)), - })) - }, + build_import_queue::, ) .await } -/// Build the import queue for the "centrifuge" runtime. +/// Builds a generic import queue. The runtime is specified via the generics. +/// +/// NOTE: Almost entirely taken from Polkadot SDK. #[allow(clippy::type_complexity)] -pub fn build_centrifuge_import_queue( - client: Arc>, - block_import: ParachainBlockImport, +pub fn build_import_queue( + client: Arc>, + block_import: ParachainBlockImport, config: &Configuration, telemetry: Option, task_manager: &TaskManager, frontier_backend: FrontierBackend, first_evm_block: BlockNumber, -) -> Result, sc_service::Error> { +) -> Result, sc_service::Error> +where + RuntimeApi: + ConstructRuntimeApi> + Send + Sync + 'static, + RuntimeApi::RuntimeApi: RuntimeApiCollection, + Executor: sc_executor::NativeExecutionDispatch + 'static, +{ let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; let block_import = evm::BlockImport::new( block_import, @@ -353,410 +266,107 @@ pub fn build_centrifuge_import_queue( Arc::new(frontier_backend), ); - cumulus_client_consensus_aura::import_queue::< - sp_consensus_aura::sr25519::AuthorityPair, - _, - _, - _, - _, - _, - >(cumulus_client_consensus_aura::ImportQueueParams { - block_import, - client, - create_inherent_data_providers: move |_, _| async move { - let time = sp_timestamp::InherentDataProvider::from_system_time(); - - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *time, - slot_duration, - ); - - Ok((slot, time)) - }, - registry: config.prometheus_registry(), - spawner: &task_manager.spawn_essential_handle(), - telemetry, - }) - .map_err(Into::into) -} - -/// Start a centrifuge parachain node. -pub async fn start_centrifuge_node( - parachain_config: Configuration, - polkadot_config: Configuration, - eth_config: EthConfiguration, - collator_options: CollatorOptions, - id: ParaId, - hwbench: Option, - first_evm_block: BlockNumber, -) -> sc_service::error::Result<( - TaskManager, - Arc>, -)> { - let is_authority = parachain_config.role.is_authority(); - - evm::start_node_impl::( - parachain_config, - polkadot_config, - eth_config, - collator_options, - id, - hwbench, - first_evm_block, - move |client, - pool, - deny_unsafe, - subscription_task_executor, - network, - sync_service, - frontier_backend, - filter_pool, - fee_history_cache, - overrides, - block_data_cache| { - - let slot_duration = sc_consensus_aura::slot_duration(&*client)?; - let target_gas_price = eth_config.target_gas_price; - let pending_create_inherent_data_providers = move |_, ()| async move { - let current = sp_timestamp::InherentDataProvider::from_system_time(); - let next_slot = current.timestamp().as_millis() + slot_duration.as_millis(); - let timestamp = sp_timestamp::InherentDataProvider::new(next_slot.into()); - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *timestamp, - slot_duration, - ); - let dynamic_fee = fp_dynamic_fee::InherentDataProvider(U256::from(target_gas_price)); - Ok((slot, timestamp, dynamic_fee)) - }; - - let mut module = rpc::create_full(client.clone(), pool.clone(), deny_unsafe)?; - module - .merge(Anchors::new(client.clone()).into_rpc()) - .map_err(|e| sc_service::Error::Application(e.into()))?; - module - .merge(Pools::new(client.clone()).into_rpc()) - .map_err(|e| sc_service::Error::Application(e.into()))?; - let eth_deps = rpc::evm::Deps { - client, - pool: pool.clone(), - graph: pool.pool().clone(), - converter: Some(development_runtime::TransactionConverter), - is_authority, - enable_dev_signer: eth_config.enable_dev_signer, - network, - sync: sync_service.clone(), - frontier_backend: match frontier_backend.clone() { - fc_db::Backend::KeyValue(b) => Arc::new(b), - #[cfg(feature = "sql")] - fc_db::Backend::Sql(b) => Arc::new(b), - }, - overrides, - block_data_cache, - filter_pool: Some(filter_pool), - max_past_logs: eth_config.max_past_logs, - fee_history_cache, - fee_history_cache_limit: eth_config.fee_history_limit, - execute_gas_limit_multiplier: eth_config.execute_gas_limit_multiplier, - forced_parent_hashes: None, - pending_create_inherent_data_providers, - }; - let module = rpc::evm::create( - module, - eth_deps, - subscription_task_executor, - Arc::new(Default::default()), - )?; - Ok(module) - }, - build_centrifuge_import_queue, - |client, - block_import, - prometheus_registry, - telemetry, - task_manager, - relay_chain_interface, - transaction_pool, - sync_oracle, - keystore, - force_authoring| { - let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; - - let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording( - task_manager.spawn_handle(), - client.clone(), - transaction_pool, - prometheus_registry, - telemetry.clone(), - ); - - Ok(AuraConsensus::build::< - sp_consensus_aura::sr25519::AuthorityPair, - _, - _, - _, - _, - _, - _, - >(BuildAuraConsensusParams { - proposer_factory, - create_inherent_data_providers: move |_, (relay_parent, validation_data)| { - let relay_chain_interface = relay_chain_interface.clone(); - async move { - let parachain_inherent = - cumulus_primitives_parachain_inherent::ParachainInherentData::create_at( - relay_parent, - &relay_chain_interface, - &validation_data, - id, - ).await; - - let time = sp_timestamp::InherentDataProvider::from_system_time(); - - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *time, - slot_duration, - ); - - let parachain_inherent = parachain_inherent.ok_or_else(|| { - Box::::from( - "Failed to create parachain inherent", - ) - })?; - Ok((slot, time, parachain_inherent)) - } - }, - block_import, - para_client: client, - backoff_authoring_blocks: Option::<()>::None, - sync_oracle, - keystore, - force_authoring, - slot_duration, - // We got around 500ms for proposing - block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32), - // And a maximum of 750ms if slots are skipped - max_block_proposal_slot_portion: Some(SlotProportion::new(1f32 / 16f32)), - telemetry, - })) - }, + Ok( + cumulus_client_consensus_aura::equivocation_import_queue::fully_verifying_import_queue::< + sp_consensus_aura::sr25519::AuthorityPair, + _, + _, + _, + _, + >( + client, + block_import, + move |_, _| async move { + let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); + Ok(timestamp) + }, + slot_duration, + &task_manager.spawn_essential_handle(), + config.prometheus_registry(), + telemetry, + ), ) - .await } -/// Build the import queue for the "development" runtime. -#[allow(clippy::type_complexity)] -pub fn build_development_import_queue( - client: Arc>, - block_import: ParachainBlockImport, - config: &Configuration, +/// Starts the aura consensus. +/// +/// NOTE: Taken from Polkadot SDK because Moonbeam uses their custom Nimbus +/// consensus +#[allow(clippy::too_many_arguments)] +fn start_consensus( + client: Arc>, + block_import: ParachainBlockImport, + prometheus_registry: Option<&Registry>, telemetry: Option, task_manager: &TaskManager, - frontier_backend: FrontierBackend, - first_evm_block: BlockNumber, -) -> Result, sc_service::Error> { + relay_chain_interface: Arc, + transaction_pool: Arc>>, + sync_oracle: Arc>, + keystore: KeystorePtr, + relay_chain_slot_duration: Duration, + para_id: ParaId, + collator_key: CollatorPair, + overseer_handle: OverseerHandle, + announce_block: Arc>) + Send + Sync>, +) -> Result<(), sc_service::Error> +where + RuntimeApi: + ConstructRuntimeApi> + Send + Sync + 'static, + RuntimeApi::RuntimeApi: RuntimeApiCollection, + Executor: sc_executor::NativeExecutionDispatch + 'static, +{ + use cumulus_client_consensus_aura::collators::basic::{ + self as basic_aura, Params as BasicAuraParams, + }; + + // NOTE: because we use Aura here explicitly, we can use + // `CollatorSybilResistance::Resistant` when starting the network. + let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; - let block_import = evm::BlockImport::new( - block_import, - first_evm_block, + + let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording( + task_manager.spawn_handle(), client.clone(), - Arc::new(frontier_backend), + transaction_pool, + prometheus_registry, + telemetry.clone(), ); - cumulus_client_consensus_aura::import_queue::< - sp_consensus_aura::sr25519::AuthorityPair, - _, - _, - _, - _, - _, - >(cumulus_client_consensus_aura::ImportQueueParams { - block_import, - client, - create_inherent_data_providers: move |_, _| async move { - let time = sp_timestamp::InherentDataProvider::from_system_time(); - - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *time, - slot_duration, - ); - - Ok((slot, time)) - }, - registry: config.prometheus_registry(), - spawner: &task_manager.spawn_essential_handle(), - telemetry, - }) - .map_err(Into::into) -} - -/// Start a development parachain node. -pub async fn start_development_node( - parachain_config: Configuration, - polkadot_config: Configuration, - eth_config: EthConfiguration, - collator_options: CollatorOptions, - id: ParaId, - hwbench: Option, - first_evm_block: BlockNumber, -) -> sc_service::error::Result<( - TaskManager, - Arc>, -)> { - let is_authority = parachain_config.role.is_authority(); - - evm::start_node_impl::( - parachain_config, - polkadot_config, - eth_config, - collator_options, - id, - hwbench, - first_evm_block, - move |client, - pool, - deny_unsafe, - subscription_task_executor, - network, - sync_service, - frontier_backend, - filter_pool, - fee_history_cache, - overrides, - block_data_cache| { + let proposer = Proposer::new(proposer_factory); - let slot_duration = sc_consensus_aura::slot_duration(&*client)?; - let target_gas_price = eth_config.target_gas_price; - let pending_create_inherent_data_providers = move |_, ()| async move { - let current = sp_timestamp::InherentDataProvider::from_system_time(); - let next_slot = current.timestamp().as_millis() + slot_duration.as_millis(); - let timestamp = sp_timestamp::InherentDataProvider::new(next_slot.into()); - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *timestamp, - slot_duration, - ); - let dynamic_fee = fp_dynamic_fee::InherentDataProvider(U256::from(target_gas_price)); - Ok((slot, timestamp, dynamic_fee)) - }; + let collator_service = CollatorService::new( + client.clone(), + Arc::new(task_manager.spawn_handle()), + announce_block, + client.clone(), + ); - let mut module = rpc::create_full(client.clone(), pool.clone(), deny_unsafe)?; - module - .merge(Anchors::new(client.clone()).into_rpc()) - .map_err(|e| sc_service::Error::Application(e.into()))?; - module - .merge(Pools::new(client.clone()).into_rpc()) - .map_err(|e| sc_service::Error::Application(e.into()))?; - module - .merge(Rewards::new(client.clone()).into_rpc()) - .map_err(|e| sc_service::Error::Application(e.into()))?; - let eth_deps = rpc::evm::Deps { - client, - pool: pool.clone(), - graph: pool.pool().clone(), - converter: Some(development_runtime::TransactionConverter), - is_authority, - enable_dev_signer: eth_config.enable_dev_signer, - network, - sync: sync_service.clone(), - frontier_backend: match frontier_backend.clone() { - fc_db::Backend::KeyValue(b) => Arc::new(b), - #[cfg(feature = "sql")] - fc_db::Backend::Sql(b) => Arc::new(b), - }, - overrides, - block_data_cache, - filter_pool: Some(filter_pool), - max_past_logs: eth_config.max_past_logs, - fee_history_cache, - fee_history_cache_limit: eth_config.fee_history_limit, - execute_gas_limit_multiplier: eth_config.execute_gas_limit_multiplier, - forced_parent_hashes: None, - pending_create_inherent_data_providers, - }; - let module = rpc::evm::create( - module, - eth_deps, - subscription_task_executor, - Arc::new(Default::default()), - )?; - Ok(module) - }, - build_development_import_queue, - |client, - block_import, - prometheus_registry, - telemetry, - task_manager, - relay_chain_interface, - transaction_pool, - sync_oracle, - keystore, - force_authoring| { - let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; - - let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording( - task_manager.spawn_handle(), - client.clone(), - transaction_pool, - prometheus_registry, - telemetry.clone(), - ); - - Ok(AuraConsensus::build::< - sp_consensus_aura::sr25519::AuthorityPair, - _, - _, - _, - _, - _, - _, - >(BuildAuraConsensusParams { - proposer_factory, - create_inherent_data_providers: move |_, (relay_parent, validation_data)| { - let relay_chain_interface = relay_chain_interface.clone(); - async move { - let parachain_inherent = - cumulus_primitives_parachain_inherent::ParachainInherentData::create_at( - relay_parent, - &relay_chain_interface, - &validation_data, - id, - ).await; - - let time = sp_timestamp::InherentDataProvider::from_system_time(); - - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *time, - slot_duration, - ); - - let parachain_inherent = parachain_inherent.ok_or_else(|| { - Box::::from( - "Failed to create parachain inherent", - ) - })?; - Ok((slot, time, parachain_inherent)) - } - }, - block_import, - para_client: client, - backoff_authoring_blocks: Option::<()>::None, - sync_oracle, - keystore, - force_authoring, - slot_duration, - // We got around 500ms for proposing - block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32), - // And a maximum of 750ms if slots are skipped - max_block_proposal_slot_portion: Some(SlotProportion::new(1f32 / 16f32)), - telemetry, - })) - }, - ) - .await + let params = BasicAuraParams { + create_inherent_data_providers: move |_, ()| async move { Ok(()) }, + block_import, + para_client: client, + relay_client: relay_chain_interface, + sync_oracle, + keystore, + collator_key, + para_id, + overseer_handle, + slot_duration, + relay_chain_slot_duration, + proposer, + collator_service, + // Very limited proposal time. + authoring_duration: Duration::from_millis(500), + collation_request_receiver: None, + }; + + let fut = + basic_aura::run::( + params, + ); + task_manager + .spawn_essential_handle() + .spawn("aura", None, fut); + + Ok(()) } diff --git a/node/src/service/evm.rs b/node/src/service/evm.rs index 319e9a01a2..6323ed2c3a 100644 --- a/node/src/service/evm.rs +++ b/node/src/service/evm.rs @@ -20,11 +20,10 @@ use std::{ use cfg_primitives::{Block, BlockNumber, Hash}; use cumulus_client_cli::CollatorOptions; -use cumulus_client_consensus_common::{ParachainBlockImportMarker, ParachainConsensus}; +use cumulus_client_consensus_common::ParachainBlockImportMarker; use cumulus_client_service::{ - build_network, build_relay_chain_interface, prepare_node_config, start_collator, - start_full_node, BuildNetworkParams, CollatorSybilResistance, StartCollatorParams, - StartFullNodeParams, + build_network, build_relay_chain_interface, prepare_node_config, start_relay_chain_tasks, + BuildNetworkParams, CollatorSybilResistance, DARecoveryProfile, StartRelayChainTasksParams, }; use cumulus_primitives_core::ParaId; use cumulus_relay_chain_interface::RelayChainInterface; @@ -34,7 +33,7 @@ use fc_mapping_sync::{kv::MappingSyncWorker, SyncStrategy}; use fc_rpc::{EthBlockDataCacheTask, EthTask, OverrideHandle}; use fc_rpc_core::types::{FeeHistoryCache, FeeHistoryCacheLimit, FilterPool}; use fp_consensus::ensure_log; -use fp_rpc::{ConvertTransactionRuntimeApi, EthereumRuntimeRPCApi}; +use fp_rpc::EthereumRuntimeRPCApi; use frame_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE; use futures::{future, StreamExt}; use sc_client_api::{backend::AuxStore, BlockOf, BlockchainEvents}; @@ -45,17 +44,17 @@ use sc_network::{NetworkBlock, NetworkService}; use sc_network_sync::SyncingService; use sc_rpc::SubscriptionTaskExecutor; use sc_rpc_api::DenyUnsafe; -use sc_service::{Configuration, PartialComponents, TFullBackend, TaskManager}; +use sc_service::{Configuration, PartialComponents, TaskManager}; use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle}; use sp_api::{ConstructRuntimeApi, ProvideRuntimeApi}; use sp_block_builder::BlockBuilder as BlockBuilderApi; use sp_blockchain::HeaderBackend; use sp_consensus::Error as ConsensusError; -use sp_keystore::KeystorePtr; use sp_runtime::traits::{BlakeTwo256, Block as BlockT, Header as HeaderT}; -use substrate_prometheus_endpoint::Registry; -use super::{rpc, FullBackend, FullClient, ParachainBlockImport}; +use super::{ + rpc, start_consensus, FullBackend, FullClient, ParachainBlockImport, RuntimeApiCollection, +}; /// The ethereum-compatibility configuration used to run a node. #[derive(Clone, Copy, Debug, clap::Parser)] @@ -165,6 +164,25 @@ fn db_config_dir(config: &Configuration) -> PathBuf { config.base_path.config_dir(config.chain_spec.id()) } +/// Assembly of PartialComponents (enough to run chain ops subcommands) +/// +/// NOTE: Based on Polkadot SDK +pub type Service = PartialComponents< + FullClient, + FullBackend, + (), + sc_consensus::DefaultImportQueue, + sc_transaction_pool::FullPool>, + ( + ParachainBlockImport, + Option, + Option, + FrontierBackend, + FilterPool, + FeeHistoryCache, + ), +>; + /// Starts a `ServiceBuilder` for a full service. /// /// Use this macro if you don't actually need the full service, but just the @@ -174,35 +192,13 @@ pub fn new_partial( config: &Configuration, first_evm_block: BlockNumber, build_import_queue: BIQ, -) -> Result< - PartialComponents< - FullClient, - FullBackend, - (), - sc_consensus::DefaultImportQueue, - sc_transaction_pool::FullPool>, - ( - ParachainBlockImport, - Option, - Option, - FrontierBackend, - FilterPool, - FeeHistoryCache, - ), - >, - sc_service::Error, -> +) -> Result, sc_service::Error> where Executor: sc_executor::NativeExecutionDispatch + 'static, RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, - RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue - + sp_api::Metadata - + sp_session::SessionKeys - + sp_api::ApiExt - + sp_offchain::OffchainWorkerApi - + sp_block_builder::BlockBuilder, - sc_client_api::StateBackendFor: sp_api::StateBackend, + RuntimeApi::RuntimeApi: RuntimeApiCollection, + sc_client_api::StateBackendFor: sc_client_api::StateBackend, BIQ: FnOnce( Arc>, ParachainBlockImport, @@ -317,31 +313,22 @@ where /// runtime api. #[allow(clippy::too_many_arguments)] #[sc_tracing::logging::prefix_logs_with("🌀Parachain")] -pub(crate) async fn start_node_impl( +pub(crate) async fn start_node_impl( parachain_config: Configuration, polkadot_config: Configuration, eth_config: EthConfiguration, collator_options: CollatorOptions, - id: ParaId, + para_id: ParaId, hwbench: Option, first_evm_block: BlockNumber, rpc_ext_builder: RB, build_import_queue: BIQ, - build_consensus: BIC, ) -> sc_service::error::Result<(TaskManager, Arc>)> where RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, - RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue - + sp_api::Metadata - + sp_session::SessionKeys - + sp_api::ApiExt - + sp_offchain::OffchainWorkerApi - + sp_block_builder::BlockBuilder - + cumulus_primitives_core::CollectCollationInfo - + EthereumRuntimeRPCApi - + ConvertTransactionRuntimeApi, - sc_client_api::StateBackendFor: sp_api::StateBackend, + RuntimeApi::RuntimeApi: RuntimeApiCollection, + sc_client_api::StateBackendFor: sc_client_api::StateBackend, Executor: sc_executor::NativeExecutionDispatch + 'static, RB: Fn( Arc>, @@ -366,18 +353,6 @@ where FrontierBackend, BlockNumber, ) -> Result, sc_service::Error>, - BIC: FnOnce( - Arc>, - ParachainBlockImport, - Option<&Registry>, - Option, - &TaskManager, - Arc, - Arc>>, - Arc>, - KeystorePtr, - bool, - ) -> Result>, sc_service::Error>, { let parachain_config = prepare_node_config(parachain_config); @@ -410,7 +385,6 @@ where .await .map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?; - let force_authoring = parachain_config.force_authoring; let validator = parachain_config.role.is_authority(); let prometheus_registry = parachain_config.prometheus_registry().cloned(); let transaction_pool = params.transaction_pool.clone(); @@ -423,7 +397,7 @@ where net_config, client: client.clone(), transaction_pool: transaction_pool.clone(), - para_id: id, + para_id, spawn_handle: task_manager.spawn_handle(), relay_chain_interface: relay_chain_interface.clone(), import_queue: params.import_queue, @@ -482,7 +456,6 @@ where telemetry: telemetry.as_mut(), })?; - // do we need this at all? spawn_frontier_tasks::( &task_manager, client.clone(), @@ -502,10 +475,14 @@ where // Putting a link in there and swapping out the requirements for your own are // probably a good idea. The requirements for a para-chain are dictated by its // relay-chain. - if !SUBSTRATE_REFERENCE_HARDWARE.check_hardware(&hwbench) && validator { - log::warn!( - "⚠️ The hardware does not meet the minimal requirements for role 'Authority'." + match SUBSTRATE_REFERENCE_HARDWARE.check_hardware(&hwbench) { + Err(err) if validator => { + log::warn!( + "⚠️ The hardware does not meet the minimal requirements {} for role 'Authority'.", + err ); + } + _ => {} } if let Some(ref mut telemetry) = telemetry { @@ -527,10 +504,27 @@ where .overseer_handle() .map_err(|e| sc_service::Error::Application(Box::new(e)))?; - let recovery_handle = Box::new(overseer_handle); + // Follows Polkadot SDK + start_relay_chain_tasks(StartRelayChainTasksParams { + client: client.clone(), + announce_block: announce_block.clone(), + para_id, + relay_chain_interface: relay_chain_interface.clone(), + task_manager: &mut task_manager, + da_recovery_profile: if validator { + DARecoveryProfile::Collator + } else { + DARecoveryProfile::FullNode + }, + import_queue: import_queue_service, + relay_chain_slot_duration, + recovery_handle: Box::new(overseer_handle.clone()), + sync_service: sync_service.clone(), + })?; + // Follows Polkadot SDK if validator { - let parachain_consensus = build_consensus( + start_consensus::( client.clone(), block_import, prometheus_registry.as_ref(), @@ -540,48 +534,13 @@ where transaction_pool, sync_service.clone(), params.keystore_container.keystore(), - force_authoring, - )?; - - let spawner = task_manager.spawn_handle(); - - let params = StartCollatorParams { - para_id: id, - block_status: client.clone(), - announce_block, - client: client.clone(), - task_manager: &mut task_manager, - relay_chain_interface, - spawner, - parachain_consensus, - import_queue: import_queue_service, - collator_key: collator_key.ok_or_else(|| { - sc_service::error::Error::Other("Collator Key is None".to_string()) - })?, relay_chain_slot_duration, - recovery_handle, - sync_service, - }; - - #[allow(deprecated)] // TODO fix before v1.3.0 - start_collator(params).await?; - } else { - let params = StartFullNodeParams { - client: client.clone(), + para_id, + collator_key.expect("Command line arguments do not allow this. qed"), + overseer_handle, announce_block, - task_manager: &mut task_manager, - para_id: id, - relay_chain_interface, - relay_chain_slot_duration, - import_queue: import_queue_service, - recovery_handle, - sync_service, - }; - - #[allow(deprecated)] // TODO fix before v1.3.0 - start_full_node(params)?; + )?; } - start_network.start_network(); Ok((task_manager, client)) @@ -592,7 +551,7 @@ where fn spawn_frontier_tasks( task_manager: &TaskManager, client: Arc>, - backend: Arc>, + backend: Arc, frontier_backend: FrontierBackend, filter_pool: FilterPool, overrides: Arc>, @@ -607,21 +566,14 @@ fn spawn_frontier_tasks( ) where RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, - RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue - + sp_api::Metadata - + sp_session::SessionKeys - + sp_api::ApiExt - + sp_offchain::OffchainWorkerApi - + sp_block_builder::BlockBuilder - + cumulus_primitives_core::CollectCollationInfo - + fp_rpc::EthereumRuntimeRPCApi, + RuntimeApi::RuntimeApi: RuntimeApiCollection, Executor: sc_executor::NativeExecutionDispatch + 'static, { match frontier_backend { FrontierBackend::KeyValue(fb) => { task_manager.spawn_essential_handle().spawn( "frontier-mapping-sync-worker", - None, + Some("frontier"), MappingSyncWorker::new( client.import_notification_stream(), Duration::new(6, 0), @@ -665,14 +617,14 @@ fn spawn_frontier_tasks( const FILTER_RETAIN_THRESHOLD: u64 = 100; task_manager.spawn_essential_handle().spawn( "frontier-filter-pool", - None, + Some("frontier"), EthTask::filter_pool_task(client.clone(), filter_pool, FILTER_RETAIN_THRESHOLD), ); // Spawn Frontier FeeHistory cache maintenance task. task_manager.spawn_essential_handle().spawn( "frontier-fee-history", - None, + Some("frontier"), EthTask::fee_history_task( client, overrides, diff --git a/pallets/anchors/src/mock.rs b/pallets/anchors/src/mock.rs index 6d8e1daab1..2bd50063f3 100644 --- a/pallets/anchors/src/mock.rs +++ b/pallets/anchors/src/mock.rs @@ -46,23 +46,11 @@ frame_support::construct_runtime!( impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; type Block = frame_system::mocking::MockBlock; - type RuntimeEvent = (); } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] impl pallet_balances::Config for Runtime { type AccountStore = System; - type Balance = Balance; - type DustRemoval = (); - type ExistentialDeposit = ConstU64<1>; - type FreezeIdentifier = (); - type MaxFreezes = (); - type MaxHolds = ConstU32<1>; - type MaxLocks = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type RuntimeEvent = (); - type RuntimeHoldReason = (); - type WeightInfo = (); } impl pallet_timestamp::Config for Runtime { diff --git a/pallets/block-rewards/src/benchmarking.rs b/pallets/block-rewards/src/benchmarking.rs index a4c0c337fc..08cd1c1467 100644 --- a/pallets/block-rewards/src/benchmarking.rs +++ b/pallets/block-rewards/src/benchmarking.rs @@ -7,7 +7,6 @@ use frame_support::{ }; use frame_system::RawOrigin; use sp_runtime::traits::Zero; -use sp_std::vec; // required for #[benchmarks] use super::*; use crate::{pallet::Config, Pallet as BlockRewards}; diff --git a/pallets/block-rewards/src/migrations.rs b/pallets/block-rewards/src/migrations.rs index c6de5570a9..f8d8e67d05 100644 --- a/pallets/block-rewards/src/migrations.rs +++ b/pallets/block-rewards/src/migrations.rs @@ -20,7 +20,7 @@ use parity_scale_codec::{Decode, Encode}; use sp_runtime::FixedPointNumber; #[cfg(feature = "try-runtime")] use sp_runtime::TryRuntimeError; -use sp_std::{marker::PhantomData, vec::Vec}; +use sp_std::marker::PhantomData; use crate::{pallet, Config, Pallet, SessionData}; @@ -31,7 +31,7 @@ fn inflation_rate(percent: u32) -> T::Rate { pub mod init { use cfg_traits::rewards::{AccountRewards, CurrencyGroupChange, GroupRewards}; use num_traits::Zero; - use sp_runtime::{BoundedVec, SaturatedConversion}; + use sp_runtime::SaturatedConversion; use super::*; @@ -40,19 +40,6 @@ pub mod init { PhantomData<(T, CollatorReward, AnnualTreasuryInflationPercent)>, ); - fn get_collators() -> Vec { - let candidates = BoundedVec::< - T::AccountId, - ::MaxCandidates, - >::truncate_from( - pallet_collator_selection::Pallet::::candidates() - .into_iter() - .map(|c| c.who) - .collect(), - ); - pallet_collator_selection::Pallet::::assemble_collators(candidates) - } - impl OnRuntimeUpgrade for InitBlockRewards where @@ -62,8 +49,8 @@ pub mod init { AnnualTreasuryInflationPercent: Get, { #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, TryRuntimeError> { - let collators = get_collators::(); + fn pre_upgrade() -> Result, TryRuntimeError> { + let collators = pallet_collator_selection::Pallet::::assemble_collators(); assert!(!collators.is_empty()); assert!(!CollatorReward::get().is_zero()); @@ -85,7 +72,7 @@ pub mod init { pallet::ActiveSessionData::::get() != Default::default(); log::info!("{LOG_PREFIX} Getting list of collators"); - let collators = get_collators::(); + let collators = pallet_collator_selection::Pallet::::assemble_collators(); let collators_are_staked = collators.clone().into_iter().all(|c| { log::info!("{LOG_PREFIX} Checking stake of collator {c:?}"); @@ -152,14 +139,15 @@ pub mod init { } #[cfg(feature = "try-runtime")] - fn post_upgrade(pre_state: Vec) -> Result<(), TryRuntimeError> { + fn post_upgrade(pre_state: sp_std::vec::Vec) -> Result<(), TryRuntimeError> { assert_eq!( Pallet::::on_chain_storage_version(), Pallet::::current_storage_version(), "On-chain storage version should be updated" ); - let collators: Vec = Decode::decode(&mut pre_state.as_slice()) - .expect("pre_upgrade provides a valid state; qed"); + let collators: sp_std::vec::Vec = + Decode::decode(&mut pre_state.as_slice()) + .expect("pre_upgrade provides a valid state; qed"); assert_ne!(Pallet::::active_session_data(), Default::default()); diff --git a/pallets/block-rewards/src/mock.rs b/pallets/block-rewards/src/mock.rs index 5d46c5fef9..5c7ecaa018 100644 --- a/pallets/block-rewards/src/mock.rs +++ b/pallets/block-rewards/src/mock.rs @@ -93,7 +93,7 @@ impl pallet_balances::Config for Test { type Balance = Balance; type DustRemoval = (); type ExistentialDeposit = ConstU128; - type RuntimeHoldReason = (); + type RuntimeHoldReason = RuntimeHoldReason; } orml_traits::parameter_type_with_key! { @@ -141,6 +141,7 @@ impl pallet_restricted_tokens::Config for Test { type PreFungiblesUnbalanced = cfg_traits::Always; type PreReservableCurrency = cfg_traits::Always; type RuntimeEvent = RuntimeEvent; + type RuntimeHoldReason = RuntimeHoldReason; type WeightInfo = (); } diff --git a/pallets/bridge/src/mock.rs b/pallets/bridge/src/mock.rs index 36c25b6388..4518b3a899 100644 --- a/pallets/bridge/src/mock.rs +++ b/pallets/bridge/src/mock.rs @@ -51,7 +51,6 @@ pub(crate) const TEST_RELAYER_VOTE_THRESHOLD: u32 = 2; // Build mock runtime frame_support::construct_runtime!( - pub enum Runtime { System: frame_system, @@ -84,21 +83,11 @@ parameter_types! { pub const ExistentialDeposit: u128 = 1; } -// Implement FRAME balances pallet configuration trait for the mock runtime +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; - type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; - type FreezeIdentifier = (); - type MaxFreezes = (); - type MaxHolds = frame_support::traits::ConstU32<1>; - type MaxLocks = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type RuntimeEvent = RuntimeEvent; - type RuntimeHoldReason = (); - type WeightInfo = (); } // Required as a tight dependency from pallet_fees, but not used for it in the diff --git a/pallets/ethereum-transaction/src/lib.rs b/pallets/ethereum-transaction/src/lib.rs index 892dcaa335..e97df5184e 100644 --- a/pallets/ethereum-transaction/src/lib.rs +++ b/pallets/ethereum-transaction/src/lib.rs @@ -23,7 +23,9 @@ use cfg_primitives::TRANSACTION_RECOVERY_ID; use cfg_traits::ethereum::EthereumTransactor; -use ethereum::{LegacyTransaction, TransactionAction, TransactionSignature, TransactionV2}; +use ethereum::{ + LegacyTransaction, ReceiptV3, TransactionAction, TransactionSignature, TransactionV2, +}; use frame_support::{ dispatch::{DispatchErrorWithPostInfo, PostDispatchInfo}, pallet_prelude::*, @@ -39,7 +41,6 @@ mod tests; #[frame_support::pallet] pub mod pallet { - use ethereum::ReceiptV3; use frame_system::pallet_prelude::OriginFor; use super::*; diff --git a/pallets/ethereum-transaction/src/mock.rs b/pallets/ethereum-transaction/src/mock.rs index 9c02dfb4eb..9d710bc537 100644 --- a/pallets/ethereum-transaction/src/mock.rs +++ b/pallets/ethereum-transaction/src/mock.rs @@ -8,7 +8,7 @@ use pallet_evm::{ FixedGasWeightMapping, IsPrecompileResult, PrecompileHandle, PrecompileSet, SubstrateBlockHashMapping, }; -use sp_core::{crypto::AccountId32, ByteArray, ConstU128, ConstU64, H160, U256}; +use sp_core::{crypto::AccountId32, ByteArray, ConstU128, ConstU32, ConstU64, H160, U256}; use sp_runtime::{traits::IdentityLookup, ConsensusEngineId}; use crate::pallet as pallet_ethereum_transaction; @@ -143,6 +143,7 @@ impl pallet_evm::Config for Runtime { type PrecompilesValue = MockPrecompiles; type Runner = Runner; type RuntimeEvent = RuntimeEvent; + type SuicideQuickClearLimit = ConstU32<0>; type Timestamp = Timestamp; type WeightInfo = (); type WeightPerGas = WeightPerGas; diff --git a/pallets/fees/Cargo.toml b/pallets/fees/Cargo.toml index f9f13b6801..4f6890518b 100644 --- a/pallets/fees/Cargo.toml +++ b/pallets/fees/Cargo.toml @@ -54,6 +54,7 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "sp-runtime/runtime-benchmarks", + "pallet-treasury/runtime-benchmarks", ] try-runtime = [ "cfg-traits/try-runtime", diff --git a/pallets/fees/src/mock.rs b/pallets/fees/src/mock.rs index 64dae18a96..b23145300a 100644 --- a/pallets/fees/src/mock.rs +++ b/pallets/fees/src/mock.rs @@ -1,10 +1,16 @@ use frame_support::{ derive_impl, parameter_types, - traits::{EitherOfDiverse, FindAuthor, SortedMembers}, + traits::{ + tokens::{PayFromAccount, UnityAssetBalanceConversion}, + EitherOfDiverse, FindAuthor, SortedMembers, + }, ConsensusEngineId, PalletId, }; use frame_system::{EnsureRoot, EnsureSignedBy}; -use sp_runtime::{traits::ConstU64, BuildStorage}; +use sp_runtime::{ + traits::{ConstU64, IdentityLookup}, + BuildStorage, +}; use crate::{self as pallet_fees, *}; @@ -30,9 +36,6 @@ impl frame_system::Config for Runtime { #[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] impl pallet_balances::Config for Runtime { type AccountStore = System; - type DustRemoval = (); - type ExistentialDeposit = ConstU64<1>; - type RuntimeHoldReason = (); } pub struct AuthorGiven; @@ -53,16 +56,25 @@ impl pallet_authorship::Config for Runtime { parameter_types! { pub const TreasuryPalletId: PalletId = PalletId(*b"treasury"); + pub TreasuryAccount: u64 = Treasury::account_id(); } impl pallet_treasury::Config for Runtime { type ApproveOrigin = EnsureSignedBy; + type AssetKind = (); + type BalanceConverter = UnityAssetBalanceConversion; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); + type Beneficiary = Self::AccountId; + type BeneficiaryLookup = IdentityLookup; type Burn = (); type BurnDestination = (); type Currency = Balances; type MaxApprovals = (); type OnSlash = Treasury; type PalletId = TreasuryPalletId; + type Paymaster = PayFromAccount; + type PayoutPeriod = ConstU64<10>; type ProposalBond = (); type ProposalBondMaximum = (); type ProposalBondMinimum = (); diff --git a/pallets/investments/src/benchmarking.rs b/pallets/investments/src/benchmarking.rs index 52ad8ac5b3..039e72a571 100644 --- a/pallets/investments/src/benchmarking.rs +++ b/pallets/investments/src/benchmarking.rs @@ -20,7 +20,6 @@ use frame_benchmarking::{account, impl_benchmark_test_suite, v2::*, whitelisted_ use frame_support::traits::fungibles::Mutate; use frame_system::RawOrigin; use sp_runtime::{traits::One, Perquintill}; -use sp_std::vec; // required for #[benchmarks] use crate::{Call, Config, CurrencyOf, Pallet}; diff --git a/pallets/liquidity-pools-gateway/routers/src/lib.rs b/pallets/liquidity-pools-gateway/routers/src/lib.rs index 25d1fa3837..7010571e18 100644 --- a/pallets/liquidity-pools-gateway/routers/src/lib.rs +++ b/pallets/liquidity-pools-gateway/routers/src/lib.rs @@ -53,7 +53,7 @@ use scale_info::TypeInfo; use sp_core::{bounded::BoundedVec, ConstU32, H160, H256, U256}; use sp_runtime::traits::{BlakeTwo256, Hash}; use sp_std::{boxed::Box, marker::PhantomData, vec::Vec}; -use staging_xcm::{latest::OriginKind, VersionedMultiLocation}; +use staging_xcm::{latest::OriginKind, prelude::Limited, VersionedLocation}; #[cfg(test)] mod mock; @@ -244,7 +244,7 @@ where // The destination to which the message should be sent. self.xcm_domain.location.clone(), // The sender will pay for this transaction. - sender, + Some(sender), // The currency in which we want to pay fees. CurrencyPayment { currency: Currency::AsCurrencyId(self.xcm_domain.fee_currency.clone()), @@ -255,7 +255,7 @@ where OriginKind::SovereignAccount, TransactWeights { transact_required_weight_at_most: self.xcm_domain.transact_required_weight_at_most, - overall_weight: Some(self.xcm_domain.overall_weight), + overall_weight: Some(Limited(self.xcm_domain.overall_weight)), }, // Opt-in on RefundSurplus true, @@ -303,7 +303,7 @@ where #[derive(Debug, Encode, Decode, Clone, PartialEq, Eq, TypeInfo, MaxEncodedLen)] pub struct XcmDomain { /// The XCM multilocation of the domain. - pub location: Box, + pub location: Box, /// The ethereum_xcm::Call::transact call index on a given domain. /// It should contain the pallet index + the `transact` call index, to which diff --git a/pallets/liquidity-pools-gateway/routers/src/mock.rs b/pallets/liquidity-pools-gateway/routers/src/mock.rs index c7f633ccc4..7671f21263 100644 --- a/pallets/liquidity-pools-gateway/routers/src/mock.rs +++ b/pallets/liquidity-pools-gateway/routers/src/mock.rs @@ -4,9 +4,7 @@ use cfg_mocks::{pallet_mock_liquidity_pools, pallet_mock_routers, MessageMock, R use cfg_primitives::{OutboundMessageNonce, BLOCK_STORAGE_LIMIT, MAX_POV_SIZE}; use cfg_traits::TryConvert; use cfg_types::domain_address::DomainAddress; -use cumulus_primitives_core::{ - Instruction, MultiAsset, MultiLocation, PalletInstance, Parachain, SendError, Xcm, XcmHash, -}; +use cumulus_primitives_core::{Instruction, PalletInstance, Parachain, SendError, Xcm, XcmHash}; use frame_support::{ derive_impl, parameter_types, traits::{FindAuthor, PalletInfo as PalletInfoTrait}, @@ -21,19 +19,16 @@ use pallet_evm::{ }; use pallet_liquidity_pools_gateway::EnsureLocal; use parity_scale_codec::{Decode, Encode}; -use sp_core::{crypto::AccountId32, ByteArray, H160, H256, U256}; +use sp_core::{crypto::AccountId32, ByteArray, ConstU32, H160, H256, U256}; use sp_runtime::{traits::IdentityLookup, ConsensusEngineId, DispatchError}; use sp_std::{cell::RefCell, marker::PhantomData}; -use staging_xcm::{ - latest::{ - Error as XcmError, InteriorMultiLocation, NetworkId, Result as XcmResult, SendResult, - XcmContext, - }, - v3::{Junction, Junctions, MultiAssets, SendXcm}, +use staging_xcm::latest::{ + opaque, Asset, Assets, Error as XcmError, InteriorLocation, Junction, Location, NetworkId, + Result as XcmResult, SendResult, SendXcm, XcmContext, }; use staging_xcm_executor::{ traits::{TransactAsset, WeightBounds}, - Assets, + AssetsInHolding, }; use xcm_primitives::{ HrmpAvailableCalls, HrmpEncodeCall, UtilityAvailableCalls, UtilityEncodeCall, XcmTransact, @@ -223,6 +218,7 @@ impl pallet_evm::Config for Runtime { type PrecompilesValue = MockPrecompiles; type Runner = Runner; type RuntimeEvent = RuntimeEvent; + type SuicideQuickClearLimit = ConstU32<0>; type Timestamp = Timestamp; type WeightInfo = (); type WeightPerGas = WeightPerGas; @@ -258,9 +254,9 @@ impl Default for Transactors { } impl XcmTransact for Transactors { - fn destination(self) -> MultiLocation { + fn destination(self) -> Location { match self { - Transactors::Relay => MultiLocation::parent(), + Transactors::Relay => Location::parent(), } } } @@ -280,36 +276,36 @@ impl UtilityEncodeCall for Transactors { } } -pub struct AccountIdToMultiLocation; -impl sp_runtime::traits::Convert for AccountIdToMultiLocation { - fn convert(_account: AccountId32) -> MultiLocation { +pub struct AccountIdToLocation; +impl sp_runtime::traits::Convert for AccountIdToLocation { + fn convert(_account: AccountId32) -> Location { let as_h160: H160 = H160::repeat_byte(0xAA); - MultiLocation::new( + Location::new( 0, - Junctions::X1(Junction::AccountKey20 { + Junction::AccountKey20 { network: None, key: as_h160.as_fixed_bytes().clone(), - }), + }, ) } } pub struct DummyAssetTransactor; impl TransactAsset for DummyAssetTransactor { - fn deposit_asset(_what: &MultiAsset, _who: &MultiLocation, _context: &XcmContext) -> XcmResult { + fn deposit_asset(_what: &Asset, _who: &Location, _context: Option<&XcmContext>) -> XcmResult { Ok(()) } fn withdraw_asset( - _what: &MultiAsset, - _who: &MultiLocation, + _what: &Asset, + _who: &Location, _context: Option<&XcmContext>, - ) -> Result { - Ok(Assets::default()) + ) -> Result { + Ok(AssetsInHolding::default()) } } -pub struct CurrencyIdToMultiLocation; +pub struct CurrencyIdToLocation; pub type AssetId = u128; @@ -319,19 +315,19 @@ pub enum CurrencyId { OtherReserve(AssetId), } -impl sp_runtime::traits::Convert> for CurrencyIdToMultiLocation { - fn convert(currency: CurrencyId) -> Option { +impl sp_runtime::traits::Convert> for CurrencyIdToLocation { + fn convert(currency: CurrencyId) -> Option { match currency { CurrencyId::SelfReserve => { - let multi: MultiLocation = SelfReserve::get(); + let multi: Location = SelfReserve::get(); Some(multi) } // To distinguish between relay and others, specially for reserve asset CurrencyId::OtherReserve(asset) => { if asset == 0 { - Some(MultiLocation::parent()) + Some(Location::parent()) } else { - Some(MultiLocation::new(1, Junctions::X1(Parachain(2)))) + Some(Location::new(1, Parachain(2))) } } } @@ -359,9 +355,9 @@ impl HrmpEncodeCall for MockHrmpEncoder { // Simulates sending a XCM message thread_local! { - pub static SENT_XCM: RefCell> = RefCell::new(Vec::new()); + pub static SENT_XCM: RefCell> = RefCell::new(Vec::new()); } -pub fn sent_xcm() -> Vec<(MultiLocation, staging_xcm::v3::opaque::Xcm)> { +pub fn sent_xcm() -> Vec<(Location, opaque::Xcm)> { SENT_XCM.with(|q| (*q.borrow()).clone()) } pub struct TestSendXcm; @@ -369,14 +365,14 @@ impl SendXcm for TestSendXcm { type Ticket = (); fn validate( - destination: &mut Option, - message: &mut Option, + destination: &mut Option, + message: &mut Option, ) -> SendResult { SENT_XCM.with(|q| { q.borrow_mut() .push((destination.clone().unwrap(), message.clone().unwrap())) }); - Ok(((), MultiAssets::new())) + Ok(((), Assets::new())) } fn deliver(_: Self::Ticket) -> Result { @@ -429,34 +425,36 @@ parameter_types! { pub ParachainId: cumulus_primitives_core::ParaId = 100.into(); - pub SelfLocation: MultiLocation = - MultiLocation::new(1, Junctions::X1(Parachain(ParachainId::get().into()))); + pub SelfLocation: Location = + Location::new(1, Parachain(ParachainId::get().into())); - pub SelfReserve: MultiLocation = MultiLocation::new( + pub SelfReserve: Location = Location::new( 1, - Junctions::X2( + [ Parachain(ParachainId::get().into()), PalletInstance( ::PalletInfo::index::().unwrap() as u8 ) - )); + ] + ); pub const BaseXcmWeight: staging_xcm::latest::Weight = staging_xcm::latest::Weight::from_parts(1000, 0); - pub MaxFee: MultiAsset = (MultiLocation::parent(), 1_000_000_000_000u128).into(); + pub MaxFee: Asset = (Location::parent(), 1_000_000_000_000u128).into(); - pub UniversalLocation: InteriorMultiLocation = RelayNetwork::get().into(); + pub UniversalLocation: InteriorLocation = RelayNetwork::get().into(); } impl pallet_xcm_transactor::Config for Runtime { - type AccountIdToMultiLocation = AccountIdToMultiLocation; + type AccountIdToLocation = AccountIdToLocation; type AssetTransactor = DummyAssetTransactor; type Balance = Balance; type BaseXcmWeight = BaseXcmWeight; type CurrencyId = CurrencyId; - type CurrencyIdToMultiLocation = CurrencyIdToMultiLocation; + type CurrencyIdToLocation = CurrencyIdToLocation; type DerivativeAddressRegistrationOrigin = EnsureRoot; type HrmpManipulatorOrigin = EnsureRoot; + type HrmpOpenOrigin = EnsureRoot; type MaxHrmpFee = MaxHrmpRelayFee; type ReserveProvider = orml_traits::location::RelativeReserveProvider; type RuntimeEvent = RuntimeEvent; diff --git a/pallets/liquidity-pools-gateway/routers/src/routers/axelar_evm.rs b/pallets/liquidity-pools-gateway/routers/src/routers/axelar_evm.rs index 99d6b6c2cc..865557b848 100644 --- a/pallets/liquidity-pools-gateway/routers/src/routers/axelar_evm.rs +++ b/pallets/liquidity-pools-gateway/routers/src/routers/axelar_evm.rs @@ -115,7 +115,7 @@ pub(crate) fn get_axelar_encoded_msg( }, ], outputs: vec![], - constant: false, + constant: Some(false), state_mutability: Default::default(), }], )]), diff --git a/pallets/liquidity-pools-gateway/routers/src/routers/ethereum_xcm.rs b/pallets/liquidity-pools-gateway/routers/src/routers/ethereum_xcm.rs index 83f49cf796..a92569b277 100644 --- a/pallets/liquidity-pools-gateway/routers/src/routers/ethereum_xcm.rs +++ b/pallets/liquidity-pools-gateway/routers/src/routers/ethereum_xcm.rs @@ -84,7 +84,7 @@ pub(crate) fn get_xcm_router_contract() -> Contract { internal_type: None, }], outputs: vec![], - constant: false, + constant: Some(false), state_mutability: Default::default(), }], ); diff --git a/pallets/liquidity-pools-gateway/routers/src/tests.rs b/pallets/liquidity-pools-gateway/routers/src/tests.rs index 508d85c6a0..dc69b1c606 100644 --- a/pallets/liquidity-pools-gateway/routers/src/tests.rs +++ b/pallets/liquidity-pools-gateway/routers/src/tests.rs @@ -1,7 +1,6 @@ use cfg_mocks::MessageMock; use cfg_primitives::CFG; use cfg_traits::liquidity_pools::{Codec, Router}; -use cumulus_primitives_core::MultiLocation; use frame_support::{assert_noop, assert_ok, traits::fungible::Mutate}; use lazy_static::lazy_static; use pallet_evm::AddressMapping; @@ -10,10 +9,8 @@ use sp_runtime::{ traits::{BlakeTwo256, Convert, Hash}, DispatchError, }; -use staging_xcm::{ - lts::WeightLimit, - v2::OriginKind, - v3::{Instruction::*, MultiAsset}, +use staging_xcm::latest::{ + Asset, AssetId, Fungibility, Instruction::*, Location, OriginKind, WeightLimit, }; use super::mock::*; @@ -187,7 +184,7 @@ mod xcm_router { pub struct XCMRouterTestData { pub currency_id: CurrencyId, - pub dest: MultiLocation, + pub dest: Location, pub xcm_domain: XcmDomain<::CurrencyId>, pub sender: AccountId32, pub msg: Vec, @@ -195,7 +192,7 @@ mod xcm_router { pub fn get_test_data() -> XCMRouterTestData { let currency_id = CurrencyId::OtherReserve(1); - let dest = CurrencyIdToMultiLocation::convert(currency_id.clone()).unwrap(); + let dest = CurrencyIdToLocation::convert(currency_id.clone()).unwrap(); let xcm_domain = XcmDomain { location: Box::new(dest.clone().into_versioned()), @@ -260,21 +257,17 @@ mod xcm_router { let (_, xcm) = sent_messages.first().unwrap(); assert!(xcm.0.contains(&WithdrawAsset( - (MultiAsset { - id: staging_xcm::v3::AssetId::Concrete(MultiLocation::here()), - fun: staging_xcm::v3::Fungibility::Fungible( - test_data.xcm_domain.fee_amount - ), + (Asset { + id: AssetId(Location::here()), + fun: Fungibility::Fungible(test_data.xcm_domain.fee_amount), }) .into() ))); assert!(xcm.0.contains(&BuyExecution { - fees: MultiAsset { - id: staging_xcm::v3::AssetId::Concrete(MultiLocation::here()), - fun: staging_xcm::v3::Fungibility::Fungible( - test_data.xcm_domain.fee_amount - ), + fees: Asset { + id: AssetId(Location::here()), + fun: Fungibility::Fungible(test_data.xcm_domain.fee_amount), }, weight_limit: WeightLimit::Limited(test_data.xcm_domain.overall_weight), })); @@ -505,7 +498,7 @@ mod axelar_xcm { pub struct AxelarXCMTestData { pub currency_id: CurrencyId, - pub dest: MultiLocation, + pub dest: Location, pub xcm_domain: XcmDomain<::CurrencyId>, pub axelar_target_chain: BoundedVec>, pub axelar_target_contract: H160, @@ -515,7 +508,7 @@ mod axelar_xcm { pub fn get_test_data() -> AxelarXCMTestData { let currency_id = CurrencyId::OtherReserve(1); - let dest = CurrencyIdToMultiLocation::convert(currency_id.clone()).unwrap(); + let dest = CurrencyIdToLocation::convert(currency_id.clone()).unwrap(); let xcm_domain = XcmDomain { location: Box::new(dest.clone().into_versioned()), @@ -601,21 +594,17 @@ mod axelar_xcm { let (_, xcm) = sent_messages.first().unwrap(); assert!(xcm.0.contains(&WithdrawAsset( - (MultiAsset { - id: staging_xcm::v3::AssetId::Concrete(MultiLocation::here()), - fun: staging_xcm::v3::Fungibility::Fungible( - test_data.xcm_domain.fee_amount - ), + (Asset { + id: AssetId(Location::here()), + fun: Fungibility::Fungible(test_data.xcm_domain.fee_amount), }) .into() ))); assert!(xcm.0.contains(&BuyExecution { - fees: MultiAsset { - id: staging_xcm::v3::AssetId::Concrete(MultiLocation::here()), - fun: staging_xcm::v3::Fungibility::Fungible( - test_data.xcm_domain.fee_amount - ), + fees: Asset { + id: AssetId(Location::here()), + fun: Fungibility::Fungible(test_data.xcm_domain.fee_amount), }, weight_limit: WeightLimit::Limited(test_data.xcm_domain.overall_weight), })); @@ -652,7 +641,7 @@ mod ethereum_xcm { pub struct EthereumXCMTestData { pub currency_id: CurrencyId, - pub dest: MultiLocation, + pub dest: Location, pub xcm_domain: XcmDomain<::CurrencyId>, pub axelar_target_chain: BoundedVec>, pub axelar_target_contract: H160, @@ -662,7 +651,7 @@ mod ethereum_xcm { pub fn get_test_data() -> EthereumXCMTestData { let currency_id = CurrencyId::OtherReserve(1); - let dest = CurrencyIdToMultiLocation::convert(currency_id.clone()).unwrap(); + let dest = CurrencyIdToLocation::convert(currency_id.clone()).unwrap(); let xcm_domain = XcmDomain { location: Box::new(dest.clone().into_versioned()), @@ -741,21 +730,17 @@ mod ethereum_xcm { let (_, xcm) = sent_messages.first().unwrap(); assert!(xcm.0.contains(&WithdrawAsset( - (MultiAsset { - id: staging_xcm::v3::AssetId::Concrete(MultiLocation::here()), - fun: staging_xcm::v3::Fungibility::Fungible( - test_data.xcm_domain.fee_amount - ), + (Asset { + id: AssetId(Location::here()), + fun: Fungibility::Fungible(test_data.xcm_domain.fee_amount), }) .into() ))); assert!(xcm.0.contains(&BuyExecution { - fees: MultiAsset { - id: staging_xcm::v3::AssetId::Concrete(MultiLocation::here()), - fun: staging_xcm::v3::Fungibility::Fungible( - test_data.xcm_domain.fee_amount - ), + fees: Asset { + id: AssetId(Location::here()), + fun: Fungibility::Fungible(test_data.xcm_domain.fee_amount), }, weight_limit: WeightLimit::Limited(test_data.xcm_domain.overall_weight), })); diff --git a/pallets/liquidity-pools/src/contract.rs b/pallets/liquidity-pools/src/contract.rs index 08206057db..852b6e1fc8 100644 --- a/pallets/liquidity-pools/src/contract.rs +++ b/pallets/liquidity-pools/src/contract.rs @@ -47,7 +47,7 @@ pub fn xcm_router_contract() -> Contract { internal_type: None, }], outputs: vec![], - constant: false, + constant: Some(false), state_mutability: Default::default(), }], ); diff --git a/pallets/liquidity-pools/src/lib.rs b/pallets/liquidity-pools/src/lib.rs index bb39c1e95a..6235475f82 100644 --- a/pallets/liquidity-pools/src/lib.rs +++ b/pallets/liquidity-pools/src/lib.rs @@ -64,9 +64,8 @@ use sp_runtime::{ }; use sp_std::{convert::TryInto, vec}; use staging_xcm::{ - latest::NetworkId, - prelude::{AccountKey20, GlobalConsensus, PalletInstance, X3}, - VersionedMultiLocation, + v4::{Junction::*, NetworkId}, + VersionedLocation, }; // NOTE: Should be replaced with generated weights in the future. For now, let's @@ -129,7 +128,6 @@ pub mod pallet { use frame_system::pallet_prelude::*; use parity_scale_codec::HasCompact; use sp_runtime::{traits::Zero, DispatchError}; - use staging_xcm::latest::MultiLocation; use super::*; use crate::defensive_weights::WeightInfo; @@ -892,21 +890,26 @@ pub mod pallet { Error::::AssetNotLiquidityPoolsTransferable ); - match meta.location { - Some(VersionedMultiLocation::V3(MultiLocation { - parents: 0, - interior: - X3( - PalletInstance(pallet_instance), - GlobalConsensus(NetworkId::Ethereum { chain_id }), - AccountKey20 { - network: None, - key: address, - }, - ), - })) if Some(pallet_instance.into()) - == ::PalletInfo::index::>() => - { + // We need to still support v3 until orml_asset_registry migrates to the last + // version. + let location = match meta.location { + Some(VersionedLocation::V3(location)) => location.try_into().map_err(|_| { + DispatchError::Other("v3 is isometric to v4 and should not fail") + })?, + Some(VersionedLocation::V4(location)) => location, + _ => Err(Error::::AssetNotLiquidityPoolsWrappedToken)?, + }; + + let pallet_index = ::PalletInfo::index::>(); + + match location.unpack() { + ( + 0, + &[PalletInstance(pallet_instance), GlobalConsensus(NetworkId::Ethereum { chain_id }), AccountKey20 { + network: None, + key: address, + }], + ) if Some(pallet_instance.into()) == pallet_index => { Ok(LiquidityPoolsWrappedToken::EVM { chain_id, address }) } _ => Err(Error::::AssetNotLiquidityPoolsWrappedToken.into()), diff --git a/pallets/liquidity-pools/src/routers.rs b/pallets/liquidity-pools/src/routers.rs index 29ebef06ef..15d16e4dec 100644 --- a/pallets/liquidity-pools/src/routers.rs +++ b/pallets/liquidity-pools/src/routers.rs @@ -3,7 +3,7 @@ use scale_info::TypeInfo; use sp_core::H160; use sp_runtime::{traits::ConstU32, BoundedVec}; use sp_std::boxed::Box; -use staging_xcm::VersionedMultiLocation; +use staging_xcm::VersionedLocation; #[allow(clippy::derive_partial_eq_without_eq)] // XcmDomain does not impl Eq #[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen)] @@ -19,7 +19,7 @@ pub enum Router { #[cfg_attr(feature = "std", derive(Debug))] pub struct XcmDomain { /// the xcm multilocation of the domain - pub location: Box, + pub location: Box, /// The ethereum_xcm::Call::transact call index on a given domain. /// It should contain the pallet index + the `transact` call index, to which /// we will append the eth_tx param. You can obtain this value by building diff --git a/pallets/oracle-collection/src/benchmarking.rs b/pallets/oracle-collection/src/benchmarking.rs index d450416c11..9092fd0e44 100644 --- a/pallets/oracle-collection/src/benchmarking.rs +++ b/pallets/oracle-collection/src/benchmarking.rs @@ -3,7 +3,6 @@ use cfg_traits::{ }; use frame_benchmarking::{v2::*, whitelisted_caller}; use frame_system::RawOrigin; -use sp_std::vec; // required for #[benchmarks] use crate::{ pallet::{Call, Collection, Config, Pallet}, diff --git a/pallets/oracle-feed/src/benchmarking.rs b/pallets/oracle-feed/src/benchmarking.rs index 26b8563eb8..a4532f8b06 100644 --- a/pallets/oracle-feed/src/benchmarking.rs +++ b/pallets/oracle-feed/src/benchmarking.rs @@ -3,7 +3,6 @@ use frame_benchmarking::{v2::*, whitelisted_caller}; use frame_support::traits::OriginTrait; use frame_system::RawOrigin; use parity_scale_codec::Decode; -use sp_std::vec; // required for #[benchmarks] use crate::pallet::{Call, Config, Pallet}; diff --git a/pallets/order-book/Cargo.toml b/pallets/order-book/Cargo.toml index 4b29841b7b..4f9a5e6e16 100644 --- a/pallets/order-book/Cargo.toml +++ b/pallets/order-book/Cargo.toml @@ -37,7 +37,6 @@ cfg-mocks = { workspace = true, default-features = true } cfg-test-utils = { workspace = true, default-features = true } orml-tokens = { workspace = true, default-features = true } pallet-balances = { workspace = true, default-features = true } -pallet-restricted-tokens = { workspace = true, default-features = true } sp-io = { workspace = true, default-features = true } [features] diff --git a/pallets/order-book/src/benchmarking.rs b/pallets/order-book/src/benchmarking.rs index f3cebd0ea8..0d18da483d 100644 --- a/pallets/order-book/src/benchmarking.rs +++ b/pallets/order-book/src/benchmarking.rs @@ -22,7 +22,6 @@ use sp_runtime::{ traits::{checked_pow, Zero}, FixedPointNumber, }; -use sp_std::vec; // required for #[benchmarks] use super::*; diff --git a/pallets/order-book/src/mock.rs b/pallets/order-book/src/mock.rs index b9e56855ec..7c57c67962 100644 --- a/pallets/order-book/src/mock.rs +++ b/pallets/order-book/src/mock.rs @@ -54,11 +54,10 @@ frame_support::construct_runtime!( pub enum Runtime { Balances: pallet_balances, System: frame_system, - OrmlTokens: orml_tokens, + Tokens: orml_tokens, OrderBook: order_book, MockRatioProvider: cfg_mocks::value_provider::pallet, MockFulfilledOrderHook: cfg_mocks::status_notification::pallet, - Tokens: pallet_restricted_tokens, } ); @@ -91,10 +90,8 @@ impl cfg_mocks::status_notification::pallet::Config for Runtime { impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; - type DustRemoval = (); type ExistentialDeposit = ConstU128<1>; - type MaxHolds = ConstU32<1>; - type RuntimeHoldReason = (); + type RuntimeHoldReason = RuntimeHoldReason; } parameter_type_with_key! { @@ -117,34 +114,6 @@ impl orml_tokens::Config for Runtime { type WeightInfo = (); } -parameter_types! { - pub const NativeToken: CurrencyId = CurrencyId::Native; -} - -impl pallet_restricted_tokens::Config for Runtime { - type Balance = Balance; - type CurrencyId = CurrencyId; - type Fungibles = OrmlTokens; - type NativeFungible = Balances; - type NativeToken = NativeToken; - type PreCurrency = cfg_traits::Always; - type PreExtrTransfer = cfg_traits::Always; - type PreFungibleInspect = pallet_restricted_tokens::FungibleInspectPassthrough; - type PreFungibleInspectHold = cfg_traits::Always; - type PreFungibleMutate = cfg_traits::Always; - type PreFungibleMutateHold = cfg_traits::Always; - type PreFungibleTransfer = cfg_traits::Always; - type PreFungiblesInspect = pallet_restricted_tokens::FungiblesInspectPassthrough; - type PreFungiblesInspectHold = cfg_traits::Always; - type PreFungiblesMutate = cfg_traits::Always; - type PreFungiblesMutateHold = cfg_traits::Always; - type PreFungiblesTransfer = cfg_traits::Always; - type PreFungiblesUnbalanced = cfg_traits::Always; - type PreReservableCurrency = cfg_traits::Always; - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); -} - parameter_types! { pub MinFulfillmentAmountNative: Balance = native(2); } diff --git a/pallets/pool-fees/src/benchmarking.rs b/pallets/pool-fees/src/benchmarking.rs index 66ac8fb9e3..4aef893183 100644 --- a/pallets/pool-fees/src/benchmarking.rs +++ b/pallets/pool-fees/src/benchmarking.rs @@ -19,7 +19,6 @@ use cfg_traits::{ use cfg_types::pools::PoolFeeEditor; use frame_benchmarking::v2::*; use frame_support::{assert_ok, dispatch::RawOrigin}; -use sp_std::vec; // required for #[benchmarks] use super::*; use crate::{types::Change, Pallet as PoolFees}; diff --git a/pallets/pool-fees/src/lib.rs b/pallets/pool-fees/src/lib.rs index f7a167ef85..4cf182a03f 100644 --- a/pallets/pool-fees/src/lib.rs +++ b/pallets/pool-fees/src/lib.rs @@ -733,7 +733,7 @@ pub mod pallet { /// the valuation is maximized at this point in time because each unit /// of reserve reduces the NAV by reducing pending to disbursment /// amounts. - /// ```ignore + /// ```text /// NAV(PoolFees) = sum(pending_fee_amount) = sum(epoch_amount - disbursement) /// ``` pub fn update_portfolio_valuation_for_pool( diff --git a/pallets/pool-registry/Cargo.toml b/pallets/pool-registry/Cargo.toml index 718adf7416..a10359b755 100644 --- a/pallets/pool-registry/Cargo.toml +++ b/pallets/pool-registry/Cargo.toml @@ -45,7 +45,6 @@ pallet-permissions = { workspace = true, default-features = true } pallet-pool-fees = { workspace = true, default-features = true } pallet-pool-system = { workspace = true, default-features = true } pallet-timestamp = { workspace = true, default-features = true } -parachain-info = { workspace = true, default-features = true } serde = { workspace = true, default-features = true } sp-core = { workspace = true, default-features = true } sp-io = { workspace = true, default-features = true } diff --git a/pallets/pool-registry/src/lib.rs b/pallets/pool-registry/src/lib.rs index 8f9dc5fd28..78b46b3b00 100644 --- a/pallets/pool-registry/src/lib.rs +++ b/pallets/pool-registry/src/lib.rs @@ -39,7 +39,7 @@ use sp_runtime::{ FixedPointNumber, FixedPointOperand, }; use sp_std::vec::Vec; -use staging_xcm::VersionedMultiLocation; +use staging_xcm::VersionedLocation; pub use weights::WeightInfo; #[cfg(feature = "runtime-benchmarks")] @@ -431,7 +431,7 @@ pub mod pallet { } } - impl cfg_traits::PoolMetadata for Pallet { + impl cfg_traits::PoolMetadata for Pallet { type AssetMetadata = AssetMetadataOf; type CustomMetadata = CustomMetadata; type PoolId = T::PoolId; @@ -471,7 +471,7 @@ pub mod pallet { name: Option>, symbol: Option>, existential_deposit: Option, - location: Option>, + location: Option>, additional: Option, ) -> DispatchResult { let currency_id = T::TrancheCurrency::generate(pool_id, tranche).into(); diff --git a/pallets/pool-registry/src/mock.rs b/pallets/pool-registry/src/mock.rs index dd8915028a..ddbdf93ee4 100644 --- a/pallets/pool-registry/src/mock.rs +++ b/pallets/pool-registry/src/mock.rs @@ -30,7 +30,7 @@ use cfg_types::{ }; use frame_support::{ derive_impl, - dispatch::{DispatchResult, RawOrigin}, + dispatch::DispatchResult, pallet_prelude::DispatchError, parameter_types, traits::{Contains, EnsureOriginWithArg, Hooks, PalletInfoAccess, SortedMembers}, @@ -125,6 +125,7 @@ impl EnsureOriginWithArg for All { #[cfg(feature = "runtime-benchmarks")] fn try_successful_origin(_: &PoolId) -> Result { + use frame_support::dispatch::RawOrigin; Ok(RawOrigin::Root.into()) } } diff --git a/pallets/pool-registry/src/tests.rs b/pallets/pool-registry/src/tests.rs index 52d2836166..851a39308e 100644 --- a/pallets/pool-registry/src/tests.rs +++ b/pallets/pool-registry/src/tests.rs @@ -18,7 +18,7 @@ use pallet_pool_system::{ pool_types::PoolChanges, tranches::{TrancheInput, TrancheType}, }; -use staging_xcm::VersionedMultiLocation; +use staging_xcm::VersionedLocation; use crate::{mock::*, pallet, pallet::Error, Event, PoolMetadataOf}; @@ -145,10 +145,12 @@ fn trait_pool_metadata_set_pool_metadata() { .as_bytes() .to_vec(); - assert_ok!(>::set_pool_metadata(pool_id, metadata.clone())); + assert_ok!( + >::set_pool_metadata( + pool_id, + metadata.clone() + ) + ); assert!(find_metadata_event(pool_id, BoundedVec::truncate_from(metadata)).is_some()) }) @@ -223,19 +225,21 @@ fn trait_pool_metadata_get_pool_metadata() { .to_vec(); assert_noop!( - >::get_pool_metadata( + >::get_pool_metadata( pool_id ), Error::::NoSuchPoolMetadata ); - assert_ok!(>::set_pool_metadata(pool_id, metadata_bytes.clone())); + assert_ok!( + >::set_pool_metadata( + pool_id, + metadata_bytes.clone() + ) + ); assert_eq!( - >::get_pool_metadata( + >::get_pool_metadata( pool_id ), Ok(PoolMetadataOf:: { @@ -266,7 +270,7 @@ fn trait_pool_metadata_create_tranche_token_metadata() { assert_ok!(>::create_tranche_token_metadata( pool_id, tranche_id, metadata )); @@ -290,7 +294,7 @@ fn trait_pool_metadata_get_tranche_token_metadata() { }; assert_noop!( - >::get_tranche_token_metadata( + >::get_tranche_token_metadata( pool_id, tranche_id ), Error::::MetadataForCurrencyNotFound @@ -298,7 +302,7 @@ fn trait_pool_metadata_get_tranche_token_metadata() { assert_ok!(>::create_tranche_token_metadata( pool_id, tranche_id, metadata.clone() )); @@ -306,7 +310,7 @@ fn trait_pool_metadata_get_tranche_token_metadata() { assert_eq!( >::get_tranche_token_metadata(pool_id, tranche_id), Ok(metadata) ); @@ -339,12 +343,12 @@ fn trait_pool_metadata_update_tranche_token_metadata() { assert_ok!(>::create_tranche_token_metadata(pool_id, tranche_id, old)); assert_ok!(>::update_tranche_token_metadata( pool_id, tranche_id, @@ -359,7 +363,7 @@ fn trait_pool_metadata_update_tranche_token_metadata() { assert_eq!( >::get_tranche_token_metadata(pool_id, tranche_id), Ok(new) ); diff --git a/pallets/pool-system/Cargo.toml b/pallets/pool-system/Cargo.toml index c4889953d4..05535520f6 100644 --- a/pallets/pool-system/Cargo.toml +++ b/pallets/pool-system/Cargo.toml @@ -48,11 +48,9 @@ pallet-balances = { workspace = true, default-features = true } pallet-investments = { workspace = true, default-features = true } pallet-pool-fees = { workspace = true, default-features = true } pallet-restricted-tokens = { workspace = true, default-features = true } -parachain-info = { workspace = true, default-features = true } rand = { workspace = true, default-features = true } sp-core = { workspace = true, default-features = true } sp-io = { workspace = true, default-features = true } -staging-xcm = { workspace = true, default-features = true } [features] default = ["std"] diff --git a/pallets/pool-system/src/mock.rs b/pallets/pool-system/src/mock.rs index 53748c57e1..da4ec270df 100644 --- a/pallets/pool-system/src/mock.rs +++ b/pallets/pool-system/src/mock.rs @@ -152,7 +152,7 @@ impl pallet_balances::Config for Runtime { type Balance = Balance; type DustRemoval = (); type ExistentialDeposit = ConstU128<1>; - type RuntimeHoldReason = (); + type RuntimeHoldReason = RuntimeHoldReason; } parameter_types! { @@ -223,8 +223,6 @@ parameter_types! { pub const MockParachainId: u32 = 100; } -impl parachain_info::Config for Runtime {} - parameter_types! { pub const NativeToken: CurrencyId = CurrencyId::Native; } @@ -250,6 +248,7 @@ impl pallet_restricted_tokens::Config for Runtime { type PreFungiblesUnbalanced = cfg_traits::Always; type PreReservableCurrency = cfg_traits::Always; type RuntimeEvent = RuntimeEvent; + type RuntimeHoldReason = RuntimeHoldReason; type WeightInfo = (); } @@ -394,6 +393,7 @@ impl EnsureOriginWithArg for All { #[cfg(feature = "runtime-benchmarks")] fn try_successful_origin(_: &PoolId) -> Result { + use frame_support::dispatch::RawOrigin; Ok(RawOrigin::Root.into()) } } diff --git a/pallets/pool-system/src/tests/mod.rs b/pallets/pool-system/src/tests/mod.rs index 7054e0a7ae..d3554142d7 100644 --- a/pallets/pool-system/src/tests/mod.rs +++ b/pallets/pool-system/src/tests/mod.rs @@ -1428,8 +1428,7 @@ fn valid_tranche_structure_is_enforced() { ], AUSD_CURRENCY_ID, 10_000 * CURRENCY, - - vec![], + vec![], ), Error::::InvalidTrancheStructure ); @@ -1492,8 +1491,7 @@ fn valid_tranche_structure_is_enforced() { ], AUSD_CURRENCY_ID, 10_000 * CURRENCY, - - vec![], + vec![], ), Error::::InvalidTrancheStructure ); @@ -1548,8 +1546,7 @@ fn valid_tranche_structure_is_enforced() { ], AUSD_CURRENCY_ID, 10_000 * CURRENCY, - - vec![], + vec![], ), Error::::InvalidTrancheStructure ); @@ -1601,8 +1598,7 @@ fn valid_tranche_structure_is_enforced() { ], AUSD_CURRENCY_ID, 10_000 * CURRENCY, - - vec![], + vec![], ), Error::::InvalidTrancheStructure ); diff --git a/pallets/restricted-tokens/src/benchmarking.rs b/pallets/restricted-tokens/src/benchmarking.rs index 05d9b9a17a..bf985bf58b 100644 --- a/pallets/restricted-tokens/src/benchmarking.rs +++ b/pallets/restricted-tokens/src/benchmarking.rs @@ -36,8 +36,10 @@ fn make_free_balance( balance: ::Balance, ) where T: Config - + pallet_balances::Config::Balance> - + orml_tokens::Config< + + pallet_balances::Config< + Balance = ::Balance, + RuntimeHoldReason = ::RuntimeHoldReason, + > + orml_tokens::Config< Balance = ::Balance, CurrencyId = ::CurrencyId, >, @@ -69,8 +71,10 @@ fn reserve_balance( balance: ::Balance, ) where T: Config - + pallet_balances::Config::Balance, RuntimeHoldReason = ()> - + orml_tokens::Config< + + pallet_balances::Config< + Balance = ::Balance, + RuntimeHoldReason = ::RuntimeHoldReason, + > + orml_tokens::Config< Balance = ::Balance, CurrencyId = ::CurrencyId, >, @@ -81,7 +85,7 @@ fn reserve_balance( "Providers should not be zero" ); as fungible::MutateHold>::hold( - &Default::default(), + &HoldReason::NativeIndex.into(), account, balance, ) @@ -89,7 +93,7 @@ fn reserve_balance( } else { as fungibles::MutateHold>::hold( currency_id, - &Default::default(), + &(), account, balance, ) @@ -149,8 +153,10 @@ fn set_up_account( ) -> T::AccountId where T: Config - + pallet_balances::Config::Balance, RuntimeHoldReason = ()> - + orml_tokens::Config< + + pallet_balances::Config< + Balance = ::Balance, + RuntimeHoldReason = ::RuntimeHoldReason, + > + orml_tokens::Config< Balance = ::Balance, CurrencyId = ::CurrencyId, > + pallet_permissions::Config, Role = Role>, @@ -190,7 +196,10 @@ benchmarks! { where_clause { where T: Config - + pallet_balances::Config::Balance, RuntimeHoldReason = ()> + + pallet_balances::Config< + Balance = ::Balance, + RuntimeHoldReason = ::RuntimeHoldReason, + > + orml_tokens::Config::Balance, CurrencyId = ::CurrencyId> + pallet_permissions::Config, Role = Role>, ::Balance: From + Zero, diff --git a/pallets/restricted-tokens/src/impl_fungible.rs b/pallets/restricted-tokens/src/impl_fungible.rs index 1785138358..875b83c068 100644 --- a/pallets/restricted-tokens/src/impl_fungible.rs +++ b/pallets/restricted-tokens/src/impl_fungible.rs @@ -126,7 +126,7 @@ pub enum FungibleInspectHoldEffects { } impl InspectHold for Pallet { - type Reason = (); + type Reason = T::RuntimeHoldReason; fn total_balance_on_hold(who: &T::AccountId) -> Self::Balance { >::total_balance_on_hold(who) diff --git a/pallets/restricted-tokens/src/impl_fungibles.rs b/pallets/restricted-tokens/src/impl_fungibles.rs index 9f59f5cdde..d841587740 100644 --- a/pallets/restricted-tokens/src/impl_fungibles.rs +++ b/pallets/restricted-tokens/src/impl_fungibles.rs @@ -199,22 +199,28 @@ impl InspectHold for Pallet { fn balance_on_hold( asset: Self::AssetId, - reason: &Self::Reason, + _reason: &Self::Reason, who: &T::AccountId, ) -> Self::Balance { if asset == T::NativeToken::get() { - >::balance_on_hold(reason, who) + >::balance_on_hold( + &HoldReason::NativeIndex.into(), + who, + ) } else { - >::balance_on_hold(asset, reason, who) + >::balance_on_hold(asset, &(), who) } } - fn hold_available(asset: Self::AssetId, reason: &Self::Reason, who: &T::AccountId) -> bool { + fn hold_available(asset: Self::AssetId, _reason: &Self::Reason, who: &T::AccountId) -> bool { if asset == T::NativeToken::get() { - >::hold_available(reason, who) + >::hold_available( + &HoldReason::NativeIndex.into(), + who, + ) } else { let hold_available = - >::hold_available(asset, reason, who); + >::hold_available(asset, &(), who); T::PreFungiblesInspectHold::check(FungiblesInspectHoldEffects::HoldAvailable( asset, @@ -226,15 +232,19 @@ impl InspectHold for Pallet { fn can_hold( asset: Self::AssetId, - reason: &Self::Reason, + _reason: &Self::Reason, who: &T::AccountId, amount: Self::Balance, ) -> bool { if asset == T::NativeToken::get() { - >::can_hold(reason, who, amount) + >::can_hold( + &HoldReason::NativeIndex.into(), + who, + amount, + ) } else { let can_hold = - >::can_hold(asset, reason, who, amount); + >::can_hold(asset, &(), who, amount); T::PreFungiblesInspectHold::check(FungiblesInspectHoldEffects::CanHold( asset, @@ -380,13 +390,15 @@ pub enum FungiblesMutateHoldEffects { impl fungibles::hold::Unbalanced for Pallet { fn set_balance_on_hold( asset: Self::AssetId, - reason: &Self::Reason, + _reason: &Self::Reason, who: &T::AccountId, amount: Self::Balance, ) -> sp_runtime::DispatchResult { if asset == T::NativeToken::get() { >::set_balance_on_hold( - reason, who, amount, + &HoldReason::NativeIndex.into(), + who, + amount, ) } else { ensure!( @@ -399,7 +411,10 @@ impl fungibles::hold::Unbalanced for Pallet { ); >::set_balance_on_hold( - asset, reason, who, amount, + asset, + &(), + who, + amount, ) } } @@ -408,12 +423,16 @@ impl fungibles::hold::Unbalanced for Pallet { impl MutateHold for Pallet { fn hold( asset: Self::AssetId, - reason: &Self::Reason, + _reason: &Self::Reason, who: &T::AccountId, amount: Self::Balance, ) -> DispatchResult { if asset == T::NativeToken::get() { - >::hold(reason, who, amount) + >::hold( + &HoldReason::NativeIndex.into(), + who, + amount, + ) } else { ensure!( T::PreFungiblesMutateHold::check(FungiblesMutateHoldEffects::Hold( @@ -424,19 +443,24 @@ impl MutateHold for Pallet { Error::::PreConditionsNotMet ); - >::hold(asset, reason, who, amount) + >::hold(asset, &(), who, amount) } } fn release( asset: Self::AssetId, - reason: &Self::Reason, + _reason: &Self::Reason, who: &T::AccountId, amount: Self::Balance, precision: Precision, ) -> Result { if asset == T::NativeToken::get() { - >::release(reason, who, amount, precision) + >::release( + &HoldReason::NativeIndex.into(), + who, + amount, + precision, + ) } else { ensure!( T::PreFungiblesMutateHold::check(FungiblesMutateHoldEffects::Release( @@ -448,15 +472,13 @@ impl MutateHold for Pallet { Error::::PreConditionsNotMet ); - >::release( - asset, reason, who, amount, precision, - ) + >::release(asset, &(), who, amount, precision) } } fn transfer_on_hold( asset: Self::AssetId, - reason: &Self::Reason, + _reason: &Self::Reason, source: &T::AccountId, dest: &T::AccountId, amount: Self::Balance, @@ -466,7 +488,13 @@ impl MutateHold for Pallet { ) -> Result { if asset == T::NativeToken::get() { >::transfer_on_hold( - reason, source, dest, amount, precision, mode, force, + &HoldReason::NativeIndex.into(), + source, + dest, + amount, + precision, + mode, + force, ) } else { ensure!( @@ -482,7 +510,14 @@ impl MutateHold for Pallet { ); >::transfer_on_hold( - asset, reason, source, dest, amount, precision, mode, force, + asset, + &(), + source, + dest, + amount, + precision, + mode, + force, ) } } diff --git a/pallets/restricted-tokens/src/lib.rs b/pallets/restricted-tokens/src/lib.rs index 6c64becd23..c224d22018 100644 --- a/pallets/restricted-tokens/src/lib.rs +++ b/pallets/restricted-tokens/src/lib.rs @@ -67,8 +67,8 @@ pub mod pallet { use frame_support::{ pallet_prelude::TypeInfo, sp_runtime::{ - traits::{AtLeast32BitUnsigned, CheckedAdd, StaticLookup}, - ArithmeticError, FixedPointOperand, + traits::{AtLeast32BitUnsigned, EnsureAdd, StaticLookup}, + FixedPointOperand, }, traits::tokens::{Fortitude, Precision, Preservation}, }; @@ -87,6 +87,12 @@ pub mod pallet { }, }; + /// A reason for this pallet placing a hold on funds. + #[pallet::composite_enum] + pub enum HoldReason { + NativeIndex, + } + /// Configure the pallet by specifying the parameters and types on which it /// depends. #[pallet::config] @@ -95,6 +101,9 @@ pub mod pallet { /// definition of an event. type RuntimeEvent: From> + IsType<::RuntimeEvent>; + /// The identifier to be used for holding. + type RuntimeHoldReason: From + Parameter; + /// The balance type type Balance: Parameter + Member @@ -202,7 +211,7 @@ pub mod pallet { + LockableCurrency + ReservableCurrency + fungible::Inspect - + fungible::InspectHold + + fungible::InspectHold + fungible::Mutate + fungible::MutateHold; @@ -497,16 +506,16 @@ pub mod pallet { ) -> DispatchResultWithPostInfo { ensure_root(origin)?; let who = T::Lookup::lookup(who)?; - let new_total = new_free - .checked_add(&new_reserved) - .ok_or(ArithmeticError::Overflow)?; + let new_total = new_free.ensure_add(new_reserved)?; let token = if T::NativeToken::get() == currency_id { - let old_reserved = - >::balance_on_hold(&(), &who); + let old_reserved = >::balance_on_hold( + &HoldReason::NativeIndex.into(), + &who, + ); >::release( - &(), + &HoldReason::NativeIndex.into(), &who, old_reserved, Precision::Exact, @@ -519,7 +528,11 @@ pub mod pallet { Fortitude::Force, )?; >::mint_into(&who, new_total)?; - >::hold(&(), &who, new_reserved)?; + >::hold( + &HoldReason::NativeIndex.into(), + &who, + new_reserved, + )?; TokenType::Native } else { diff --git a/pallets/restricted-tokens/src/mock.rs b/pallets/restricted-tokens/src/mock.rs index 8d84a4057d..8809a2af13 100644 --- a/pallets/restricted-tokens/src/mock.rs +++ b/pallets/restricted-tokens/src/mock.rs @@ -14,6 +14,8 @@ use cfg_traits::PreConditions; use frame_support::{derive_impl, parameter_types}; use orml_traits::parameter_type_with_key; use pallet_restricted_tokens::TransferDetails; +use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; +use scale_info::TypeInfo; #[cfg(feature = "std")] use serde::{Deserialize, Serialize}; use sp_runtime::{traits::ConstU32, BuildStorage}; @@ -349,17 +351,7 @@ mod filter { } #[derive( - parity_scale_codec::Encode, - parity_scale_codec::Decode, - Clone, - Copy, - Debug, - PartialOrd, - Ord, - PartialEq, - Eq, - scale_info::TypeInfo, - parity_scale_codec::MaxEncodedLen, + Encode, Decode, Clone, Copy, Debug, PartialOrd, Ord, PartialEq, Eq, TypeInfo, MaxEncodedLen, )] #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub enum CurrencyId { @@ -392,10 +384,8 @@ parameter_types! { #[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] impl pallet_balances::Config for Runtime { type AccountStore = System; - type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; - type MaxHolds = ConstU32<1>; - type RuntimeHoldReason = (); + type RuntimeHoldReason = RuntimeHoldReason; } parameter_type_with_key! { @@ -444,6 +434,7 @@ impl pallet_restricted_tokens::Config for Runtime { type PreFungiblesUnbalanced = filter::fungibles::UnbalancedFilter; type PreReservableCurrency = cfg_traits::Always; type RuntimeEvent = RuntimeEvent; + type RuntimeHoldReason = RuntimeHoldReason; type WeightInfo = (); } diff --git a/pallets/restricted-tokens/src/tests.rs b/pallets/restricted-tokens/src/tests.rs index fcad7514b4..8c6d5a50e8 100644 --- a/pallets/restricted-tokens/src/tests.rs +++ b/pallets/restricted-tokens/src/tests.rs @@ -25,7 +25,7 @@ use orml_traits::GetByKey; use crate::{ mock::{DISTR_PER_ACCOUNT, *}, - Error, + Error, HoldReason, }; #[test] @@ -252,10 +252,9 @@ fn set_balance_native_works() { 1, CurrencyId::Cfg, 200, - 100 + 100, )); assert_eq!(System::account(1).data.free, 200); - assert_eq!(System::account(1).data.reserved, 100); }) } @@ -269,7 +268,7 @@ fn set_balance_foreign_works() { 1, CurrencyId::AUSD, 200, - 100 + 100, )); assert!(orml_tokens::Pallet::::accounts(1, CurrencyId::AUSD).free == 200); assert!(orml_tokens::Pallet::::accounts(1, CurrencyId::AUSD).reserved == 100); @@ -279,7 +278,7 @@ fn set_balance_foreign_works() { 1, CurrencyId::AUSD, 400, - 200 + 200, )); assert!(orml_tokens::Pallet::::accounts(1, CurrencyId::AUSD).free == 400); assert!(orml_tokens::Pallet::::accounts(1, CurrencyId::AUSD).reserved == 200); @@ -396,7 +395,7 @@ fn fungible_balance_on_hold() { assert_eq!( as fungible::InspectHold< AccountId, - >>::balance_on_hold(&(), &1), + >>::balance_on_hold(&HoldReason::NativeIndex.into(), &1), 0 ); }) @@ -410,7 +409,7 @@ fn fungible_can_hold() { assert!( as fungible::InspectHold< AccountId, - >>::can_hold(&(), &1, DISTR_PER_ACCOUNT) + >>::can_hold(&HoldReason::NativeIndex.into(), &1, DISTR_PER_ACCOUNT) ); }) } @@ -441,7 +440,7 @@ fn fungible_hold() { assert!( as fungible::MutateHold< AccountId, - >>::hold(&(), &1, DISTR_PER_ACCOUNT) + >>::hold(&HoldReason::NativeIndex.into(), &1, DISTR_PER_ACCOUNT) .is_ok() ); }) @@ -455,13 +454,13 @@ fn fungible_release() { assert!( as fungible::MutateHold< AccountId, - >>::hold(&(), &1, DISTR_PER_ACCOUNT) + >>::hold(&HoldReason::NativeIndex.into(), &1, DISTR_PER_ACCOUNT) .is_ok() ); assert!( as fungible::MutateHold< AccountId, - >>::release(&(), &1, DISTR_PER_ACCOUNT, Precision::Exact) + >>::release(&HoldReason::NativeIndex.into(), &1, DISTR_PER_ACCOUNT, Precision::Exact) .is_ok() ); }) @@ -472,13 +471,13 @@ fn fungible_transfer_on_hold() { TestExternalitiesBuilder::default() .build(Some(|| {})) .execute_with(|| { - assert!( as fungible::MutateHold>::hold(&(), &1, DISTR_PER_ACCOUNT).is_ok()); - assert!( as fungible::MutateHold>::transfer_on_hold(&(), &1, &9, DISTR_PER_ACCOUNT, Precision::Exact, Restriction::OnHold, Fortitude::Polite).is_ok()); + assert!( as fungible::MutateHold>::hold(&HoldReason::NativeIndex.into(), &1, DISTR_PER_ACCOUNT).is_ok()); + assert!( as fungible::MutateHold>::transfer_on_hold(&HoldReason::NativeIndex.into(), &1, &9, DISTR_PER_ACCOUNT, Precision::Exact, Restriction::OnHold, Fortitude::Polite).is_ok()); assert_eq!( as fungible::Inspect>::reducible_balance(&1, Preservation::Preserve, Fortitude::Polite), 0); assert_eq!( as fungible::Inspect>::reducible_balance(&9, Preservation::Preserve, Fortitude::Polite), DISTR_PER_ACCOUNT - 2 * ExistentialDeposit::get()); - assert!( as fungible::MutateHold>::hold(&(), &2, DISTR_PER_ACCOUNT).is_ok()); - assert!( as fungible::MutateHold>::transfer_on_hold(&(), &2, &9, DISTR_PER_ACCOUNT, Precision::Exact, Restriction::Free,Fortitude::Polite).is_ok()); + assert!( as fungible::MutateHold>::hold(&HoldReason::NativeIndex.into(), &2, DISTR_PER_ACCOUNT).is_ok()); + assert!( as fungible::MutateHold>::transfer_on_hold(&HoldReason::NativeIndex.into(), &2, &9, DISTR_PER_ACCOUNT, Precision::Exact, Restriction::Free,Fortitude::Polite).is_ok()); assert_eq!( as fungible::Inspect>::reducible_balance(&2, Preservation::Preserve, Fortitude::Polite), 0); assert_eq!( as fungible::Inspect>::reducible_balance(&9, Preservation::Preserve, Fortitude::Polite), 2 * DISTR_PER_ACCOUNT - 2 * ExistentialDeposit::get()); }) @@ -1315,11 +1314,18 @@ mod fungible_hold { fn hold_available() { TestExternalitiesBuilder::default() .build(Some(|| { - assert_ok!(Tokens::hold(&(), &HOLD_USER, RESERVED)); + assert_ok!(Tokens::hold( + &HoldReason::NativeIndex.into(), + &HOLD_USER, + RESERVED + )); })) .execute_with(|| { - assert!(Tokens::hold_available(&(), &1)); - assert!(Tokens::hold_available(&(), &HOLD_USER)); + assert!(Tokens::hold_available(&HoldReason::NativeIndex.into(), &1)); + assert!(Tokens::hold_available( + &HoldReason::NativeIndex.into(), + &HOLD_USER + )); }) } @@ -1327,14 +1333,30 @@ mod fungible_hold { fn balance_on_hold() { TestExternalitiesBuilder::default() .build(Some(|| { - assert_ok!(Tokens::hold(&(), &HOLD_USER, RESERVED)); + assert_ok!(Tokens::hold( + &HoldReason::NativeIndex.into(), + &HOLD_USER, + RESERVED + )); })) .execute_with(|| { - assert_eq!(Tokens::balance_on_hold(&(), &1), 0); - assert_eq!(Tokens::balance_on_hold(&(), &1), 0); + assert_eq!( + Tokens::balance_on_hold(&HoldReason::NativeIndex.into(), &1), + 0 + ); + assert_eq!( + Tokens::balance_on_hold(&HoldReason::NativeIndex.into(), &1), + 0 + ); - assert_eq!(Tokens::balance_on_hold(&(), &HOLD_USER), RESERVED); - assert_eq!(Tokens::balance_on_hold(&(), &HOLD_USER), RESERVED); + assert_eq!( + Tokens::balance_on_hold(&HoldReason::NativeIndex.into(), &HOLD_USER), + RESERVED + ); + assert_eq!( + Tokens::balance_on_hold(&HoldReason::NativeIndex.into(), &HOLD_USER), + RESERVED + ); }) } @@ -1342,7 +1364,11 @@ mod fungible_hold { fn total_balance_on_hold() { TestExternalitiesBuilder::default() .build(Some(|| { - assert_ok!(Tokens::hold(&(), &HOLD_USER, RESERVED)); + assert_ok!(Tokens::hold( + &HoldReason::NativeIndex.into(), + &HOLD_USER, + RESERVED + )); })) .execute_with(|| { assert_eq!(Tokens::total_balance_on_hold(&1), 0); @@ -1357,7 +1383,11 @@ mod fungible_hold { fn reducible_total_balance_on_hold() { TestExternalitiesBuilder::default() .build(Some(|| { - assert_ok!(Tokens::hold(&(), &HOLD_USER, RESERVED)); + assert_ok!(Tokens::hold( + &HoldReason::NativeIndex.into(), + &HOLD_USER, + RESERVED + )); })) .execute_with(|| { assert_eq!( @@ -1384,7 +1414,11 @@ mod fungible_hold { fn reducible_balance() { TestExternalitiesBuilder::default() .build(Some(|| { - assert_ok!(Tokens::hold(&(), &HOLD_USER, RESERVED)); + assert_ok!(Tokens::hold( + &HoldReason::NativeIndex.into(), + &HOLD_USER, + RESERVED + )); })) .execute_with(|| { // Total funds can be withdrawn for Expendable and Protect diff --git a/pallets/restricted-xtokens/src/lib.rs b/pallets/restricted-xtokens/src/lib.rs index 525926e20f..15f4c1e6ad 100644 --- a/pallets/restricted-xtokens/src/lib.rs +++ b/pallets/restricted-xtokens/src/lib.rs @@ -23,15 +23,15 @@ //! ### Dispatchable functions //! //! - `transfer`: Transfer local assets with given `CurrencyId` and `Amount`. -//! - `transfer_multiasset`: Transfer `MultiAsset` assets. +//! - `transfer_multiasset`: Transfer `Asset` assets. //! - `transfer_with_fee`: Transfer native currencies specifying the fee and //! amount as separate. -//! - `transfer_multiasset_with_fee`: Transfer `MultiAsset` specifying the fee -//! and amount as separate. +//! - `transfer_multiasset_with_fee`: Transfer `Asset` specifying the fee and +//! amount as separate. //! - `transfer_multicurrencies`: Transfer several currencies specifying the //! item to be used as fee. -//! - `transfer_multiassets`: Transfer several `MultiAsset` specifying the item -//! to be used as fee. +//! - `transfer_multiassets`: Transfer several `Asset` specifying the item to be +//! used as fee. #![cfg_attr(not(feature = "std"), no_std)] #![allow(clippy::from_over_into)] @@ -46,46 +46,44 @@ use frame_system::{ensure_signed, pallet_prelude::*}; use orml_traits::XtokensWeightInfo; pub use pallet::*; use sp_std::{boxed::Box, vec::Vec}; -use staging_xcm::{ - v3::prelude::*, VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation, -}; +use staging_xcm::{v4::prelude::*, VersionedAsset, VersionedAssets, VersionedLocation}; pub enum TransferEffects { Transfer { sender: AccountId, - destination: MultiLocation, + destination: VersionedLocation, currency_id: CurrencyId, amount: Balance, }, TransferMultiAsset { sender: AccountId, - destination: MultiLocation, - asset: MultiAsset, + destination: VersionedLocation, + asset: Asset, }, TransferWithFee { sender: AccountId, - destination: MultiLocation, + destination: VersionedLocation, currency_id: CurrencyId, amount: Balance, fee: Balance, }, TransferMultiAssetWithFee { sender: AccountId, - destination: MultiLocation, - asset: MultiAsset, - fee_asset: MultiAsset, + destination: VersionedLocation, + asset: Asset, + fee_asset: Asset, }, TransferMultiCurrencies { sender: AccountId, - destination: MultiLocation, + destination: VersionedLocation, currencies: Vec<(CurrencyId, Balance)>, fee: (CurrencyId, Balance), }, TransferMultiAssets { sender: AccountId, - destination: MultiLocation, - assets: MultiAssets, - fee_asset: MultiAsset, + destination: VersionedLocation, + assets: Assets, + fee_asset: Asset, }, } @@ -129,17 +127,14 @@ pub mod pallet { origin: OriginFor, currency_id: T::CurrencyId, amount: T::Balance, - dest: Box, + dest: Box, dest_weight_limit: WeightLimit, ) -> DispatchResult { - let destination: MultiLocation = (*dest.clone()) - .try_into() - .map_err(|()| Error::::BadVersion)?; let sender = ensure_signed(origin.clone())?; T::PreTransfer::check(TransferEffects::Transfer { sender, - destination, + destination: (*dest.clone()), currency_id: currency_id.clone(), amount, })?; @@ -153,7 +148,7 @@ pub mod pallet { ) } - /// Transfer `MultiAsset`. + /// Transfer `Asset`. /// /// `dest_weight_limit` is the weight for XCM execution on the dest /// chain, and it would be charged from the transferred assets. If set @@ -169,21 +164,18 @@ pub mod pallet { #[pallet::weight(orml_xtokens::XtokensWeight::< T >::weight_of_transfer_multiasset(asset, dest) + T::DbWeight::get().reads(4))] pub fn transfer_multiasset( origin: OriginFor, - asset: Box, - dest: Box, + asset: Box, + dest: Box, dest_weight_limit: WeightLimit, ) -> DispatchResult { let sender = ensure_signed(origin.clone())?; - let multi_asset: MultiAsset = (*asset.clone()) - .try_into() - .map_err(|()| Error::::BadVersion)?; - let destination: MultiLocation = (*dest.clone()) + let multi_asset: Asset = (*asset.clone()) .try_into() .map_err(|()| Error::::BadVersion)?; T::PreTransfer::check(TransferEffects::TransferMultiAsset { sender, - destination, + destination: (*dest.clone()), asset: multi_asset, })?; @@ -218,17 +210,14 @@ pub mod pallet { currency_id: T::CurrencyId, amount: T::Balance, fee: T::Balance, - dest: Box, + dest: Box, dest_weight_limit: WeightLimit, ) -> DispatchResult { let sender = ensure_signed(origin.clone())?; - let destination: MultiLocation = (*dest.clone()) - .try_into() - .map_err(|()| Error::::BadVersion)?; T::PreTransfer::check(TransferEffects::TransferWithFee { sender, - destination, + destination: (*dest.clone()), currency_id: currency_id.clone(), amount, fee, @@ -244,7 +233,7 @@ pub mod pallet { ) } - /// Transfer `MultiAsset` specifying the fee and amount as separate. + /// Transfer `Asset` specifying the fee and amount as separate. /// /// `dest_weight_limit` is the weight for XCM execution on the dest /// chain, and it would be charged from the transferred assets. If set @@ -254,7 +243,7 @@ pub mod pallet { /// `fee` is the multiasset to be spent to pay for execution in /// destination chain. Both fee and amount will be subtracted form the /// callers balance For now we only accept fee and asset having the same - /// `MultiLocation` id. + /// `Location` id. /// /// If `fee` is not high enough to cover for the execution costs in the /// destination chain, then the assets will be trapped in the @@ -269,25 +258,22 @@ pub mod pallet { #[pallet::weight(orml_xtokens::XtokensWeight::< T >::weight_of_transfer_multiasset(asset, dest) + T::DbWeight::get().reads(4))] pub fn transfer_multiasset_with_fee( origin: OriginFor, - asset: Box, - fee: Box, - dest: Box, + asset: Box, + fee: Box, + dest: Box, dest_weight_limit: WeightLimit, ) -> DispatchResult { let sender = ensure_signed(origin.clone())?; - let multi_asset: MultiAsset = (*asset.clone()) + let multi_asset: Asset = (*asset.clone()) .try_into() .map_err(|()| Error::::BadVersion)?; - let fee_asset: MultiAsset = (*fee.clone()) - .try_into() - .map_err(|()| Error::::BadVersion)?; - let destination: MultiLocation = (*dest.clone()) + let fee_asset: Asset = (*fee.clone()) .try_into() .map_err(|()| Error::::BadVersion)?; T::PreTransfer::check(TransferEffects::TransferMultiAssetWithFee { sender, - destination, + destination: (*dest.clone()), asset: multi_asset, fee_asset, })?; @@ -322,20 +308,17 @@ pub mod pallet { origin: OriginFor, currencies: Vec<(T::CurrencyId, T::Balance)>, fee_item: u32, - dest: Box, + dest: Box, dest_weight_limit: WeightLimit, ) -> DispatchResult { let sender = ensure_signed(origin.clone())?; - let destination: MultiLocation = (*dest.clone()) - .try_into() - .map_err(|()| Error::::BadVersion)?; let fee = currencies .get(fee_item as usize) .ok_or(orml_xtokens::Error::::AssetIndexNonExistent)?; T::PreTransfer::check(TransferEffects::TransferMultiCurrencies { sender, - destination, + destination: (*dest.clone()), currencies: currencies.clone(), fee: fee.clone(), })?; @@ -349,14 +332,14 @@ pub mod pallet { ) } - /// Transfer several `MultiAsset` specifying the item to be used as fee + /// Transfer several `Asset` specifying the item to be used as fee /// /// `dest_weight_limit` is the weight for XCM execution on the dest /// chain, and it would be charged from the transferred assets. If set /// below requirements, the execution may fail and assets wouldn't be /// received. /// - /// `fee_item` is index of the MultiAssets that we want to use for + /// `fee_item` is index of the Assets that we want to use for /// payment /// /// It's a no-op if any error on local XCM execution or message sending. @@ -368,25 +351,22 @@ pub mod pallet { #[pallet::weight(orml_xtokens::XtokensWeight::< T >::weight_of_transfer_multiassets(assets, fee_item, dest) + T::DbWeight::get().reads(4))] pub fn transfer_multiassets( origin: OriginFor, - assets: Box, + assets: Box, fee_item: u32, - dest: Box, + dest: Box, dest_weight_limit: WeightLimit, ) -> DispatchResult { let sender = ensure_signed(origin.clone())?; - let multi_assets: MultiAssets = (*assets.clone()) - .try_into() - .map_err(|()| Error::::BadVersion)?; - let destination: MultiLocation = (*dest.clone()) + let multi_assets: Assets = (*assets.clone()) .try_into() .map_err(|()| Error::::BadVersion)?; - let fee_asset: &MultiAsset = multi_assets + let fee_asset: &Asset = multi_assets .get(fee_item as usize) .ok_or(orml_xtokens::Error::::AssetIndexNonExistent)?; T::PreTransfer::check(TransferEffects::TransferMultiAssets { sender, - destination, + destination: (*dest.clone()), assets: multi_assets.clone(), fee_asset: fee_asset.clone(), })?; diff --git a/pallets/rewards/src/issuance.rs b/pallets/rewards/src/issuance.rs index 8ea5860297..3e8b873abf 100644 --- a/pallets/rewards/src/issuance.rs +++ b/pallets/rewards/src/issuance.rs @@ -15,7 +15,7 @@ use cfg_traits::rewards::RewardIssuance; use frame_support::traits::{fungibles::Mutate, tokens::Preservation}; use parity_scale_codec::{Decode, Encode}; use sp_runtime::{traits::Get, DispatchResult}; -use sp_std::marker::PhantomData; +use sp_std::{cmp::Eq, marker::PhantomData}; /// Enables rewarding out of thin air, e.g. via minting. pub struct MintReward( @@ -25,7 +25,7 @@ pub struct MintReward( impl RewardIssuance for MintReward where - AccountId: Encode + Decode, + AccountId: Encode + Decode + Eq, Currency: Mutate, { type AccountId = AccountId; @@ -49,7 +49,7 @@ pub struct TransferReward RewardIssuance for TransferReward where - AccountId: Encode + Decode, + AccountId: Encode + Decode + Eq, Currency: Mutate, SourceAddress: Get, { diff --git a/pallets/token-mux/src/benchmarking.rs b/pallets/token-mux/src/benchmarking.rs index 4364d16143..bee4f672f4 100644 --- a/pallets/token-mux/src/benchmarking.rs +++ b/pallets/token-mux/src/benchmarking.rs @@ -21,7 +21,6 @@ use frame_support::traits::fungibles::{Inspect, Mutate}; use frame_system::RawOrigin; use orml_traits::asset_registry::{Inspect as OrmlInspect, Mutate as OrmlMutate}; use sp_arithmetic::traits::{One, Zero}; -use sp_std::vec; // required for #[benchmarks] use super::*; diff --git a/pallets/transfer-allowlist/src/benchmarking.rs b/pallets/transfer-allowlist/src/benchmarking.rs index 724b692198..6a2e4c6b82 100644 --- a/pallets/transfer-allowlist/src/benchmarking.rs +++ b/pallets/transfer-allowlist/src/benchmarking.rs @@ -13,13 +13,13 @@ #![cfg(feature = "runtime-benchmarks")] use cfg_types::tokens::{CurrencyId, FilterCurrency}; -use frame_benchmarking::*; +use frame_benchmarking::{account, v2::*}; use frame_support::{ pallet_prelude::Get, traits::{fungible::Unbalanced, tokens::Precision, Currency, ReservableCurrency}, }; use frame_system::{pallet_prelude::BlockNumberFor, RawOrigin}; -use parity_scale_codec::EncodeLike; +use sp_core::crypto::AccountId32; use sp_runtime::{ traits::{CheckedAdd, One}, Saturating, @@ -29,105 +29,283 @@ use super::*; const BENCHMARK_CURRENCY_ID: FilterCurrency = FilterCurrency::Specific(CurrencyId::ForeignAsset(1)); -benchmarks! { - where_clause { - where - ::AccountId: Into<::Location>, - ::Location: From<::AccountId> + EncodeLike<::Location>, - ::ReserveCurrency: Currency<::AccountId> + ReservableCurrency<::AccountId>, - T: pallet::Config, - BlockNumberFor: One, - <::ReserveCurrency as frame_support::traits::fungible::Inspect<::AccountId,>>::Balance: From - } +#[benchmarks( +where + T: Config, + ::AccountId: Into, + T::Location: From<::AccountId>, + T::ReserveCurrency: Currency<::AccountId> + ReservableCurrency<::AccountId>, + BlockNumberFor: One, + <::ReserveCurrency as frame_support::traits::fungible::Inspect<::AccountId,>>::Balance: From +)] +mod benchmarks { + use super::*; - add_transfer_allowance_no_existing_metadata { + #[benchmark] + fn add_transfer_allowance_no_existing_metadata() -> Result<(), BenchmarkError> { let (sender, receiver) = set_up_users::(); - }:add_transfer_allowance(RawOrigin::Signed(sender.clone()), BENCHMARK_CURRENCY_ID, receiver.clone().into()) + #[extrinsic_call] + add_transfer_allowance( + RawOrigin::Signed(sender), + BENCHMARK_CURRENCY_ID, + T::Location::from(receiver), + ); - add_transfer_allowance_existing_metadata { - let (sender, receiver) = set_up_users::(); - Pallet::::add_allowance_delay(RawOrigin::Signed(sender.clone()).into(), BENCHMARK_CURRENCY_ID, 200u32.into())?; - }:add_transfer_allowance(RawOrigin::Signed(sender.clone()), BENCHMARK_CURRENCY_ID, receiver.clone().into()) + Ok(()) + } - add_allowance_delay_no_existing_metadata { + #[benchmark] + fn add_transfer_allowance_existing_metadata() -> Result<(), BenchmarkError> { let (sender, receiver) = set_up_users::(); - }:add_allowance_delay(RawOrigin::Signed(sender.clone()), BENCHMARK_CURRENCY_ID, 200u32.into()) + Pallet::::add_allowance_delay( + RawOrigin::Signed(sender.clone()).into(), + BENCHMARK_CURRENCY_ID, + 200u32.into(), + )?; - add_allowance_delay_existing_metadata { - let (sender, receiver) = set_up_users::(); - Pallet::::add_transfer_allowance(RawOrigin::Signed(sender.clone()).into(), BENCHMARK_CURRENCY_ID, receiver.clone().into())?; - }:add_allowance_delay(RawOrigin::Signed(sender.clone()), BENCHMARK_CURRENCY_ID, 200u32.into()) + #[extrinsic_call] + add_transfer_allowance( + RawOrigin::Signed(sender), + BENCHMARK_CURRENCY_ID, + T::Location::from(receiver), + ); + Ok(()) + } + #[benchmark] + fn add_allowance_delay_no_existing_metadata() -> Result<(), BenchmarkError> { + let (sender, _) = set_up_users::(); - toggle_allowance_delay_once_future_modifiable { - let (sender, receiver) = set_up_users::(); - Pallet::::add_allowance_delay(RawOrigin::Signed(sender.clone()).into(), BENCHMARK_CURRENCY_ID, 1u32.into())?; - }:toggle_allowance_delay_once_future_modifiable(RawOrigin::Signed(sender.clone()), BENCHMARK_CURRENCY_ID) + #[extrinsic_call] + add_allowance_delay( + RawOrigin::Signed(sender), + BENCHMARK_CURRENCY_ID, + 200u32.into(), + ); - update_allowance_delay { + Ok(()) + } + #[benchmark] + fn add_allowance_delay_existing_metadata() -> Result<(), BenchmarkError> { let (sender, receiver) = set_up_users::(); - Pallet::::add_allowance_delay(RawOrigin::Signed(sender.clone()).into(), BENCHMARK_CURRENCY_ID, 1u32.into())?; - Pallet::::toggle_allowance_delay_once_future_modifiable(RawOrigin::Signed(sender.clone()).into(), BENCHMARK_CURRENCY_ID)?; + Pallet::::add_transfer_allowance( + RawOrigin::Signed(sender.clone()).into(), + BENCHMARK_CURRENCY_ID, + T::Location::from(receiver), + )?; + + #[extrinsic_call] + add_allowance_delay( + RawOrigin::Signed(sender), + BENCHMARK_CURRENCY_ID, + 200u32.into(), + ); + + Ok(()) + } + + #[benchmark] + fn toggle_allowance_delay_once_future_modifiable() -> Result<(), BenchmarkError> { + let (sender, _) = set_up_users::(); + Pallet::::add_allowance_delay( + RawOrigin::Signed(sender.clone()).into(), + BENCHMARK_CURRENCY_ID, + 1u32.into(), + )?; + + #[extrinsic_call] + toggle_allowance_delay_once_future_modifiable( + RawOrigin::Signed(sender), + BENCHMARK_CURRENCY_ID, + ); + + Ok(()) + } + + #[benchmark] + fn update_allowance_delay() -> Result<(), BenchmarkError> { + let (sender, _) = set_up_users::(); + Pallet::::add_allowance_delay( + RawOrigin::Signed(sender.clone()).into(), + BENCHMARK_CURRENCY_ID, + 1u32.into(), + )?; + Pallet::::toggle_allowance_delay_once_future_modifiable( + RawOrigin::Signed(sender.clone()).into(), + BENCHMARK_CURRENCY_ID, + )?; let b = frame_system::Pallet::::block_number() - .checked_add(&1u32.into()) - .expect("Mock block advancement failed."); + .checked_add(&1u32.into()) + .expect("Mock block advancement failed."); frame_system::Pallet::::set_block_number(b); - }:update_allowance_delay(RawOrigin::Signed(sender.clone()), BENCHMARK_CURRENCY_ID, 200u32.into()) - purge_allowance_delay_no_remaining_metadata { - let (sender, receiver) = set_up_users::(); - Pallet::::add_allowance_delay(RawOrigin::Signed(sender.clone()).into(), BENCHMARK_CURRENCY_ID, 1u32.into())?; - Pallet::::toggle_allowance_delay_once_future_modifiable(RawOrigin::Signed(sender.clone()).into(), BENCHMARK_CURRENCY_ID)?; + #[extrinsic_call] + update_allowance_delay( + RawOrigin::Signed(sender), + BENCHMARK_CURRENCY_ID, + 200u32.into(), + ); + + Ok(()) + } + + #[benchmark] + fn purge_allowance_delay_no_remaining_metadata() -> Result<(), BenchmarkError> { + let (sender, _) = set_up_users::(); + Pallet::::add_allowance_delay( + RawOrigin::Signed(sender.clone()).into(), + BENCHMARK_CURRENCY_ID, + 1u32.into(), + )?; + Pallet::::toggle_allowance_delay_once_future_modifiable( + RawOrigin::Signed(sender.clone()).into(), + BENCHMARK_CURRENCY_ID, + )?; let b = frame_system::Pallet::::block_number() - .checked_add(&2u32.into()) - .expect("Mock block advancement failed."); + .checked_add(&2u32.into()) + .expect("Mock block advancement failed."); frame_system::Pallet::::set_block_number(b); - }:purge_allowance_delay(RawOrigin::Signed(sender.clone()), BENCHMARK_CURRENCY_ID) - purge_allowance_delay_remaining_metadata { + #[extrinsic_call] + purge_allowance_delay(RawOrigin::Signed(sender), BENCHMARK_CURRENCY_ID); + + Ok(()) + } + + #[benchmark] + fn purge_allowance_delay_remaining_metadata() -> Result<(), BenchmarkError> { let (sender, receiver) = set_up_users::(); - Pallet::::add_allowance_delay(RawOrigin::Signed(sender.clone()).into(), BENCHMARK_CURRENCY_ID, 1u32.into())?; - Pallet::::add_transfer_allowance(RawOrigin::Signed(sender.clone()).into(), BENCHMARK_CURRENCY_ID, receiver.clone().into())?; - Pallet::::toggle_allowance_delay_once_future_modifiable(RawOrigin::Signed(sender.clone()).into(), BENCHMARK_CURRENCY_ID)?; + Pallet::::add_allowance_delay( + RawOrigin::Signed(sender.clone()).into(), + BENCHMARK_CURRENCY_ID, + 1u32.into(), + )?; + Pallet::::add_transfer_allowance( + RawOrigin::Signed(sender.clone()).into(), + BENCHMARK_CURRENCY_ID, + T::Location::from(receiver), + )?; + Pallet::::toggle_allowance_delay_once_future_modifiable( + RawOrigin::Signed(sender.clone()).into(), + BENCHMARK_CURRENCY_ID, + )?; let b = frame_system::Pallet::::block_number() - .checked_add(&2u32.into()) - .expect("Mock block advancement failed."); + .checked_add(&2u32.into()) + .expect("Mock block advancement failed."); frame_system::Pallet::::set_block_number(b); - }:purge_allowance_delay(RawOrigin::Signed(sender.clone()), BENCHMARK_CURRENCY_ID) + #[extrinsic_call] + purge_allowance_delay(RawOrigin::Signed(sender), BENCHMARK_CURRENCY_ID); - remove_transfer_allowance_delay_present { + Ok(()) + } + + #[benchmark] + fn remove_transfer_allowance_delay_present() -> Result<(), BenchmarkError> { let (sender, receiver) = set_up_users::(); let delay = BlockNumberFor::::one(); - Pallet::::add_allowance_delay(RawOrigin::Signed(sender.clone()).into(), BENCHMARK_CURRENCY_ID, delay.clone())?; - Pallet::::add_transfer_allowance(RawOrigin::Signed(sender.clone()).into(), BENCHMARK_CURRENCY_ID, receiver.clone().into())?; + Pallet::::add_allowance_delay( + RawOrigin::Signed(sender.clone()).into(), + BENCHMARK_CURRENCY_ID, + delay.clone(), + )?; + Pallet::::add_transfer_allowance( + RawOrigin::Signed(sender.clone()).into(), + BENCHMARK_CURRENCY_ID, + T::Location::from(receiver.clone()), + )?; let b = frame_system::Pallet::::block_number() .checked_add(&1u32.into()) .expect("Mock block advancement failed."); frame_system::Pallet::::set_block_number(b); - }:remove_transfer_allowance(RawOrigin::Signed(sender.clone()), BENCHMARK_CURRENCY_ID, receiver.clone().into()) - remove_transfer_allowance_no_delay { + #[extrinsic_call] + remove_transfer_allowance( + RawOrigin::Signed(sender), + BENCHMARK_CURRENCY_ID, + T::Location::from(receiver), + ); + + Ok(()) + } + + #[benchmark] + fn remove_transfer_allowance_no_delay() -> Result<(), BenchmarkError> { let (sender, receiver) = set_up_users::(); - Pallet::::add_transfer_allowance(RawOrigin::Signed(sender.clone()).into(), BENCHMARK_CURRENCY_ID, receiver.clone().into())?; - }:remove_transfer_allowance(RawOrigin::Signed(sender.clone()), BENCHMARK_CURRENCY_ID, receiver.clone().into()) + Pallet::::add_transfer_allowance( + RawOrigin::Signed(sender.clone()).into(), + BENCHMARK_CURRENCY_ID, + T::Location::from(receiver.clone()), + )?; + + #[extrinsic_call] + remove_transfer_allowance( + RawOrigin::Signed(sender), + BENCHMARK_CURRENCY_ID, + T::Location::from(receiver), + ); - purge_transfer_allowance_no_remaining_metadata { + Ok(()) + } + + #[benchmark] + fn purge_transfer_allowance_no_remaining_metadata() -> Result<(), BenchmarkError> { let (sender, receiver) = set_up_users::(); - Pallet::::add_transfer_allowance(RawOrigin::Signed(sender.clone()).into(), BENCHMARK_CURRENCY_ID, receiver.clone().into())?; - Pallet::::remove_transfer_allowance(RawOrigin::Signed(sender.clone()).into(), BENCHMARK_CURRENCY_ID, receiver.clone().into())?; - }:purge_transfer_allowance(RawOrigin::Signed(sender.clone()), BENCHMARK_CURRENCY_ID, receiver.clone().into()) + Pallet::::add_transfer_allowance( + RawOrigin::Signed(sender.clone()).into(), + BENCHMARK_CURRENCY_ID, + T::Location::from(receiver.clone()), + )?; + Pallet::::remove_transfer_allowance( + RawOrigin::Signed(sender.clone()).into(), + BENCHMARK_CURRENCY_ID, + T::Location::from(receiver.clone()), + )?; + + #[extrinsic_call] + purge_transfer_allowance( + RawOrigin::Signed(sender), + BENCHMARK_CURRENCY_ID, + T::Location::from(receiver.clone()), + ); + + Ok(()) + } - purge_transfer_allowance_remaining_metadata { + #[benchmark] + fn purge_transfer_allowance_remaining_metadata() -> Result<(), BenchmarkError> { let (sender, receiver) = set_up_users::(); let receiver_1 = set_up_second_receiver::(); - Pallet::::add_transfer_allowance(RawOrigin::Signed(sender.clone()).into(), BENCHMARK_CURRENCY_ID, receiver.clone().into())?; - Pallet::::add_transfer_allowance(RawOrigin::Signed(sender.clone()).into(), BENCHMARK_CURRENCY_ID, receiver_1.clone().into())?; - Pallet::::remove_transfer_allowance(RawOrigin::Signed(sender.clone()).into(), BENCHMARK_CURRENCY_ID, receiver.clone().into())?; - }:purge_transfer_allowance(RawOrigin::Signed(sender.clone()), BENCHMARK_CURRENCY_ID, receiver.clone().into()) + Pallet::::add_transfer_allowance( + RawOrigin::Signed(sender.clone()).into(), + BENCHMARK_CURRENCY_ID, + T::Location::from(receiver.clone()), + )?; + Pallet::::add_transfer_allowance( + RawOrigin::Signed(sender.clone()).into(), + BENCHMARK_CURRENCY_ID, + T::Location::from(receiver_1.clone()), + )?; + Pallet::::remove_transfer_allowance( + RawOrigin::Signed(sender.clone()).into(), + BENCHMARK_CURRENCY_ID, + T::Location::from(receiver.clone()), + )?; + + #[extrinsic_call] + purge_transfer_allowance( + RawOrigin::Signed(sender), + BENCHMARK_CURRENCY_ID, + T::Location::from(receiver), + ); + + Ok(()) + } + + impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Runtime); } fn set_up_users() -> (T::AccountId, T::AccountId) @@ -152,5 +330,3 @@ where fn set_up_second_receiver() -> T::AccountId { account::("Receiver_1", 3, 0) } - -impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Runtime); diff --git a/pallets/transfer-allowlist/src/lib.rs b/pallets/transfer-allowlist/src/lib.rs index 32127d411c..aafe0d95cf 100644 --- a/pallets/transfer-allowlist/src/lib.rs +++ b/pallets/transfer-allowlist/src/lib.rs @@ -81,9 +81,14 @@ pub mod pallet { #[pallet::pallet] #[pallet::storage_version(STORAGE_VERSION)] - pub struct Pallet(_); + /// A reason for this pallet placing a hold on funds. + #[pallet::composite_enum] + pub enum HoldReason { + TransferAllowance, + } + #[pallet::config] pub trait Config: frame_system::Config { type RuntimeEvent: From> + IsType<::RuntimeEvent>; @@ -92,24 +97,19 @@ pub mod pallet { /// Currency for holding/unholding with allowlist adding/removal, /// given that the allowlist will be in storage - type ReserveCurrency: fungible::hold::Mutate; + type ReserveCurrency: fungible::hold::Mutate< + Self::AccountId, + Reason = Self::RuntimeHoldReason, + >; /// The identifier to be used for holding. - type HoldId: Get>; + type RuntimeHoldReason: From; /// Deposit amount type Deposit: Get>; /// Type containing the locations a transfer can be sent to. - type Location: Member - + Debug - + Eq - + PartialEq - + TypeInfo - + Encode - + EncodeLike - + Decode - + MaxEncodedLen; + type Location: Member + TypeInfo + Encode + EncodeLike + Decode + MaxEncodedLen; /// Type for pallet weights type WeightInfo: WeightInfo; @@ -348,7 +348,11 @@ pub mod pallet { &receiver, )) { Self::increment_or_create_allowance_count(&account_id, ¤cy_id)?; - T::ReserveCurrency::hold(&T::HoldId::get(), &account_id, T::Deposit::get())?; + T::ReserveCurrency::hold( + &HoldReason::TransferAllowance.into(), + &account_id, + T::Deposit::get(), + )?; }; >::insert( (&account_id, ¤cy_id, &receiver), @@ -428,7 +432,7 @@ pub mod pallet { { Some(AllowanceDetails { blocked_at, .. }) if blocked_at < current_block => { T::ReserveCurrency::release( - &T::HoldId::get(), + &HoldReason::TransferAllowance.into(), &account_id, T::Deposit::get(), Precision::BestEffort, diff --git a/pallets/transfer-allowlist/src/mock.rs b/pallets/transfer-allowlist/src/mock.rs index fb372559e7..de6868e9cf 100644 --- a/pallets/transfer-allowlist/src/mock.rs +++ b/pallets/transfer-allowlist/src/mock.rs @@ -11,22 +11,23 @@ // GNU General Public License for more details. use cfg_types::tokens::FilterCurrency; -use frame_support::{ - derive_impl, parameter_types, - traits::{ConstU32, ConstU64}, - Deserialize, Serialize, -}; +use frame_support::{derive_impl, traits::ConstU64, Deserialize, Serialize}; use frame_system::pallet_prelude::BlockNumberFor; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; -use sp_runtime::{traits::CheckedAdd, BuildStorage}; +use sp_core::crypto::AccountId32; +use sp_runtime::{ + traits::{CheckedAdd, IdentityLookup}, + BuildStorage, +}; use crate as transfer_allowlist; pub(crate) const STARTING_BLOCK: u64 = 50; -pub(crate) const SENDER: u64 = 0x1; -pub(crate) const ACCOUNT_RECEIVER: u64 = 0x2; -pub(crate) const FEE_DEFICIENT_SENDER: u64 = 0x3; +pub(crate) const SENDER: AccountId32 = AccountId32::new([1u8; 32]); +pub(crate) const ACCOUNT_RECEIVER: AccountId32 = AccountId32::new([2u8; 32]); +pub(crate) const FEE_DEFICIENT_SENDER: AccountId32 = AccountId32::new([3u8; 32]); +pub(crate) const OTHER_RECEIVER: AccountId32 = AccountId32::new([100u8; 32]); type Balance = u64; @@ -41,7 +42,24 @@ frame_support::construct_runtime!( #[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; + type AccountId = AccountId32; type Block = frame_system::mocking::MockBlock; + type Lookup = IdentityLookup; +} + +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] +impl pallet_balances::Config for Runtime { + type AccountStore = System; +} + +impl transfer_allowlist::Config for Runtime { + type CurrencyId = FilterCurrency; + type Deposit = ConstU64<10>; + type Location = Location; + type ReserveCurrency = Balances; + type RuntimeEvent = RuntimeEvent; + type RuntimeHoldReason = RuntimeHoldReason; + type WeightInfo = (); } #[derive( @@ -59,36 +77,17 @@ impl frame_system::Config for Runtime { Serialize, )] pub enum Location { - TestLocal(u64), + TestLocal(AccountId32), } -impl From for Location { - fn from(a: u64) -> Self { +impl From for Location { + fn from(a: AccountId32) -> Self { Self::TestLocal(a) } } -#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] -impl pallet_balances::Config for Runtime { - type AccountStore = System; - type DustRemoval = (); - type ExistentialDeposit = ConstU64<1>; - type MaxHolds = ConstU32<1>; - type RuntimeHoldReason = (); -} - -parameter_types! { - pub const HoldId: () = (); -} - -impl transfer_allowlist::Config for Runtime { - type CurrencyId = FilterCurrency; - type Deposit = ConstU64<10>; - type HoldId = HoldId; - type Location = Location; - type ReserveCurrency = Balances; - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); +pub(crate) fn local_location(receiver: AccountId32) -> Location { + receiver.into() } pub fn new_test_ext() -> sp_io::TestExternalities { diff --git a/pallets/transfer-allowlist/src/tests.rs b/pallets/transfer-allowlist/src/tests.rs index dfd603a641..c6e4eb0eb1 100644 --- a/pallets/transfer-allowlist/src/tests.rs +++ b/pallets/transfer-allowlist/src/tests.rs @@ -12,13 +12,13 @@ fn add_transfer_allowance_works() { assert_ok!(TransferAllowList::add_transfer_allowance( RuntimeOrigin::signed(SENDER), TEST_CURRENCY_ID, - ACCOUNT_RECEIVER.into(), + local_location(ACCOUNT_RECEIVER) )); assert_eq!( TransferAllowList::get_account_currency_transfer_allowance(( SENDER, TEST_CURRENCY_ID, - ::Location::from(ACCOUNT_RECEIVER) + local_location(ACCOUNT_RECEIVER) )) .unwrap(), AllowanceDetails { @@ -48,7 +48,7 @@ fn add_transfer_allowance_updates_with_delay_set() { assert_ok!(TransferAllowList::add_transfer_allowance( RuntimeOrigin::signed(SENDER), TEST_CURRENCY_ID, - ACCOUNT_RECEIVER.into(), + local_location(ACCOUNT_RECEIVER) )); assert_ok!(TransferAllowList::add_allowance_delay( RuntimeOrigin::signed(SENDER), @@ -58,7 +58,7 @@ fn add_transfer_allowance_updates_with_delay_set() { assert_ok!(TransferAllowList::add_transfer_allowance( RuntimeOrigin::signed(SENDER), TEST_CURRENCY_ID, - ACCOUNT_RECEIVER.into(), + local_location(ACCOUNT_RECEIVER) ),); // only one allowance has been created, should still only have 1 reserve @@ -67,7 +67,7 @@ fn add_transfer_allowance_updates_with_delay_set() { TransferAllowList::get_account_currency_transfer_allowance(( SENDER, TEST_CURRENCY_ID, - ::Location::from(ACCOUNT_RECEIVER) + local_location(ACCOUNT_RECEIVER) )) .unwrap(), AllowanceDetails { @@ -98,13 +98,13 @@ fn add_transfer_allowance_multiple_dests_increments_correctly() { assert_ok!(TransferAllowList::add_transfer_allowance( RuntimeOrigin::signed(SENDER), TEST_CURRENCY_ID, - ACCOUNT_RECEIVER.into(), + local_location(ACCOUNT_RECEIVER) )); assert_eq!(Balances::reserved_balance(&SENDER), 10); assert_ok!(TransferAllowList::add_transfer_allowance( RuntimeOrigin::signed(SENDER), TEST_CURRENCY_ID, - 100u64.into(), + local_location(OTHER_RECEIVER), )); // verify reserve incremented for second allowance assert_eq!(Balances::reserved_balance(&SENDER), 20); @@ -128,11 +128,15 @@ fn transfer_allowance_allows_correctly_with_allowance_set() { assert_ok!(TransferAllowList::add_transfer_allowance( RuntimeOrigin::signed(SENDER), TEST_CURRENCY_ID, - ACCOUNT_RECEIVER.into(), + local_location(ACCOUNT_RECEIVER) )); assert_eq!( - TransferAllowList::allowance(SENDER.into(), ACCOUNT_RECEIVER.into(), TEST_CURRENCY_ID), - Ok(Some(ACCOUNT_RECEIVER.into())) + TransferAllowList::allowance( + SENDER.into(), + local_location(ACCOUNT_RECEIVER), + TEST_CURRENCY_ID + ), + Ok(Some(local_location(ACCOUNT_RECEIVER))) ) }) } @@ -143,10 +147,14 @@ fn transfer_allowance_blocks_when_account_not_allowed() { assert_ok!(TransferAllowList::add_transfer_allowance( RuntimeOrigin::signed(SENDER), TEST_CURRENCY_ID, - ACCOUNT_RECEIVER.into(), + local_location(ACCOUNT_RECEIVER) )); assert_err!( - TransferAllowList::allowance(SENDER.into(), 55u64.into(), TEST_CURRENCY_ID), + TransferAllowList::allowance( + SENDER.into(), + local_location(OTHER_RECEIVER), + TEST_CURRENCY_ID + ), Error::::NoAllowanceForDestination, ) }) @@ -164,10 +172,14 @@ fn transfer_allowance_blocks_correctly_when_before_start_block() { assert_ok!(TransferAllowList::add_transfer_allowance( RuntimeOrigin::signed(SENDER), TEST_CURRENCY_ID, - ACCOUNT_RECEIVER.into(), + local_location(ACCOUNT_RECEIVER) )); assert_err!( - TransferAllowList::allowance(SENDER.into(), ACCOUNT_RECEIVER.into(), TEST_CURRENCY_ID), + TransferAllowList::allowance( + SENDER.into(), + local_location(ACCOUNT_RECEIVER), + TEST_CURRENCY_ID + ), Error::::NoAllowanceForDestination, ) }) @@ -179,11 +191,15 @@ fn transfer_allowance_blocks_correctly_when_after_blocked_at_block() { assert_ok!(TransferAllowList::add_transfer_allowance( RuntimeOrigin::signed(SENDER), TEST_CURRENCY_ID, - ACCOUNT_RECEIVER.into(), + local_location(ACCOUNT_RECEIVER) )); assert_eq!( - TransferAllowList::allowance(SENDER.into(), ACCOUNT_RECEIVER.into(), TEST_CURRENCY_ID), - Ok(Some(ACCOUNT_RECEIVER.into())) + TransferAllowList::allowance( + SENDER.into(), + local_location(ACCOUNT_RECEIVER), + TEST_CURRENCY_ID + ), + Ok(Some(local_location(ACCOUNT_RECEIVER))) ) }) } @@ -194,19 +210,19 @@ fn remove_transfer_allowance_works() { assert_ok!(TransferAllowList::add_transfer_allowance( RuntimeOrigin::signed(SENDER), TEST_CURRENCY_ID, - ACCOUNT_RECEIVER.into(), + local_location(ACCOUNT_RECEIVER) )); assert_ok!(TransferAllowList::remove_transfer_allowance( RuntimeOrigin::signed(SENDER), TEST_CURRENCY_ID, - ACCOUNT_RECEIVER.into(), + local_location(ACCOUNT_RECEIVER) )); // ensure blocked at set to restrict transfers assert_eq!( TransferAllowList::get_account_currency_transfer_allowance(( SENDER, TEST_CURRENCY_ID, - ::Location::from(ACCOUNT_RECEIVER) + local_location(ACCOUNT_RECEIVER) )) .unwrap(), AllowanceDetails { @@ -241,7 +257,7 @@ fn remove_transfer_allowance_with_delay_works() { assert_ok!(TransferAllowList::add_transfer_allowance( RuntimeOrigin::signed(SENDER), TEST_CURRENCY_ID, - ACCOUNT_RECEIVER.into(), + local_location(ACCOUNT_RECEIVER) )); assert_ok!(TransferAllowList::add_allowance_delay( RuntimeOrigin::signed(SENDER), @@ -251,13 +267,13 @@ fn remove_transfer_allowance_with_delay_works() { assert_ok!(TransferAllowList::remove_transfer_allowance( RuntimeOrigin::signed(SENDER), TEST_CURRENCY_ID, - ACCOUNT_RECEIVER.into(), + local_location(ACCOUNT_RECEIVER) )); assert_eq!( TransferAllowList::get_account_currency_transfer_allowance(( SENDER, TEST_CURRENCY_ID, - ::Location::from(ACCOUNT_RECEIVER) + local_location(ACCOUNT_RECEIVER) )) .unwrap(), AllowanceDetails { @@ -298,12 +314,12 @@ fn purge_transfer_allowance_works() { assert_ok!(TransferAllowList::add_transfer_allowance( RuntimeOrigin::signed(SENDER), TEST_CURRENCY_ID, - ACCOUNT_RECEIVER.into(), + local_location(ACCOUNT_RECEIVER) )); assert_ok!(TransferAllowList::remove_transfer_allowance( RuntimeOrigin::signed(SENDER), TEST_CURRENCY_ID, - ACCOUNT_RECEIVER.into(), + local_location(ACCOUNT_RECEIVER) )); assert_eq!(Balances::reserved_balance(&SENDER), 10); advance_n_blocks::(6u64); @@ -312,14 +328,14 @@ fn purge_transfer_allowance_works() { assert_ok!(TransferAllowList::purge_transfer_allowance( RuntimeOrigin::signed(SENDER), TEST_CURRENCY_ID, - ACCOUNT_RECEIVER.into(), + local_location(ACCOUNT_RECEIVER) )); // verify removed assert_eq!( TransferAllowList::get_account_currency_transfer_allowance(( SENDER, TEST_CURRENCY_ID, - ::Location::from(ACCOUNT_RECEIVER) + local_location(ACCOUNT_RECEIVER) )), None ); @@ -349,7 +365,7 @@ fn purge_transfer_allowance_non_existant_transfer_allowance() { TransferAllowList::purge_transfer_allowance( RuntimeOrigin::signed(SENDER), TEST_CURRENCY_ID, - ACCOUNT_RECEIVER.into(), + local_location(ACCOUNT_RECEIVER) ), Error::::NoMatchingAllowance ); @@ -369,20 +385,20 @@ fn purge_transfer_allowance_when_multiple_present_for_sender_currency_properly_d assert_ok!(TransferAllowList::add_transfer_allowance( RuntimeOrigin::signed(SENDER), TEST_CURRENCY_ID, - ACCOUNT_RECEIVER.into(), + local_location(ACCOUNT_RECEIVER) )); assert_eq!(Balances::reserved_balance(&SENDER), 10); assert_ok!(TransferAllowList::add_transfer_allowance( RuntimeOrigin::signed(SENDER), TEST_CURRENCY_ID, - 100u64.into(), + local_location(OTHER_RECEIVER), )); assert_eq!(Balances::reserved_balance(&SENDER), 20); assert_ok!(TransferAllowList::remove_transfer_allowance( RuntimeOrigin::signed(SENDER), TEST_CURRENCY_ID, - ACCOUNT_RECEIVER.into(), + local_location(ACCOUNT_RECEIVER) )); advance_n_blocks::(6u64); @@ -391,7 +407,7 @@ fn purge_transfer_allowance_when_multiple_present_for_sender_currency_properly_d assert_ok!(TransferAllowList::purge_transfer_allowance( RuntimeOrigin::signed(SENDER), TEST_CURRENCY_ID, - ACCOUNT_RECEIVER.into(), + local_location(ACCOUNT_RECEIVER) )); // verify correct reserve decrement @@ -402,7 +418,7 @@ fn purge_transfer_allowance_when_multiple_present_for_sender_currency_properly_d TransferAllowList::get_account_currency_transfer_allowance(( SENDER, TEST_CURRENCY_ID, - ::Location::from(ACCOUNT_RECEIVER) + local_location(ACCOUNT_RECEIVER) )), None ); @@ -412,7 +428,7 @@ fn purge_transfer_allowance_when_multiple_present_for_sender_currency_properly_d TransferAllowList::get_account_currency_transfer_allowance(( SENDER, TEST_CURRENCY_ID, - ::Location::from(100u64) + local_location(OTHER_RECEIVER) )) .unwrap(), AllowanceDetails { diff --git a/runtime/altair/Cargo.toml b/runtime/altair/Cargo.toml index 047c0e2bb7..91a5c59e12 100644 --- a/runtime/altair/Cargo.toml +++ b/runtime/altair/Cargo.toml @@ -10,7 +10,6 @@ repository.workspace = true documentation.workspace = true [dependencies] -getrandom = { workspace = true } hex = { workspace = true } hex-literal = { workspace = true, optional = true } log = { workspace = true } @@ -23,6 +22,7 @@ sp-api = { workspace = true } sp-block-builder = { workspace = true } sp-consensus-aura = { workspace = true } sp-core = { workspace = true } +sp-genesis-builder = { workspace = true } sp-inherents = { workspace = true } sp-io = { workspace = true } sp-offchain = { workspace = true } @@ -107,6 +107,7 @@ pallet-liquidity-pools-gateway = { workspace = true } pallet-liquidity-rewards = { workspace = true } pallet-loans = { workspace = true } pallet-membership = { workspace = true } +pallet-message-queue = { workspace = true } pallet-multisig = { workspace = true } pallet-oracle-collection = { workspace = true } pallet-oracle-feed = { workspace = true } @@ -135,7 +136,7 @@ pallet-utility = { workspace = true } pallet-vesting = { workspace = true } pallet-xcm = { workspace = true } pallet-xcm-transactor = { workspace = true } -parachain-info = { workspace = true } +staging-parachain-info = { workspace = true } [build-dependencies] substrate-wasm-builder = { workspace = true } @@ -145,18 +146,17 @@ default = ["std"] std = [ "parity-scale-codec/std", - "getrandom/std", "hex/std", "scale-info/std", "serde/std", "log/std", - # Substrate related "sp-api/std", "sp-runtime/std", "sp-block-builder/std", "sp-consensus-aura/std", "sp-core/std", + "sp-genesis-builder/std", "sp-inherents/std", "sp-io/std", "sp-offchain/std", @@ -187,14 +187,12 @@ std = [ "pallet-transaction-payment-rpc-runtime-api/std", "polkadot-runtime-common/std", "polkadot-parachain-primitives/std", - # Locals "cfg-primitives/std", "cfg-traits/std", "cfg-types/std", "runtime-common/std", "liquidity-pools-gateway-routers/std", - # Pallet list "axelar-gateway-precompile/std", "chainbridge/std", @@ -262,7 +260,8 @@ std = [ "pallet-vesting/std", "pallet-xcm/std", "pallet-xcm-transactor/std", - "parachain-info/std", + "pallet-message-queue/std", + "staging-parachain-info/std", ] runtime-benchmarks = [ @@ -271,7 +270,6 @@ runtime-benchmarks = [ "frame-system-benchmarking/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", - # Substrate related "sp-runtime/runtime-benchmarks", "sp-staking/runtime-benchmarks", @@ -282,14 +280,12 @@ runtime-benchmarks = [ "xcm-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", - # Locals "cfg-primitives/runtime-benchmarks", "cfg-traits/runtime-benchmarks", "cfg-types/runtime-benchmarks", "runtime-common/runtime-benchmarks", "liquidity-pools-gateway-routers/runtime-benchmarks", - # Pallet list "axelar-gateway-precompile/runtime-benchmarks", "chainbridge/runtime-benchmarks", @@ -347,12 +343,12 @@ runtime-benchmarks = [ "pallet-vesting/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "pallet-xcm-transactor/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", ] try-runtime = [ # Enabling optional "frame-try-runtime/try-runtime", - # Substrate related "sp-runtime/try-runtime", "frame-support/try-runtime", @@ -360,14 +356,12 @@ try-runtime = [ "frame-executive/try-runtime", "fp-self-contained/try-runtime", "polkadot-runtime-common/try-runtime", - # Locals "cfg-primitives/try-runtime", "cfg-traits/try-runtime", "cfg-types/try-runtime", "runtime-common/try-runtime", "liquidity-pools-gateway-routers/try-runtime", - # Pallet list "axelar-gateway-precompile/try-runtime", "chainbridge/try-runtime", @@ -435,7 +429,8 @@ try-runtime = [ "pallet-vesting/try-runtime", "pallet-xcm/try-runtime", "pallet-xcm-transactor/try-runtime", - "parachain-info/try-runtime", + "pallet-message-queue/try-runtime", + "staging-parachain-info/try-runtime", ] # A feature that should be enabled when the runtime should be build for on-chain diff --git a/runtime/altair/src/lib.rs b/runtime/altair/src/lib.rs index 60459973f5..64106e2e71 100644 --- a/runtime/altair/src/lib.rs +++ b/runtime/altair/src/lib.rs @@ -37,23 +37,31 @@ use cfg_types::{ fee_keys::{Fee, FeeKey}, fixed_point::{Quantity, Rate, Ratio}, investments::InvestmentPortfolio, + locations::RestrictedTransferLocation, oracles::OracleKey, permissions::{PermissionRoles, PermissionScope, PermissionedCurrencyRole, PoolRole, Role}, + pools::PoolNav, time::TimeProvider, - tokens::{AssetStringLimit, CurrencyId, CustomMetadata, StakingCurrency, TrancheCurrency}, + tokens::{ + AssetStringLimit, CurrencyId, CustomMetadata, FilterCurrency, LocalAssetId, + StakingCurrency, TrancheCurrency, + }, }; use constants::currency::*; -use cumulus_primitives_core::{MultiAsset, MultiLocation}; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use fp_rpc::TransactionStatus; use frame_support::{ construct_runtime, dispatch::DispatchClass, + genesis_builder_helper::{build_config, create_default_config}, pallet_prelude::RuntimeDebug, parameter_types, traits::{ + fungible::HoldConsideration, + tokens::{PayFromAccount, UnityAssetBalanceConversion}, AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64, Contains, EitherOfDiverse, - EqualPrivilegeOnly, Get, InstanceFilter, LockIdentifier, OnFinalize, PalletInfoAccess, - UnixTime, WithdrawReasons, + EqualPrivilegeOnly, Get, InstanceFilter, LinearStoragePrice, LockIdentifier, OnFinalize, + PalletInfoAccess, TransformOrigin, UnixTime, WithdrawReasons, }, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}, @@ -77,6 +85,7 @@ use pallet_investments::OrderType; use pallet_liquidity_pools::hooks::{ CollectedForeignInvestmentHook, CollectedForeignRedemptionHook, DecreasedForeignInvestOrderHook, }; +pub use pallet_loans::entities::{input::PriceCollectionInput, loans::ActiveLoanInfo}; use pallet_loans::types::cashflow::CashflowPayment; use pallet_pool_system::{ pool_types::{PoolDetails, ScheduledUpdateDetails}, @@ -87,7 +96,9 @@ use pallet_restricted_tokens::{FungibleInspectPassthrough, FungiblesInspectPasst use pallet_transaction_payment::CurrencyAdapter; use pallet_transaction_payment_rpc_runtime_api::{FeeDetails, RuntimeDispatchInfo}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; -use polkadot_runtime_common::{prod_or_fast, BlockHashCount, SlowAdjustingFeeUpdate}; +use polkadot_runtime_common::{ + prod_or_fast, xcm_sender::NoPriceForMessageDelivery, BlockHashCount, SlowAdjustingFeeUpdate, +}; use runtime_common::{ account_conversion::{AccountConverter, RuntimeAccountConverter}, asset_registry, @@ -98,15 +109,16 @@ use runtime_common::{ fees::{DealWithFees, FeeToTreasury, WeightToFee}, gateway, instances, liquidity_pools::LiquidityPoolsMessage, + message_queue::{NarrowOriginToSibling, ParaIdToSibling}, oracle::{ Feeder, OracleConverterBridge, OracleRatioProvider, OracleRatioProviderLocalAssetExtension, }, permissions::PoolAdminCheck, remarks::Remark, rewards::SingleCurrencyMovement, - transfer_filter::PreLpTransfer, - xcm::AccountIdToMultiLocation, - xcm_transactor, AllowanceDeposit, CurrencyED, HoldId, + transfer_filter::{PreLpTransfer, PreNativeTransfer}, + xcm::AccountIdToLocation, + xcm_transactor, AllowanceDeposit, CurrencyED, }; use scale_info::TypeInfo; use sp_api::impl_runtime_apis; @@ -116,7 +128,7 @@ use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{ AccountIdConversion, BlakeTwo256, Block as BlockT, ConvertInto, DispatchInfoOf, - Dispatchable, PostDispatchInfoOf, UniqueSaturatedInto, Zero, + Dispatchable, IdentityLookup, PostDispatchInfoOf, UniqueSaturatedInto, Verify, Zero, }, transaction_validity::{TransactionSource, TransactionValidity, TransactionValidityError}, ApplyExtrinsicResult, DispatchError, DispatchResult, FixedI128, Perbill, Permill, Perquintill, @@ -124,7 +136,7 @@ use sp_runtime::{ use sp_staking::currency_to_vote::U128CurrencyToVote; use sp_std::{marker::PhantomData, prelude::*, vec::Vec}; use sp_version::RuntimeVersion; -use staging_xcm_executor::XcmExecutor; +use staging_xcm::v4::{Asset, Location}; use static_assertions::const_assert; use crate::xcm::*; @@ -234,6 +246,7 @@ impl frame_system::Config for Runtime { type RuntimeEvent = RuntimeEvent; /// The ubiquitous origin type. type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type SS58Prefix = SS58Prefix; type SystemWeightInfo = weights::frame_system::WeightInfo; /// Get the chain's current version. @@ -249,6 +262,7 @@ impl Contains for BaseCallFilter { // Block these calls when called by a signed extrinsic. // Root will still be able to execute these. pallet_xcm::Call::execute { .. } + | pallet_xcm::Call::transfer_assets { .. } | pallet_xcm::Call::teleport_assets { .. } | pallet_xcm::Call::reserve_transfer_assets { .. } | pallet_xcm::Call::limited_reserve_transfer_assets { .. } @@ -280,25 +294,74 @@ impl Contains for BaseCallFilter { parameter_types! { pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; } impl cumulus_pallet_parachain_system::Config for Runtime { type CheckAssociatedRelayNumber = cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; - type DmpMessageHandler = DmpQueue; + // Using weights for recomended hardware + type DmpQueue = frame_support::traits::EnqueueWithOrigin; type OnSystemEvent = (); type OutboundXcmpMessageSource = XcmpQueue; type ReservedDmpWeight = ReservedDmpWeight; type ReservedXcmpWeight = ReservedXcmpWeight; type RuntimeEvent = RuntimeEvent; - type SelfParaId = parachain_info::Pallet; + type SelfParaId = staging_parachain_info::Pallet; + type WeightInfo = cumulus_pallet_parachain_system::weights::SubstrateWeight; type XcmpMessageHandler = XcmpQueue; } -impl parachain_info::Config for Runtime {} +impl staging_parachain_info::Config for Runtime {} + +parameter_types! { + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; +} + +impl pallet_message_queue::Config for Runtime { + type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; + type MaxStale = sp_core::ConstU32<8>; + // Using weights for recomended hardware + #[cfg(feature = "runtime-benchmarks")] + type MessageProcessor = + pallet_message_queue::mock_helpers::NoopMessageProcessor; + #[cfg(not(feature = "runtime-benchmarks"))] + type MessageProcessor = staging_xcm_builder::ProcessXcmMessage< + AggregateMessageOrigin, + staging_xcm_executor::XcmExecutor, + RuntimeCall, + >; + type QueueChangeHandler = NarrowOriginToSibling; + type QueuePausedQuery = NarrowOriginToSibling; + type RuntimeEvent = RuntimeEvent; + type ServiceWeight = MessageQueueServiceWeight; + type Size = u32; + type WeightInfo = pallet_message_queue::weights::SubstrateWeight; +} + +/// XCMP Queue is responsible to handle XCM messages coming directly from +/// sibling parachains. +impl cumulus_pallet_xcmp_queue::Config for Runtime { + type ChannelInfo = ParachainSystem; + type ControllerOrigin = EnsureRoot; + type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; + type MaxInboundSuspended = sp_core::ConstU32<1_000>; + type PriceForSiblingDelivery = NoPriceForMessageDelivery; + type RuntimeEvent = RuntimeEvent; + type VersionWrapper = PolkadotXcm; + type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; + type XcmpQueue = TransformOrigin; +} + +impl cumulus_pallet_dmp_queue::Config for Runtime { + type DmpSink = frame_support::traits::EnqueueWithOrigin; + type RuntimeEvent = RuntimeEvent; + type WeightInfo = cumulus_pallet_dmp_queue::weights::SubstrateWeight; +} parameter_types! { pub const MinimumPeriod: Millis = SLOT_DURATION / 2; } + impl pallet_timestamp::Config for Runtime { type MinimumPeriod = MinimumPeriod; /// A timestamp: milliseconds since the unix epoch. @@ -345,13 +408,13 @@ impl pallet_balances::Config for Runtime { type ExistentialDeposit = ExistentialDeposit; type FreezeIdentifier = (); type MaxFreezes = ConstU32<10>; - type MaxHolds = ConstU32<10>; type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; /// The overarching event type. type RuntimeEvent = RuntimeEvent; - type RuntimeHoldReason = (); + type RuntimeFreezeReason = RuntimeFreezeReason; + type RuntimeHoldReason = RuntimeHoldReason; type WeightInfo = weights::pallet_balances::WeightInfo; } @@ -672,11 +735,16 @@ parameter_types! { pub const PreimageMaxSize: u32 = 4096 * 1024; pub PreimageBaseDeposit: Balance = deposit(2, 64); pub PreimageByteDeposit: Balance = deposit(0, 1); + pub const PreimageHoldReason: RuntimeHoldReason = RuntimeHoldReason::Preimage(pallet_preimage::HoldReason::Preimage); } impl pallet_preimage::Config for Runtime { - type BaseDeposit = PreimageBaseDeposit; - type ByteDeposit = PreimageByteDeposit; + type Consideration = HoldConsideration< + AccountId, + Balances, + PreimageHoldReason, + LinearStoragePrice, + >; type Currency = Balances; type ManagerOrigin = EnsureRoot; type RuntimeEvent = RuntimeEvent; @@ -821,24 +889,30 @@ parameter_types! { pub const MaxSubAccounts: u32 = 100; pub const MaxAdditionalFields: u32 = 100; pub const BasicDeposit: Balance = 100 * AIR; - pub const FieldDeposit: Balance = 25 * AIR; + pub const ByteDeposit: Balance = deposit(0, 1); pub const SubAccountDeposit: Balance = 20 * AIR; pub const MaxRegistrars: u32 = 20; } impl pallet_identity::Config for Runtime { type BasicDeposit = BasicDeposit; + type ByteDeposit = ByteDeposit; type Currency = Balances; - type FieldDeposit = FieldDeposit; type ForceOrigin = EnsureRootOr>; - type MaxAdditionalFields = MaxAdditionalFields; + type IdentityInformation = pallet_identity::legacy::IdentityInfo; type MaxRegistrars = MaxRegistrars; type MaxSubAccounts = MaxSubAccounts; + type MaxSuffixLength = ConstU32<7>; + type MaxUsernameLength = ConstU32<32>; + type OffchainSignature = Signature; + type PendingUsernameExpiration = ConstU32<{ 7 * DAYS }>; type RegistrarOrigin = EnsureRootOr>; type RuntimeEvent = RuntimeEvent; + type SigningPublicKey = ::Signer; type Slashed = Treasury; type SubAccountDeposit = SubAccountDeposit; + type UsernameAuthorityOrigin = EnsureRoot; type WeightInfo = weights::pallet_identity::WeightInfo; } @@ -849,6 +923,7 @@ parameter_types! { } impl pallet_vesting::Config for Runtime { + type BlockNumberProvider = System; type BlockNumberToBalance = ConvertInto; type Currency = Balances; type MinVestedTransfer = MinVestedTransfer; @@ -872,6 +947,7 @@ parameter_types! { // periods between treasury spends pub const SpendPeriod: BlockNumber = 6 * DAYS; + pub const PayoutPeriod: BlockNumber = 30 * DAYS; // percentage of treasury we burn per Spend period if there is a surplus // If the treasury is able to spend on all the approved proposals and didn't miss any @@ -887,26 +963,30 @@ parameter_types! { } impl pallet_treasury::Config for Runtime { - // either democracy or 66% of council votes type ApproveOrigin = EnsureRootOr; + type AssetKind = (); + type BalanceConverter = UnityAssetBalanceConversion; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); + type Beneficiary = Self::AccountId; + type BeneficiaryLookup = IdentityLookup; type Burn = Burn; - // we burn and dont handle the unbalance type BurnDestination = (); type Currency = Tokens; type MaxApprovals = MaxApprovals; - // slashed amount goes to treasury account type OnSlash = Treasury; type PalletId = TreasuryPalletId; + type Paymaster = PayFromAccount; + type PayoutPeriod = PayoutPeriod; type ProposalBond = ProposalBond; type ProposalBondMaximum = ProposalBondMaximum; type ProposalBondMinimum = ProposalBondMinimum; - // either democracy or more than 50% council votes type RejectOrigin = EnsureRootOr>; type RuntimeEvent = RuntimeEvent; type SpendFunds = (); type SpendOrigin = frame_support::traits::NeverEnsureOrigin; type SpendPeriod = SpendPeriod; - type WeightInfo = weights::pallet_treasury::WeightInfo; + type WeightInfo = pallet_treasury::weights::SubstrateWeight; } parameter_types! { @@ -1101,6 +1181,7 @@ impl pallet_restricted_tokens::Config for Runtime { type PreFungiblesUnbalanced = cfg_traits::Always; type PreReservableCurrency = cfg_traits::Always; type RuntimeEvent = RuntimeEvent; + type RuntimeHoldReason = RuntimeHoldReason; type WeightInfo = weights::pallet_restricted_tokens::WeightInfo; } @@ -1134,7 +1215,7 @@ impl orml_tokens::Config for Runtime { type WeightInfo = (); } -impl orml_asset_registry::Config for Runtime { +impl orml_asset_registry::module::Config for Runtime { type AssetId = CurrencyId; type AssetProcessor = asset_registry::CustomAssetProcessor; type AuthorityOrigin = @@ -1146,30 +1227,6 @@ impl orml_asset_registry::Config for Runtime { type WeightInfo = (); } -// XCM - -/// XCMP Queue is responsible to handle XCM messages coming directly from -/// sibling parachains. -impl cumulus_pallet_xcmp_queue::Config for Runtime { - type ChannelInfo = ParachainSystem; - type ControllerOrigin = EnsureRoot; - type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; - type ExecuteOverweightOrigin = EnsureRoot; - type PriceForSiblingDelivery = (); - type RuntimeEvent = RuntimeEvent; - type VersionWrapper = PolkadotXcm; - type WeightInfo = cumulus_pallet_xcmp_queue::weights::SubstrateWeight; - type XcmExecutor = XcmExecutor; -} - -/// The config for the Downward Message Passing Queue, i.e., how messages coming -/// from the relay-chain are handled. -impl cumulus_pallet_dmp_queue::Config for Runtime { - type ExecuteOverweightOrigin = EnsureRoot; - type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; -} - // Block Rewards parameter_types! { @@ -1347,7 +1404,7 @@ impl pallet_loans::Config for Runtime { parameter_types! { // 1 KSM should be enough to cover for fees opening/accepting HRMP channels - pub MaxHrmpRelayFee: MultiAsset = (MultiLocation::parent(), 1_000_000_000_000u128).into(); + pub MaxHrmpRelayFee: Asset = (Location::parent(), 1_000_000_000_000u128).into(); } /// Xcm Weigher shared between multiple Xcm-related configs. @@ -1355,14 +1412,15 @@ pub type XcmWeigher = staging_xcm_builder::FixedWeightBounds; impl pallet_xcm_transactor::Config for Runtime { - type AccountIdToMultiLocation = AccountIdToMultiLocation; + type AccountIdToLocation = AccountIdToLocation; type AssetTransactor = FungiblesTransactor; type Balance = Balance; type BaseXcmWeight = BaseXcmWeight; type CurrencyId = CurrencyId; - type CurrencyIdToMultiLocation = CurrencyIdConvert; + type CurrencyIdToLocation = CurrencyIdConvert; type DerivativeAddressRegistrationOrigin = EnsureRoot; type HrmpManipulatorOrigin = EnsureRootOr; + type HrmpOpenOrigin = EnsureRoot; type MaxHrmpFee = staging_xcm_builder::Case; type ReserveProvider = xcm_primitives::AbsoluteAndRelativeReserve; type RuntimeEvent = RuntimeEvent; @@ -1801,10 +1859,10 @@ impl pallet_remarks::Config for Runtime { impl pallet_transfer_allowlist::Config for Runtime { type CurrencyId = FilterCurrency; type Deposit = AllowanceDeposit; - type HoldId = HoldId; - type Location = Location; + type Location = RestrictedTransferLocation; type ReserveCurrency = Balances; type RuntimeEvent = RuntimeEvent; + type RuntimeHoldReason = RuntimeHoldReason; type WeightInfo = weights::pallet_transfer_allowlist::WeightInfo; } @@ -1835,6 +1893,7 @@ impl pallet_evm::Config for Runtime { type PrecompilesValue = PrecompilesValue; type Runner = pallet_evm::runner::stack::Runner; type RuntimeEvent = RuntimeEvent; + type SuicideQuickClearLimit = ConstU32<0>; type Timestamp = Timestamp; type WeightInfo = (); type WeightPerGas = WeightPerGas; @@ -1920,7 +1979,7 @@ construct_runtime!( System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event} = 1, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3, - ParachainInfo: parachain_info::{Pallet, Storage, Config} = 4, + ParachainInfo: staging_parachain_info::{Pallet, Storage, Config} = 4, // money stuff Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 20, @@ -1945,7 +2004,7 @@ construct_runtime!( Identity: pallet_identity::{Pallet, Call, Storage, Event} = 67, Vesting: pallet_vesting::{Pallet, Call, Storage, Event, Config} = 68, Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 69, - Preimage: pallet_preimage::{Pallet, Call, Storage, Event} = 70, + Preimage: pallet_preimage::{Pallet, Call, Storage, Event, HoldReason} = 70, Uniques: pallet_uniques::{Pallet, Call, Storage, Event} = 72, // our pallets (part 1) @@ -1956,7 +2015,7 @@ construct_runtime!( // Removed: CrowdloanReward = 94 CollatorAllowlist: pallet_collator_allowlist::{Pallet, Call, Storage, Config, Event} = 95, Permissions: pallet_permissions::{Pallet, Call, Storage, Event} = 96, - Tokens: pallet_restricted_tokens::{Pallet, Call, Event} = 97, + Tokens: pallet_restricted_tokens::{Pallet, Call, Event, HoldReason} = 97, // Removed: NftSales = 98 PoolSystem: pallet_pool_system::{Pallet, Call, Storage, Event} = 99, Loans: pallet_loans::{Pallet, Call, Storage, Event} = 100, @@ -1973,7 +2032,7 @@ construct_runtime!( GapRewardMechanism: pallet_rewards::mechanism::gap = 112, OrderBook: pallet_order_book::{Pallet, Call, Storage, Event} = 113, ForeignInvestments: pallet_foreign_investments::{Pallet, Storage, Event} = 114, - TransferAllowList: pallet_transfer_allowlist::{Pallet, Call, Storage, Event} = 115, + TransferAllowList: pallet_transfer_allowlist::{Pallet, Call, Storage, Event, HoldReason} = 115, OraclePriceFeed: pallet_oracle_feed::{Pallet, Call, Storage, Event} = 116, OraclePriceCollection: pallet_oracle_collection::{Pallet, Call, Storage, Event} = 117, PoolFees: pallet_pool_fees::{Pallet, Call, Storage, Event} = 118, @@ -1987,10 +2046,11 @@ construct_runtime!( XTokens: pallet_restricted_xtokens::{Pallet, Call} = 124, XcmTransactor: pallet_xcm_transactor::{Pallet, Call, Storage, Event} = 125, OrmlXTokens: orml_xtokens::{Pallet, Event} = 126, + MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 127, // 3rd party pallets OrmlTokens: orml_tokens::{Pallet, Storage, Event, Config} = 150, - OrmlAssetRegistry: orml_asset_registry::{Pallet, Storage, Call, Event, Config} = 151, + OrmlAssetRegistry: orml_asset_registry::module::{Pallet, Storage, Call, Event, Config} = 151, OrmlXcm: orml_xcm::{Pallet, Storage, Call, Event} = 152, // EVM pallets @@ -2103,14 +2163,6 @@ impl fp_rpc::ConvertTransaction for TransactionConv } } -use cfg_types::{ - locations::Location, - pools::PoolNav, - tokens::{FilterCurrency, LocalAssetId}, -}; -pub use pallet_loans::entities::{input::PriceCollectionInput, loans::ActiveLoanInfo}; -use runtime_common::transfer_filter::PreNativeTransfer; - impl_runtime_apis! { impl sp_api::Core for Runtime { fn version() -> RuntimeVersion { @@ -2332,13 +2384,13 @@ impl_runtime_apis! { // Investment Runtime APIs impl runtime_common::apis::InvestmentsApi> for Runtime { fn investment_portfolio(account_id: AccountId) -> Vec<(TrancheCurrency, InvestmentPortfolio)> { - runtime_common::investment_portfolios::get_account_portfolio::(account_id) + runtime_common::investment_portfolios::get_account_portfolio::(account_id).unwrap_or_default() } } // AccountConversionApi impl runtime_common::apis::AccountConversionApi for Runtime { - fn conversion_of(location: MultiLocation) -> Option { + fn conversion_of(location: Location) -> Option { AccountConverter::location_to_account::(location) } } @@ -2565,7 +2617,7 @@ impl_runtime_apis! { fn gas_limit_multiplier_support() {} fn pending_block( - xts: Vec<::Extrinsic> + xts: Vec<::Extrinsic> ) -> ( Option, Option> ) { @@ -2616,6 +2668,7 @@ impl_runtime_apis! { use frame_support::traits::StorageInfoTrait; use frame_system_benchmarking::Pallet as SystemBench; use cumulus_pallet_session_benchmarking::Pallet as SessionBench; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsicsBenchmark; let mut list = Vec::::new(); list_benchmarks!(list, extra); @@ -2644,6 +2697,9 @@ impl_runtime_apis! { use cumulus_pallet_session_benchmarking::Pallet as SessionBench; impl cumulus_pallet_session_benchmarking::Config for Runtime {} + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsicsBenchmark; + impl pallet_xcm::benchmarking::Config for Runtime {} + use frame_support::traits::WhitelistedStorageKeys; let whitelist = AllPalletsWithSystem::whitelisted_storage_keys(); @@ -2655,6 +2711,16 @@ impl_runtime_apis! { Ok(batches) } } + + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn create_default_config() -> Vec { + create_default_config::() + } + + fn build_config(config: Vec) -> sp_genesis_builder::Result { + build_config::(config) + } + } } #[cfg(feature = "runtime-benchmarks")] @@ -2672,7 +2738,6 @@ mod benches { [pallet_democracy, Democracy] [pallet_identity, Identity] [pallet_vesting, Vesting] - [pallet_treasury, Treasury] [pallet_preimage, Preimage] [pallet_uniques, Uniques] [pallet_fees, Fees] @@ -2690,7 +2755,7 @@ mod benches { [pallet_keystore, Keystore] [pallet_order_book, OrderBook] [pallet_investments, Investments] - [pallet_xcm, PolkadotXcm] + [pallet_xcm, PalletXcmExtrinsicsBenchmark::] [cumulus_pallet_xcmp_queue, XcmpQueue] [pallet_liquidity_rewards, LiquidityRewards] [pallet_transfer_allowlist, TransferAllowList] diff --git a/runtime/altair/src/migrations.rs b/runtime/altair/src/migrations.rs index 949dd37e10..13fff00f13 100644 --- a/runtime/altair/src/migrations.rs +++ b/runtime/altair/src/migrations.rs @@ -12,6 +12,9 @@ use crate::{ForeignInvestments, OraclePriceCollection, OraclePriceFeed, OrderBook}; +// Number of identities on Altair Chain on 30.05.2024 was 34 +const IDENTITY_MIGRATION_KEY_LIMIT: u64 = 1000; + /// The migration set for Altair @ Kusama. /// It includes all the migrations that have to be applied on that chain. pub type UpgradeAltair1035 = ( @@ -20,4 +23,16 @@ pub type UpgradeAltair1035 = ( runtime_common::migrations::increase_storage_version::Migration, runtime_common::migrations::increase_storage_version::Migration, pallet_collator_selection::migration::v1::MigrateToV1, + pallet_collator_selection::migration::v2::MigrationToV2, + runtime_common::migrations::loans::AddWithLinearPricing, + // As of May 2024, the `pallet_balances::Hold` storage was empty. But better be safe. + runtime_common::migrations::hold_reason::MigrateTransferAllowListHolds< + crate::Runtime, + crate::RuntimeHoldReason, + >, + // Migrations below this comment originate from Polkadot SDK + pallet_xcm::migration::MigrateToLatestXcmVersion, + cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, + pallet_identity::migration::versioned::V0ToV1, + pallet_uniques::migration::MigrateV0ToV1, ); diff --git a/runtime/altair/src/weights/cumulus_pallet_xcmp_queue.rs b/runtime/altair/src/weights/cumulus_pallet_xcmp_queue.rs index c319469bca..644b444fb3 100644 --- a/runtime/altair/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/runtime/altair/src/weights/cumulus_pallet_xcmp_queue.rs @@ -44,16 +44,28 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: XcmpQueue QueueConfig (r:1 w:1) - /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) - fn set_config_with_weight() -> Weight { - // Proof Size summary in bytes: - // Measured: `109` - // Estimated: `1594` - // Minimum execution time: 8_756_000 picoseconds. - Weight::from_parts(9_017_000, 0) - .saturating_add(Weight::from_parts(0, 1594)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + + fn enqueue_xcmp_message() -> Weight { + Weight::zero() + } + + fn suspend_channel() -> Weight { + Weight::zero() + } + + fn resume_channel() -> Weight { + Weight::zero() + } + + fn take_first_concatenated_xcm() -> Weight { + Weight::zero() + } + + fn on_idle_good_msg() -> Weight { + Weight::from_parts(1, 1) + } + + fn on_idle_large_msg() -> Weight { + Weight::from_parts(1, 1) } } diff --git a/runtime/altair/src/weights/frame_system.rs b/runtime/altair/src/weights/frame_system.rs index e20598c77c..05427a8a9c 100644 --- a/runtime/altair/src/weights/frame_system.rs +++ b/runtime/altair/src/weights/frame_system.rs @@ -110,4 +110,12 @@ impl frame_system::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } + + fn authorize_upgrade() -> Weight { + Weight::zero() + } + + fn apply_authorized_upgrade() -> Weight { + Weight::zero() + } } diff --git a/runtime/altair/src/weights/pallet_balances.rs b/runtime/altair/src/weights/pallet_balances.rs index 6b115823e7..e039260aad 100644 --- a/runtime/altair/src/weights/pallet_balances.rs +++ b/runtime/altair/src/weights/pallet_balances.rs @@ -132,4 +132,8 @@ impl pallet_balances::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into())) } + + fn force_adjust_total_issuance() -> Weight { + Weight::zero() + } } diff --git a/runtime/altair/src/weights/pallet_collator_selection.rs b/runtime/altair/src/weights/pallet_collator_selection.rs index bc518dffbf..b0638a6c71 100644 --- a/runtime/altair/src/weights/pallet_collator_selection.rs +++ b/runtime/altair/src/weights/pallet_collator_selection.rs @@ -65,7 +65,7 @@ impl pallet_collator_selection::WeightInfo for WeightIn } /// Storage: CollatorSelection CandidacyBond (r:0 w:1) /// Proof: CollatorSelection CandidacyBond (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) - fn set_candidacy_bond() -> Weight { + fn set_candidacy_bond(_: u32, _: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` @@ -173,4 +173,14 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Pending to generate Weight::default() } + + fn update_bond(_: u32) -> Weight { + // Pending to generate + Weight::default() + } + + fn take_candidate_slot(_: u32) -> Weight { + // Pending to generate + Weight::default() + } } diff --git a/runtime/altair/src/weights/pallet_identity.rs b/runtime/altair/src/weights/pallet_identity.rs index 118596c4c5..9c57f67b3b 100644 --- a/runtime/altair/src/weights/pallet_identity.rs +++ b/runtime/altair/src/weights/pallet_identity.rs @@ -51,19 +51,8 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) /// The range of component `r` is `[1, 20]`. /// The range of component `x` is `[0, 100]`. - fn set_identity(r: u32, x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `441 + r * (5 ±0)` - // Estimated: `11003` - // Minimum execution time: 48_391_000 picoseconds. - Weight::from_parts(47_441_350, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 4_632 - .saturating_add(Weight::from_parts(114_047, 0).saturating_mul(r.into())) - // Standard Error: 903 - .saturating_add(Weight::from_parts(796_229, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + fn set_identity(_: u32) -> Weight { + Weight::default() } /// Storage: Identity IdentityOf (r:1 w:0) /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) @@ -116,22 +105,8 @@ impl pallet_identity::WeightInfo for WeightInfo { /// The range of component `r` is `[1, 20]`. /// The range of component `s` is `[0, 100]`. /// The range of component `x` is `[0, 100]`. - fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `468 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` - // Estimated: `11003` - // Minimum execution time: 88_256_000 picoseconds. - Weight::from_parts(47_087_223, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 12_735 - .saturating_add(Weight::from_parts(206_434, 0).saturating_mul(r.into())) - // Standard Error: 2_487 - .saturating_add(Weight::from_parts(2_032_500, 0).saturating_mul(s.into())) - // Standard Error: 2_487 - .saturating_add(Weight::from_parts(405_404, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) + fn clear_identity(_: u32, _: u32) -> Weight { + Weight::default() } /// Storage: Identity Registrars (r:1 w:0) /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) @@ -139,37 +114,15 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) /// The range of component `r` is `[1, 20]`. /// The range of component `x` is `[0, 100]`. - fn request_judgement(r: u32, x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `366 + r * (57 ±0) + x * (66 ±0)` - // Estimated: `11003` - // Minimum execution time: 48_361_000 picoseconds. - Weight::from_parts(47_387_035, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 5_801 - .saturating_add(Weight::from_parts(89_565, 0).saturating_mul(r.into())) - // Standard Error: 1_132 - .saturating_add(Weight::from_parts(828_691, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) + fn request_judgement(_: u32) -> Weight { + Weight::default() } /// Storage: Identity IdentityOf (r:1 w:1) /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) /// The range of component `r` is `[1, 20]`. /// The range of component `x` is `[0, 100]`. - fn cancel_request(r: u32, x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `397 + x * (66 ±0)` - // Estimated: `11003` - // Minimum execution time: 44_634_000 picoseconds. - Weight::from_parts(44_200_462, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 7_846 - .saturating_add(Weight::from_parts(66_743, 0).saturating_mul(r.into())) - // Standard Error: 1_531 - .saturating_add(Weight::from_parts(823_322, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + fn cancel_request(_: u32) -> Weight { + Weight::default() } /// Storage: Identity Registrars (r:1 w:1) /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) @@ -222,19 +175,8 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) /// The range of component `r` is `[1, 19]`. /// The range of component `x` is `[0, 100]`. - fn provide_judgement(r: u32, x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `444 + r * (57 ±0) + x * (66 ±0)` - // Estimated: `11003` - // Minimum execution time: 33_443_000 picoseconds. - Weight::from_parts(30_762_960, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 9_179 - .saturating_add(Weight::from_parts(151_014, 0).saturating_mul(r.into())) - // Standard Error: 1_698 - .saturating_add(Weight::from_parts(1_309_125, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) + fn provide_judgement(_: u32) -> Weight { + Weight::default() } /// Storage: Identity SubsOf (r:1 w:1) /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) @@ -247,22 +189,8 @@ impl pallet_identity::WeightInfo for WeightInfo { /// The range of component `r` is `[1, 20]`. /// The range of component `s` is `[0, 100]`. /// The range of component `x` is `[0, 100]`. - fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `797 + r * (15 ±0) + s * (32 ±0) + x * (66 ±0)` - // Estimated: `11003` - // Minimum execution time: 117_871_000 picoseconds. - Weight::from_parts(76_587_113, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 10_045 - .saturating_add(Weight::from_parts(179_445, 0).saturating_mul(r.into())) - // Standard Error: 1_961 - .saturating_add(Weight::from_parts(2_029_598, 0).saturating_mul(s.into())) - // Standard Error: 1_961 - .saturating_add(Weight::from_parts(433_828, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) + fn kill_identity(_: u32, _: u32) -> Weight { + Weight::default() } /// Storage: Identity IdentityOf (r:1 w:0) /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) @@ -338,4 +266,32 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } + + fn add_username_authority() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn remove_username_authority() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn set_username_for() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn accept_username() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn remove_expired_approval() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn set_primary_username() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn remove_dangling_username() -> cumulus_primitives_core::Weight { + Weight::default() + } } diff --git a/runtime/altair/src/weights/pallet_preimage.rs b/runtime/altair/src/weights/pallet_preimage.rs index 6b723f7f3b..b7dcdcc9f9 100644 --- a/runtime/altair/src/weights/pallet_preimage.rs +++ b/runtime/altair/src/weights/pallet_preimage.rs @@ -197,4 +197,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } + + fn ensure_updated(_: u32) -> cumulus_primitives_core::Weight { + Weight::default() + } } diff --git a/runtime/altair/src/weights/pallet_treasury.rs b/runtime/altair/src/weights/pallet_treasury.rs index 8c78a9491c..4e3fe41b9f 100644 --- a/runtime/altair/src/weights/pallet_treasury.rs +++ b/runtime/altair/src/weights/pallet_treasury.rs @@ -120,4 +120,20 @@ impl pallet_treasury::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 2583).saturating_mul(p.into())) } + + fn spend_local() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn payout() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn check_status() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn void_spend() -> cumulus_primitives_core::Weight { + Weight::default() + } } diff --git a/runtime/altair/src/weights/pallet_vesting.rs b/runtime/altair/src/weights/pallet_vesting.rs index 6944a97607..17e791c7eb 100644 --- a/runtime/altair/src/weights/pallet_vesting.rs +++ b/runtime/altair/src/weights/pallet_vesting.rs @@ -220,4 +220,8 @@ impl pallet_vesting::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } + + fn force_remove_vesting_schedule(_: u32, _: u32) -> cumulus_primitives_core::Weight { + Weight::default() + } } diff --git a/runtime/altair/src/weights/pallet_xcm.rs b/runtime/altair/src/weights/pallet_xcm.rs index 36acba6504..b2a78e5853 100644 --- a/runtime/altair/src/weights/pallet_xcm.rs +++ b/runtime/altair/src/weights/pallet_xcm.rs @@ -273,4 +273,16 @@ impl pallet_xcm::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) } + + fn transfer_assets() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn new_query() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn take_response() -> cumulus_primitives_core::Weight { + Weight::default() + } } diff --git a/runtime/altair/src/xcm.rs b/runtime/altair/src/xcm.rs index 05c7361d06..ab0c2e231b 100644 --- a/runtime/altair/src/xcm.rs +++ b/runtime/altair/src/xcm.rs @@ -27,7 +27,7 @@ use pallet_xcm::XcmPassthrough; use runtime_common::{ transfer_filter::PreXcmTransfer, xcm::{ - general_key, AccountIdToMultiLocation, Barrier, FixedConversionRateProvider, + general_key, AccountIdToLocation, Barrier, FixedConversionRateProvider, LocalOriginToLocation, ToTreasury, }, xcm_fees::native_per_second, @@ -35,12 +35,12 @@ use runtime_common::{ use sp_core::ConstU32; use staging_xcm::{ prelude::*, - v3::{MultiLocation, Weight as XcmWeight}, + v4::{Location, Weight as XcmWeight}, }; use staging_xcm_builder::{ - ConvertedConcreteId, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, FungiblesAdapter, - NoChecking, RelayChainAsNative, SiblingParachainAsNative, SignedAccountId32AsNative, - SovereignSignedViaLocation, + ConvertedConcreteId, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, + FrameTransactionalProcessor, FungiblesAdapter, NoChecking, RelayChainAsNative, + SiblingParachainAsNative, SignedAccountId32AsNative, SovereignSignedViaLocation, }; use staging_xcm_executor::{traits::JustTry, XcmExecutor}; @@ -49,37 +49,6 @@ use super::{ RuntimeCall, RuntimeEvent, RuntimeOrigin, Tokens, XcmpQueue, }; -/// A call filter for the XCM Transact instruction. This is a temporary -/// measure until we properly account for proof size weights. -/// -/// Calls that are allowed through this filter must: -/// 1. Have a fixed weight; -/// 2. Cannot lead to another call being made; -/// 3. Have a defined proof size weight, e.g. no unbounded vecs in call -/// parameters. -/// -/// NOTE: Defensive configuration for now, inspired by filter of -/// SystemParachains and Polkadot, can be extended if desired. -pub struct SafeCallFilter; -impl frame_support::traits::Contains for SafeCallFilter { - fn contains(call: &RuntimeCall) -> bool { - matches!( - call, - RuntimeCall::Timestamp(..) - | RuntimeCall::Balances(..) - | RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) - | RuntimeCall::PolkadotXcm( - pallet_xcm::Call::limited_reserve_transfer_assets { .. } - ) | RuntimeCall::XcmpQueue(..) - | RuntimeCall::DmpQueue(..) - | RuntimeCall::Proxy(..) - | RuntimeCall::LiquidityPoolsGateway( - pallet_liquidity_pools_gateway::Call::process_msg { .. } - ) | RuntimeCall::OrderBook(..) - ) - } -} - /// The main XCM config /// This is where we configure the core of our XCM integrations: how tokens are /// transferred, how fees are calculated, what barriers we impose on incoming @@ -104,9 +73,10 @@ impl staging_xcm_executor::Config for XcmConfig { type PalletInstancesInfo = crate::AllPalletsWithSystem; type ResponseHandler = PolkadotXcm; type RuntimeCall = RuntimeCall; - type SafeCallFilter = SafeCallFilter; + type SafeCallFilter = Everything; type SubscriptionService = PolkadotXcm; type Trader = Trader; + type TransactionalProcessor = FrameTransactionalProcessor; type UniversalAliases = Nothing; type UniversalLocation = UniversalLocation; type Weigher = FixedWeightBounds; @@ -128,9 +98,9 @@ pub type Trader = ( parameter_types! { // Canonical location: https://github.com/paritytech/polkadot/pull/4470 pub CanonicalAirPerSecond: (AssetId, u128, u128) = ( - MultiLocation::new( + Location::new( 0, - X1(general_key(parachains::kusama::altair::AIR_KEY)) + general_key(parachains::kusama::altair::AIR_KEY) ).into(), native_per_second(), 0, @@ -144,7 +114,7 @@ pub type FungiblesTransactor = FungiblesAdapter< // This means that this adapter should handle any token that `CurrencyIdConvert` can convert // to `CurrencyId`, the `CurrencyId` type of `Tokens`, the fungibles implementation it uses. ConvertedConcreteId, - // Convert an XCM MultiLocation into a local account id + // Convert an XCM Location into a local account id LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly) AccountId, @@ -160,11 +130,6 @@ parameter_types! { pub const MaxInstructions: u32 = 100; } -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - /// Pallet Xcm offers a lot of out-of-the-box functionality and features to /// configure and handle XCM messages. impl pallet_xcm::Config for Runtime { @@ -175,8 +140,6 @@ impl pallet_xcm::Config for Runtime { type ExecuteXcmOrigin = EnsureXcmOrigin>; type MaxLockers = ConstU32<8>; type MaxRemoteLockConsumers = ConstU32<0>; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; type RemoteLockConsumerIdentifier = (); type RuntimeCall = RuntimeCall; type RuntimeEvent = RuntimeEvent; @@ -199,7 +162,7 @@ impl pallet_xcm::Config for Runtime { parameter_types! { pub const RelayNetwork: NetworkId = NetworkId::Kusama; pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); + pub Ancestry: Location = Parachain(ParachainInfo::parachain_id().into()).into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); } @@ -243,29 +206,29 @@ parameter_types! { } parameter_types! { - /// The `MultiLocation` identifying this very parachain - pub SelfLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::get().into()))); - pub UniversalLocation: InteriorMultiLocation = X2( + /// The `Location` identifying this very parachain + pub SelfLocation: Location = Location::new(1, Parachain(ParachainInfo::get().into())); + pub UniversalLocation: InteriorLocation = [ GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into()) - ); + ].into(); } parameter_type_with_key! { - pub ParachainMinFee: |_location: MultiLocation| -> Option { + pub ParachainMinFee: |_location: Location| -> Option { None }; } impl orml_xtokens::Config for Runtime { - type AccountIdToMultiLocation = AccountIdToMultiLocation; + type AccountIdToLocation = AccountIdToLocation; type Balance = Balance; type BaseXcmWeight = BaseXcmWeight; type CurrencyId = CurrencyId; type CurrencyIdConvert = CurrencyIdConvert; + type LocationsFilter = Everything; type MaxAssetsForTransfer = MaxAssetsForTransfer; type MinXcmFee = ParachainMinFee; - type MultiLocationsFilter = Everything; type ReserveProvider = AbsoluteReserveProvider; type RuntimeEvent = RuntimeEvent; type SelfLocation = SelfLocation; diff --git a/runtime/centrifuge/Cargo.toml b/runtime/centrifuge/Cargo.toml index bc5bceac63..8d0e1c27f4 100644 --- a/runtime/centrifuge/Cargo.toml +++ b/runtime/centrifuge/Cargo.toml @@ -10,7 +10,6 @@ repository.workspace = true documentation.workspace = true [dependencies] -getrandom = { workspace = true } hex = { workspace = true } hex-literal = { workspace = true } log = { workspace = true } @@ -23,6 +22,7 @@ sp-api = { workspace = true } sp-block-builder = { workspace = true } sp-consensus-aura = { workspace = true } sp-core = { workspace = true } +sp-genesis-builder = { workspace = true } sp-inherents = { workspace = true } sp-io = { workspace = true } sp-offchain = { workspace = true } @@ -107,6 +107,7 @@ pallet-liquidity-pools-gateway = { workspace = true } pallet-liquidity-rewards = { workspace = true } pallet-loans = { workspace = true } pallet-membership = { workspace = true } +pallet-message-queue = { workspace = true } pallet-multisig = { workspace = true } pallet-oracle-collection = { workspace = true } pallet-oracle-feed = { workspace = true } @@ -135,7 +136,7 @@ pallet-utility = { workspace = true } pallet-vesting = { workspace = true } pallet-xcm = { workspace = true } pallet-xcm-transactor = { workspace = true } -parachain-info = { workspace = true } +staging-parachain-info = { workspace = true } [build-dependencies] substrate-wasm-builder = { workspace = true } @@ -145,18 +146,17 @@ default = ["std"] std = [ "parity-scale-codec/std", - "getrandom/std", "hex/std", "scale-info/std", "serde/std", "log/std", - # Substrate related "sp-api/std", "sp-runtime/std", "sp-block-builder/std", "sp-consensus-aura/std", "sp-core/std", + "sp-genesis-builder/std", "sp-inherents/std", "sp-io/std", "sp-offchain/std", @@ -187,14 +187,12 @@ std = [ "pallet-transaction-payment-rpc-runtime-api/std", "polkadot-runtime-common/std", "polkadot-parachain-primitives/std", - # Locals "cfg-primitives/std", "cfg-traits/std", "cfg-types/std", "runtime-common/std", "liquidity-pools-gateway-routers/std", - # Pallet list "axelar-gateway-precompile/std", "chainbridge/std", @@ -262,7 +260,8 @@ std = [ "pallet-vesting/std", "pallet-xcm/std", "pallet-xcm-transactor/std", - "parachain-info/std", + "pallet-message-queue/std", + "staging-parachain-info/std", ] runtime-benchmarks = [ @@ -270,7 +269,6 @@ runtime-benchmarks = [ "frame-system-benchmarking/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", - # Substrate related "sp-runtime/runtime-benchmarks", "sp-staking/runtime-benchmarks", @@ -281,14 +279,12 @@ runtime-benchmarks = [ "xcm-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", - # Locals "cfg-primitives/runtime-benchmarks", "cfg-traits/runtime-benchmarks", "cfg-types/runtime-benchmarks", "runtime-common/runtime-benchmarks", "liquidity-pools-gateway-routers/runtime-benchmarks", - # Pallet list "axelar-gateway-precompile/runtime-benchmarks", "chainbridge/runtime-benchmarks", @@ -346,12 +342,12 @@ runtime-benchmarks = [ "pallet-vesting/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "pallet-xcm-transactor/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", ] try-runtime = [ # Enabling optional "frame-try-runtime/try-runtime", - # Substrate related "sp-runtime/try-runtime", "frame-support/try-runtime", @@ -359,14 +355,12 @@ try-runtime = [ "frame-executive/try-runtime", "fp-self-contained/try-runtime", "polkadot-runtime-common/try-runtime", - # Locals "cfg-primitives/try-runtime", "cfg-traits/try-runtime", "cfg-types/try-runtime", "runtime-common/try-runtime", "liquidity-pools-gateway-routers/try-runtime", - # Pallet list "axelar-gateway-precompile/try-runtime", "chainbridge/try-runtime", @@ -434,7 +428,8 @@ try-runtime = [ "pallet-vesting/try-runtime", "pallet-xcm/try-runtime", "pallet-xcm-transactor/try-runtime", - "parachain-info/try-runtime", + "pallet-message-queue/try-runtime", + "staging-parachain-info/try-runtime", ] # A feature that should be enabled when the runtime should be build for on-chain diff --git a/runtime/centrifuge/src/lib.rs b/runtime/centrifuge/src/lib.rs index 9bcc090d2d..cfa35b617c 100644 --- a/runtime/centrifuge/src/lib.rs +++ b/runtime/centrifuge/src/lib.rs @@ -37,24 +37,32 @@ use cfg_types::{ fee_keys::{Fee, FeeKey}, fixed_point::{Quantity, Rate, Ratio}, investments::InvestmentPortfolio, + locations::RestrictedTransferLocation, oracles::OracleKey, permissions::{ PermissionRoles, PermissionScope, PermissionedCurrencyRole, PoolRole, Role, UNION, }, + pools::PoolNav, time::TimeProvider, - tokens::{AssetStringLimit, CurrencyId, CustomMetadata, StakingCurrency, TrancheCurrency}, + tokens::{ + AssetStringLimit, CurrencyId, CustomMetadata, FilterCurrency, LocalAssetId, + StakingCurrency, TrancheCurrency, + }, }; -use cumulus_primitives_core::{MultiAsset, MultiLocation}; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use fp_rpc::TransactionStatus; use frame_support::{ construct_runtime, dispatch::DispatchClass, + genesis_builder_helper::{build_config, create_default_config}, pallet_prelude::{DispatchError, DispatchResult, RuntimeDebug}, parameter_types, traits::{ + fungible::HoldConsideration, + tokens::{PayFromAccount, UnityAssetBalanceConversion}, AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64, Contains, EitherOfDiverse, - EqualPrivilegeOnly, Get, InstanceFilter, LockIdentifier, OnFinalize, PalletInfoAccess, - UnixTime, WithdrawReasons, + EqualPrivilegeOnly, Get, InstanceFilter, LinearStoragePrice, LockIdentifier, OnFinalize, + PalletInfoAccess, TransformOrigin, UnixTime, WithdrawReasons, }, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}, @@ -78,6 +86,7 @@ use pallet_investments::OrderType; use pallet_liquidity_pools::hooks::{ CollectedForeignInvestmentHook, CollectedForeignRedemptionHook, DecreasedForeignInvestOrderHook, }; +pub use pallet_loans::entities::{input::PriceCollectionInput, loans::ActiveLoanInfo}; use pallet_loans::types::cashflow::CashflowPayment; use pallet_pool_system::{ pool_types::{PoolDetails, ScheduledUpdateDetails}, @@ -90,7 +99,9 @@ use pallet_restricted_tokens::{ use pallet_transaction_payment::CurrencyAdapter; use pallet_transaction_payment_rpc_runtime_api::{FeeDetails, RuntimeDispatchInfo}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; -use polkadot_runtime_common::{prod_or_fast, BlockHashCount, SlowAdjustingFeeUpdate}; +use polkadot_runtime_common::{ + prod_or_fast, xcm_sender::NoPriceForMessageDelivery, BlockHashCount, SlowAdjustingFeeUpdate, +}; use runtime_common::{ account_conversion::{AccountConverter, RuntimeAccountConverter}, asset_registry, @@ -101,15 +112,16 @@ use runtime_common::{ fees::{DealWithFees, FeeToTreasury, WeightToFee}, gateway, instances, liquidity_pools::LiquidityPoolsMessage, + message_queue::{NarrowOriginToSibling, ParaIdToSibling}, oracle::{ Feeder, OracleConverterBridge, OracleRatioProvider, OracleRatioProviderLocalAssetExtension, }, origin::EnsureAccountOrRootOr, permissions::PoolAdminCheck, rewards::SingleCurrencyMovement, - transfer_filter::PreLpTransfer, - xcm::AccountIdToMultiLocation, - xcm_transactor, AllowanceDeposit, CurrencyED, HoldId, + transfer_filter::{PreLpTransfer, PreNativeTransfer}, + xcm::AccountIdToLocation, + xcm_transactor, AllowanceDeposit, CurrencyED, }; use scale_info::TypeInfo; use sp_api::impl_runtime_apis; @@ -119,7 +131,7 @@ use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{ AccountIdConversion, BlakeTwo256, Block as BlockT, ConvertInto, DispatchInfoOf, - Dispatchable, PostDispatchInfoOf, UniqueSaturatedInto, Zero, + Dispatchable, IdentityLookup, PostDispatchInfoOf, UniqueSaturatedInto, Verify, Zero, }, transaction_validity::{TransactionSource, TransactionValidity, TransactionValidityError}, ApplyExtrinsicResult, FixedI128, Perbill, Permill, Perquintill, @@ -127,7 +139,7 @@ use sp_runtime::{ use sp_staking::currency_to_vote::U128CurrencyToVote; use sp_std::{marker::PhantomData, prelude::*, vec::Vec}; use sp_version::RuntimeVersion; -use staging_xcm_executor::XcmExecutor; +use staging_xcm::v4::{Asset, Location}; use static_assertions::const_assert; use crate::xcm::*; @@ -235,6 +247,7 @@ impl frame_system::Config for Runtime { type RuntimeEvent = RuntimeEvent; /// The ubiquitous origin type. type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type SS58Prefix = SS58Prefix; type SystemWeightInfo = weights::frame_system::WeightInfo; /// Get the chain's current version. @@ -250,6 +263,7 @@ impl Contains for BaseCallFilter { // Block these calls when called by a signed extrinsic. // Root will still be able to execute these. pallet_xcm::Call::execute { .. } + | pallet_xcm::Call::transfer_assets { .. } | pallet_xcm::Call::teleport_assets { .. } | pallet_xcm::Call::reserve_transfer_assets { .. } | pallet_xcm::Call::limited_reserve_transfer_assets { .. } @@ -281,21 +295,49 @@ impl Contains for BaseCallFilter { parameter_types! { pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT .saturating_div(4); pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; } impl cumulus_pallet_parachain_system::Config for Runtime { type CheckAssociatedRelayNumber = cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; - type DmpMessageHandler = DmpQueue; + // Using weights for recomended hardware + type DmpQueue = frame_support::traits::EnqueueWithOrigin; type OnSystemEvent = (); type OutboundXcmpMessageSource = XcmpQueue; type ReservedDmpWeight = ReservedDmpWeight; type ReservedXcmpWeight = ReservedXcmpWeight; type RuntimeEvent = RuntimeEvent; - type SelfParaId = parachain_info::Pallet; + type SelfParaId = staging_parachain_info::Pallet; + type WeightInfo = cumulus_pallet_parachain_system::weights::SubstrateWeight; type XcmpMessageHandler = XcmpQueue; } -// XCM +impl staging_parachain_info::Config for Runtime {} + +parameter_types! { + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; +} + +impl pallet_message_queue::Config for Runtime { + type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; + type MaxStale = sp_core::ConstU32<8>; + // Using weights for recomended hardware + #[cfg(feature = "runtime-benchmarks")] + type MessageProcessor = + pallet_message_queue::mock_helpers::NoopMessageProcessor; + #[cfg(not(feature = "runtime-benchmarks"))] + type MessageProcessor = staging_xcm_builder::ProcessXcmMessage< + AggregateMessageOrigin, + staging_xcm_executor::XcmExecutor, + RuntimeCall, + >; + type QueueChangeHandler = NarrowOriginToSibling; + type QueuePausedQuery = NarrowOriginToSibling; + type RuntimeEvent = RuntimeEvent; + type ServiceWeight = MessageQueueServiceWeight; + type Size = u32; + type WeightInfo = pallet_message_queue::weights::SubstrateWeight; +} /// XCMP Queue is responsible to handle XCM messages coming directly from /// sibling parachains. @@ -303,20 +345,18 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type ChannelInfo = ParachainSystem; type ControllerOrigin = EnsureRoot; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; - type ExecuteOverweightOrigin = EnsureRoot; - type PriceForSiblingDelivery = (); + type MaxInboundSuspended = sp_core::ConstU32<1_000>; + type PriceForSiblingDelivery = NoPriceForMessageDelivery; type RuntimeEvent = RuntimeEvent; type VersionWrapper = PolkadotXcm; - type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; - type XcmExecutor = XcmExecutor; + type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; + type XcmpQueue = TransformOrigin; } -/// The config for the Downward Message Passing Queue, i.e., how messages coming -/// from the relay-chain are handled. impl cumulus_pallet_dmp_queue::Config for Runtime { - type ExecuteOverweightOrigin = EnsureRoot; + type DmpSink = frame_support::traits::EnqueueWithOrigin; type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; + type WeightInfo = cumulus_pallet_dmp_queue::weights::SubstrateWeight; } parameter_types! { @@ -347,6 +387,7 @@ impl pallet_restricted_tokens::Config for Runtime { type PreFungiblesUnbalanced = cfg_traits::Always; type PreReservableCurrency = cfg_traits::Always; type RuntimeEvent = RuntimeEvent; + type RuntimeHoldReason = RuntimeHoldReason; type WeightInfo = weights::pallet_restricted_tokens::WeightInfo; } @@ -413,7 +454,7 @@ impl orml_tokens::Config for Runtime { type WeightInfo = (); } -impl orml_asset_registry::Config for Runtime { +impl orml_asset_registry::module::Config for Runtime { type AssetId = CurrencyId; type AssetProcessor = asset_registry::CustomAssetProcessor; type AuthorityOrigin = @@ -427,7 +468,6 @@ impl orml_asset_registry::Config for Runtime { // case, pallet-pools and democracy type WeightInfo = (); } -impl parachain_info::Config for Runtime {} parameter_types! { pub const MinimumPeriod: Millis = SLOT_DURATION / 2; @@ -478,13 +518,13 @@ impl pallet_balances::Config for Runtime { type ExistentialDeposit = ExistentialDeposit; type FreezeIdentifier = (); type MaxFreezes = ConstU32<10>; - type MaxHolds = ConstU32<10>; type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; /// The overarching event type. type RuntimeEvent = RuntimeEvent; - type RuntimeHoldReason = (); + type RuntimeFreezeReason = RuntimeFreezeReason; + type RuntimeHoldReason = RuntimeHoldReason; type WeightInfo = weights::pallet_balances::WeightInfo; } @@ -808,11 +848,16 @@ parameter_types! { pub const PreimageMaxSize: u32 = 4096 * 1024; pub PreimageBaseDeposit: Balance = deposit(2, 64); pub PreimageByteDeposit: Balance = deposit(0, 1); + pub const PreimageHoldReason: RuntimeHoldReason = RuntimeHoldReason::Preimage(pallet_preimage::HoldReason::Preimage); } impl pallet_preimage::Config for Runtime { - type BaseDeposit = PreimageBaseDeposit; - type ByteDeposit = PreimageByteDeposit; + type Consideration = HoldConsideration< + AccountId, + Balances, + PreimageHoldReason, + LinearStoragePrice, + >; type Currency = Balances; type ManagerOrigin = EnsureRoot; type RuntimeEvent = RuntimeEvent; @@ -960,24 +1005,30 @@ parameter_types! { pub const MaxSubAccounts: u32 = 100; pub const MaxAdditionalFields: u32 = 100; pub const BasicDeposit: Balance = 100 * CFG; - pub const FieldDeposit: Balance = 25 * CFG; + pub const ByteDeposit: Balance = deposit(0, 1); pub const SubAccountDeposit: Balance = 20 * CFG; pub const MaxRegistrars: u32 = 20; } impl pallet_identity::Config for Runtime { type BasicDeposit = BasicDeposit; + type ByteDeposit = ByteDeposit; type Currency = Balances; - type FieldDeposit = FieldDeposit; type ForceOrigin = EnsureRootOr>; - type MaxAdditionalFields = MaxAdditionalFields; + type IdentityInformation = pallet_identity::legacy::IdentityInfo; type MaxRegistrars = MaxRegistrars; type MaxSubAccounts = MaxSubAccounts; + type MaxSuffixLength = ConstU32<7>; + type MaxUsernameLength = ConstU32<32>; + type OffchainSignature = Signature; + type PendingUsernameExpiration = ConstU32<{ 7 * DAYS }>; type RegistrarOrigin = EnsureRootOr>; type RuntimeEvent = RuntimeEvent; + type SigningPublicKey = ::Signer; type Slashed = Treasury; type SubAccountDeposit = SubAccountDeposit; + type UsernameAuthorityOrigin = EnsureRoot; type WeightInfo = weights::pallet_identity::WeightInfo; } @@ -988,6 +1039,7 @@ parameter_types! { } impl pallet_vesting::Config for Runtime { + type BlockNumberProvider = System; type BlockNumberToBalance = ConvertInto; type Currency = Balances; type MinVestedTransfer = MinVestedTransfer; @@ -1011,6 +1063,7 @@ parameter_types! { // periods between treasury spends pub const SpendPeriod: BlockNumber = 14 * DAYS; + pub const PayoutPeriod: BlockNumber = 30 * DAYS; // percentage of treasury we burn per Spend period if there is a surplus // If the treasury is able to spend on all the approved proposals and didn't miss any @@ -1026,26 +1079,30 @@ parameter_types! { } impl pallet_treasury::Config for Runtime { - // either democracy or 50% of council votes type ApproveOrigin = EnsureRootOr; + type AssetKind = (); + type BalanceConverter = UnityAssetBalanceConversion; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); + type Beneficiary = Self::AccountId; + type BeneficiaryLookup = IdentityLookup; type Burn = Burn; - // we burn and dont handle the unbalance type BurnDestination = (); type Currency = Tokens; type MaxApprovals = MaxApprovals; - // slashed amount goes to treasury account type OnSlash = Treasury; type PalletId = TreasuryPalletId; + type Paymaster = PayFromAccount; + type PayoutPeriod = PayoutPeriod; type ProposalBond = ProposalBond; type ProposalBondMaximum = ProposalBondMaximum; type ProposalBondMinimum = ProposalBondMinimum; - // either democracy or more than 50% council votes type RejectOrigin = EnsureRootOr; type RuntimeEvent = RuntimeEvent; type SpendFunds = (); type SpendOrigin = frame_support::traits::NeverEnsureOrigin; type SpendPeriod = SpendPeriod; - type WeightInfo = weights::pallet_treasury::WeightInfo; + type WeightInfo = pallet_treasury::weights::SubstrateWeight; } // our pallets @@ -1160,18 +1217,19 @@ pub type XcmWeigher = parameter_types! { // 1 DOT, which has 10 decimals, should be enough to cover for fees opening/accepting hrmp channels. - pub MaxHrmpRelayFee: MultiAsset = (MultiLocation::parent(), 10_000_000_000u128).into(); + pub MaxHrmpRelayFee: Asset = (Location::parent(), 10_000_000_000u128).into(); } impl pallet_xcm_transactor::Config for Runtime { - type AccountIdToMultiLocation = AccountIdToMultiLocation; + type AccountIdToLocation = AccountIdToLocation; type AssetTransactor = FungiblesTransactor; type Balance = Balance; type BaseXcmWeight = BaseXcmWeight; type CurrencyId = CurrencyId; - type CurrencyIdToMultiLocation = CurrencyIdConvert; + type CurrencyIdToLocation = CurrencyIdConvert; type DerivativeAddressRegistrationOrigin = EnsureRootOr; type HrmpManipulatorOrigin = EnsureRootOr; + type HrmpOpenOrigin = EnsureRoot; type MaxHrmpFee = staging_xcm_builder::Case; type ReserveProvider = xcm_primitives::AbsoluteAndRelativeReserve; type RuntimeEvent = RuntimeEvent; @@ -1902,10 +1960,10 @@ impl pallet_token_mux::Config for Runtime { impl pallet_transfer_allowlist::Config for Runtime { type CurrencyId = FilterCurrency; type Deposit = AllowanceDeposit; - type HoldId = HoldId; - type Location = Location; + type Location = RestrictedTransferLocation; type ReserveCurrency = Balances; type RuntimeEvent = RuntimeEvent; + type RuntimeHoldReason = RuntimeHoldReason; type WeightInfo = weights::pallet_transfer_allowlist::WeightInfo; } @@ -1949,6 +2007,7 @@ impl pallet_evm::Config for Runtime { type PrecompilesValue = PrecompilesValue; type Runner = pallet_evm::runner::stack::Runner; type RuntimeEvent = RuntimeEvent; + type SuicideQuickClearLimit = ConstU32<0>; type Timestamp = Timestamp; type WeightInfo = (); type WeightPerGas = WeightPerGas; @@ -2033,7 +2092,7 @@ construct_runtime!( System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event} = 1, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3, - ParachainInfo: parachain_info::{Pallet, Storage, Config} = 4, + ParachainInfo: staging_parachain_info::{Pallet, Storage, Config} = 4, // money stuff Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 20, @@ -2057,7 +2116,7 @@ construct_runtime!( Democracy: pallet_democracy::{Pallet, Call, Storage, Config, Event} = 66, Identity: pallet_identity::{Pallet, Call, Storage, Event} = 67, Vesting: pallet_vesting::{Pallet, Call, Storage, Event, Config} = 68, - Preimage: pallet_preimage::{Pallet, Call, Storage, Event} = 69, + Preimage: pallet_preimage::{Pallet, Call, Storage, Event, HoldReason} = 69, Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 70, // our pallets @@ -2069,7 +2128,7 @@ construct_runtime!( // Removed: Migration = 95 // Removed: CrowdloanClaim = 96 // Removed: CrowdloanReward = 97 - Tokens: pallet_restricted_tokens::{Pallet, Call, Event} = 98, + Tokens: pallet_restricted_tokens::{Pallet, Call, Event, HoldReason} = 98, CollatorAllowlist: pallet_collator_allowlist::{Pallet, Call, Storage, Config, Event} = 99, BlockRewardsBase: pallet_rewards::::{Pallet, Storage, Event, Config} = 100, BlockRewards: pallet_block_rewards::{Pallet, Call, Storage, Event, Config} = 101, @@ -2080,7 +2139,7 @@ construct_runtime!( LiquidityPoolsGateway: pallet_liquidity_pools_gateway::{Pallet, Call, Storage, Event, Origin } = 107, OrderBook: pallet_order_book::{Pallet, Call, Storage, Event} = 108, ForeignInvestments: pallet_foreign_investments::{Pallet, Storage, Event} = 109, - TransferAllowList: pallet_transfer_allowlist::{Pallet, Call, Storage, Event} = 110, + TransferAllowList: pallet_transfer_allowlist::{Pallet, Call, Storage, Event, HoldReason} = 110, OraclePriceFeed: pallet_oracle_feed::{Pallet, Call, Storage, Event} = 111, OraclePriceCollection: pallet_oracle_collection::{Pallet, Call, Storage, Event} = 112, Remarks: pallet_remarks::{Pallet, Call, Event} = 113, @@ -2094,11 +2153,12 @@ construct_runtime!( XTokens: pallet_restricted_xtokens::{Pallet, Call} = 124, XcmTransactor: pallet_xcm_transactor::{Pallet, Call, Storage, Event} = 125, OrmlXTokens: orml_xtokens::{Pallet, Event} = 126, + MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 127, // 3rd party pallets ChainBridge: chainbridge::{Pallet, Call, Storage, Event} = 150, OrmlTokens: orml_tokens::{Pallet, Storage, Event, Config} = 151, - OrmlAssetRegistry: orml_asset_registry::{Pallet, Storage, Call, Event, Config} = 152, + OrmlAssetRegistry: orml_asset_registry::module::{Pallet, Storage, Call, Event, Config} = 152, OrmlXcm: orml_xcm::{Pallet, Storage, Call, Event} = 153, // EVM pallets @@ -2150,14 +2210,6 @@ impl fp_rpc::ConvertTransaction for TransactionConv } } -use cfg_types::{ - locations::Location, - pools::PoolNav, - tokens::{FilterCurrency, LocalAssetId}, -}; -pub use pallet_loans::entities::{input::PriceCollectionInput, loans::ActiveLoanInfo}; -use runtime_common::transfer_filter::PreNativeTransfer; - impl_runtime_apis! { impl sp_api::Core for Runtime { fn version() -> RuntimeVersion { @@ -2380,13 +2432,13 @@ impl_runtime_apis! { // Investment Runtime APIs impl runtime_common::apis::InvestmentsApi> for Runtime { fn investment_portfolio(account_id: AccountId) -> Vec<(TrancheCurrency, InvestmentPortfolio)> { - runtime_common::investment_portfolios::get_account_portfolio::(account_id) + runtime_common::investment_portfolios::get_account_portfolio::(account_id).unwrap_or_default() } } // AccountConversionApi impl runtime_common::apis::AccountConversionApi for Runtime { - fn conversion_of(location: MultiLocation) -> Option { + fn conversion_of(location: Location) -> Option { AccountConverter::location_to_account::(location) } } @@ -2615,7 +2667,7 @@ impl_runtime_apis! { fn gas_limit_multiplier_support() {} fn pending_block( - xts: Vec<::Extrinsic> + xts: Vec<::Extrinsic> ) -> ( Option, Option> ) { @@ -2667,6 +2719,7 @@ impl_runtime_apis! { use frame_support::traits::StorageInfoTrait; use frame_system_benchmarking::Pallet as SystemBench; use cumulus_pallet_session_benchmarking::Pallet as SessionBench; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsicsBenchmark; let mut list = Vec::::new(); list_benchmarks!(list, extra); @@ -2695,6 +2748,9 @@ impl_runtime_apis! { use cumulus_pallet_session_benchmarking::Pallet as SessionBench; impl cumulus_pallet_session_benchmarking::Config for Runtime {} + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsicsBenchmark; + impl pallet_xcm::benchmarking::Config for Runtime {} + use frame_support::traits::WhitelistedStorageKeys; let whitelist = AllPalletsWithSystem::whitelisted_storage_keys(); @@ -2706,6 +2762,16 @@ impl_runtime_apis! { Ok(batches) } } + + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn create_default_config() -> Vec { + create_default_config::() + } + + fn build_config(config: Vec) -> sp_genesis_builder::Result { + build_config::(config) + } + } } #[cfg(feature = "runtime-benchmarks")] @@ -2723,7 +2789,6 @@ mod benches { [pallet_elections_phragmen, Elections] [pallet_identity, Identity] [pallet_vesting, Vesting] - [pallet_treasury, Treasury] [pallet_preimage, Preimage] [pallet_fees, Fees] [pallet_anchors, Anchor] @@ -2743,7 +2808,7 @@ mod benches { [cumulus_pallet_xcmp_queue, XcmpQueue] [pallet_order_book, OrderBook] [pallet_investments, Investments] - [pallet_xcm, PolkadotXcm] + [pallet_xcm, PalletXcmExtrinsicsBenchmark::] [pallet_liquidity_rewards, LiquidityRewards] [pallet_transfer_allowlist, TransferAllowList] [pallet_oracle_feed, OraclePriceFeed] diff --git a/runtime/centrifuge/src/migrations.rs b/runtime/centrifuge/src/migrations.rs index 7bba719806..1b3af54bcd 100644 --- a/runtime/centrifuge/src/migrations.rs +++ b/runtime/centrifuge/src/migrations.rs @@ -10,13 +10,45 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. +use cfg_primitives::AccountId; +use frame_support::parameter_types; +use sp_std::{vec, vec::Vec}; + use crate::{OraclePriceCollection, OraclePriceFeed}; +// Number of identities on Centrifuge Chain on 29.05.2024 was 34 +const IDENTITY_MIGRATION_KEY_LIMIT: u64 = 1000; + +parameter_types! { + // Address used by Anemoy to withdraw in AssetHub + // 4dTeMxuPJCK7zQGhFcgCivSJqBs9Wo2SuMSQeYCCuVJ9xrE2 --> 5Fc9NzKzJZwZvgjQBmSKtvZmJ5oP6B49DFC5dXZhTETjrSzo + pub AccountMap: Vec<(AccountId, AccountId)> = vec![ + ( + AccountId::new(hex_literal::hex!("5dbb2cec05b6bda775f7945827b887b0e7b5245eae8b4ef266c60820c9377185")), + AccountId::new(hex_literal::hex!("10c03288a534d77418e3c19e745dfbc952423e179e1e3baa89e287092fc7802f")) + ) + ]; +} + /// The migration set for Centrifuge @ Polkadot. /// It includes all the migrations that have to be applied on that chain. pub type UpgradeCentrifuge1029 = ( runtime_common::migrations::increase_storage_version::Migration, runtime_common::migrations::increase_storage_version::Migration, pallet_collator_selection::migration::v1::MigrateToV1, + pallet_collator_selection::migration::v2::MigrationToV2, runtime_common::migrations::loans::AddWithLinearPricing, + runtime_common::migrations::hold_reason::MigrateTransferAllowListHolds< + crate::Runtime, + crate::RuntimeHoldReason, + >, + // Migrations below this comment originate from Polkadot SDK + pallet_xcm::migration::MigrateToLatestXcmVersion, + cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, + pallet_identity::migration::versioned::V0ToV1, + pallet_uniques::migration::MigrateV0ToV1, + runtime_common::migrations::restricted_location::MigrateRestrictedTransferLocation< + crate::Runtime, + AccountMap, + >, ); diff --git a/runtime/centrifuge/src/weights/cumulus_pallet_xcmp_queue.rs b/runtime/centrifuge/src/weights/cumulus_pallet_xcmp_queue.rs index d501357109..fc48e1b1f4 100644 --- a/runtime/centrifuge/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/runtime/centrifuge/src/weights/cumulus_pallet_xcmp_queue.rs @@ -44,16 +44,28 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: XcmpQueue QueueConfig (r:1 w:1) - /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) - fn set_config_with_weight() -> Weight { - // Proof Size summary in bytes: - // Measured: `109` - // Estimated: `1594` - // Minimum execution time: 8_486_000 picoseconds. - Weight::from_parts(8_866_000, 0) - .saturating_add(Weight::from_parts(0, 1594)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + + fn enqueue_xcmp_message() -> Weight { + Weight::zero() + } + + fn suspend_channel() -> Weight { + Weight::zero() + } + + fn resume_channel() -> Weight { + Weight::zero() + } + + fn take_first_concatenated_xcm() -> Weight { + Weight::zero() + } + + fn on_idle_good_msg() -> Weight { + Weight::from_parts(1, 1) + } + + fn on_idle_large_msg() -> Weight { + Weight::from_parts(1, 1) } } diff --git a/runtime/centrifuge/src/weights/frame_system.rs b/runtime/centrifuge/src/weights/frame_system.rs index e20598c77c..05427a8a9c 100644 --- a/runtime/centrifuge/src/weights/frame_system.rs +++ b/runtime/centrifuge/src/weights/frame_system.rs @@ -110,4 +110,12 @@ impl frame_system::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } + + fn authorize_upgrade() -> Weight { + Weight::zero() + } + + fn apply_authorized_upgrade() -> Weight { + Weight::zero() + } } diff --git a/runtime/centrifuge/src/weights/pallet_balances.rs b/runtime/centrifuge/src/weights/pallet_balances.rs index 9ac874a3f5..ca65ff4d9b 100644 --- a/runtime/centrifuge/src/weights/pallet_balances.rs +++ b/runtime/centrifuge/src/weights/pallet_balances.rs @@ -132,4 +132,8 @@ impl pallet_balances::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into())) } + + fn force_adjust_total_issuance() -> Weight { + Weight::zero() + } } diff --git a/runtime/centrifuge/src/weights/pallet_collator_selection.rs b/runtime/centrifuge/src/weights/pallet_collator_selection.rs index 1cb4a90819..f807c0fea8 100644 --- a/runtime/centrifuge/src/weights/pallet_collator_selection.rs +++ b/runtime/centrifuge/src/weights/pallet_collator_selection.rs @@ -66,7 +66,7 @@ impl pallet_collator_selection::WeightInfo for WeightIn } /// Storage: CollatorSelection CandidacyBond (r:0 w:1) /// Proof: CollatorSelection CandidacyBond (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) - fn set_candidacy_bond() -> Weight { + fn set_candidacy_bond(_: u32, _: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` @@ -178,4 +178,14 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Pending to generate Weight::default() } + + fn update_bond(_: u32) -> Weight { + // Pending to generate + Weight::default() + } + + fn take_candidate_slot(_: u32) -> Weight { + // Pending to generate + Weight::default() + } } diff --git a/runtime/centrifuge/src/weights/pallet_identity.rs b/runtime/centrifuge/src/weights/pallet_identity.rs index 8f6e8c815a..6e896c8d09 100644 --- a/runtime/centrifuge/src/weights/pallet_identity.rs +++ b/runtime/centrifuge/src/weights/pallet_identity.rs @@ -51,19 +51,8 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) /// The range of component `r` is `[1, 20]`. /// The range of component `x` is `[0, 100]`. - fn set_identity(r: u32, x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `441 + r * (5 ±0)` - // Estimated: `11003` - // Minimum execution time: 47_899_000 picoseconds. - Weight::from_parts(46_624_446, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 3_568 - .saturating_add(Weight::from_parts(101_394, 0).saturating_mul(r.into())) - // Standard Error: 696 - .saturating_add(Weight::from_parts(774_354, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + fn set_identity(_: u32) -> Weight { + Weight::default() } /// Storage: Identity IdentityOf (r:1 w:0) /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) @@ -116,22 +105,8 @@ impl pallet_identity::WeightInfo for WeightInfo { /// The range of component `r` is `[1, 20]`. /// The range of component `s` is `[0, 100]`. /// The range of component `x` is `[0, 100]`. - fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `468 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` - // Estimated: `11003` - // Minimum execution time: 87_102_000 picoseconds. - Weight::from_parts(44_595_745, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 11_560 - .saturating_add(Weight::from_parts(167_752, 0).saturating_mul(r.into())) - // Standard Error: 2_257 - .saturating_add(Weight::from_parts(1_973_567, 0).saturating_mul(s.into())) - // Standard Error: 2_257 - .saturating_add(Weight::from_parts(434_354, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) + fn clear_identity(_: u32, _: u32) -> Weight { + Weight::default() } /// Storage: Identity Registrars (r:1 w:0) /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) @@ -139,37 +114,15 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) /// The range of component `r` is `[1, 20]`. /// The range of component `x` is `[0, 100]`. - fn request_judgement(r: u32, x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `366 + r * (57 ±0) + x * (66 ±0)` - // Estimated: `11003` - // Minimum execution time: 47_698_000 picoseconds. - Weight::from_parts(46_194_059, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 6_067 - .saturating_add(Weight::from_parts(122_661, 0).saturating_mul(r.into())) - // Standard Error: 1_183 - .saturating_add(Weight::from_parts(816_347, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) + fn request_judgement(_: u32) -> Weight { + Weight::default() } /// Storage: Identity IdentityOf (r:1 w:1) /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) /// The range of component `r` is `[1, 20]`. /// The range of component `x` is `[0, 100]`. - fn cancel_request(r: u32, x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `397 + x * (66 ±0)` - // Estimated: `11003` - // Minimum execution time: 43_581_000 picoseconds. - Weight::from_parts(43_206_735, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 6_274 - .saturating_add(Weight::from_parts(75_118, 0).saturating_mul(r.into())) - // Standard Error: 1_224 - .saturating_add(Weight::from_parts(805_273, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + fn cancel_request(_: u32) -> Weight { + Weight::default() } /// Storage: Identity Registrars (r:1 w:1) /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) @@ -222,19 +175,8 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) /// The range of component `r` is `[1, 19]`. /// The range of component `x` is `[0, 100]`. - fn provide_judgement(r: u32, x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `444 + r * (57 ±0) + x * (66 ±0)` - // Estimated: `11003` - // Minimum execution time: 32_801_000 picoseconds. - Weight::from_parts(31_628_849, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 7_378 - .saturating_add(Weight::from_parts(78_258, 0).saturating_mul(r.into())) - // Standard Error: 1_365 - .saturating_add(Weight::from_parts(1_258_986, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) + fn provide_judgement(_: u32) -> Weight { + Weight::default() } /// Storage: Identity SubsOf (r:1 w:1) /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) @@ -247,22 +189,8 @@ impl pallet_identity::WeightInfo for WeightInfo { /// The range of component `r` is `[1, 20]`. /// The range of component `s` is `[0, 100]`. /// The range of component `x` is `[0, 100]`. - fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `797 + r * (15 ±0) + s * (32 ±0) + x * (66 ±0)` - // Estimated: `11003` - // Minimum execution time: 116_286_000 picoseconds. - Weight::from_parts(75_504_595, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 15_724 - .saturating_add(Weight::from_parts(220_350, 0).saturating_mul(r.into())) - // Standard Error: 3_070 - .saturating_add(Weight::from_parts(1_959_302, 0).saturating_mul(s.into())) - // Standard Error: 3_070 - .saturating_add(Weight::from_parts(420_698, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) + fn kill_identity(_: u32, _: u32) -> Weight { + Weight::default() } /// Storage: Identity IdentityOf (r:1 w:0) /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) @@ -338,4 +266,32 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } + + fn add_username_authority() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn remove_username_authority() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn set_username_for() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn accept_username() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn remove_expired_approval() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn set_primary_username() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn remove_dangling_username() -> cumulus_primitives_core::Weight { + Weight::default() + } } diff --git a/runtime/centrifuge/src/weights/pallet_preimage.rs b/runtime/centrifuge/src/weights/pallet_preimage.rs index 797ad7c8a4..06fbdb6efc 100644 --- a/runtime/centrifuge/src/weights/pallet_preimage.rs +++ b/runtime/centrifuge/src/weights/pallet_preimage.rs @@ -197,4 +197,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } + + fn ensure_updated(_: u32) -> cumulus_primitives_core::Weight { + Weight::default() + } } diff --git a/runtime/centrifuge/src/weights/pallet_treasury.rs b/runtime/centrifuge/src/weights/pallet_treasury.rs index 91cebd2470..a0236f6710 100644 --- a/runtime/centrifuge/src/weights/pallet_treasury.rs +++ b/runtime/centrifuge/src/weights/pallet_treasury.rs @@ -120,4 +120,20 @@ impl pallet_treasury::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 2583).saturating_mul(p.into())) } + + fn spend_local() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn payout() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn check_status() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn void_spend() -> cumulus_primitives_core::Weight { + Weight::default() + } } diff --git a/runtime/centrifuge/src/weights/pallet_vesting.rs b/runtime/centrifuge/src/weights/pallet_vesting.rs index f0b06d0697..7a0accf2c2 100644 --- a/runtime/centrifuge/src/weights/pallet_vesting.rs +++ b/runtime/centrifuge/src/weights/pallet_vesting.rs @@ -220,4 +220,8 @@ impl pallet_vesting::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } + + fn force_remove_vesting_schedule(_: u32, _: u32) -> cumulus_primitives_core::Weight { + Weight::default() + } } diff --git a/runtime/centrifuge/src/weights/pallet_xcm.rs b/runtime/centrifuge/src/weights/pallet_xcm.rs index 77e10e1b31..5f245e8acf 100644 --- a/runtime/centrifuge/src/weights/pallet_xcm.rs +++ b/runtime/centrifuge/src/weights/pallet_xcm.rs @@ -273,4 +273,16 @@ impl pallet_xcm::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) } + + fn transfer_assets() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn new_query() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn take_response() -> cumulus_primitives_core::Weight { + Weight::default() + } } diff --git a/runtime/centrifuge/src/xcm.rs b/runtime/centrifuge/src/xcm.rs index 8935f1c5e1..cd1da395a4 100644 --- a/runtime/centrifuge/src/xcm.rs +++ b/runtime/centrifuge/src/xcm.rs @@ -28,7 +28,7 @@ use pallet_xcm::XcmPassthrough; use runtime_common::{ transfer_filter::PreXcmTransfer, xcm::{ - general_key, AccountIdToMultiLocation, Barrier, FixedConversionRateProvider, + general_key, AccountIdToLocation, Barrier, FixedConversionRateProvider, LocalOriginToLocation, LpInstanceRelayer, ToTreasury, }, xcm_fees::native_per_second, @@ -36,12 +36,12 @@ use runtime_common::{ use sp_core::ConstU32; use staging_xcm::{ prelude::*, - v3::{MultiLocation, Weight as XcmWeight}, + v4::{Location, Weight as XcmWeight}, }; use staging_xcm_builder::{ - ConvertedConcreteId, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, FungiblesAdapter, - NoChecking, RelayChainAsNative, SiblingParachainAsNative, SignedAccountId32AsNative, - SovereignSignedViaLocation, + ConvertedConcreteId, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, + FrameTransactionalProcessor, FungiblesAdapter, NoChecking, RelayChainAsNative, + SiblingParachainAsNative, SignedAccountId32AsNative, SovereignSignedViaLocation, }; use staging_xcm_executor::{traits::JustTry, XcmExecutor}; @@ -50,37 +50,6 @@ use super::{ RuntimeCall, RuntimeEvent, RuntimeOrigin, Tokens, XcmpQueue, }; -/// A call filter for the XCM Transact instruction. This is a temporary -/// measure until we properly account for proof size weights. -/// -/// Calls that are allowed through this filter must: -/// 1. Have a fixed weight; -/// 2. Cannot lead to another call being made; -/// 3. Have a defined proof size weight, e.g. no unbounded vecs in call -/// parameters. -/// -/// NOTE: Defensive configuration for now, inspired by filter of -/// SystemParachains and Polkadot, can be extended if desired. -pub struct SafeCallFilter; -impl frame_support::traits::Contains for SafeCallFilter { - fn contains(call: &RuntimeCall) -> bool { - matches!( - call, - RuntimeCall::Timestamp(..) - | RuntimeCall::Balances(..) - | RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) - | RuntimeCall::PolkadotXcm( - pallet_xcm::Call::limited_reserve_transfer_assets { .. } - ) | RuntimeCall::XcmpQueue(..) - | RuntimeCall::DmpQueue(..) - | RuntimeCall::Proxy(..) - | RuntimeCall::LiquidityPoolsGateway( - pallet_liquidity_pools_gateway::Call::process_msg { .. } - ) | RuntimeCall::OrderBook(..) - ) - } -} - /// The main XCM config /// This is where we configure the core of our XCM integrations: how tokens are /// transferred, how fees are calculated, what barriers we impose on incoming @@ -105,9 +74,10 @@ impl staging_xcm_executor::Config for XcmConfig { type PalletInstancesInfo = crate::AllPalletsWithSystem; type ResponseHandler = PolkadotXcm; type RuntimeCall = RuntimeCall; - type SafeCallFilter = SafeCallFilter; + type SafeCallFilter = Everything; type SubscriptionService = PolkadotXcm; type Trader = Trader; + type TransactionalProcessor = FrameTransactionalProcessor; type UniversalAliases = Nothing; type UniversalLocation = UniversalLocation; type Weigher = FixedWeightBounds; @@ -129,9 +99,9 @@ pub type Trader = ( parameter_types! { // Canonical location: https://github.com/paritytech/polkadot/pull/4470 pub CanonicalCfgPerSecond: (AssetId, u128, u128) = ( - MultiLocation::new( + Location::new( 0, - X1(general_key(parachains::polkadot::centrifuge::CFG_KEY)), + general_key(parachains::polkadot::centrifuge::CFG_KEY), ).into(), native_per_second(), 0, @@ -145,7 +115,7 @@ pub type FungiblesTransactor = FungiblesAdapter< // This means that this adapter should handle any token that `CurrencyIdConvert` can convert // to `CurrencyId`, the `CurrencyId` type of `Tokens`, the fungibles implementation it uses. ConvertedConcreteId, - // Convert an XCM MultiLocation into a local account id + // Convert an XCM Location into a local account id LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly) AccountId, @@ -161,11 +131,6 @@ parameter_types! { pub const MaxInstructions: u32 = 100; } -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - /// Pallet Xcm offers a lot of out-of-the-box functionality and features to /// configure and handle XCM messages. impl pallet_xcm::Config for Runtime { @@ -176,8 +141,6 @@ impl pallet_xcm::Config for Runtime { type ExecuteXcmOrigin = EnsureXcmOrigin>; type MaxLockers = ConstU32<8>; type MaxRemoteLockConsumers = ConstU32<0>; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; type RemoteLockConsumerIdentifier = (); type RuntimeCall = RuntimeCall; type RuntimeEvent = RuntimeEvent; @@ -200,7 +163,7 @@ impl pallet_xcm::Config for Runtime { parameter_types! { pub const RelayNetwork: NetworkId = NetworkId::Polkadot; pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); + pub Ancestry: Location = Parachain(ParachainInfo::parachain_id().into()).into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); } @@ -264,29 +227,29 @@ parameter_types! { } parameter_types! { - /// The `MultiLocation` identifying this very parachain - pub SelfLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::get().into()))); - pub UniversalLocation: InteriorMultiLocation = X2( + /// The `Location` identifying this very parachain + pub SelfLocation: Location = Location::new(1, Parachain(ParachainInfo::get().into())); + pub UniversalLocation: InteriorLocation = [ GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into()) - ); + ].into(); } parameter_type_with_key! { - pub ParachainMinFee: |_location: MultiLocation| -> Option { + pub ParachainMinFee: |_location: Location| -> Option { None }; } impl orml_xtokens::Config for Runtime { - type AccountIdToMultiLocation = AccountIdToMultiLocation; + type AccountIdToLocation = AccountIdToLocation; type Balance = Balance; type BaseXcmWeight = BaseXcmWeight; type CurrencyId = CurrencyId; type CurrencyIdConvert = CurrencyIdConvert; + type LocationsFilter = Everything; type MaxAssetsForTransfer = MaxAssetsForTransfer; type MinXcmFee = ParachainMinFee; - type MultiLocationsFilter = Everything; type ReserveProvider = AbsoluteReserveProvider; type RuntimeEvent = RuntimeEvent; type SelfLocation = SelfLocation; diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 88050be173..bdac1c6db0 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -9,6 +9,7 @@ repository.workspace = true documentation.workspace = true [dependencies] +hex = { workspace = true } hex-literal = { workspace = true } log = { workspace = true } num_enum = { workspace = true } @@ -27,6 +28,7 @@ sp-io = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } +cumulus-primitives-core = { workspace = true } polkadot-parachain-primitives = { workspace = true } staging-xcm = { workspace = true } staging-xcm-builder = { workspace = true } @@ -55,7 +57,6 @@ cfg-utils = { workspace = true } axelar-gateway-precompile = { workspace = true } chainbridge = { workspace = true } cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-dmp-queue = { workspace = true } cumulus-pallet-parachain-system = { workspace = true } cumulus-pallet-xcm = { workspace = true } cumulus-pallet-xcmp-queue = { workspace = true } @@ -90,6 +91,7 @@ pallet-liquidity-pools-gateway = { workspace = true } pallet-liquidity-rewards = { workspace = true } pallet-loans = { workspace = true } pallet-membership = { workspace = true } +pallet-message-queue = { workspace = true } pallet-multisig = { workspace = true } pallet-oracle-collection = { workspace = true } pallet-oracle-feed = { workspace = true } @@ -116,7 +118,7 @@ pallet-utility = { workspace = true } pallet-vesting = { workspace = true } pallet-xcm = { workspace = true } pallet-xcm-transactor = { workspace = true } -parachain-info = { workspace = true } +staging-parachain-info = { workspace = true } # Optionals for benchmarking frame-benchmarking = { workspace = true, optional = true } @@ -150,16 +152,8 @@ std = [ "pallet-evm-precompile-sha3fips/std", "pallet-evm-precompile-simple/std", "precompile-utils/std", - "pallet-evm/std", - "pallet-investments/std", - "pallet-liquidity-pools-gateway/std", - "pallet-liquidity-pools/std", - "pallet-loans/std", - "pallet-pool-system/std", - "pallet-restricted-tokens/std", - "pallet-treasury/std", - "parachain-info/std", "polkadot-parachain-primitives/std", + "cumulus-primitives-core/std", "scale-info/std", "serde/std", "sp-api/std", @@ -185,7 +179,6 @@ std = [ "axelar-gateway-precompile/std", "chainbridge/std", "cumulus-pallet-aura-ext/std", - "cumulus-pallet-dmp-queue/std", "cumulus-pallet-parachain-system/std", "cumulus-pallet-xcm/std", "cumulus-pallet-xcmp-queue/std", @@ -246,7 +239,8 @@ std = [ "pallet-vesting/std", "pallet-xcm/std", "pallet-xcm-transactor/std", - "parachain-info/std", + "pallet-message-queue/std", + "staging-parachain-info/std", ] runtime-benchmarks = [ # Substrate related @@ -258,6 +252,7 @@ runtime-benchmarks = [ "xcm-primitives/runtime-benchmarks", "staging-xcm-builder/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", + "cumulus-primitives-core/runtime-benchmarks", # Locals "cfg-primitives/runtime-benchmarks", @@ -321,6 +316,7 @@ runtime-benchmarks = [ "pallet-vesting/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "pallet-xcm-transactor/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", ] try-runtime = [ "sp-runtime/try-runtime", @@ -336,7 +332,6 @@ try-runtime = [ "axelar-gateway-precompile/try-runtime", "chainbridge/try-runtime", "cumulus-pallet-aura-ext/try-runtime", - "cumulus-pallet-dmp-queue/try-runtime", "cumulus-pallet-parachain-system/try-runtime", "cumulus-pallet-xcm/try-runtime", "cumulus-pallet-xcmp-queue/try-runtime", @@ -397,7 +392,8 @@ try-runtime = [ "pallet-vesting/try-runtime", "pallet-xcm/try-runtime", "pallet-xcm-transactor/try-runtime", - "parachain-info/try-runtime", + "pallet-message-queue/try-runtime", + "staging-parachain-info/try-runtime", ] on-chain-release-build = [ "sp-api/disable-logging", diff --git a/runtime/common/src/account_conversion.rs b/runtime/common/src/account_conversion.rs index cdc209d040..9e896c9db5 100644 --- a/runtime/common/src/account_conversion.rs +++ b/runtime/common/src/account_conversion.rs @@ -15,7 +15,7 @@ use cfg_types::domain_address::{Domain, DomainAddress}; use pallet_evm::AddressMapping; use sp_core::{crypto::AccountId32, Get, H160}; use sp_runtime::traits::Convert; -use staging_xcm::v3; +use staging_xcm::v4::{Junction::AccountKey20, Location, NetworkId::Ethereum}; use staging_xcm_executor::traits::ConvertLocation; /// Common converter code for translating accounts across different @@ -40,22 +40,21 @@ impl AccountConverter { } pub fn location_to_account>( - location: v3::MultiLocation, + location: Location, ) -> Option { // Try xcm logic first match XcmConverter::convert_location(&location) { Some(acc) => Some(acc), None => { // match EVM logic - match location { - v3::MultiLocation { - parents: 0, - interior: - v3::Junctions::X1(v3::Junction::AccountKey20 { - network: Some(v3::NetworkId::Ethereum { chain_id }), - key, - }), - } => Some(Self::convert_evm_address(chain_id, key)), + match location.unpack() { + ( + 0, + [AccountKey20 { + network: Some(Ethereum { chain_id }), + key, + }], + ) => Some(Self::convert_evm_address(*chain_id, *key)), _ => None, } } diff --git a/runtime/common/src/apis/account_conversion.rs b/runtime/common/src/apis/account_conversion.rs index 4f9557f24b..0ffd74c618 100644 --- a/runtime/common/src/apis/account_conversion.rs +++ b/runtime/common/src/apis/account_conversion.rs @@ -11,7 +11,7 @@ // GNU General Public License for more details. use parity_scale_codec::Codec; use sp_api::decl_runtime_apis; -use staging_xcm::v3::MultiLocation; +use staging_xcm::v4::Location; decl_runtime_apis! { /// Runtime Api for the pallet-anchors, to be implemented @@ -20,6 +20,6 @@ decl_runtime_apis! { where AccountId: Codec { - fn conversion_of(location: MultiLocation) -> Option; + fn conversion_of(location: Location) -> Option; } } diff --git a/runtime/common/src/fees.rs b/runtime/common/src/fees.rs index 6a951a1087..89af83d124 100644 --- a/runtime/common/src/fees.rs +++ b/runtime/common/src/fees.rs @@ -143,7 +143,10 @@ mod test { use cfg_types::ids::TREASURY_PALLET_ID; use frame_support::{ derive_impl, parameter_types, - traits::{Currency, FindAuthor}, + traits::{ + tokens::{PayFromAccount, UnityAssetBalanceConversion}, + Currency, FindAuthor, + }, PalletId, }; use sp_core::ConstU64; @@ -185,17 +188,26 @@ mod test { parameter_types! { pub const TreasuryPalletId: PalletId = TREASURY_PALLET_ID; + pub TreasuryAccount: AccountId = Treasury::account_id(); pub const MaxApprovals: u32 = 100; } impl pallet_treasury::Config for Runtime { type ApproveOrigin = frame_system::EnsureRoot; + type AssetKind = (); + type BalanceConverter = UnityAssetBalanceConversion; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); + type Beneficiary = Self::AccountId; + type BeneficiaryLookup = IdentityLookup; type Burn = (); type BurnDestination = (); type Currency = pallet_balances::Pallet; type MaxApprovals = MaxApprovals; type OnSlash = (); type PalletId = TreasuryPalletId; + type Paymaster = PayFromAccount; + type PayoutPeriod = ConstU64<10>; type ProposalBond = (); type ProposalBondMaximum = (); type ProposalBondMinimum = (); diff --git a/runtime/common/src/gateway.rs b/runtime/common/src/gateway.rs index b46a87f27d..4129eec96c 100644 --- a/runtime/common/src/gateway.rs +++ b/runtime/common/src/gateway.rs @@ -17,9 +17,10 @@ use sp_runtime::traits::AccountIdConversion; use crate::account_conversion::AccountConverter; -pub fn get_gateway_account() -> AccountId { +pub fn get_gateway_account( +) -> AccountId { let sender_account: AccountId = - Sibling::from(parachain_info::Pallet::::get()).into_account_truncating(); + Sibling::from(staging_parachain_info::Pallet::::get()).into_account_truncating(); let truncated_sender_account = H160::from_slice(&>::as_ref(&sender_account)[0..20]); diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index ebc4227130..1802d8d951 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -53,10 +53,6 @@ parameter_types! { /// The native currency identifier of our currency id enum /// to be used for Get types. pub const NativeCurrency: CurrencyId = CurrencyId::Native; - - /// The hold identifier in our system to be used for - /// Get<()> types - pub const HoldId: HoldIdentifier = (); } pub struct AllowanceDeposit(sp_std::marker::PhantomData); @@ -68,9 +64,6 @@ impl> Get } } -/// To be used with the transfer-allowlist pallet across runtimes -pub type HoldIdentifier = (); - #[macro_export] macro_rules! production_or_benchmark { ($production:expr, $benchmark:expr) => {{ @@ -86,13 +79,13 @@ pub struct CurrencyED(PhantomData); impl GetByKey for CurrencyED where T: pallet_balances::Config - + orml_asset_registry::Config, + + orml_asset_registry::module::Config, { fn get(currency_id: &CurrencyId) -> Balance { match currency_id { CurrencyId::Native => T::ExistentialDeposit::get(), CurrencyId::Staking(StakingCurrency::BlockRewards) => T::ExistentialDeposit::get(), - currency_id => orml_asset_registry::Pallet::::metadata(currency_id) + currency_id => orml_asset_registry::module::Pallet::::metadata(currency_id) .map(|metadata| metadata.existential_deposit) .unwrap_or_default(), } @@ -283,16 +276,21 @@ pub mod asset_registry { /// Module for investment portfolio common to all runtimes pub mod investment_portfolios { - use cfg_primitives::{Balance, PoolId, TrancheId}; + use cfg_primitives::{AccountId, Balance, PoolId}; use cfg_traits::{ - investments::{InvestmentCollector, TrancheCurrency}, - PoolInspect, Seconds, + investments::{InvestmentCollector, TrancheCurrency as _}, + PoolInspect, + }; + use cfg_types::{ + investments::InvestmentPortfolio, + tokens::{CurrencyId, TrancheCurrency}, }; - use cfg_types::{investments::InvestmentPortfolio, tokens::CurrencyId}; use frame_support::traits::{ fungibles, tokens::{Fortitude, Preservation}, }; + use fungibles::{Inspect, InspectHold}; + use sp_runtime::DispatchError; use sp_std::{collections::btree_map::BTreeMap, vec::Vec}; /// Get the PoolId, CurrencyId, InvestmentId, and Balance for all @@ -301,76 +299,56 @@ pub mod investment_portfolios { /// NOTE: Moving inner scope to any pallet would introduce tight(er) /// coupling due to requirement of iterating over storage maps which in turn /// require the pallet's Config trait. - pub fn get_account_portfolio( - investor: ::AccountId, - ) -> Vec<( - ::InvestmentId, - InvestmentPortfolio, - )> + #[allow(clippy::type_complexity)] + pub fn get_account_portfolio( + investor: AccountId, + ) -> Result)>, DispatchError> where - T: frame_system::Config - + pallet_investments::Config - + orml_tokens::Config - + pallet_restricted_tokens::Config, - ::InvestmentId: TrancheCurrency - + Into<::CurrencyId> - + Ord - + Into<::CurrencyId>, - CurrencyId: From<::CurrencyId> - + From<::CurrencyId>, - ::CurrencyId: - From<::CurrencyId>, - Balance: From<::Amount> - + From<::Balance>, - PoolInspector: PoolInspect< - ::AccountId, - ::CurrencyId, - PoolId = PoolId, - TrancheId = TrancheId, - Moment = Seconds, - >, + T: frame_system::Config + + pallet_investments::Config + + orml_tokens::Config + + pallet_restricted_tokens::Config + + pallet_pool_system::Config, { - let mut portfolio = BTreeMap::< - ::InvestmentId, - InvestmentPortfolio, - >::new(); + let mut portfolio = + BTreeMap::>::new(); // Denote current tranche token balances before dry running collecting - orml_tokens::Accounts::::iter_key_prefix(&investor).for_each(|currency| { - if let CurrencyId::Tranche(pool_id, tranche_id) = CurrencyId::from(currency) { - let pool_currency = PoolInspector::currency_for(pool_id) - .expect("Pool must exist; qed") - .into(); - let free_balance = as fungibles::Inspect< - T::AccountId, - >>::reducible_balance( - currency.into(), + for currency in orml_tokens::Accounts::::iter_key_prefix(&investor) { + if let CurrencyId::Tranche(pool_id, tranche_id) = currency { + let pool_currency = pallet_pool_system::Pallet::::currency_for(pool_id) + .ok_or(DispatchError::Other("Pool must exist; qed"))?; + + let free_balance = pallet_restricted_tokens::Pallet::::reducible_balance( + currency, &investor, Preservation::Preserve, Fortitude::Polite, ); - let reserved_balance = as fungibles::InspectHold< - T::AccountId, - >>::balance_on_hold(currency.into(), &(), &investor); + let reserved_balance = pallet_restricted_tokens::Pallet::::balance_on_hold( + currency, + &(), + &investor, + ); portfolio .entry(TrancheCurrency::generate(pool_id, tranche_id)) .and_modify(|p| { - p.free_tranche_tokens = free_balance.into(); - p.reserved_tranche_tokens = reserved_balance.into(); + p.free_tranche_tokens = free_balance; + p.reserved_tranche_tokens = reserved_balance; }) .or_insert( InvestmentPortfolio::::new(pool_currency) - .with_free_tranche_tokens(free_balance.into()) - .with_reserved_tranche_tokens(reserved_balance.into()), + .with_free_tranche_tokens(free_balance) + .with_reserved_tranche_tokens(reserved_balance), ); } - }); + } // Set pending invest currency and claimable tranche tokens - pallet_investments::InvestOrders::::iter_key_prefix(&investor).for_each(|invest_id| { - let pool_currency = - PoolInspector::currency_for(invest_id.of_pool()).expect("Pool must exist; qed"); + for invest_id in pallet_investments::InvestOrders::::iter_key_prefix(&investor) { + let pool_currency = pallet_pool_system::Pallet::::currency_for(invest_id.of_pool()) + .ok_or(DispatchError::Other("Pool must exist; qed"))?; // Collect such that we can determine claimable tranche tokens // NOTE: Does not modify storage since RtAPI is readonly @@ -379,44 +357,40 @@ pub mod investment_portfolios { let amount = pallet_investments::InvestOrders::::get(&investor, invest_id) .map(|order| order.amount()) .unwrap_or_default(); - let free_tranche_tokens_new: Balance = as fungibles::Inspect< - T::AccountId, - >>::reducible_balance( + let free_tranche_tokens_new = pallet_restricted_tokens::Pallet::::reducible_balance( invest_id.into(), &investor, Preservation::Preserve, Fortitude::Polite, - ).into(); + ); portfolio .entry(invest_id) .and_modify(|p| { - p.pending_invest_currency = amount.into(); + p.pending_invest_currency = amount; if p.free_tranche_tokens < free_tranche_tokens_new { p.claimable_tranche_tokens = free_tranche_tokens_new.saturating_sub(p.free_tranche_tokens); } }) .or_insert( - InvestmentPortfolio::::new(pool_currency.into()) - .with_pending_invest_currency(amount.into()) + InvestmentPortfolio::::new(pool_currency) + .with_pending_invest_currency(amount) .with_claimable_tranche_tokens(free_tranche_tokens_new), ); - }); + } // Set pending tranche tokens and claimable invest currency - pallet_investments::RedeemOrders::::iter_key_prefix(&investor).for_each(|invest_id| { - let pool_currency = - PoolInspector::currency_for(invest_id.of_pool()).expect("Pool must exist; qed"); - let balance_before: Balance = - as fungibles::Inspect< - T::AccountId, - >>::reducible_balance( - pool_currency, - &investor, - Preservation::Preserve, - Fortitude::Polite, - ).into(); + for invest_id in pallet_investments::RedeemOrders::::iter_key_prefix(&investor) { + let pool_currency = pallet_pool_system::Pallet::::currency_for(invest_id.of_pool()) + .ok_or(DispatchError::Other("Pool must exist; qed"))?; + + let balance_before = pallet_restricted_tokens::Pallet::::reducible_balance( + pool_currency, + &investor, + Preservation::Preserve, + Fortitude::Polite, + ); // Collect such that we can determine claimable invest currency // NOTE: Does not modify storage since RtAPI is readonly @@ -425,32 +399,29 @@ pub mod investment_portfolios { let amount = pallet_investments::RedeemOrders::::get(&investor, invest_id) .map(|order| order.amount()) .unwrap_or_default(); - let balance_after: Balance = - as fungibles::Inspect< - T::AccountId, - >>::reducible_balance( - pool_currency, - &investor, - Preservation::Preserve, - Fortitude::Polite, - ).into(); + let balance_after = pallet_restricted_tokens::Pallet::::reducible_balance( + pool_currency, + &investor, + Preservation::Preserve, + Fortitude::Polite, + ); portfolio .entry(invest_id) .and_modify(|p| { - p.pending_redeem_tranche_tokens = amount.into(); + p.pending_redeem_tranche_tokens = amount; if balance_before < balance_after { p.claimable_currency = balance_after.saturating_sub(balance_before); } }) .or_insert( - InvestmentPortfolio::::new(pool_currency.into()) - .with_pending_redeem_tranche_tokens(amount.into()) + InvestmentPortfolio::::new(pool_currency) + .with_pending_redeem_tranche_tokens(amount) .with_claimable_currency(balance_after), ); - }); + } - portfolio.into_iter().collect() + Ok(portfolio.into_iter().collect()) } } @@ -472,7 +443,7 @@ pub mod xcm_transactor { } impl XcmTransact for NullTransactor { - fn destination(self) -> staging_xcm::latest::MultiLocation { + fn destination(self) -> staging_xcm::latest::Location { Default::default() } } @@ -793,3 +764,40 @@ pub mod rewards { pub const SingleCurrencyMovement: u32 = 1; } } + +/// Helpers to deal with configuring the message queue in the runtime. +pub mod message_queue { + use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; + use frame_support::traits::{QueueFootprint, QueuePausedQuery}; + use pallet_message_queue::OnQueueChanged; + use sp_std::marker::PhantomData; + + pub struct NarrowOriginToSibling(PhantomData); + impl> QueuePausedQuery + for NarrowOriginToSibling + { + fn is_paused(origin: &AggregateMessageOrigin) -> bool { + match origin { + AggregateMessageOrigin::Sibling(id) => Inner::is_paused(id), + _ => false, + } + } + } + + impl> OnQueueChanged + for NarrowOriginToSibling + { + fn on_queue_changed(origin: AggregateMessageOrigin, fp: QueueFootprint) { + if let AggregateMessageOrigin::Sibling(id) = origin { + Inner::on_queue_changed(id, fp) + } + } + } + + pub struct ParaIdToSibling; + impl sp_runtime::traits::Convert for ParaIdToSibling { + fn convert(para_id: ParaId) -> AggregateMessageOrigin { + AggregateMessageOrigin::Sibling(para_id) + } + } +} diff --git a/runtime/common/src/migrations/hold_reason.rs b/runtime/common/src/migrations/hold_reason.rs new file mode 100644 index 0000000000..da29b24d5a --- /dev/null +++ b/runtime/common/src/migrations/hold_reason.rs @@ -0,0 +1,151 @@ +// Copyright 2023 Centrifuge Foundation (centrifuge.io). +// +// This file is part of the Centrifuge chain project. +// Centrifuge is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version (see http://www.gnu.org/licenses). +// Centrifuge is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +use cfg_primitives::{AccountId, Balance}; +use frame_support::{ + pallet_prelude::ValueQuery, + storage_alias, + traits::{ConstU32, Get, Len, OnRuntimeUpgrade, VariantCountOf}, + Blake2_128Concat, BoundedVec, Parameter, +}; +use pallet_balances::IdAmount; +use pallet_order_book::weights::Weight; +use pallet_transfer_allowlist::HoldReason; +#[cfg(feature = "try-runtime")] +use parity_scale_codec::{Decode, Encode}; +use parity_scale_codec::{FullCodec, FullEncode}; +#[cfg(feature = "try-runtime")] +use sp_runtime::Saturating; +#[cfg(feature = "try-runtime")] +use sp_runtime::TryRuntimeError; +use sp_runtime::{traits::Member, SaturatedConversion}; +use sp_std::{vec, vec::Vec}; + +const LOG_PREFIX: &str = "MigrateTransferAllowList HoldReason:"; + +pub struct MigrateTransferAllowListHolds( + sp_std::marker::PhantomData<(T, RuntimeHoldReason)>, +); + +type OldHolds = BoundedVec, ConstU32<10>>; +type NewHolds = + BoundedVec, VariantCountOf>; + +#[storage_alias] +pub type Holds = + StorageMap, Blake2_128Concat, AccountId, OldHolds, ValueQuery>; + +impl OnRuntimeUpgrade for MigrateTransferAllowListHolds +where + T: pallet_balances::Config + + pallet_transfer_allowlist::Config + + frame_system::Config, + ::RuntimeHoldReason: From, + RuntimeHoldReason: frame_support::traits::VariantCount + + FullCodec + + FullEncode + + Parameter + + Member + + sp_std::fmt::Debug, +{ + fn on_runtime_upgrade() -> Weight { + let transfer_allowlist_accounts: Vec = + pallet_transfer_allowlist::AccountCurrencyTransferAllowance::::iter_keys() + .map(|(a, _, _)| a) + .collect(); + let mut weight = + T::DbWeight::get().reads(transfer_allowlist_accounts.len().saturated_into()); + + pallet_balances::Holds::::translate::(|who, holds| { + if Self::account_can_be_migrated(&who, &transfer_allowlist_accounts) { + log::info!("{LOG_PREFIX} Migrating hold for account {who:?}"); + let id_amount = IdAmount:: { + id: HoldReason::TransferAllowance.into(), + // Non-emptiness ensured above + amount: holds[0].amount, + }; + weight.saturating_accrue(T::DbWeight::get().reads_writes(1, 1)); + + Some(NewHolds::truncate_from(vec![id_amount])) + } else { + None + } + }); + + log::info!( + "{LOG_PREFIX} migrated {:?} accounts", + transfer_allowlist_accounts.len() + ); + + weight + } + + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, TryRuntimeError> { + let transfer_allowlist_accounts: Vec = + pallet_transfer_allowlist::AccountCurrencyTransferAllowance::::iter_keys() + .map(|(a, _, _)| a) + .collect(); + + let mut n = 0u64; + for (acc, _) in Holds::::iter() { + assert!(Self::account_can_be_migrated( + &acc, + &transfer_allowlist_accounts + )); + n.saturating_accrue(1); + } + + log::info!("{LOG_PREFIX} pre checks done"); + Ok(n.encode()) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(pre_state: Vec) -> Result<(), TryRuntimeError> { + let count_pre: u64 = Decode::decode(&mut pre_state.as_slice()) + .expect("pre_upgrade provides a valid state; qed"); + + let holds_post = pallet_balances::Holds::::iter(); + let count_post: u64 = holds_post.count().saturated_into(); + assert_eq!(count_pre, count_post); + + for (_, hold) in pallet_balances::Holds::::iter() { + assert_eq!(hold.len(), 1); + assert_eq!(hold[0].id, HoldReason::TransferAllowance.into()); + } + + log::info!("{LOG_PREFIX} post checks done"); + Ok(()) + } +} + +impl MigrateTransferAllowListHolds +where + T: pallet_balances::Config + + pallet_transfer_allowlist::Config + + frame_system::Config, +{ + fn account_can_be_migrated(who: &AccountId, whitelist: &[AccountId]) -> bool { + if !whitelist.iter().any(|a| a == who) { + log::warn!("{LOG_PREFIX} Account {who:?} is skipped due to missing AccountCurrencyTransferAllowance storage entry"); + return false; + } + + match Holds::::get(who) { + holds if holds.len() == 1 => true, + _ => { + log::warn!("{LOG_PREFIX} Account {who:?} does not meet Hold storage assumptions"); + false + } + } + } +} diff --git a/runtime/common/src/migrations/mod.rs b/runtime/common/src/migrations/mod.rs index b4bbaa8069..c74db367ff 100644 --- a/runtime/common/src/migrations/mod.rs +++ b/runtime/common/src/migrations/mod.rs @@ -12,10 +12,12 @@ //! Centrifuge Runtime-Common Migrations +pub mod hold_reason; pub mod increase_storage_version; pub mod loans; pub mod nuke; pub mod precompile_account_codes; +pub mod restricted_location; pub mod utils { use frame_support::storage::unhashed; diff --git a/runtime/common/src/migrations/restricted_location.rs b/runtime/common/src/migrations/restricted_location.rs new file mode 100644 index 0000000000..21aded9f1b --- /dev/null +++ b/runtime/common/src/migrations/restricted_location.rs @@ -0,0 +1,210 @@ +use cfg_primitives::AccountId; +use cfg_types::{locations::RestrictedTransferLocation, tokens::FilterCurrency}; +use frame_support::{ + traits::{Get, OnRuntimeUpgrade}, + weights::Weight, +}; +use pallet_transfer_allowlist::AccountCurrencyTransferAllowance; +use parity_scale_codec::Encode; +use sp_arithmetic::traits::SaturatedConversion; +use sp_core::H256; +use sp_runtime::traits::{BlakeTwo256, Hash}; +use sp_std::{boxed::Box, vec::Vec}; +use staging_xcm::{v4, VersionedLocation}; + +mod old { + use cfg_primitives::AccountId; + use cfg_types::{domain_address::DomainAddress, tokens::FilterCurrency}; + use frame_support::{pallet_prelude::*, storage_alias}; + use frame_system::pallet_prelude::*; + use pallet_transfer_allowlist::AllowanceDetails; + use sp_core::H256; + use staging_xcm::v3; + + #[derive( + Clone, + RuntimeDebugNoBound, + Encode, + parity_scale_codec::Decode, + Eq, + PartialEq, + MaxEncodedLen, + TypeInfo, + )] + pub enum RestrictedTransferLocation { + Local(AccountId), + Xcm(H256), + Address(DomainAddress), + } + + #[storage_alias] + pub type AccountCurrencyTransferAllowance = StorageNMap< + pallet_transfer_allowlist::Pallet, + ( + NMapKey, + NMapKey, + NMapKey, + ), + AllowanceDetails>, + OptionQuery, + >; + + pub fn location_v3_created_by_apps(account_id: AccountId) -> v3::Location { + // Ref: https://github.com/centrifuge/apps/blob/b59bdd34561a4ccd90e0d803c14a3729fc2f3a6d/centrifuge-app/src/utils/usePermissions.tsx#L386 + // for account_id == "4dTeMxuPJCK7zQGhFcgCivSJqBs9Wo2SuMSQeYCCuVJ9xrE2" + v3::Location::new( + 1, + v3::Junctions::X2( + v3::Junction::Parachain(1000), // AssetHub + v3::Junction::AccountId32 { + network: None, + id: account_id.into(), + }, + ), + ) + } +} + +const LOG_PREFIX: &str = "MigrateRestrictedTransferLocation:"; + +pub struct MigrateRestrictedTransferLocation( + sp_std::marker::PhantomData<(T, AccountMap)>, +); +impl OnRuntimeUpgrade for MigrateRestrictedTransferLocation +where + T: pallet_transfer_allowlist::Config< + AccountId = AccountId, + CurrencyId = FilterCurrency, + Location = RestrictedTransferLocation, + >, + AccountMap: Get>, +{ + fn on_runtime_upgrade() -> Weight { + log::info!("{LOG_PREFIX} Check keys to migrate..."); + + let mut weight = T::DbWeight::get().reads( + old::AccountCurrencyTransferAllowance::::iter_keys() + .count() + .saturated_into(), + ); + + let key_translations = Self::get_key_translations(); + + for (acc, currency, old_location, maybe_new_location) in key_translations { + let old_key = (&acc, ¤cy, &old_location); + log::info!("{LOG_PREFIX} Removing old key {old_key:?}"); + let value = old::AccountCurrencyTransferAllowance::::get(old_key); + old::AccountCurrencyTransferAllowance::::remove(old_key); + + if let Some(new_location) = maybe_new_location { + let new_key = (&acc, ¤cy, &new_location); + log::info!("{LOG_PREFIX} Adding new key {new_key:?}"); + AccountCurrencyTransferAllowance::::set(new_key, value); + } + + weight.saturating_accrue(T::DbWeight::get().writes(2)); + } + + weight + } + + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { + let key_translations = Self::get_key_translations(); + assert!( + key_translations + .iter() + .all(|(_, _, _, new_location)| new_location.is_some()), + "At least one XCM location could not be translated" + ); + + let count: u64 = old::AccountCurrencyTransferAllowance::::iter_keys() + .count() + .saturated_into(); + + log::info!("{LOG_PREFIX} Pre checks done!"); + Ok(count.encode()) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(pre_state: Vec) -> Result<(), sp_runtime::TryRuntimeError> { + let count_pre: u64 = parity_scale_codec::Decode::decode(&mut pre_state.as_slice()) + .expect("pre_upgrade provides a valid state; qed"); + let count_post: u64 = AccountCurrencyTransferAllowance::::iter_keys() + .count() + .saturated_into(); + assert_eq!(count_pre, count_post, "Number of keys in AccountCurrencyTransferAllowance changed during migration: pre {count_pre} vs post {count_post}"); + + log::info!("{LOG_PREFIX} Post checks done!"); + Ok(()) + } +} + +impl MigrateRestrictedTransferLocation +where + T: pallet_transfer_allowlist::Config< + AccountId = AccountId, + CurrencyId = FilterCurrency, + Location = RestrictedTransferLocation, + >, + AccountMap: Get>, +{ + fn migrate_location_key( + account_id: AccountId, + hash: H256, + ) -> Option { + let old_location = old::location_v3_created_by_apps(account_id); + if BlakeTwo256::hash(&old_location.encode()) == hash { + match v4::Location::try_from(old_location) { + Ok(location) => { + log::info!("{LOG_PREFIX} Hash: '{hash}' migrated!"); + let new_restricted_location = + RestrictedTransferLocation::Xcm(Box::new(VersionedLocation::V4(location))); + + Some(new_restricted_location) + } + Err(_) => { + log::error!("{LOG_PREFIX} Non isometric location v3 -> v4"); + None + } + } + } else { + log::error!("{LOG_PREFIX} Hash can not be recovered"); + None + } + } + + fn get_key_translations() -> Vec<( + AccountId, + FilterCurrency, + old::RestrictedTransferLocation, + Option, + )> { + let accounts = AccountMap::get(); + + old::AccountCurrencyTransferAllowance::::iter_keys() + .filter_map(|(account_id, currency_id, old_restricted_location)| { + match (accounts.iter().find(|(key, _)| key == &account_id), old_restricted_location.clone()) { + (Some((_, transfer_address)), old::RestrictedTransferLocation::Xcm(hash)) => Some(( + account_id.clone(), + currency_id, + old_restricted_location, + Self::migrate_location_key(transfer_address.clone(), hash), + )), + (None, old::RestrictedTransferLocation::Xcm(_)) => { + log::warn!("{LOG_PREFIX} Account {account_id:?} missing in AccountMap despite old XCM location storage"); + Some(( + account_id.clone(), + currency_id, + old_restricted_location, + // Leads to storage entry removal + // TODO: Discuss whether we are fine with removing such storage entries or whether we want to keep the old undecodable ones or maybe just use same account id per default instead of removing? + None, + )) + } + _ => None, + } + }) + .collect::>() + } +} diff --git a/runtime/common/src/transfer_filter.rs b/runtime/common/src/transfer_filter.rs index c8a634e867..35da08e366 100644 --- a/runtime/common/src/transfer_filter.rs +++ b/runtime/common/src/transfer_filter.rs @@ -14,7 +14,7 @@ use cfg_primitives::{AccountId, Balance}; use cfg_traits::{PreConditions, TransferAllowance}; use cfg_types::{ domain_address::DomainAddress, - locations::Location, + locations::RestrictedTransferLocation, tokens::{CurrencyId, FilterCurrency}, }; use frame_support::{traits::IsSubType, RuntimeDebugNoBound}; @@ -22,43 +22,49 @@ use pallet_restricted_tokens::TransferDetails; use pallet_restricted_xtokens::TransferEffects; use parity_scale_codec::{Decode, Encode}; use scale_info::TypeInfo; -use sp_core::Hasher; use sp_runtime::{ - traits::{BlakeTwo256, Convert, DispatchInfoOf, SignedExtension, StaticLookup}, + traits::{Convert, DispatchInfoOf, SignedExtension, StaticLookup}, transaction_validity::{InvalidTransaction, TransactionValidityError}, DispatchError, DispatchResult, TokenError, }; -use sp_std::vec::Vec; -use staging_xcm::v3::{MultiAsset, MultiLocation}; +use sp_std::{boxed::Box, vec::Vec}; +use staging_xcm::{ + v4::{Asset, Location}, + VersionedLocation, +}; pub struct PreXcmTransfer(sp_std::marker::PhantomData<(T, C)>); impl< - T: TransferAllowance, - C: Convert>, + T: TransferAllowance< + AccountId, + CurrencyId = FilterCurrency, + Location = RestrictedTransferLocation, + >, + C: Convert>, > PreConditions> for PreXcmTransfer { type Result = DispatchResult; fn check(t: TransferEffects) -> Self::Result { - let currency_based_check = |sender: AccountId, destination: MultiLocation, currency| { + let currency_based_check = |sender: AccountId, destination: VersionedLocation, currency| { amalgamate_allowance( T::allowance( sender.clone(), - Location::XCM(BlakeTwo256::hash(&destination.encode())), + RestrictedTransferLocation::Xcm(Box::new(destination.clone())), FilterCurrency::Specific(currency), ), T::allowance( sender, - Location::XCM(BlakeTwo256::hash(&destination.encode())), + RestrictedTransferLocation::Xcm(Box::new(destination)), FilterCurrency::All, ), ) }; - let asset_based_check = |sender, destination, asset| { + let asset_based_check = |sender, destination, asset: Asset| { let currency = - C::convert(asset).ok_or(DispatchError::Token(TokenError::UnknownAsset))?; + C::convert(asset.id.0).ok_or(DispatchError::Token(TokenError::UnknownAsset))?; currency_based_check(sender, destination, currency) }; @@ -87,7 +93,7 @@ impl< asset, fee_asset, } => { - asset_based_check(sender.clone(), destination, asset)?; + asset_based_check(sender.clone(), destination.clone(), asset)?; // NOTE: We do check the fee asset and assume that the destination // is the same as for the actual assets. This is a pure subjective @@ -102,7 +108,7 @@ impl< fee, } => { for (currency, ..) in currencies { - currency_based_check(sender.clone(), destination, currency)?; + currency_based_check(sender.clone(), destination.clone(), currency)?; } // NOTE: We do check the fee asset and assume that the destination @@ -121,7 +127,7 @@ impl< // but rather a burn of tokens. Furthermore, we do not know the // destination where those fees will go. for asset in assets.into_inner() { - asset_based_check(sender.clone(), destination, asset)?; + asset_based_check(sender.clone(), destination.clone().clone(), asset)?; } // NOTE: We do check the fee asset and assume that the destination @@ -136,8 +142,13 @@ impl< pub struct PreNativeTransfer(sp_std::marker::PhantomData); -impl> - PreConditions> for PreNativeTransfer +impl< + T: TransferAllowance< + AccountId, + CurrencyId = FilterCurrency, + Location = RestrictedTransferLocation, + >, + > PreConditions> for PreNativeTransfer { type Result = bool; @@ -145,12 +156,12 @@ impl(sp_std::marker::PhantomData); -impl> - PreConditions<(AccountId, DomainAddress, CurrencyId)> for PreLpTransfer +impl< + T: TransferAllowance< + AccountId, + CurrencyId = FilterCurrency, + Location = RestrictedTransferLocation, + >, + > PreConditions<(AccountId, DomainAddress, CurrencyId)> for PreLpTransfer { type Result = DispatchResult; @@ -170,10 +186,14 @@ impl Result, TransactionValidityError> { Self::recursive_search(caller.clone(), call, |who, balance_call, checks| { match balance_call { - pallet_balances::Call::transfer { dest, .. } - | pallet_balances::Call::transfer_all { dest, .. } + pallet_balances::Call::transfer_all { dest, .. } | pallet_balances::Call::transfer_allow_death { dest, .. } | pallet_balances::Call::transfer_keep_alive { dest, .. } => { let recv: T::AccountId = ::Lookup::lookup( @@ -298,8 +317,10 @@ where + pallet_utility::Config::RuntimeCall> + pallet_proxy::Config::RuntimeCall> + pallet_remarks::Config::RuntimeCall> - + pallet_transfer_allowlist::Config - + Sync + + pallet_transfer_allowlist::Config< + CurrencyId = FilterCurrency, + Location = RestrictedTransferLocation, + > + Sync + Send, ::RuntimeCall: IsSubType> + IsSubType> @@ -330,12 +351,12 @@ where amalgamate_allowance( pallet_transfer_allowlist::pallet::Pallet::::allowance( who.clone(), - Location::Local(recv.clone()), + RestrictedTransferLocation::Local(recv.clone()), FilterCurrency::All, ), pallet_transfer_allowlist::pallet::Pallet::::allowance( who.clone(), - Location::Local(recv.clone()), + RestrictedTransferLocation::Local(recv.clone()), FilterCurrency::Specific(CurrencyId::Native), ), ) @@ -345,8 +366,8 @@ where } fn amalgamate_allowance( - first: Result, DispatchError>, - second: Result, DispatchError>, + first: Result, DispatchError>, + second: Result, DispatchError>, ) -> DispatchResult { match (first, second) { // There is an allowance set for `Specific(id)`, but NOT for the given recv diff --git a/runtime/common/src/xcm.rs b/runtime/common/src/xcm.rs index dd838647b6..e4e0a8dce8 100644 --- a/runtime/common/src/xcm.rs +++ b/runtime/common/src/xcm.rs @@ -19,14 +19,15 @@ use cfg_types::{ }; use frame_support::traits::{fungibles::Mutate, Everything, Get}; use frame_system::pallet_prelude::BlockNumberFor; +use orml_traits::asset_registry::Inspect; use polkadot_parachain_primitives::primitives::Sibling; use sp_runtime::traits::{AccountIdConversion, Convert, MaybeEquivalence, Zero}; use sp_std::marker::PhantomData; -use staging_xcm::v3::{ - prelude::*, +use staging_xcm::v4::{ + Asset, AssetId, + Fungibility::Fungible, Junction::{AccountId32, AccountKey20, GeneralKey, Parachain}, - Junctions::{X1, X2}, - MultiAsset, MultiLocation, NetworkId, OriginKind, + Location, NetworkId, OriginKind, }; use staging_xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, @@ -50,7 +51,7 @@ impl< >, > orml_traits::FixedConversionRateProvider for FixedConversionRateProvider { - fn get_fee_per_second(location: &MultiLocation) -> Option { + fn get_fee_per_second(location: &Location) -> Option { let metadata = OrmlAssetRegistry::metadata_by_location(location)?; match metadata.additional.transferability { CrossChainTransferability::Xcm(xcm_metadata) => xcm_metadata @@ -70,14 +71,14 @@ pub fn general_key(data: &[u8]) -> staging_xcm::latest::Junction { } } -/// How we convert an `[AccountId]` into an XCM MultiLocation -pub struct AccountIdToMultiLocation; -impl> Convert for AccountIdToMultiLocation { - fn convert(account: AccountId) -> MultiLocation { - X1(AccountId32 { +/// How we convert an `[AccountId]` into an XCM Location +pub struct AccountIdToLocation; +impl> Convert for AccountIdToLocation { + fn convert(account: AccountId) -> Location { + AccountId32 { network: None, id: account.into(), - }) + } .into() } } @@ -93,35 +94,26 @@ where From, { fn convert_origin( - origin: impl Into, + origin: impl Into, kind: OriginKind, - ) -> Result<::RuntimeOrigin, MultiLocation> { - let location: MultiLocation = origin.into(); - match kind { - OriginKind::SovereignAccount => match location { - MultiLocation { - parents: 1, - interior: X2(Parachain(para), AccountKey20 { key, .. }), - } => { - let evm_id = ParaAsEvmChain::try_convert(para).map_err(|_| location)?; - let domain_address = DomainAddress::EVM(evm_id, key); - - if pallet_liquidity_pools_gateway::Pallet::::relayer( - Domain::EVM(evm_id), - &domain_address, - ) - .is_some() - { - Ok(pallet_liquidity_pools_gateway::GatewayOrigin::AxelarRelay( - domain_address, - ) - .into()) - } else { - Err(location) - } - } - _ => Err(location), - }, + ) -> Result<::RuntimeOrigin, Location> { + let location = origin.into(); + match (kind, location.clone().unpack()) { + (OriginKind::SovereignAccount, (1, [Parachain(para), AccountKey20 { key, .. }])) => { + let evm_id = ParaAsEvmChain::try_convert(*para).map_err(|_| location.clone())?; + let domain_address = DomainAddress::EVM(evm_id, *key); + + pallet_liquidity_pools_gateway::Pallet::::relayer( + Domain::EVM(evm_id), + &domain_address, + ) + .ok_or(location.clone())?; + + Ok( + pallet_liquidity_pools_gateway::GatewayOrigin::AxelarRelay(domain_address) + .into(), + ) + } _ => Err(location), } } @@ -149,97 +141,80 @@ where /// CurrencyIdConvert /// This type implements conversions from our `CurrencyId` type into -/// `MultiLocation` and vice-versa. A currency locally is identified with a +/// `Location` and vice-versa. A currency locally is identified with a /// `CurrencyId` variant but in the network it is identified in the form of a -/// `MultiLocation`. +/// `Location`. pub struct CurrencyIdConvert(PhantomData); -impl MaybeEquivalence for CurrencyIdConvert +impl MaybeEquivalence for CurrencyIdConvert where - T: orml_asset_registry::Config - + parachain_info::Config, + T: orml_asset_registry::module::Config + + staging_parachain_info::Config, { - fn convert(location: &MultiLocation) -> Option { - let para_id = parachain_info::Pallet::::parachain_id(); + fn convert(location: &Location) -> Option { + let para_id = staging_parachain_info::Pallet::::parachain_id(); let unanchored_location = match location { - MultiLocation { + Location { parents: 0, interior, - } => MultiLocation { + } => Location { parents: 1, interior: interior + .clone() .pushed_front_with(Parachain(u32::from(para_id))) .ok()?, }, - x => *x, + x => x.clone(), }; - orml_asset_registry::Pallet::::location_to_asset_id(unanchored_location) + orml_asset_registry::module::Pallet::::asset_id(&unanchored_location) } - fn convert_back(id: &CurrencyId) -> Option { - orml_asset_registry::Pallet::::metadata(id) + fn convert_back(id: &CurrencyId) -> Option { + orml_asset_registry::module::Pallet::::metadata(id) .filter(|m| m.additional.transferability.includes_xcm()) .and_then(|m| m.location) .and_then(|l| l.try_into().ok()) } } -/// Convert our `CurrencyId` type into its `MultiLocation` representation. -/// We use the `AssetRegistry` to lookup the associated `MultiLocation` for +/// Convert our `CurrencyId` type into its `Location` representation. +/// We use the `AssetRegistry` to lookup the associated `Location` for /// any given `CurrencyId`, while blocking tokens that are not Xcm-transferable. -impl Convert> for CurrencyIdConvert +impl Convert> for CurrencyIdConvert where - T: orml_asset_registry::Config - + parachain_info::Config, + T: orml_asset_registry::module::Config + + staging_parachain_info::Config, { - fn convert(id: CurrencyId) -> Option { + fn convert(id: CurrencyId) -> Option { >::convert_back(&id) } } -/// Convert an incoming `MultiLocation` into a `CurrencyId` through a +/// Convert an incoming `Location` into a `CurrencyId` through a /// reverse-lookup using the AssetRegistry. In the registry, we register CFG -/// using its absolute, non-anchored MultiLocation so we need to unanchor the +/// using its absolute, non-anchored Location so we need to unanchor the /// input location for Centrifuge-native assets for that to work. -impl Convert> for CurrencyIdConvert +impl Convert> for CurrencyIdConvert where - T: orml_asset_registry::Config - + parachain_info::Config, + T: orml_asset_registry::module::Config + + staging_parachain_info::Config, { - fn convert(location: MultiLocation) -> Option { + fn convert(location: Location) -> Option { >::convert(&location) } } -impl Convert> for CurrencyIdConvert -where - T: orml_asset_registry::Config - + parachain_info::Config, -{ - fn convert(asset: MultiAsset) -> Option { - if let MultiAsset { - id: Concrete(location), - .. - } = asset - { - >::convert(&location) - } else { - None - } - } -} - pub struct ToTreasury(PhantomData); impl TakeRevenue for ToTreasury where - T: orml_asset_registry::Config - + parachain_info::Config + T: orml_asset_registry::module::Config + + staging_parachain_info::Config + pallet_restricted_tokens::Config, { - fn take_revenue(revenue: MultiAsset) { - if let MultiAsset { - id: Concrete(location), + fn take_revenue(revenue: Asset) { + if let Asset { + id: AssetId(location), fun: Fungible(amount), } = revenue { @@ -268,7 +243,7 @@ pub type Barrier = ( AllowSubscriptionsFrom, ); -/// Type for specifying how a `MultiLocation` can be converted into an +/// Type for specifying how a `Location` can be converted into an /// `AccountId`. This is used when determining ownership of accounts for asset /// transacting and when attempting to use XCM `Transact` in order to determine /// the dispatch Origin. @@ -374,15 +349,15 @@ mod test { Ok(RELAYER_EVM_ID) }); - let location: MultiLocation = MultiLocation::new( + let location = Location::new( 1, - X2( + [ Parachain(RELAYER_PARA_ID), AccountKey20 { network: None, key: RELAYER_ADDRESS, }, - ), + ], ); let origin = LpInstanceRelayer::::convert_origin( @@ -413,11 +388,11 @@ mod test { Ok(RELAYER_EVM_ID) }); - let location: MultiLocation = MultiLocation::new(1, X1(Parachain(RELAYER_PARA_ID))); + let location = Location::new(1, Parachain(RELAYER_PARA_ID)); assert_eq!( LpInstanceRelayer::::convert_origin( - location, + location.clone(), OriginKind::SovereignAccount, ) .unwrap_err(), @@ -434,20 +409,20 @@ mod test { Ok(RELAYER_EVM_ID) }); - let location: MultiLocation = MultiLocation::new( + let location = Location::new( 1, - X2( + [ Parachain(RELAYER_PARA_ID), AccountKey20 { network: None, key: RELAYER_ADDRESS, }, - ), + ], ); assert_eq!( LpInstanceRelayer::::convert_origin( - location, + location.clone(), OriginKind::SovereignAccount, ) .unwrap_err(), @@ -471,20 +446,20 @@ mod test { Err(()) }); - let location: MultiLocation = MultiLocation::new( + let location = Location::new( 1, - X2( + [ Parachain(RELAYER_PARA_ID), AccountKey20 { network: None, key: RELAYER_ADDRESS, }, - ), + ], ); assert_eq!( LpInstanceRelayer::::convert_origin( - location, + location.clone(), OriginKind::SovereignAccount, ) .unwrap_err(), @@ -508,20 +483,20 @@ mod test { Err(()) }); - let location: MultiLocation = MultiLocation::new( + let location = Location::new( 1, - X2( + [ Parachain(1), AccountKey20 { network: None, key: RELAYER_ADDRESS, }, - ), + ], ); assert_eq!( LpInstanceRelayer::::convert_origin( - location, + location.clone(), OriginKind::SovereignAccount, ) .unwrap_err(), @@ -545,20 +520,20 @@ mod test { Ok(RELAYER_EVM_ID) }); - let location: MultiLocation = MultiLocation::new( + let location = Location::new( 1, - X2( + [ Parachain(RELAYER_PARA_ID), AccountKey20 { network: None, key: [0u8; 20], }, - ), + ], ); assert_eq!( LpInstanceRelayer::::convert_origin( - location, + location.clone(), OriginKind::SovereignAccount, ) .unwrap_err(), diff --git a/runtime/development/Cargo.toml b/runtime/development/Cargo.toml index 17cc6bd48d..e6cdd54606 100644 --- a/runtime/development/Cargo.toml +++ b/runtime/development/Cargo.toml @@ -10,9 +10,8 @@ repository.workspace = true documentation.workspace = true [dependencies] -getrandom = { workspace = true } hex = { workspace = true } -hex-literal = { workspace = true, optional = true } +hex-literal = { workspace = true } log = { workspace = true } parity-scale-codec = { workspace = true } scale-info = { workspace = true } @@ -23,6 +22,7 @@ sp-api = { workspace = true } sp-block-builder = { workspace = true } sp-consensus-aura = { workspace = true } sp-core = { workspace = true } +sp-genesis-builder = { workspace = true } sp-inherents = { workspace = true } sp-io = { workspace = true } sp-offchain = { workspace = true } @@ -107,6 +107,7 @@ pallet-liquidity-pools-gateway = { workspace = true } pallet-liquidity-rewards = { workspace = true } pallet-loans = { workspace = true } pallet-membership = { workspace = true } +pallet-message-queue = { workspace = true } pallet-multisig = { workspace = true } pallet-oracle-collection = { workspace = true } pallet-oracle-feed = { workspace = true } @@ -135,7 +136,7 @@ pallet-utility = { workspace = true } pallet-vesting = { workspace = true } pallet-xcm = { workspace = true } pallet-xcm-transactor = { workspace = true } -parachain-info = { workspace = true } +staging-parachain-info = { workspace = true } [build-dependencies] substrate-wasm-builder = { workspace = true } @@ -145,7 +146,6 @@ default = ["std"] std = [ "parity-scale-codec/std", - "getrandom/std", "hex/std", "log/std", "scale-info/std", @@ -156,6 +156,7 @@ std = [ "sp-block-builder/std", "sp-consensus-aura/std", "sp-core/std", + "sp-genesis-builder/std", "sp-inherents/std", "sp-io/std", "sp-offchain/std", @@ -259,12 +260,12 @@ std = [ "pallet-vesting/std", "pallet-xcm/std", "pallet-xcm-transactor/std", - "parachain-info/std", + "pallet-message-queue/std", + "staging-parachain-info/std", ] runtime-benchmarks = [ # Enabling optional - "hex-literal", "frame-system-benchmarking/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", @@ -341,6 +342,7 @@ runtime-benchmarks = [ "pallet-vesting/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "pallet-xcm-transactor/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", ] try-runtime = [ @@ -426,7 +428,8 @@ try-runtime = [ "pallet-vesting/try-runtime", "pallet-xcm/try-runtime", "pallet-xcm-transactor/try-runtime", - "parachain-info/try-runtime", + "pallet-message-queue/try-runtime", + "staging-parachain-info/try-runtime", ] # A feature that should be enabled when the runtime should be build for on-chain diff --git a/runtime/development/src/lib.rs b/runtime/development/src/lib.rs index 5427d12d86..5f73e98780 100644 --- a/runtime/development/src/lib.rs +++ b/runtime/development/src/lib.rs @@ -37,29 +37,33 @@ use cfg_types::{ fee_keys::{Fee, FeeKey}, fixed_point::{Quantity, Rate, Ratio}, investments::InvestmentPortfolio, - locations::Location, + locations::RestrictedTransferLocation, oracles::OracleKey, permissions::{ PermissionRoles, PermissionScope, PermissionedCurrencyRole, PoolRole, Role, UNION, }, + pools::PoolNav, time::TimeProvider, tokens::{ - AssetStringLimit, CurrencyId, CustomMetadata, + AssetStringLimit, CurrencyId, CustomMetadata, FilterCurrency, LocalAssetId, StakingCurrency::BlockRewards as BlockRewardsCurrency, TrancheCurrency, }, }; use chainbridge::constants::DEFAULT_RELAYER_VOTE_THRESHOLD; -use cumulus_primitives_core::{MultiAsset, MultiLocation}; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use fp_rpc::TransactionStatus; use frame_support::{ construct_runtime, dispatch::DispatchClass, + genesis_builder_helper::{build_config, create_default_config}, pallet_prelude::{DispatchError, DispatchResult, RuntimeDebug}, parameter_types, traits::{ + fungible::HoldConsideration, + tokens::{PayFromAccount, UnityAssetBalanceConversion}, AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64, Contains, EitherOfDiverse, - EqualPrivilegeOnly, Get, InstanceFilter, LockIdentifier, OnFinalize, PalletInfoAccess, - UnixTime, WithdrawReasons, + EqualPrivilegeOnly, Get, InstanceFilter, LinearStoragePrice, LockIdentifier, OnFinalize, + PalletInfoAccess, TransformOrigin, UnixTime, WithdrawReasons, }, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}, @@ -82,6 +86,7 @@ use pallet_investments::OrderType; use pallet_liquidity_pools::hooks::{ CollectedForeignInvestmentHook, CollectedForeignRedemptionHook, DecreasedForeignInvestOrderHook, }; +pub use pallet_loans::entities::{input::PriceCollectionInput, loans::ActiveLoanInfo}; use pallet_loans::types::cashflow::CashflowPayment; use pallet_pool_system::{ pool_types::{PoolDetails, ScheduledUpdateDetails}, @@ -94,7 +99,9 @@ use pallet_restricted_tokens::{ use pallet_transaction_payment::CurrencyAdapter; use pallet_transaction_payment_rpc_runtime_api::{FeeDetails, RuntimeDispatchInfo}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; -use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; +use polkadot_runtime_common::{ + xcm_sender::NoPriceForMessageDelivery, BlockHashCount, SlowAdjustingFeeUpdate, +}; use runtime_common::{ account_conversion::{AccountConverter, RuntimeAccountConverter}, asset_registry, @@ -106,14 +113,16 @@ use runtime_common::{ fees::{DealWithFees, FeeToTreasury, WeightToFee}, gateway, instances, liquidity_pools::LiquidityPoolsMessage, + message_queue::{NarrowOriginToSibling, ParaIdToSibling}, oracle::{ Feeder, OracleConverterBridge, OracleRatioProvider, OracleRatioProviderLocalAssetExtension, }, permissions::PoolAdminCheck, + remarks::Remark, rewards::SingleCurrencyMovement, - transfer_filter::PreLpTransfer, - xcm::AccountIdToMultiLocation, - xcm_transactor, AllowanceDeposit, CurrencyED, HoldId, + transfer_filter::{PreLpTransfer, PreNativeTransfer}, + xcm::AccountIdToLocation, + xcm_transactor, AllowanceDeposit, CurrencyED, }; use scale_info::TypeInfo; use sp_api::impl_runtime_apis; @@ -123,7 +132,7 @@ use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{ AccountIdConversion, BlakeTwo256, Block as BlockT, ConvertInto, DispatchInfoOf, - Dispatchable, PostDispatchInfoOf, UniqueSaturatedInto, Zero, + Dispatchable, IdentityLookup, PostDispatchInfoOf, UniqueSaturatedInto, Verify, Zero, }, transaction_validity::{TransactionSource, TransactionValidity, TransactionValidityError}, ApplyExtrinsicResult, FixedI128, Perbill, Permill, Perquintill, @@ -131,7 +140,7 @@ use sp_runtime::{ use sp_staking::currency_to_vote::U128CurrencyToVote; use sp_std::{marker::PhantomData, prelude::*, vec::Vec}; use sp_version::RuntimeVersion; -use staging_xcm_executor::XcmExecutor; +use staging_xcm::v4::{Asset, Location}; use static_assertions::const_assert; use crate::xcm::*; @@ -240,6 +249,7 @@ impl frame_system::Config for Runtime { type RuntimeEvent = RuntimeEvent; /// The ubiquitous origin type. type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type SS58Prefix = SS58Prefix; type SystemWeightInfo = weights::frame_system::WeightInfo; /// Get the chain's current version. @@ -255,8 +265,9 @@ impl Contains for BaseCallFilter { // Block these calls when called by a signed extrinsic. // Root will still be able to execute these. pallet_xcm::Call::execute { .. } - | pallet_xcm::Call::teleport_assets { .. } - | pallet_xcm::Call::reserve_transfer_assets { .. } + | pallet_xcm::Call::transfer_assets { .. } + | pallet_xcm::Call::teleport_assets { .. } // deprecated + | pallet_xcm::Call::reserve_transfer_assets { .. } // deprecated | pallet_xcm::Call::limited_reserve_transfer_assets { .. } | pallet_xcm::Call::limited_teleport_assets { .. } => false, pallet_xcm::Call::__Ignore { .. } => { @@ -284,27 +295,76 @@ impl Contains for BaseCallFilter { parameter_types! { pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; } impl cumulus_pallet_parachain_system::Config for Runtime { // Using AnyRelayNumber only for the development & demo environments, // to be able to recover quickly from a relay chains issue type CheckAssociatedRelayNumber = cumulus_pallet_parachain_system::AnyRelayNumber; - type DmpMessageHandler = DmpQueue; + type DmpQueue = frame_support::traits::EnqueueWithOrigin; + // Using weights for recomended hardware type OnSystemEvent = (); type OutboundXcmpMessageSource = XcmpQueue; type ReservedDmpWeight = ReservedDmpWeight; type ReservedXcmpWeight = ReservedXcmpWeight; type RuntimeEvent = RuntimeEvent; - type SelfParaId = parachain_info::Pallet; + type SelfParaId = staging_parachain_info::Pallet; + type WeightInfo = cumulus_pallet_parachain_system::weights::SubstrateWeight; type XcmpMessageHandler = XcmpQueue; } -impl parachain_info::Config for Runtime {} +impl staging_parachain_info::Config for Runtime {} + +parameter_types! { + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; +} + +impl pallet_message_queue::Config for Runtime { + type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; + type MaxStale = sp_core::ConstU32<8>; + // Using weights for recomended hardware + #[cfg(feature = "runtime-benchmarks")] + type MessageProcessor = + pallet_message_queue::mock_helpers::NoopMessageProcessor; + #[cfg(not(feature = "runtime-benchmarks"))] + type MessageProcessor = staging_xcm_builder::ProcessXcmMessage< + AggregateMessageOrigin, + staging_xcm_executor::XcmExecutor, + RuntimeCall, + >; + type QueueChangeHandler = NarrowOriginToSibling; + type QueuePausedQuery = NarrowOriginToSibling; + type RuntimeEvent = RuntimeEvent; + type ServiceWeight = MessageQueueServiceWeight; + type Size = u32; + type WeightInfo = pallet_message_queue::weights::SubstrateWeight; +} + +/// XCMP Queue is responsible to handle XCM messages coming directly from +/// sibling parachains. +impl cumulus_pallet_xcmp_queue::Config for Runtime { + type ChannelInfo = ParachainSystem; + type ControllerOrigin = EnsureRoot; + type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; + type MaxInboundSuspended = sp_core::ConstU32<1_000>; + type PriceForSiblingDelivery = NoPriceForMessageDelivery; + type RuntimeEvent = RuntimeEvent; + type VersionWrapper = PolkadotXcm; + type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; + type XcmpQueue = TransformOrigin; +} + +impl cumulus_pallet_dmp_queue::Config for Runtime { + type DmpSink = frame_support::traits::EnqueueWithOrigin; + type RuntimeEvent = RuntimeEvent; + type WeightInfo = cumulus_pallet_dmp_queue::weights::SubstrateWeight; +} parameter_types! { pub const MinimumPeriod: Millis = SLOT_DURATION / 2; } + impl pallet_timestamp::Config for Runtime { type MinimumPeriod = MinimumPeriod; /// A timestamp: milliseconds since the unix epoch. @@ -351,13 +411,13 @@ impl pallet_balances::Config for Runtime { type ExistentialDeposit = ExistentialDeposit; type FreezeIdentifier = (); type MaxFreezes = ConstU32<10>; - type MaxHolds = ConstU32<10>; type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; /// The overarching event type. type RuntimeEvent = RuntimeEvent; - type RuntimeHoldReason = (); + type RuntimeFreezeReason = RuntimeFreezeReason; + type RuntimeHoldReason = RuntimeHoldReason; type WeightInfo = weights::pallet_balances::WeightInfo; } @@ -540,7 +600,6 @@ impl InstanceFilter for ProxyType { | RuntimeCall::Elections(..) | RuntimeCall::Utility(..) ), - // TODO: Should be no change when adding BlockRewards, right? ProxyType::_Staking => false, ProxyType::NonProxy => { matches!(c, RuntimeCall::Proxy(pallet_proxy::Call::proxy { .. })) @@ -680,11 +739,16 @@ parameter_types! { pub const PreimageMaxSize: u32 = 4096 * 1024; pub PreimageBaseDeposit: Balance = deposit(2, 64); pub PreimageByteDeposit: Balance = deposit(0, 1); + pub const PreimageHoldReason: RuntimeHoldReason = RuntimeHoldReason::Preimage(pallet_preimage::HoldReason::Preimage); } impl pallet_preimage::Config for Runtime { - type BaseDeposit = PreimageBaseDeposit; - type ByteDeposit = PreimageByteDeposit; + type Consideration = HoldConsideration< + AccountId, + Balances, + PreimageHoldReason, + LinearStoragePrice, + >; type Currency = Balances; type ManagerOrigin = EnsureRoot; type RuntimeEvent = RuntimeEvent; @@ -838,23 +902,29 @@ parameter_types! { pub const MaxSubAccounts: u32 = 100; pub const MaxAdditionalFields: u32 = 100; pub const BasicDeposit: Balance = 100 * CFG; - pub const FieldDeposit: Balance = 25 * CFG; + pub const ByteDeposit: Balance = deposit(0, 1); pub const SubAccountDeposit: Balance = 20 * CFG; pub const MaxRegistrars: u32 = 20; } impl pallet_identity::Config for Runtime { type BasicDeposit = BasicDeposit; + type ByteDeposit = ByteDeposit; type Currency = Tokens; - type FieldDeposit = FieldDeposit; type ForceOrigin = EnsureRootOr; - type MaxAdditionalFields = MaxAdditionalFields; + type IdentityInformation = pallet_identity::legacy::IdentityInfo; type MaxRegistrars = MaxRegistrars; type MaxSubAccounts = MaxSubAccounts; + type MaxSuffixLength = ConstU32<7>; + type MaxUsernameLength = ConstU32<32>; + type OffchainSignature = Signature; + type PendingUsernameExpiration = ConstU32<{ 7 * DAYS }>; type RegistrarOrigin = EnsureRootOr; type RuntimeEvent = RuntimeEvent; + type SigningPublicKey = ::Signer; type Slashed = (); type SubAccountDeposit = SubAccountDeposit; + type UsernameAuthorityOrigin = EnsureRoot; type WeightInfo = weights::pallet_identity::WeightInfo; } @@ -865,6 +935,7 @@ parameter_types! { } impl pallet_vesting::Config for Runtime { + type BlockNumberProvider = System; type BlockNumberToBalance = ConvertInto; type Currency = Tokens; type MinVestedTransfer = MinVestedTransfer; @@ -925,6 +996,7 @@ parameter_types! { // periods between treasury spends pub const SpendPeriod: BlockNumber = 30 * DAYS; + pub const PayoutPeriod: BlockNumber = 30 * DAYS; // percentage of treasury we burn per Spend period if there is a surplus // If the treasury is able to spend on all the approved proposals and didn't miss any @@ -940,28 +1012,32 @@ parameter_types! { } impl pallet_treasury::Config for Runtime { - // either democracy or 75% of council votes type ApproveOrigin = EnsureRootOr< pallet_collective::EnsureProportionAtLeast, >; + type AssetKind = (); + type BalanceConverter = UnityAssetBalanceConversion; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); + type Beneficiary = Self::AccountId; + type BeneficiaryLookup = IdentityLookup; type Burn = Burn; - // we burn and dont handle the unbalance type BurnDestination = (); type Currency = Tokens; type MaxApprovals = MaxApprovals; - // slashed amount goes to treasury account type OnSlash = Treasury; type PalletId = TreasuryPalletId; + type Paymaster = PayFromAccount; + type PayoutPeriod = PayoutPeriod; type ProposalBond = ProposalBond; type ProposalBondMaximum = ProposalBondMaximum; type ProposalBondMinimum = ProposalBondMinimum; - // either democracy or more than 50% council votes type RejectOrigin = EnsureRootOr; type RuntimeEvent = RuntimeEvent; type SpendFunds = (); type SpendOrigin = frame_support::traits::NeverEnsureOrigin; type SpendPeriod = SpendPeriod; - type WeightInfo = weights::pallet_treasury::WeightInfo; + type WeightInfo = pallet_treasury::weights::SubstrateWeight; } // our pallets @@ -1233,18 +1309,19 @@ impl pallet_collator_selection::Config for Runtime { parameter_types! { // 1 ROC should be enough to cover for fees opening/accepting hrmp channels - pub MaxHrmpRelayFee: MultiAsset = (MultiLocation::parent(), 1_000_000_000_000u128).into(); + pub MaxHrmpRelayFee: Asset = (Location::parent(), 1_000_000_000_000u128).into(); } impl pallet_xcm_transactor::Config for Runtime { - type AccountIdToMultiLocation = AccountIdToMultiLocation; + type AccountIdToLocation = AccountIdToLocation; type AssetTransactor = FungiblesTransactor; type Balance = Balance; type BaseXcmWeight = BaseXcmWeight; type CurrencyId = CurrencyId; - type CurrencyIdToMultiLocation = CurrencyIdConvert; + type CurrencyIdToLocation = CurrencyIdConvert; type DerivativeAddressRegistrationOrigin = EnsureRoot; type HrmpManipulatorOrigin = EnsureRootOr; + type HrmpOpenOrigin = EnsureRoot; type MaxHrmpFee = staging_xcm_builder::Case; type ReserveProvider = xcm_primitives::AbsoluteAndRelativeReserve; type RuntimeEvent = RuntimeEvent; @@ -1461,6 +1538,7 @@ impl pallet_restricted_tokens::Config for Runtime { type PreFungiblesUnbalanced = cfg_traits::Always; type PreReservableCurrency = cfg_traits::Always; type RuntimeEvent = RuntimeEvent; + type RuntimeHoldReason = RuntimeHoldReason; type WeightInfo = weights::pallet_restricted_tokens::WeightInfo; } @@ -1494,7 +1572,7 @@ impl orml_tokens::Config for Runtime { type WeightInfo = (); } -impl orml_asset_registry::Config for Runtime { +impl orml_asset_registry::module::Config for Runtime { type AssetId = CurrencyId; type AssetProcessor = asset_registry::CustomAssetProcessor; type AuthorityOrigin = @@ -1724,10 +1802,10 @@ impl pallet_block_rewards::Config for Runtime { impl pallet_transfer_allowlist::Config for Runtime { type CurrencyId = FilterCurrency; type Deposit = AllowanceDeposit; - type HoldId = HoldId; - type Location = Location; + type Location = RestrictedTransferLocation; type ReserveCurrency = Balances; type RuntimeEvent = RuntimeEvent; + type RuntimeHoldReason = RuntimeHoldReason; type WeightInfo = weights::pallet_transfer_allowlist::WeightInfo; } @@ -1867,14 +1945,6 @@ impl pallet_remarks::Config for Runtime { type WeightInfo = weights::pallet_remarks::WeightInfo; } -/// The config for the Downward Message Passing Queue, i.e., how messages coming -/// from the relay-chain are handled. -impl cumulus_pallet_dmp_queue::Config for Runtime { - type ExecuteOverweightOrigin = EnsureRoot; - type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; -} - parameter_types! { /// The amount of weight an XCM operation takes. This is a safe overestimate. pub UnitWeightCost: Weight = Weight::from_parts(200_000_000u64, 0); @@ -1886,20 +1956,6 @@ parameter_types! { pub type XcmWeigher = staging_xcm_builder::FixedWeightBounds; -/// XCMP Queue is responsible to handle XCM messages coming directly from -/// sibling parachains. -impl cumulus_pallet_xcmp_queue::Config for Runtime { - type ChannelInfo = ParachainSystem; - type ControllerOrigin = EnsureRoot; - type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; - type ExecuteOverweightOrigin = EnsureRoot; - type PriceForSiblingDelivery = (); - type RuntimeEvent = RuntimeEvent; - type VersionWrapper = PolkadotXcm; - type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; - type XcmExecutor = XcmExecutor; -} - pub type DevelopmentPrecompiles = Precompiles; parameter_types! { @@ -1927,6 +1983,7 @@ impl pallet_evm::Config for Runtime { type PrecompilesValue = PrecompilesValue; type Runner = pallet_evm::runner::stack::Runner; type RuntimeEvent = RuntimeEvent; + type SuicideQuickClearLimit = ConstU32<0>; type Timestamp = Timestamp; type WeightInfo = (); type WeightPerGas = WeightPerGas; @@ -2011,7 +2068,7 @@ construct_runtime!( System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event} = 1, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3, - ParachainInfo: parachain_info::{Pallet, Storage, Config} = 4, + ParachainInfo: staging_parachain_info::{Pallet, Storage, Config} = 4, // money stuff Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 20, @@ -2037,7 +2094,7 @@ construct_runtime!( Vesting: pallet_vesting::{Pallet, Call, Storage, Event, Config} = 68, Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 69, Uniques: pallet_uniques::{Pallet, Call, Storage, Event} = 70, - Preimage: pallet_preimage::{Pallet, Call, Storage, Event} = 72, + Preimage: pallet_preimage::{Pallet, Call, Storage, Event, HoldReason} = 72, // our pallets part 1 Fees: pallet_fees::{Pallet, Call, Storage, Config, Event} = 90, @@ -2049,7 +2106,7 @@ construct_runtime!( Loans: pallet_loans::{Pallet, Call, Storage, Event} = 96, Permissions: pallet_permissions::{Pallet, Call, Storage, Event} = 97, CollatorAllowlist: pallet_collator_allowlist::{Pallet, Call, Storage, Config, Event} = 98, - Tokens: pallet_restricted_tokens::{Pallet, Call, Event} = 99, + Tokens: pallet_restricted_tokens::{Pallet, Call, Event, HoldReason} = 99, // Removed: NftSales = 100 Bridge: pallet_bridge::{Pallet, Call, Storage, Config, Event} = 101, InterestAccrual: pallet_interest_accrual::{Pallet, Storage, Event} = 102, @@ -2062,7 +2119,7 @@ construct_runtime!( PoolRegistry: pallet_pool_registry::{Pallet, Call, Storage, Event} = 109, BlockRewardsBase: pallet_rewards::::{Pallet, Storage, Event, Config} = 110, BlockRewards: pallet_block_rewards::{Pallet, Call, Storage, Event, Config} = 111, - TransferAllowList: pallet_transfer_allowlist::{Pallet, Call, Storage, Event} = 112, + TransferAllowList: pallet_transfer_allowlist::{Pallet, Call, Storage, Event, HoldReason} = 112, GapRewardMechanism: pallet_rewards::mechanism::gap = 114, LiquidityPoolsGateway: pallet_liquidity_pools_gateway::{Pallet, Call, Storage, Event, Origin } = 115, OrderBook: pallet_order_book::{Pallet, Call, Storage, Event} = 116, @@ -2078,11 +2135,12 @@ construct_runtime!( XTokens: pallet_restricted_xtokens::{Pallet, Call} = 124, XcmTransactor: pallet_xcm_transactor::{Pallet, Call, Storage, Event} = 125, OrmlXTokens: orml_xtokens::{Pallet, Event} = 126, + MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 127, // 3rd party pallets OrmlTokens: orml_tokens::{Pallet, Storage, Event, Config} = 150, ChainBridge: chainbridge::{Pallet, Call, Storage, Event} = 151, - OrmlAssetRegistry: orml_asset_registry::{Pallet, Storage, Call, Event, Config} = 152, + OrmlAssetRegistry: orml_asset_registry::module::{Pallet, Storage, Call, Event, Config} = 152, OrmlXcm: orml_xcm::{Pallet, Storage, Call, Event} = 153, // EVM pallets @@ -2187,13 +2245,6 @@ impl fp_rpc::ConvertTransaction for TransactionConv } } -use cfg_types::{ - pools::PoolNav, - tokens::{FilterCurrency, LocalAssetId}, -}; -pub use pallet_loans::entities::{input::PriceCollectionInput, loans::ActiveLoanInfo}; -use runtime_common::{remarks::Remark, transfer_filter::PreNativeTransfer}; - impl_runtime_apis! { impl sp_api::Core for Runtime { fn version() -> RuntimeVersion { @@ -2419,13 +2470,13 @@ impl_runtime_apis! { // Investment Runtime APIs impl runtime_common::apis::InvestmentsApi> for Runtime { fn investment_portfolio(account_id: AccountId) -> Vec<(TrancheCurrency, InvestmentPortfolio)> { - runtime_common::investment_portfolios::get_account_portfolio::(account_id) + runtime_common::investment_portfolios::get_account_portfolio::(account_id).unwrap_or_default() } } // AccountConversionApi impl runtime_common::apis::AccountConversionApi for Runtime { - fn conversion_of(location: MultiLocation) -> Option { + fn conversion_of(location: Location) -> Option { AccountConverter::location_to_account::(location) } } @@ -2655,7 +2706,7 @@ impl_runtime_apis! { fn gas_limit_multiplier_support() {} fn pending_block( - xts: Vec<::Extrinsic> + xts: Vec<::Extrinsic> ) -> ( Option, Option> ) { @@ -2706,6 +2757,7 @@ impl_runtime_apis! { use frame_support::traits::StorageInfoTrait; use frame_system_benchmarking::Pallet as SystemBench; use cumulus_pallet_session_benchmarking::Pallet as SessionBench; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsicsBenchmark; let mut list = Vec::::new(); list_benchmarks!(list, extra); @@ -2734,6 +2786,9 @@ impl_runtime_apis! { use cumulus_pallet_session_benchmarking::Pallet as SessionBench; impl cumulus_pallet_session_benchmarking::Config for Runtime {} + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsicsBenchmark; + impl pallet_xcm::benchmarking::Config for Runtime {} + use frame_support::traits::WhitelistedStorageKeys; let whitelist = AllPalletsWithSystem::whitelisted_storage_keys(); @@ -2745,6 +2800,16 @@ impl_runtime_apis! { Ok(batches) } } + + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn create_default_config() -> Vec { + create_default_config::() + } + + fn build_config(config: Vec) -> sp_genesis_builder::Result { + build_config::(config) + } + } } #[cfg(feature = "runtime-benchmarks")] @@ -2762,7 +2827,6 @@ mod benches { [pallet_elections_phragmen, Elections] [pallet_identity, Identity] [pallet_vesting, Vesting] - [pallet_treasury, Treasury] [pallet_preimage, Preimage] [pallet_fees, Fees] [pallet_anchors, Anchor] @@ -2783,7 +2847,7 @@ mod benches { [pallet_transfer_allowlist, TransferAllowList] [pallet_order_book, OrderBook] [pallet_investments, Investments] - [pallet_xcm, PolkadotXcm] + [pallet_xcm, PalletXcmExtrinsicsBenchmark::] [pallet_oracle_feed, OraclePriceFeed] [pallet_oracle_collection, OraclePriceCollection] [pallet_remarks, Remarks] diff --git a/runtime/development/src/migrations.rs b/runtime/development/src/migrations.rs index 0f3d1912b6..fdc2cb322a 100644 --- a/runtime/development/src/migrations.rs +++ b/runtime/development/src/migrations.rs @@ -10,16 +10,25 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. +use cfg_primitives::AccountId; use sp_core::parameter_types; +use sp_std::{vec, vec::Vec}; + parameter_types! { pub const CollatorReward: cfg_primitives::Balance = cfg_primitives::constants::CFG; pub const AnnualTreasuryInflationPercent: u32 = 3; + pub AccountMap: Vec<(AccountId, AccountId)> = vec![]; + } +// Number of identities on Dev and Demo Chain on 30.05.2024 was both 0 +const IDENTITY_MIGRATION_KEY_LIMIT: u64 = 1000; + /// The migration set for Development & Demo. /// It includes all the migrations that have to be applied on that chain. pub type UpgradeDevelopment1047 = ( pallet_collator_selection::migration::v1::MigrateToV1, + pallet_collator_selection::migration::v2::MigrationToV2, cleanup_foreign_investments::Migration, // v0 -> v1 pallet_multisig::migrations::v1::MigrateToV1, @@ -30,11 +39,10 @@ pub type UpgradeDevelopment1047 = ( // v0 -> v1 runtime_common::migrations::nuke::ResetPallet, // v0 -> v1 - pallet_xcm::migration::v1::VersionUncheckedMigrateToV1, + runtime_common::migrations::nuke::ResetPallet, runtime_common::migrations::increase_storage_version::Migration, runtime_common::migrations::increase_storage_version::Migration, runtime_common::migrations::increase_storage_version::Migration, - runtime_common::migrations::increase_storage_version::Migration, runtime_common::migrations::increase_storage_version::Migration, runtime_common::migrations::increase_storage_version::Migration< crate::OraclePriceCollection, @@ -42,14 +50,29 @@ pub type UpgradeDevelopment1047 = ( 1, >, runtime_common::migrations::increase_storage_version::Migration, - // Reset Block rewards + // Reset Block rewards on Demo which is at v0 runtime_common::migrations::nuke::ResetPallet, + // Reset Block rewards on Dev which is at v2 + runtime_common::migrations::nuke::ResetPallet, pallet_block_rewards::migrations::init::InitBlockRewards< crate::Runtime, CollatorReward, AnnualTreasuryInflationPercent, >, + runtime_common::migrations::restricted_location::MigrateRestrictedTransferLocation< + crate::Runtime, + AccountMap, + >, runtime_common::migrations::loans::AddWithLinearPricing, + runtime_common::migrations::hold_reason::MigrateTransferAllowListHolds< + crate::Runtime, + crate::RuntimeHoldReason, + >, + // Migrations below this comment originate from Polkadot SDK + pallet_xcm::migration::MigrateToLatestXcmVersion, + cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, + pallet_identity::migration::versioned::V0ToV1, + pallet_uniques::migration::MigrateV0ToV1, ); mod cleanup_foreign_investments { diff --git a/runtime/development/src/weights/cumulus_pallet_xcmp_queue.rs b/runtime/development/src/weights/cumulus_pallet_xcmp_queue.rs index 8ebf568dc8..1be99aa0d7 100644 --- a/runtime/development/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/runtime/development/src/weights/cumulus_pallet_xcmp_queue.rs @@ -44,16 +44,28 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: XcmpQueue QueueConfig (r:1 w:1) - /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) - fn set_config_with_weight() -> Weight { - // Proof Size summary in bytes: - // Measured: `109` - // Estimated: `1594` - // Minimum execution time: 7_785_000 picoseconds. - Weight::from_parts(8_025_000, 0) - .saturating_add(Weight::from_parts(0, 1594)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + + fn enqueue_xcmp_message() -> Weight { + Weight::zero() + } + + fn suspend_channel() -> Weight { + Weight::zero() + } + + fn resume_channel() -> Weight { + Weight::zero() + } + + fn take_first_concatenated_xcm() -> Weight { + Weight::zero() + } + + fn on_idle_good_msg() -> Weight { + Weight::from_parts(1, 1) + } + + fn on_idle_large_msg() -> Weight { + Weight::from_parts(1, 1) } } diff --git a/runtime/development/src/weights/frame_system.rs b/runtime/development/src/weights/frame_system.rs index 389139626a..d06ea6295d 100644 --- a/runtime/development/src/weights/frame_system.rs +++ b/runtime/development/src/weights/frame_system.rs @@ -110,4 +110,13 @@ impl frame_system::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } + + fn authorize_upgrade() -> Weight { + Weight::zero() + } + + fn apply_authorized_upgrade() -> Weight { + Weight::zero() + } + } diff --git a/runtime/development/src/weights/pallet_balances.rs b/runtime/development/src/weights/pallet_balances.rs index 58771df8f1..1253f43884 100644 --- a/runtime/development/src/weights/pallet_balances.rs +++ b/runtime/development/src/weights/pallet_balances.rs @@ -132,4 +132,8 @@ impl pallet_balances::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into())) } + + fn force_adjust_total_issuance() -> Weight { + Weight::zero() + } } diff --git a/runtime/development/src/weights/pallet_collator_selection.rs b/runtime/development/src/weights/pallet_collator_selection.rs index 37f479517f..3f00b39ce3 100644 --- a/runtime/development/src/weights/pallet_collator_selection.rs +++ b/runtime/development/src/weights/pallet_collator_selection.rs @@ -64,7 +64,7 @@ impl pallet_collator_selection::WeightInfo for WeightIn } /// Storage: CollatorSelection CandidacyBond (r:0 w:1) /// Proof: CollatorSelection CandidacyBond (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) - fn set_candidacy_bond() -> Weight { + fn set_candidacy_bond(_: u32, _: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` @@ -174,4 +174,14 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Pending to generate Weight::default() } + + fn update_bond(_: u32) -> Weight { + // Pending to generate + Weight::default() + } + + fn take_candidate_slot(_: u32) -> Weight { + // Pending to generate + Weight::default() + } } diff --git a/runtime/development/src/weights/pallet_identity.rs b/runtime/development/src/weights/pallet_identity.rs index a3f990dffb..b005595346 100644 --- a/runtime/development/src/weights/pallet_identity.rs +++ b/runtime/development/src/weights/pallet_identity.rs @@ -51,19 +51,8 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) /// The range of component `r` is `[1, 20]`. /// The range of component `x` is `[0, 100]`. - fn set_identity(r: u32, x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `441 + r * (5 ±0)` - // Estimated: `11003` - // Minimum execution time: 46_377_000 picoseconds. - Weight::from_parts(45_672_988, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 7_829 - .saturating_add(Weight::from_parts(110_777, 0).saturating_mul(r.into())) - // Standard Error: 1_527 - .saturating_add(Weight::from_parts(773_988, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + fn set_identity(_: u32) -> Weight { + Weight::default() } /// Storage: Identity IdentityOf (r:1 w:0) /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) @@ -116,22 +105,8 @@ impl pallet_identity::WeightInfo for WeightInfo { /// The range of component `r` is `[1, 20]`. /// The range of component `s` is `[0, 100]`. /// The range of component `x` is `[0, 100]`. - fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `468 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` - // Estimated: `11003` - // Minimum execution time: 85_852_000 picoseconds. - Weight::from_parts(43_121_455, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 8_529 - .saturating_add(Weight::from_parts(134_938, 0).saturating_mul(r.into())) - // Standard Error: 1_665 - .saturating_add(Weight::from_parts(1_901_046, 0).saturating_mul(s.into())) - // Standard Error: 1_665 - .saturating_add(Weight::from_parts(445_516, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) + fn clear_identity(_: u32, _: u32) -> Weight { + Weight::default() } /// Storage: Identity Registrars (r:1 w:0) /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) @@ -139,37 +114,15 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) /// The range of component `r` is `[1, 20]`. /// The range of component `x` is `[0, 100]`. - fn request_judgement(r: u32, x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `366 + r * (57 ±0) + x * (66 ±0)` - // Estimated: `11003` - // Minimum execution time: 46_477_000 picoseconds. - Weight::from_parts(44_703_745, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 6_245 - .saturating_add(Weight::from_parts(149_256, 0).saturating_mul(r.into())) - // Standard Error: 1_218 - .saturating_add(Weight::from_parts(812_768, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) + fn request_judgement(_: u32) -> Weight { + Weight::default() } /// Storage: Identity IdentityOf (r:1 w:1) /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) /// The range of component `r` is `[1, 20]`. /// The range of component `x` is `[0, 100]`. - fn cancel_request(r: u32, x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `397 + x * (66 ±0)` - // Estimated: `11003` - // Minimum execution time: 42_289_000 picoseconds. - Weight::from_parts(41_699_662, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 5_903 - .saturating_add(Weight::from_parts(99_576, 0).saturating_mul(r.into())) - // Standard Error: 1_151 - .saturating_add(Weight::from_parts(795_580, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + fn cancel_request(_: u32) -> Weight { + Weight::default() } /// Storage: Identity Registrars (r:1 w:1) /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) @@ -222,19 +175,8 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) /// The range of component `r` is `[1, 19]`. /// The range of component `x` is `[0, 100]`. - fn provide_judgement(r: u32, x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `444 + r * (57 ±0) + x * (66 ±0)` - // Estimated: `11003` - // Minimum execution time: 32_532_000 picoseconds. - Weight::from_parts(30_238_292, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 6_879 - .saturating_add(Weight::from_parts(156_196, 0).saturating_mul(r.into())) - // Standard Error: 1_272 - .saturating_add(Weight::from_parts(1_276_350, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) + fn provide_judgement(_: u32) -> Weight { + Weight::default() } /// Storage: Identity SubsOf (r:1 w:1) /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) @@ -247,22 +189,8 @@ impl pallet_identity::WeightInfo for WeightInfo { /// The range of component `r` is `[1, 20]`. /// The range of component `s` is `[0, 100]`. /// The range of component `x` is `[0, 100]`. - fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `708 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` - // Estimated: `11003` - // Minimum execution time: 93_435_000 picoseconds. - Weight::from_parts(49_922_054, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 8_472 - .saturating_add(Weight::from_parts(160_912, 0).saturating_mul(r.into())) - // Standard Error: 1_654 - .saturating_add(Weight::from_parts(1_941_271, 0).saturating_mul(s.into())) - // Standard Error: 1_654 - .saturating_add(Weight::from_parts(439_581, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) + fn kill_identity(_: u32, _: u32) -> Weight { + Weight::default() } /// Storage: Identity IdentityOf (r:1 w:0) /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) @@ -338,4 +266,32 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } + + fn add_username_authority() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn remove_username_authority() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn set_username_for() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn accept_username() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn remove_expired_approval() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn set_primary_username() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn remove_dangling_username() -> cumulus_primitives_core::Weight { + Weight::default() + } } diff --git a/runtime/development/src/weights/pallet_preimage.rs b/runtime/development/src/weights/pallet_preimage.rs index 46e2b7175d..b83edd57e2 100644 --- a/runtime/development/src/weights/pallet_preimage.rs +++ b/runtime/development/src/weights/pallet_preimage.rs @@ -197,4 +197,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } + + fn ensure_updated(_: u32) -> cumulus_primitives_core::Weight { + Weight::default() + } } diff --git a/runtime/development/src/weights/pallet_treasury.rs b/runtime/development/src/weights/pallet_treasury.rs index 568a17761e..54f4091f70 100644 --- a/runtime/development/src/weights/pallet_treasury.rs +++ b/runtime/development/src/weights/pallet_treasury.rs @@ -120,4 +120,20 @@ impl pallet_treasury::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 2583).saturating_mul(p.into())) } + + fn spend_local() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn payout() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn check_status() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn void_spend() -> cumulus_primitives_core::Weight { + Weight::default() + } } diff --git a/runtime/development/src/weights/pallet_vesting.rs b/runtime/development/src/weights/pallet_vesting.rs index 0589faeddd..fabf138ed7 100644 --- a/runtime/development/src/weights/pallet_vesting.rs +++ b/runtime/development/src/weights/pallet_vesting.rs @@ -220,4 +220,8 @@ impl pallet_vesting::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } + + fn force_remove_vesting_schedule(_: u32, _: u32) -> cumulus_primitives_core::Weight { + Weight::default() + } } diff --git a/runtime/development/src/weights/pallet_xcm.rs b/runtime/development/src/weights/pallet_xcm.rs index abed172801..79671573aa 100644 --- a/runtime/development/src/weights/pallet_xcm.rs +++ b/runtime/development/src/weights/pallet_xcm.rs @@ -273,4 +273,16 @@ impl pallet_xcm::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) } + + fn transfer_assets() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn new_query() -> cumulus_primitives_core::Weight { + Weight::default() + } + + fn take_response() -> cumulus_primitives_core::Weight { + Weight::default() + } } diff --git a/runtime/development/src/xcm.rs b/runtime/development/src/xcm.rs index 0d386af94c..b9efe50bed 100644 --- a/runtime/development/src/xcm.rs +++ b/runtime/development/src/xcm.rs @@ -27,7 +27,7 @@ use pallet_xcm::XcmPassthrough; use runtime_common::{ transfer_filter::PreXcmTransfer, xcm::{ - general_key, AccountIdToMultiLocation, Barrier, FixedConversionRateProvider, + general_key, AccountIdToLocation, Barrier, FixedConversionRateProvider, LocalOriginToLocation, LpInstanceRelayer, ToTreasury, }, xcm_fees::native_per_second, @@ -35,12 +35,12 @@ use runtime_common::{ use sp_core::ConstU32; use staging_xcm::{ prelude::*, - v3::{MultiLocation, Weight as XcmWeight}, + v4::{Location, Weight as XcmWeight}, }; use staging_xcm_builder::{ - ConvertedConcreteId, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, FungiblesAdapter, - NoChecking, RelayChainAsNative, SiblingParachainAsNative, SignedAccountId32AsNative, - SovereignSignedViaLocation, + ConvertedConcreteId, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, + FrameTransactionalProcessor, FungiblesAdapter, NoChecking, RelayChainAsNative, + SiblingParachainAsNative, SignedAccountId32AsNative, SovereignSignedViaLocation, }; use staging_xcm_executor::{traits::JustTry, XcmExecutor}; @@ -49,37 +49,6 @@ use super::{ RuntimeCall, RuntimeEvent, RuntimeOrigin, Tokens, XcmpQueue, }; -/// A call filter for the XCM Transact instruction. This is a temporary -/// measure until we properly account for proof size weights. -/// -/// Calls that are allowed through this filter must: -/// 1. Have a fixed weight; -/// 2. Cannot lead to another call being made; -/// 3. Have a defined proof size weight, e.g. no unbounded vecs in call -/// parameters. -/// -/// NOTE: Defensive configuration for now, inspired by filter of -/// SystemParachains and Polkadot, can be extended if desired. -pub struct SafeCallFilter; -impl frame_support::traits::Contains for SafeCallFilter { - fn contains(call: &RuntimeCall) -> bool { - matches!( - call, - RuntimeCall::Timestamp(..) - | RuntimeCall::Balances(..) - | RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) - | RuntimeCall::PolkadotXcm( - pallet_xcm::Call::limited_reserve_transfer_assets { .. } - ) | RuntimeCall::XcmpQueue(..) - | RuntimeCall::DmpQueue(..) - | RuntimeCall::Proxy(..) - | RuntimeCall::LiquidityPoolsGateway( - pallet_liquidity_pools_gateway::Call::process_msg { .. } - ) | RuntimeCall::OrderBook(..) - ) - } -} - /// The main XCM config /// This is where we configure the core of our XCM integrations: how tokens are /// transferred, how fees are calculated, what barriers we impose on incoming @@ -104,9 +73,10 @@ impl staging_xcm_executor::Config for XcmConfig { type PalletInstancesInfo = crate::AllPalletsWithSystem; type ResponseHandler = PolkadotXcm; type RuntimeCall = RuntimeCall; - type SafeCallFilter = SafeCallFilter; + type SafeCallFilter = Everything; type SubscriptionService = PolkadotXcm; type Trader = Trader; + type TransactionalProcessor = FrameTransactionalProcessor; type UniversalAliases = Nothing; type UniversalLocation = UniversalLocation; type Weigher = FixedWeightBounds; @@ -128,9 +98,9 @@ pub type Trader = ( parameter_types! { // Canonical location: https://github.com/paritytech/polkadot/pull/4470 pub CanonicalNativePerSecond: (AssetId, u128, u128) = ( - MultiLocation::new( + Location::new( 0, - X1(general_key(parachains::kusama::altair::AIR_KEY)), + general_key(parachains::kusama::altair::AIR_KEY), ).into(), native_per_second(), 0, @@ -145,7 +115,7 @@ pub type FungiblesTransactor = FungiblesAdapter< // This means that this adapter should handle any token that `CurrencyIdConvert` can convert // to `CurrencyId`, the `CurrencyId` type of `Tokens`, the fungibles implementation it uses. ConvertedConcreteId, - // Convert an XCM MultiLocation into a local account id + // Convert an XCM Location into a local account id LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly) AccountId, @@ -161,11 +131,6 @@ parameter_types! { pub const MaxInstructions: u32 = 100; } -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - /// Pallet Xcm offers a lot of out-of-the-box functionality and features to /// configure and handle XCM messages. impl pallet_xcm::Config for Runtime { @@ -176,8 +141,6 @@ impl pallet_xcm::Config for Runtime { type ExecuteXcmOrigin = EnsureXcmOrigin>; type MaxLockers = ConstU32<8>; type MaxRemoteLockConsumers = ConstU32<0>; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; type RemoteLockConsumerIdentifier = (); type RuntimeCall = RuntimeCall; type RuntimeEvent = RuntimeEvent; @@ -200,7 +163,7 @@ impl pallet_xcm::Config for Runtime { parameter_types! { pub const RelayNetwork: NetworkId = NetworkId::Rococo; pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); + pub Ancestry: Location = Parachain(ParachainInfo::parachain_id().into()).into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); } @@ -264,29 +227,29 @@ parameter_types! { } parameter_types! { - /// The `MultiLocation` identifying this very parachain - pub SelfLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::get().into()))); - pub UniversalLocation: InteriorMultiLocation = X2( + /// The `Location` identifying this very parachain + pub SelfLocation: Location = Location::new(1, Parachain(ParachainInfo::get().into())); + pub UniversalLocation: InteriorLocation = [ GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into()) - ); + ].into(); } parameter_type_with_key! { - pub ParachainMinFee: |_location: MultiLocation| -> Option { + pub ParachainMinFee: |_location: Location| -> Option { None }; } impl orml_xtokens::Config for Runtime { - type AccountIdToMultiLocation = AccountIdToMultiLocation; + type AccountIdToLocation = AccountIdToLocation; type Balance = Balance; type BaseXcmWeight = BaseXcmWeight; type CurrencyId = CurrencyId; type CurrencyIdConvert = CurrencyIdConvert; + type LocationsFilter = Everything; type MaxAssetsForTransfer = MaxAssetsForTransfer; type MinXcmFee = ParachainMinFee; - type MultiLocationsFilter = Everything; type ReserveProvider = AbsoluteReserveProvider; type RuntimeEvent = RuntimeEvent; type SelfLocation = SelfLocation; diff --git a/runtime/integration-tests/Cargo.toml b/runtime/integration-tests/Cargo.toml index 7fdcb77e38..a10cd5ca18 100644 --- a/runtime/integration-tests/Cargo.toml +++ b/runtime/integration-tests/Cargo.toml @@ -13,7 +13,6 @@ ethabi = { workspace = true, features = ["std"] } ethereum = { workspace = true, features = ["std"] } fudge = { workspace = true } fudge-core = { workspace = true } -getrandom = { workspace = true } hex = { workspace = true } hex-literal = { workspace = true } lazy_static = { workspace = true } @@ -54,11 +53,9 @@ polkadot-core-primitives = { workspace = true, features = ["std"] } polkadot-node-primitives = { workspace = true } polkadot-parachain-primitives = { workspace = true, features = ["std"] } polkadot-primitives = { workspace = true, features = ["std"] } -polkadot-runtime = { workspace = true, features = ["std"] } polkadot-runtime-common = { workspace = true, features = ["std"] } polkadot-runtime-parachains = { workspace = true, features = ["std"] } rococo-runtime = { workspace = true, features = ["std"] } -staging-kusama-runtime = { workspace = true, features = ["std"] } pallet-babe = { workspace = true, features = ["std"] } pallet-grandpa = { workspace = true, features = ["std"] } @@ -87,7 +84,6 @@ runtime-integration-tests-proc-macro = { workspace = true } axelar-gateway-precompile = { workspace = true, features = ["std"] } chainbridge = { workspace = true, features = ["std"] } cumulus-pallet-aura-ext = { workspace = true, features = ["std"] } -cumulus-pallet-dmp-queue = { workspace = true, features = ["std"] } cumulus-pallet-parachain-system = { workspace = true, features = ["std"] } cumulus-pallet-xcm = { workspace = true, features = ["std"] } cumulus-pallet-xcmp-queue = { workspace = true, features = ["std"] } @@ -148,7 +144,7 @@ pallet-utility = { workspace = true, features = ["std"] } pallet-vesting = { workspace = true, features = ["std"] } pallet-xcm = { workspace = true, features = ["std"] } pallet-xcm-transactor = { workspace = true, features = ["std"] } -parachain-info = { workspace = true, features = ["std"] } +staging-parachain-info = { workspace = true, features = ["std"] } [features] # There is no need for integration test to add new features. diff --git a/runtime/integration-tests/src/generic/cases/account_derivation.rs b/runtime/integration-tests/src/generic/cases/account_derivation.rs index d25222df4a..a6bf2cbf4b 100644 --- a/runtime/integration-tests/src/generic/cases/account_derivation.rs +++ b/runtime/integration-tests/src/generic/cases/account_derivation.rs @@ -14,12 +14,10 @@ use cfg_primitives::AccountId; use runtime_common::apis::runtime_decl_for_account_conversion_api::AccountConversionApi; -use sp_api::{BlockT, HeaderT}; -use sp_runtime::traits::{Get, Zero}; -use staging_xcm::v3::{ +use sp_runtime::traits::{Block, Get, Header, Zero}; +use staging_xcm::v4::{ Junction::{AccountId32, AccountKey20, Parachain}, - Junctions::{X1, X2}, - MultiLocation, NetworkId, + Location, NetworkId, }; use crate::generic::{config::Runtime, env::Env, envs::runtime_env::RuntimeEnv}; @@ -55,12 +53,12 @@ fn local_evm_account() { let env = RuntimeEnv::::default(); let derived = env.parachain_state(|| { - T::Api::conversion_of(MultiLocation::new( + T::Api::conversion_of(Location::new( 0, - X1(AccountKey20 { + AccountKey20 { key: KEY_20, network: network_id(pallet_evm_chain_id::Pallet::::get()), - }), + }, )) .unwrap() }); @@ -76,12 +74,12 @@ fn lp_evm_account() { let env = RuntimeEnv::::default(); let derived = env.parachain_state(|| { - T::Api::conversion_of(MultiLocation::new( + T::Api::conversion_of(Location::new( 0, - X1(AccountKey20 { + AccountKey20 { key: KEY_20, network: network_id(RANDOM_EVM_ID), - }), + }, )) .unwrap() }); @@ -94,12 +92,12 @@ fn relay_chain_account() { let env = RuntimeEnv::::default(); let derived = env.parachain_state(|| { - T::Api::conversion_of(MultiLocation::new( + T::Api::conversion_of(Location::new( 1, - X1(AccountKey20 { + AccountKey20 { key: KEY_20, network: None, - }), + }, )) .unwrap() }); @@ -113,12 +111,12 @@ fn relay_chain_account() { ); let derived = env.parachain_state(|| { - T::Api::conversion_of(MultiLocation::new( + T::Api::conversion_of(Location::new( 1, - X1(AccountId32 { + AccountId32 { id: KEY_32, network: None, - }), + }, )) .unwrap() }); @@ -137,15 +135,15 @@ fn sibling_chain_account() { let env = RuntimeEnv::::default(); let derived = env.parachain_state(|| { - T::Api::conversion_of(MultiLocation::new( + T::Api::conversion_of(Location::new( 1, - X2( + [ Parachain(RANDOM_PARA_ID), AccountKey20 { key: KEY_20, network: None, }, - ), + ], )) .unwrap() }); @@ -159,15 +157,15 @@ fn sibling_chain_account() { ); let derived = env.parachain_state(|| { - T::Api::conversion_of(MultiLocation::new( + T::Api::conversion_of(Location::new( 1, - X2( + [ Parachain(RANDOM_PARA_ID), AccountId32 { id: KEY_32, network: None, }, - ), + ], )) .unwrap() }); @@ -186,17 +184,17 @@ fn remote_account_on_relay() { let env = RuntimeEnv::::default(); let derived = env.parachain_state(|| { - T::Api::conversion_of(MultiLocation::new( + T::Api::conversion_of(Location::new( 0, - X2( - Parachain(parachain_info::Pallet::::get().into()), + [ + Parachain(staging_parachain_info::Pallet::::get().into()), AccountId32 { id: KEY_32, network: Some(NetworkId::ByGenesis( frame_system::BlockHash::::get::(Zero::zero()).0, )), }, - ), + ], )) .unwrap() }); @@ -215,20 +213,20 @@ fn remote_account_on_sibling() { let env = RuntimeEnv::::default(); let derived = env.parachain_state(|| { - T::Api::conversion_of(MultiLocation::new( + T::Api::conversion_of(Location::new( 1, - X2( - Parachain(parachain_info::Pallet::::get().into()), + [ + Parachain(staging_parachain_info::Pallet::::get().into()), AccountId32 { id: KEY_32, network: Some(NetworkId::ByGenesis( frame_system::BlockHash::::get( - <::Header as HeaderT>::Number::zero(), + <::Header as Header>::Number::zero(), ) .0, )), }, - ), + ], )) .unwrap() }); diff --git a/runtime/integration-tests/src/generic/cases/block_rewards.rs b/runtime/integration-tests/src/generic/cases/block_rewards.rs index 48fb58ca6b..020a724423 100644 --- a/runtime/integration-tests/src/generic/cases/block_rewards.rs +++ b/runtime/integration-tests/src/generic/cases/block_rewards.rs @@ -206,7 +206,7 @@ fn is_staked(collator: &AccountId) -> bool { } fn is_candidate(collator: &AccountId) -> bool { - pallet_collator_selection::Pallet::::candidates() + pallet_collator_selection::Pallet::::candidate_list() .into_iter() .find(|c| c.who == *collator) .is_some() diff --git a/runtime/integration-tests/src/generic/cases/example.rs b/runtime/integration-tests/src/generic/cases/example.rs index c06a8cec6e..2268081251 100644 --- a/runtime/integration-tests/src/generic/cases/example.rs +++ b/runtime/integration-tests/src/generic/cases/example.rs @@ -39,7 +39,7 @@ fn transfer_balance() { let fee = env .submit_now( Keyring::Alice, - pallet_balances::Call::transfer { + pallet_balances::Call::transfer_allow_death { dest: Keyring::Bob.into(), value: TRANSFER, }, @@ -89,7 +89,7 @@ fn fudge_transfer_balance() { env.submit_later( Keyring::Alice, - pallet_balances::Call::transfer { + pallet_balances::Call::transfer_allow_death { dest: Keyring::Bob.into(), value: TRANSFER, }, diff --git a/runtime/integration-tests/src/generic/cases/liquidity_pools.rs b/runtime/integration-tests/src/generic/cases/liquidity_pools.rs index e403b70ed9..5e36ed13c4 100644 --- a/runtime/integration-tests/src/generic/cases/liquidity_pools.rs +++ b/runtime/integration-tests/src/generic/cases/liquidity_pools.rs @@ -10,7 +10,7 @@ use cfg_types::{ domain_address::{Domain, DomainAddress}, fixed_point::{Quantity, Ratio}, investments::{InvestCollection, InvestmentAccount, RedeemCollection}, - locations::Location, + locations::RestrictedTransferLocation, orders::FulfillmentWithPrice, permissions::{PermissionScope, PoolRole, Role}, pools::TrancheMetadata, @@ -52,34 +52,39 @@ use sp_core::{Get, H160, U256}; use sp_runtime::{ traits::{ AccountIdConversion, BadOrigin, ConstU32, Convert as C1, Convert as C2, EnsureAdd, Hash, - One, Zero, + One, StaticLookup, Zero, }, BoundedVec, BuildStorage, DispatchError, FixedPointNumber, Perquintill, SaturatedConversion, WeakBoundedVec, }; use staging_xcm::{ - latest::NetworkId, prelude::XCM_VERSION, - v3::{ - AssetId, Fungibility, Junction, Junction::*, Junctions, Junctions::*, MultiAsset, - MultiAssets, MultiLocation, WeightLimit, + v4::{ + Asset, AssetId, Assets, Fungibility, Junction, Junction::*, Junctions, Junctions::*, + Location, NetworkId, WeightLimit, }, - VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation, + VersionedAsset, VersionedAssets, VersionedLocation, }; use crate::{ generic::{ config::Runtime, env::{Blocks, Env}, - envs::fudge_env::{handle::FudgeHandle, FudgeEnv, FudgeSupport}, + envs::fudge_env::{handle::FudgeHandle, FudgeEnv, FudgeRelayRuntime, FudgeSupport}, utils::{ democracy::execute_via_democracy, evm::mint_balance_into_derived_account, genesis, - genesis::Genesis, + genesis::Genesis, xcm::setup_xcm, }, }, utils::accounts::Keyring, }; +mod orml_asset_registry { + // orml_asset_registry has remove the reexport of all pallet stuff, + // we reexport it again here + pub use orml_asset_registry::module::*; +} + /// The AUSD asset id pub const AUSD_CURRENCY_ID: CurrencyId = CurrencyId::ForeignAsset(3); /// The USDT asset id @@ -102,72 +107,12 @@ pub mod utils { } } - pub fn setup_xcm(env: &mut FudgeEnv) { - env.parachain_state_mut(|| { - // Set the XCM version used when sending XCM messages to sibling. - assert_ok!(pallet_xcm::Pallet::::force_xcm_version( - ::RuntimeOrigin::root(), - Box::new(MultiLocation::new( - 1, - Junctions::X1(Junction::Parachain(T::FudgeHandle::SIBLING_ID)), - )), - XCM_VERSION, - )); - }); - - env.sibling_state_mut(|| { - // Set the XCM version used when sending XCM messages to parachain. - assert_ok!(pallet_xcm::Pallet::::force_xcm_version( - ::RuntimeOrigin::root(), - Box::new(MultiLocation::new( - 1, - Junctions::X1(Junction::Parachain(T::FudgeHandle::PARA_ID)), - )), - XCM_VERSION, - )); - }); - - env.relay_state_mut(|| { - assert_ok!(polkadot_runtime_parachains::hrmp::Pallet::< - FudgeRelayRuntime, - >::force_open_hrmp_channel( - as frame_system::Config>::RuntimeOrigin::root(), - Id::from(T::FudgeHandle::PARA_ID), - Id::from(T::FudgeHandle::SIBLING_ID), - 10, - 1024, - )); - - assert_ok!(polkadot_runtime_parachains::hrmp::Pallet::< - FudgeRelayRuntime, - >::force_open_hrmp_channel( - as frame_system::Config>::RuntimeOrigin::root(), - Id::from(T::FudgeHandle::SIBLING_ID), - Id::from(T::FudgeHandle::PARA_ID), - 10, - 1024, - )); - - assert_ok!(polkadot_runtime_parachains::hrmp::Pallet::< - FudgeRelayRuntime, - >::force_process_hrmp_open( - as frame_system::Config>::RuntimeOrigin::root(), - 0, - )); - }); - - env.pass(Blocks::ByNumber(1)); - } - pub fn setup_usdc_xcm(env: &mut FudgeEnv) { env.parachain_state_mut(|| { // Set the XCM version used when sending XCM messages to USDC parachain. assert_ok!(pallet_xcm::Pallet::::force_xcm_version( ::RuntimeOrigin::root(), - Box::new(MultiLocation::new( - 1, - Junctions::X1(Junction::Parachain(1000)), - )), + Box::new(Location::new(1, Junction::Parachain(1000))), XCM_VERSION, )); }); @@ -187,7 +132,7 @@ pub mod utils { FudgeRelayRuntime, >::force_process_hrmp_open( as frame_system::Config>::RuntimeOrigin::root(), - 0, + 2, )); }); @@ -200,12 +145,12 @@ pub mod utils { name: BoundedVec::default(), symbol: BoundedVec::default(), existential_deposit: 1_000_000_000, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( + location: Some(VersionedLocation::V4(Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::SIBLING_ID), general_key(parachains::kusama::karura::AUSD_KEY), - ), + ], ))), additional: CustomMetadata { transferability: CrossChainTransferability::Xcm(Default::default()), @@ -269,8 +214,6 @@ pub mod utils { } } -type FudgeRelayRuntime = <::FudgeHandle as FudgeHandle>::RelayRuntime; - use utils::*; mod development { @@ -366,9 +309,9 @@ mod development { name: BoundedVec::default(), symbol: BoundedVec::default(), existential_deposit: GLMR_ED, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( + location: Some(VersionedLocation::V4(Location::new( 1, - X2(Parachain(T::FudgeHandle::SIBLING_ID), general_key(&[0, 1])), + [Parachain(T::FudgeHandle::SIBLING_ID), general_key(&[0, 1])], ))), additional: CustomMetadata { transferability: CrossChainTransferability::Xcm(Default::default()), @@ -385,7 +328,7 @@ mod development { pub fn set_test_domain_router( evm_chain_id: u64, - xcm_domain_location: VersionedMultiLocation, + xcm_domain_location: VersionedLocation, currency_id: CurrencyId, ) { let ethereum_xcm_router = EthereumXCMRouter:: { @@ -430,16 +373,16 @@ mod development { .expect("Tranche at index 0 exists") } - /// Returns a `VersionedMultiLocation` that can be converted into + /// Returns a `VersionedLocation` that can be converted into /// `LiquidityPoolsWrappedToken` which is required for cross chain asset /// registration and transfer. pub fn liquidity_pools_transferable_multilocation( chain_id: u64, address: [u8; 20], - ) -> VersionedMultiLocation { - VersionedMultiLocation::V3(MultiLocation { - parents: 0, - interior: X3( + ) -> VersionedLocation { + VersionedLocation::V4(Location::new( + 0, + [ PalletInstance( ::PalletInfo::index::< pallet_liquidity_pools::Pallet, @@ -452,8 +395,8 @@ mod development { network: None, key: address, }, - ), - }) + ], + )) } /// Enables `LiquidityPoolsTransferable` in the custom asset metadata @@ -506,11 +449,7 @@ mod development { set_test_domain_router::( MOONBEAM_EVM_CHAIN_ID, - MultiLocation::new( - 1, - Junctions::X1(Junction::Parachain(T::FudgeHandle::SIBLING_ID)), - ) - .into(), + Location::new(1, Junction::Parachain(T::FudgeHandle::SIBLING_ID)).into(), GLMR_CURRENCY_ID, ); }); @@ -788,9 +727,9 @@ mod development { name: BoundedVec::default(), symbol: BoundedVec::default(), existential_deposit: USDT_ED, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( + location: Some(VersionedLocation::V4(Location::new( 1, - X3(Parachain(1000), PalletInstance(50), GeneralIndex(1984)), + [Parachain(1000), PalletInstance(50), GeneralIndex(1984)], ))), additional: CustomMetadata { transferability: CrossChainTransferability::LiquidityPools, @@ -1226,7 +1165,7 @@ mod development { ); // Should fail to add currency_id which is missing a registered - // MultiLocation + // Location let currency_id = CurrencyId::ForeignAsset(100); assert_ok!(orml_asset_registry::Pallet::::register_asset( @@ -1256,7 +1195,7 @@ mod development { pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsWrappedToken ); - // Add convertable MultiLocation to metadata but remove transferability + // Add convertable Location to metadata but remove transferability assert_ok!(orml_asset_registry::Pallet::::update_asset( ::RuntimeOrigin::root(), currency_id, @@ -1453,7 +1392,7 @@ mod development { pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsTransferable ); - // Should fail if currency does not have any MultiLocation in metadata + // Should fail if currency does not have any Location in metadata assert_ok!(orml_asset_registry::Pallet::::update_asset( ::RuntimeOrigin::root(), currency_id, @@ -1490,7 +1429,7 @@ mod development { None, // Changed: Add some location which cannot be converted to // LiquidityPoolsWrappedToken - Some(Some(VersionedMultiLocation::V3(Default::default()))), + Some(Some(VersionedLocation::V4(Default::default()))), // No change for transferability required as it is already allowed for // LiquidityPools None, @@ -1648,7 +1587,7 @@ mod development { pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsTransferable ); - // Should fail if currency does not have any MultiLocation in metadata + // Should fail if currency does not have any Location in metadata assert_ok!(orml_asset_registry::Pallet::::update_asset( ::RuntimeOrigin::root(), currency_id, @@ -1685,7 +1624,7 @@ mod development { None, // Changed: Add some location which cannot be converted to // LiquidityPoolsWrappedToken - Some(Some(VersionedMultiLocation::V3(Default::default()))), + Some(Some(VersionedLocation::V4(Default::default()))), // No change for transferability required as it is already allowed for // LiquidityPools None, @@ -4559,12 +4498,12 @@ mod development { name: BoundedVec::default(), symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( + location: Some(VersionedLocation::V4(Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::PARA_ID), general_key(parachains::polkadot::centrifuge::CFG_KEY), - ), + ], ))), additional: CustomMetadata { transferability: CrossChainTransferability::Xcm(Default::default()), @@ -4610,15 +4549,15 @@ mod development { CurrencyId::Native, transfer_amount, Box::new( - MultiLocation::new( + Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::SIBLING_ID), Junction::AccountId32 { network: None, id: Keyring::Bob.into(), }, - ), + ], ) .into() ), @@ -4640,7 +4579,7 @@ mod development { ); }); - env.pass(Blocks::ByNumber(1)); + env.pass(Blocks::ByNumber(2)); env.sibling_state(|| { let current_balance = @@ -4706,15 +4645,15 @@ mod development { cfg_in_sibling, sibling_to_para_transfer_amount, Box::new( - MultiLocation::new( + Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::PARA_ID), Junction::AccountId32 { network: None, id: Keyring::Charlie.into(), } - ) + ] ) .into() ), @@ -4728,7 +4667,7 @@ mod development { ); }); - env.pass(Blocks::ByNumber(2)); + env.pass(Blocks::ByNumber(3)); env.parachain_state(|| { // Verify that Charlie's balance equals the amount transferred - fee @@ -4932,11 +4871,7 @@ mod development { env.parachain_state_mut(|| { let domain_router = router_creation_fn( - MultiLocation { - parents: 1, - interior: X1(Parachain(T::FudgeHandle::SIBLING_ID)), - } - .into(), + Location::new(1, Parachain(T::FudgeHandle::SIBLING_ID)).into(), GLMR_CURRENCY_ID, ); @@ -4979,14 +4914,12 @@ mod development { } type RouterCreationFn = - Box DomainRouter>; + Box DomainRouter>; pub fn get_axelar_xcm_router_fn() -> RouterCreationFn { Box::new( - |location: VersionedMultiLocation, - currency_id: CurrencyId| - -> DomainRouter { + |location: VersionedLocation, currency_id: CurrencyId| -> DomainRouter { let router = AxelarXCMRouter:: { router: XCMRouter { xcm_domain: XcmDomain { @@ -5022,9 +4955,7 @@ mod development { pub fn get_ethereum_xcm_router_fn() -> RouterCreationFn { Box::new( - |location: VersionedMultiLocation, - currency_id: CurrencyId| - -> DomainRouter { + |location: VersionedLocation, currency_id: CurrencyId| -> DomainRouter { let router = EthereumXCMRouter:: { router: XCMRouter { xcm_domain: XcmDomain { @@ -5272,12 +5203,12 @@ mod altair { name: BoundedVec::default(), symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( + location: Some(VersionedLocation::V4(Location::new( 1, - X2( + [ Parachain(parachains::kusama::altair::ID), general_key(parachains::kusama::altair::AIR_KEY), - ), + ], ))), additional: CustomMetadata { transferability: CrossChainTransferability::Xcm(Default::default()), @@ -5298,7 +5229,7 @@ mod altair { name: BoundedVec::default(), symbol: BoundedVec::default(), existential_deposit: 1_000_000_000, - location: Some(VersionedMultiLocation::V3(MultiLocation::new(1, Here))), + location: Some(VersionedLocation::V4(Location::new(1, Here))), additional: CustomMetadata { transferability: CrossChainTransferability::Xcm(Default::default()), ..CustomMetadata::default() @@ -5362,12 +5293,12 @@ mod altair { name: BoundedVec::default(), symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( + location: Some(VersionedLocation::V4(Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::PARA_ID), general_key(parachains::kusama::altair::AIR_KEY), - ), + ], ))), additional: CustomMetadata { transferability: CrossChainTransferability::Xcm(Default::default()), @@ -5393,12 +5324,12 @@ mod altair { name: BoundedVec::default(), symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( + location: Some(VersionedLocation::V4(Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::PARA_ID), general_key(parachains::kusama::altair::AIR_KEY), - ), + ], ))), additional: CustomMetadata { transferability: CrossChainTransferability::Xcm(Default::default()), @@ -5420,15 +5351,15 @@ mod altair { CurrencyId::Native, transfer_amount, Box::new( - MultiLocation::new( + Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::SIBLING_ID), Junction::AccountId32 { network: None, id: Keyring::Bob.into(), } - ) + ] ) .into() ), @@ -5450,7 +5381,7 @@ mod altair { ); }); - env.pass(Blocks::ByNumber(1)); + env.pass(Blocks::ByNumber(2)); env.sibling_state_mut(|| { let current_balance = @@ -5510,15 +5441,15 @@ mod altair { air_in_sibling, transfer_amount, Box::new( - MultiLocation::new( + Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::PARA_ID), Junction::AccountId32 { network: None, id: Keyring::Alice.into(), } - ) + ] ) .into() ), @@ -5532,7 +5463,7 @@ mod altair { ); }); - env.pass(Blocks::ByNumber(2)); + env.pass(Blocks::ByNumber(3)); env.parachain_state_mut(|| { // Verify that Keyring::Alice now has initial balance + amount transferred - fee @@ -5592,15 +5523,15 @@ mod altair { AUSD_CURRENCY_ID, transfer_amount, Box::new( - MultiLocation::new( + Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::PARA_ID), Junction::AccountId32 { network: None, id: Keyring::Bob.into(), } - ) + ] ) .into() ), @@ -5626,7 +5557,7 @@ mod altair { ); }); - env.pass(Blocks::ByNumber(2)); + env.pass(Blocks::ByNumber(3)); env.parachain_state_mut(|| { // Verify that Keyring::Bob now has initial balance + amount transferred - fee @@ -5660,7 +5591,9 @@ mod altair { assert_ok!( pallet_balances::Pallet::>::force_set_balance( as frame_system::Config>::RuntimeOrigin::root(), - Keyring::Alice.to_account_id().into(), + as frame_system::Config>::Lookup::unlookup( + Keyring::Alice.id() + ), transfer_amount * 2, ) ); @@ -5668,9 +5601,9 @@ mod altair { assert_ok!( pallet_xcm::Pallet::>::force_xcm_version( as frame_system::Config>::RuntimeOrigin::root(), - Box::new(MultiLocation::new( + Box::new(Location::new( 0, - Junctions::X1(Junction::Parachain(T::FudgeHandle::PARA_ID)), + Junction::Parachain(T::FudgeHandle::PARA_ID), )), XCM_VERSION, ) @@ -5693,7 +5626,7 @@ mod altair { ); }); - env.pass(Blocks::ByNumber(1)); + env.pass(Blocks::ByNumber(2)); env.parachain_state(|| { assert_eq!( @@ -5714,7 +5647,7 @@ mod altair { name: BoundedVec::default(), symbol: BoundedVec::default(), existential_deposit: 1_000_000_000, - location: Some(VersionedMultiLocation::V3(MultiLocation::new(1, Here))), + location: Some(VersionedLocation::V4(Location::new(1, Here))), additional: CustomMetadata { transferability: CrossChainTransferability::Xcm(Default::default()), ..CustomMetadata::default() @@ -5729,7 +5662,7 @@ mod altair { env.parachain_state_mut(|| { assert_ok!(pallet_xcm::Pallet::::force_xcm_version( ::RuntimeOrigin::root(), - Box::new(MultiLocation::new(1, Junctions::Here)), + Box::new(Location::new(1, Junctions::Here)), XCM_VERSION, )); @@ -5738,12 +5671,12 @@ mod altair { currency_id, ksm(1), Box::new( - MultiLocation::new( + Location::new( 1, - X1(Junction::AccountId32 { + Junction::AccountId32 { id: Keyring::Bob.into(), network: None, - }) + } ) .into() ), @@ -5751,14 +5684,14 @@ mod altair { )); }); - env.pass(Blocks::ByNumber(1)); + env.pass(Blocks::ByNumber(2)); env.relay_state_mut(|| { assert_eq!( pallet_balances::Pallet::>::free_balance( &Keyring::Bob.into() ), - 999918220455 + 999989698923 ); }); } @@ -5774,16 +5707,16 @@ mod altair { setup_xcm(&mut env); let sibling_asset_id = CurrencyId::ForeignAsset(1); - let asset_location = MultiLocation::new( + let asset_location = Location::new( 1, - X2(Parachain(T::FudgeHandle::SIBLING_ID), general_key(&[0, 1])), + [Parachain(T::FudgeHandle::SIBLING_ID), general_key(&[0, 1])], ); let meta: AssetMetadata = AssetMetadata { decimals: 18, name: BoundedVec::default(), symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, - location: Some(VersionedMultiLocation::V3(asset_location)), + location: Some(VersionedLocation::V4(asset_location)), additional: CustomMetadata { transferability: CrossChainTransferability::Xcm(XcmMetadata { // We specify a custom fee_per_second and verify below that this value is @@ -5827,15 +5760,15 @@ mod altair { CurrencyId::Native, transfer_amount, Box::new( - MultiLocation::new( + Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::PARA_ID), Junction::AccountId32 { network: None, id: Keyring::Bob.into(), } - ) + ] ) .into() ), @@ -5849,7 +5782,7 @@ mod altair { ); }); - env.pass(Blocks::ByNumber(2)); + env.pass(Blocks::ByNumber(3)); env.parachain_state_mut(|| { let bob_balance = @@ -5884,19 +5817,19 @@ mod altair { setup_xcm(&mut env); let usdc_asset_id = CurrencyId::ForeignAsset(39); - let asset_location = MultiLocation::new( + let asset_location = Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::SIBLING_ID), general_key("0x02f3a00dd12f644daec907013b16eb6d14bf1c4cb4".as_bytes()), - ), + ], ); let meta: AssetMetadata = AssetMetadata { decimals: 6, name: BoundedVec::default(), symbol: BoundedVec::default(), existential_deposit: 1, - location: Some(VersionedMultiLocation::V3(asset_location)), + location: Some(VersionedLocation::V4(asset_location)), additional: CustomMetadata { transferability: CrossChainTransferability::Xcm(Default::default()), ..CustomMetadata::default() @@ -5941,15 +5874,15 @@ mod altair { usdc_asset_id, transfer_amount, Box::new( - MultiLocation::new( + Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::PARA_ID), Junction::AccountId32 { network: None, id: Keyring::Bob.into(), } - ) + ] ) .into() ), @@ -5963,7 +5896,7 @@ mod altair { ); }); - env.pass(Blocks::ByNumber(2)); + env.pass(Blocks::ByNumber(3)); env.parachain_state_mut(|| { let bob_balance = @@ -5988,9 +5921,9 @@ mod altair { name: BoundedVec::default(), symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( + location: Some(VersionedLocation::V4(Location::new( 0, - X1(general_key(parachains::kusama::altair::AIR_KEY)), + general_key(parachains::kusama::altair::AIR_KEY), ))), additional: CustomMetadata { transferability: CrossChainTransferability::Xcm(Default::default()), @@ -6016,12 +5949,12 @@ mod altair { name: BoundedVec::default(), symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( + location: Some(VersionedLocation::V4(Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::SIBLING_ID), general_key(parachains::kusama::karura::AUSD_KEY), - ), + ], ))), additional: CustomMetadata { transferability: CrossChainTransferability::Xcm(Default::default()), @@ -6048,9 +5981,9 @@ mod altair { name: BoundedVec::default(), symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( + location: Some(VersionedLocation::V4(Location::new( 1, - X2(Parachain(2000), general_key(&[42])), + [Parachain(2000), general_key(&[42])], ))), additional: CustomMetadata { transferability: CrossChainTransferability::Xcm(Default::default()), @@ -6084,8 +6017,8 @@ mod altair { env.parachain_state_mut(|| { // The way AIR is represented relative within the Altair runtime - let air_location_inner: MultiLocation = - MultiLocation::new(0, X1(general_key(parachains::kusama::altair::AIR_KEY))); + let air_location_inner: Location = + Location::new(0, general_key(parachains::kusama::altair::AIR_KEY)); // register air register_air::(); @@ -6096,12 +6029,12 @@ mod altair { ); // The canonical way AIR is represented out in the wild - let air_location_canonical: MultiLocation = MultiLocation::new( + let air_location_canonical: Location = Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::PARA_ID), general_key(parachains::kusama::altair::AIR_KEY), - ), + ], ); assert_eq!( @@ -6120,17 +6053,17 @@ mod altair { let tranche_currency = CurrencyId::Tranche(401, [0; 16]); let tranche_id = WeakBoundedVec::>::force_from(tranche_currency.encode(), None); - let tranche_multilocation = MultiLocation { - parents: 1, - interior: X3( + let tranche_multilocation = Location::new( + 1, + [ Parachain(T::FudgeHandle::PARA_ID), PalletInstance(PoolPalletIndex::get()), GeneralKey { length: tranche_id.len() as u8, data: vec_to_fixed_array(tranche_id.to_vec()), }, - ), - }; + ], + ); env.parachain_state_mut(|| { assert_eq!( @@ -6154,12 +6087,12 @@ mod altair { env.parachain_state_mut(|| { assert_eq!(parachains::kusama::karura::AUSD_KEY, &[0, 129]); - let ausd_location: MultiLocation = MultiLocation::new( + let ausd_location: Location = Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::SIBLING_ID), general_key(parachains::kusama::karura::AUSD_KEY), - ), + ], ); register_ausd::(); @@ -6180,13 +6113,13 @@ mod altair { fn convert_ksm() { let mut env = FudgeEnv::::default(); - let ksm_location: MultiLocation = MultiLocation::parent().into(); + let ksm_location: Location = Location::parent().into(); env.parachain_state_mut(|| { register_ksm::(); assert_eq!( - >::convert(ksm_location), + >::convert(ksm_location.clone()), Some(KSM_ASSET_ID), ); @@ -6201,10 +6134,8 @@ mod altair { fn convert_unkown_multilocation() { let mut env = FudgeEnv::::default(); - let unknown_location: MultiLocation = MultiLocation::new( - 1, - X2(Parachain(T::FudgeHandle::PARA_ID), general_key(&[42])), - ); + let unknown_location: Location = + Location::new(1, [Parachain(T::FudgeHandle::PARA_ID), general_key(&[42])]); env.parachain_state_mut(|| { assert!(>::convert(unknown_location).is_none()); @@ -6234,8 +6165,6 @@ mod centrifuge { use super::*; mod utils { - use staging_xcm::v3::NetworkId; - use super::*; /// The test asset id attributed to DOT @@ -6256,7 +6185,7 @@ mod centrifuge { name: BoundedVec::default(), symbol: BoundedVec::default(), existential_deposit: 100_000_000, - location: Some(VersionedMultiLocation::V3(MultiLocation::parent())), + location: Some(VersionedLocation::V4(Location::parent())), additional: CustomMetadata { transferability: CrossChainTransferability::Xcm(Default::default()), ..CustomMetadata::default() @@ -6275,16 +6204,16 @@ mod centrifuge { name: BoundedVec::default(), symbol: BoundedVec::default(), existential_deposit: 1_000, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( + location: Some(VersionedLocation::V4(Location::new( 0, - X3( + [ PalletInstance(103), GlobalConsensus(NetworkId::Ethereum { chain_id: 1 }), AccountKey20 { network: None, key: hex_literal::hex!("a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"), }, - ), + ], ))), additional: CustomMetadata { transferability: CrossChainTransferability::LiquidityPools, @@ -6305,13 +6234,13 @@ mod centrifuge { name: BoundedVec::default(), symbol: BoundedVec::default(), existential_deposit: 1_000, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( + location: Some(VersionedLocation::V4(Location::new( 1, - X3( + [ Junction::Parachain(1000), Junction::PalletInstance(50), Junction::GeneralIndex(1337), - ), + ], ))), additional: CustomMetadata { transferability: CrossChainTransferability::Xcm(Default::default()), @@ -6333,12 +6262,12 @@ mod centrifuge { name: BoundedVec::default(), symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( + location: Some(VersionedLocation::V4(Location::new( 1, - X2( + [ Parachain(para_id), general_key(parachains::polkadot::centrifuge::CFG_KEY), - ), + ], ))), additional: CustomMetadata { transferability: CrossChainTransferability::Xcm(Default::default()), @@ -6362,20 +6291,18 @@ mod centrifuge { name: BoundedVec::default(), symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, - location: Some(VersionedMultiLocation::V2( - staging_xcm::v2::MultiLocation::new( - 1, - staging_xcm::v2::Junctions::X2( - staging_xcm::v2::Junction::Parachain(T::FudgeHandle::PARA_ID), - staging_xcm::v2::Junction::GeneralKey( - WeakBoundedVec::>::force_from( - parachains::polkadot::centrifuge::CFG_KEY.into(), - None, - ), + location: Some(VersionedLocation::V2(staging_xcm::v2::MultiLocation::new( + 1, + staging_xcm::v2::Junctions::X2( + staging_xcm::v2::Junction::Parachain(T::FudgeHandle::PARA_ID), + staging_xcm::v2::Junction::GeneralKey( + WeakBoundedVec::>::force_from( + parachains::polkadot::centrifuge::CFG_KEY.into(), + None, ), ), ), - )), + ))), additional: CustomMetadata { transferability: CrossChainTransferability::Xcm(Default::default()), ..CustomMetadata::default() @@ -6456,7 +6383,9 @@ mod centrifuge { assert_ok!( pallet_balances::Pallet::>::force_set_balance( as frame_system::Config>::RuntimeOrigin::root(), - Keyring::Alice.to_account_id().into(), + as frame_system::Config>::Lookup::unlookup( + Keyring::Alice.id() + ), alice_initial_dot, ) ); @@ -6464,9 +6393,9 @@ mod centrifuge { assert_ok!( pallet_xcm::Pallet::>::force_xcm_version( as frame_system::Config>::RuntimeOrigin::root(), - Box::new(MultiLocation::new( + Box::new(Location::new( 0, - Junctions::X1(Junction::Parachain(T::FudgeHandle::PARA_ID)), + Junction::Parachain(T::FudgeHandle::PARA_ID), )), XCM_VERSION, ) @@ -6492,11 +6421,11 @@ mod centrifuge { pallet_balances::Pallet::>::free_balance( &Keyring::Alice.into() ), - alice_initial_dot - transfer_amount + 69867666991 // Comes from alice_initial_dot - transfer_amount with noise ); }); - env.pass(Blocks::ByNumber(1)); + env.pass(Blocks::ByNumber(2)); env.parachain_state(|| { assert_eq!( @@ -6522,9 +6451,9 @@ mod centrifuge { name: BoundedVec::default(), symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( + location: Some(VersionedLocation::V4(Location::new( 0, - X1(general_key(parachains::polkadot::centrifuge::CFG_KEY)), + general_key(parachains::polkadot::centrifuge::CFG_KEY), ))), additional: CustomMetadata { transferability: CrossChainTransferability::Xcm(Default::default()), @@ -6550,12 +6479,12 @@ mod centrifuge { name: BoundedVec::default(), symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( + location: Some(VersionedLocation::V4(Location::new( 1, - X2( + [ Parachain(parachains::polkadot::acala::ID), general_key(parachains::polkadot::acala::AUSD_KEY), - ), + ], ))), additional: CustomMetadata { transferability: CrossChainTransferability::Xcm(Default::default()), @@ -6582,9 +6511,9 @@ mod centrifuge { name: BoundedVec::default(), symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( + location: Some(VersionedLocation::V4(Location::new( 1, - X2(Parachain(2000), general_key(&[42])), + [Parachain(2000), general_key(&[42])], ))), additional: CustomMetadata { transferability: CrossChainTransferability::Xcm(Default::default()), @@ -6618,10 +6547,8 @@ mod centrifuge { env.parachain_state_mut(|| { // The way CFG is represented relative within the Centrifuge runtime - let cfg_location_inner: MultiLocation = MultiLocation::new( - 0, - X1(general_key(parachains::polkadot::centrifuge::CFG_KEY)), - ); + let cfg_location_inner: Location = + Location::new(0, general_key(parachains::polkadot::centrifuge::CFG_KEY)); register_cfg::(T::FudgeHandle::PARA_ID); @@ -6631,12 +6558,12 @@ mod centrifuge { ); // The canonical way CFG is represented out in the wild - let cfg_location_canonical: MultiLocation = MultiLocation::new( + let cfg_location_canonical: Location = Location::new( 1, - X2( + [ Parachain(parachains::polkadot::centrifuge::ID), general_key(parachains::polkadot::centrifuge::CFG_KEY), - ), + ], ); assert_eq!( @@ -6647,7 +6574,7 @@ mod centrifuge { } /// Verify that even with CFG registered in the AssetRegistry with a XCM - /// v2 MultiLocation, that `CurrencyIdConvert` can look it up given an + /// v2 Location, that `CurrencyIdConvert` can look it up given an /// identical location in XCM v3. #[test_runtimes([centrifuge])] fn convert_cfg_xcm_v2() { @@ -6660,10 +6587,8 @@ mod centrifuge { register_cfg_v2::(); // The way CFG is represented relative within the Centrifuge runtime in xcm v3 - let cfg_location_inner: MultiLocation = MultiLocation::new( - 0, - X1(general_key(parachains::polkadot::centrifuge::CFG_KEY)), - ); + let cfg_location_inner: Location = + Location::new(0, general_key(parachains::polkadot::centrifuge::CFG_KEY)); assert_eq!( >::convert(cfg_location_inner), @@ -6671,12 +6596,12 @@ mod centrifuge { ); // The canonical way CFG is represented out in the wild - let cfg_location_canonical: MultiLocation = MultiLocation::new( + let cfg_location_canonical: Location = Location::new( 1, - X2( + [ Parachain(parachains::polkadot::centrifuge::ID), general_key(parachains::polkadot::centrifuge::CFG_KEY), - ), + ], ); assert_eq!( @@ -6706,13 +6631,13 @@ mod centrifuge { fn convert_dot() { let mut env = FudgeEnv::::default(); - let dot_location: MultiLocation = MultiLocation::parent(); + let dot_location: Location = Location::parent(); env.parachain_state_mut(|| { register_dot::(); assert_eq!( - >::convert(dot_location), + >::convert(dot_location.clone()), Some(DOT_ASSET_ID), ); @@ -6727,12 +6652,12 @@ mod centrifuge { fn convert_unknown_multilocation() { let mut env = FudgeEnv::::default(); - let unknown_location: MultiLocation = MultiLocation::new( + let unknown_location: Location = Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::PARA_ID), general_key([42].as_ref()), - ), + ], ); env.parachain_state_mut(|| { @@ -6764,21 +6689,25 @@ mod centrifuge { const TRANSFER_AMOUNT: u128 = 10; - fn xcm_location() -> MultiLocation { - MultiLocation::new( + fn xcm_location() -> VersionedLocation { + VersionedLocation::V4(Location::new( 1, - X1(AccountId32 { + AccountId32 { id: Keyring::Alice.into(), network: None, - }), - ) + }, + )) } - fn allowed_xcm_location() -> Location { - Location::XCM(BlakeTwo256::hash(&xcm_location().encode())) + fn allowed_xcm_location() -> RestrictedTransferLocation { + RestrictedTransferLocation::Xcm(Box::new(xcm_location())) } - fn add_allowance(account: Keyring, asset: CurrencyId, location: Location) { + fn add_allowance( + account: Keyring, + asset: CurrencyId, + location: RestrictedTransferLocation, + ) { assert_ok!( pallet_transfer_allowlist::Pallet::::add_transfer_allowance( RawOrigin::Signed(account.into()).into(), @@ -6812,7 +6741,7 @@ mod centrifuge { pallet_transfer_allowlist::Pallet::::add_transfer_allowance( RawOrigin::Signed(Keyring::Alice.into()).into(), FilterCurrency::All, - Location::Local(Keyring::Bob.to_account_id()) + RestrictedTransferLocation::Local(Keyring::Bob.to_account_id()) ) ); @@ -6825,13 +6754,13 @@ mod centrifuge { ) }); - let call = pallet_balances::Call::::transfer { + let call = pallet_balances::Call::::transfer_allow_death { dest: Keyring::Charlie.into(), value: cfg(TRANSFER_AMOUNT), }; env.submit_now(Keyring::Alice, call).unwrap(); - let call = pallet_balances::Call::::transfer { + let call = pallet_balances::Call::::transfer_allow_death { dest: Keyring::Bob.into(), value: cfg(TRANSFER_AMOUNT), }; @@ -6876,7 +6805,7 @@ mod centrifuge { pallet_transfer_allowlist::Pallet::::add_transfer_allowance( RawOrigin::Signed(Keyring::Alice.into()).into(), FilterCurrency::All, - Location::Local(Keyring::Bob.to_account_id()) + RestrictedTransferLocation::Local(Keyring::Bob.to_account_id()) ) ); }); @@ -7019,7 +6948,7 @@ mod centrifuge { add_allowance::( Keyring::Alice, LP_ETH_USDC, - Location::Local(Keyring::Bob.to_account_id()), + RestrictedTransferLocation::Local(Keyring::Bob.to_account_id()), ); assert_noop!( @@ -7109,8 +7038,7 @@ mod centrifuge { router: XCMRouter { xcm_domain: XcmDomain { location: Box::new( - MultiLocation::new(1, X1(Parachain(T::FudgeHandle::SIBLING_ID))) - .into(), + Location::new(1, Parachain(T::FudgeHandle::SIBLING_ID)).into(), ), ethereum_xcm_transact_call_index: BoundedVec::truncate_from(vec![ 38, 0, @@ -7146,7 +7074,7 @@ mod centrifuge { add_allowance::( Keyring::Alice, LP_ETH_USDC, - Location::Address(domain_address.clone()), + RestrictedTransferLocation::Address(domain_address.clone()), ); assert_noop!( @@ -7203,7 +7131,7 @@ mod centrifuge { add_allowance::( Keyring::Alice, USDC, - Location::Local(Keyring::Bob.to_account_id()), + RestrictedTransferLocation::Local(Keyring::Bob.to_account_id()), ); assert_noop!( @@ -7269,6 +7197,15 @@ mod centrifuge { Default::default(), ); + // Configuring XCM in this test fails because the Hrmp + // configuration is not applied. We force the application here, + // but we should configure correctly this because something is off. + env.relay_state_mut(|| { + polkadot_runtime_parachains::configuration::Pallet::>::force_set_active_config( + crate::generic::envs::fudge_env::handle::hrmp_host_config() + ); + }); + setup_xcm(&mut env); setup_usdc_xcm(&mut env); @@ -7292,19 +7229,18 @@ mod centrifuge { pallet_transfer_allowlist::Pallet::::add_transfer_allowance( RawOrigin::Signed(Keyring::Alice.into()).into(), FilterCurrency::Specific(USDC), - Location::XCM(BlakeTwo256::hash( - &MultiLocation::new( + RestrictedTransferLocation::Xcm(Box::new(VersionedLocation::V4( + Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::SIBLING_ID), Junction::AccountId32 { id: Keyring::Alice.into(), network: None, } - ) + ] ) - .encode() - )) + ))) ) ); @@ -7314,15 +7250,15 @@ mod centrifuge { USDC, usdc(1_000), Box::new( - MultiLocation::new( + Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::SIBLING_ID), Junction::AccountId32 { id: Keyring::Bob.into(), network: None, } - ) + ] ) .into() ), @@ -7336,15 +7272,15 @@ mod centrifuge { USDC, usdc(1_000), Box::new( - MultiLocation::new( + Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::SIBLING_ID), Junction::AccountId32 { id: Keyring::Alice.into(), network: None, } - ) + ] ) .into() ), @@ -7400,7 +7336,7 @@ mod centrifuge { add_allowance::( Keyring::Alice, DOT_ASSET_ID, - Location::Local(Keyring::Bob.to_account_id()), + RestrictedTransferLocation::Local(Keyring::Bob.to_account_id()), ); assert_noop!( @@ -7470,7 +7406,7 @@ mod centrifuge { assert_ok!(pallet_xcm::Pallet::::force_xcm_version( ::RuntimeOrigin::root(), - Box::new(MultiLocation::new(1, Junctions::Here)), + Box::new(Location::new(1, Junctions::Here)), XCM_VERSION, )); @@ -7488,12 +7424,12 @@ mod centrifuge { DOT_ASSET_ID, dot(1), Box::new( - MultiLocation::new( + Location::new( 1, - X1(Junction::AccountId32 { + Junction::AccountId32 { id: Keyring::Bob.into(), network: None, - }) + } ) .into() ), @@ -7507,12 +7443,12 @@ mod centrifuge { DOT_ASSET_ID, dot(1), Box::new( - MultiLocation::new( + Location::new( 1, - X1(Junction::AccountId32 { + Junction::AccountId32 { id: Keyring::Alice.into(), network: None, - }) + } ) .into() ), @@ -7525,14 +7461,14 @@ mod centrifuge { ); }); - env.pass(Blocks::ByNumber(1)); + env.pass(Blocks::ByNumber(2)); env.relay_state_mut(|| { assert_eq!( pallet_balances::Pallet::>::free_balance( &Keyring::Alice.into() ), - 79978937205 + 79857365914 ); }); } @@ -7552,12 +7488,12 @@ mod centrifuge { name: BoundedVec::default(), symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( + location: Some(VersionedLocation::V4(Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::PARA_ID), general_key(parachains::polkadot::centrifuge::CFG_KEY), - ), + ], ))), additional: CustomMetadata { transferability: CrossChainTransferability::Xcm(Default::default()), @@ -7603,15 +7539,15 @@ mod centrifuge { CurrencyId::Native, transfer_amount, Box::new( - MultiLocation::new( + Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::SIBLING_ID), Junction::AccountId32 { network: None, id: Keyring::Bob.into(), } - ) + ] ) .into() ), @@ -7633,7 +7569,7 @@ mod centrifuge { ); }); - env.pass(Blocks::ByNumber(1)); + env.pass(Blocks::ByNumber(2)); env.sibling_state_mut(|| { let current_balance = @@ -7694,15 +7630,15 @@ mod centrifuge { cfg_in_sibling, transfer_amount, Box::new( - MultiLocation::new( + Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::PARA_ID), Junction::AccountId32 { network: None, id: Keyring::Alice.into(), } - ) + ] ) .into() ), @@ -7716,7 +7652,7 @@ mod centrifuge { ); }); - env.pass(Blocks::ByNumber(2)); + env.pass(Blocks::ByNumber(3)); env.parachain_state_mut(|| { // Verify that Keyring::Alice now has initial balance + amount transferred - fee @@ -7776,15 +7712,15 @@ mod centrifuge { AUSD_CURRENCY_ID, transfer_amount, Box::new( - MultiLocation::new( + Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::PARA_ID), Junction::AccountId32 { network: None, id: Keyring::Bob.into(), } - ) + ] ) .into() ), @@ -7810,7 +7746,7 @@ mod centrifuge { ); }); - env.pass(Blocks::ByNumber(2)); + env.pass(Blocks::ByNumber(3)); env.parachain_state_mut(|| { // Verify that Keyring::Bob now has initial balance + amount transferred - fee @@ -7833,7 +7769,7 @@ mod centrifuge { assert_ok!(pallet_xcm::Pallet::::force_xcm_version( ::RuntimeOrigin::root(), - Box::new(MultiLocation::new(1, Junctions::Here)), + Box::new(Location::new(1, Junctions::Here)), XCM_VERSION, )); @@ -7842,12 +7778,12 @@ mod centrifuge { DOT_ASSET_ID, dot(1), Box::new( - MultiLocation::new( + Location::new( 1, - X1(Junction::AccountId32 { + Junction::AccountId32 { id: Keyring::Alice.into(), network: None, - }) + } ) .into() ), @@ -7860,14 +7796,14 @@ mod centrifuge { ); }); - env.pass(Blocks::ByNumber(1)); + env.pass(Blocks::ByNumber(2)); env.relay_state_mut(|| { assert_eq!( pallet_balances::Pallet::>::free_balance( &Keyring::Alice.into() ), - 79978937205 + 79857365914 ); }); } @@ -7883,16 +7819,16 @@ mod centrifuge { setup_xcm(&mut env); let sibling_asset_id = CurrencyId::ForeignAsset(1); - let asset_location = MultiLocation::new( + let asset_location = Location::new( 1, - X2(Parachain(T::FudgeHandle::SIBLING_ID), general_key(&[0, 1])), + [Parachain(T::FudgeHandle::SIBLING_ID), general_key(&[0, 1])], ); let meta: AssetMetadata = AssetMetadata { decimals: 18, name: BoundedVec::default(), symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, - location: Some(VersionedMultiLocation::V3(asset_location)), + location: Some(VersionedLocation::V4(asset_location)), additional: CustomMetadata { transferability: CrossChainTransferability::Xcm(XcmMetadata { // We specify a custom fee_per_second and verify below that this value is @@ -7937,15 +7873,15 @@ mod centrifuge { CurrencyId::Native, transfer_amount, Box::new( - MultiLocation::new( + Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::PARA_ID), Junction::AccountId32 { network: None, id: Keyring::Bob.into(), } - ) + ] ) .into() ), @@ -7959,7 +7895,7 @@ mod centrifuge { ); }); - env.pass(Blocks::ByNumber(2)); + env.pass(Blocks::ByNumber(3)); env.parachain_state_mut(|| { let bob_balance = @@ -7994,19 +7930,19 @@ mod centrifuge { setup_xcm(&mut env); let usdc_asset_id = CurrencyId::ForeignAsset(39); - let asset_location = MultiLocation::new( + let asset_location = Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::SIBLING_ID), general_key("0x02f3a00dd12f644daec907013b16eb6d14bf1c4cb4".as_bytes()), - ), + ], ); let meta: AssetMetadata = AssetMetadata { decimals: 6, name: BoundedVec::default(), symbol: BoundedVec::default(), existential_deposit: 1, - location: Some(VersionedMultiLocation::V3(asset_location)), + location: Some(VersionedLocation::V4(asset_location)), additional: CustomMetadata { transferability: CrossChainTransferability::Xcm(Default::default()), ..CustomMetadata::default() @@ -8050,15 +7986,15 @@ mod centrifuge { usdc_asset_id, transfer_amount, Box::new( - MultiLocation::new( + Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::PARA_ID), Junction::AccountId32 { network: None, id: Keyring::Bob.into(), } - ) + ] ) .into() ), @@ -8071,7 +8007,7 @@ mod centrifuge { ); }); - env.pass(Blocks::ByNumber(2)); + env.pass(Blocks::ByNumber(3)); env.parachain_state_mut(|| { let bob_balance = @@ -8101,15 +8037,15 @@ mod all { CurrencyId::Tranche(401, [0; 16]), 42, Box::new( - MultiLocation::new( + Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::SIBLING_ID), Junction::AccountId32 { network: None, id: Keyring::Bob.into(), } - ) + ] ) .into() ), @@ -8127,19 +8063,19 @@ mod all { let tranche_currency = CurrencyId::Tranche(401, [0; 16]); let tranche_id = WeakBoundedVec::>::force_from(tranche_currency.encode(), None); - let tranche_location = MultiLocation { - parents: 1, - interior: X3( + let tranche_location = Location::new( + 1, + [ Parachain(123), PalletInstance(42), GeneralKey { length: tranche_id.len() as u8, data: vec_to_fixed_array(tranche_id.to_vec()), }, - ), - }; - let tranche_multi_asset = VersionedMultiAsset::from(MultiAsset::from(( - AssetId::Concrete(tranche_location), + ], + ); + let tranche_asset = VersionedAsset::from(Asset::from(( + AssetId(tranche_location), Fungibility::Fungible(42), ))); @@ -8147,17 +8083,17 @@ mod all { assert_noop!( orml_xtokens::Pallet::::transfer_multiasset( RawOrigin::Signed(Keyring::Alice.into()).into(), - Box::new(tranche_multi_asset), + Box::new(tranche_asset), Box::new( - MultiLocation::new( + Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::SIBLING_ID), Junction::AccountId32 { network: None, id: Keyring::Bob.into(), } - ) + ] ) .into() ), @@ -8175,40 +8111,35 @@ mod all { let tranche_currency = CurrencyId::Tranche(401, [0; 16]); let tranche_id = WeakBoundedVec::>::force_from(tranche_currency.encode(), None); - let tranche_location = MultiLocation { - parents: 1, - interior: X3( + let tranche_location = Location::new( + 1, + [ Parachain(123), PalletInstance(42), GeneralKey { length: tranche_id.len() as u8, data: vec_to_fixed_array(tranche_id.to_vec()), }, - ), - }; - let tranche_multi_asset = MultiAsset::from(( - AssetId::Concrete(tranche_location), - Fungibility::Fungible(42), - )); + ], + ); + let tranche_asset = Asset::from((AssetId(tranche_location), Fungibility::Fungible(42))); env.parachain_state_mut(|| { assert_noop!( orml_xtokens::Pallet::::transfer_multiassets( RawOrigin::Signed(Keyring::Alice.into()).into(), - Box::new(VersionedMultiAssets::from(MultiAssets::from(vec![ - tranche_multi_asset - ]))), + Box::new(VersionedAssets::from(Assets::from(vec![tranche_asset]))), 0, Box::new( - MultiLocation::new( + Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::SIBLING_ID), Junction::AccountId32 { network: None, id: Keyring::Bob.into(), } - ) + ] ) .into() ), diff --git a/runtime/integration-tests/src/generic/cases/precompile.rs b/runtime/integration-tests/src/generic/cases/precompile.rs index c4f95cd9b7..d2e3d05df5 100644 --- a/runtime/integration-tests/src/generic/cases/precompile.rs +++ b/runtime/integration-tests/src/generic/cases/precompile.rs @@ -104,7 +104,7 @@ fn axelar_precompile_execute() { }, ], outputs: vec![], - constant: false, + constant: Some(false), state_mutability: Default::default(), } .encode_input(&[ diff --git a/runtime/integration-tests/src/generic/cases/proxy.rs b/runtime/integration-tests/src/generic/cases/proxy.rs index 7f2d059986..fdd1781e28 100644 --- a/runtime/integration-tests/src/generic/cases/proxy.rs +++ b/runtime/integration-tests/src/generic/cases/proxy.rs @@ -5,13 +5,12 @@ use frame_system::RawOrigin; use sp_runtime::{traits::StaticLookup, DispatchResult}; use staging_xcm::{ prelude::Parachain, - v3::{Junction, Junctions::*, MultiLocation, WeightLimit}, - VersionedMultiLocation, + v4::{Junction, Location, WeightLimit}, + VersionedLocation, }; use crate::{ generic::{ - cases::liquidity_pools::utils::setup_xcm, config::Runtime, env::Env, envs::{ @@ -22,6 +21,7 @@ use crate::{ self, currency::{cfg, register_currency, usd6, CurrencyInfo, Usd6}, genesis::{self, Genesis}, + xcm::setup_xcm, }, }, utils::accounts::Keyring, @@ -70,9 +70,9 @@ fn configure_proxy_and_x_transfer( env.parachain_state_mut(|| { register_currency::(Usd6, |meta| { - meta.location = Some(VersionedMultiLocation::V3(MultiLocation::new( + meta.location = Some(VersionedLocation::V4(Location::new( 1, - X1(Parachain(T::FudgeHandle::SIBLING_ID)), + Parachain(T::FudgeHandle::SIBLING_ID), ))); meta.additional.transferability = CrossChainTransferability::Xcm(XcmMetadata { fee_per_second: Some(1_000), @@ -84,15 +84,15 @@ fn configure_proxy_and_x_transfer( currency_id: Usd6.id(), amount: TRANSFER_AMOUNT, dest: Box::new( - MultiLocation::new( + Location::new( 1, - X2( + [ Parachain(T::FudgeHandle::SIBLING_ID), Junction::AccountId32 { id: TO.into(), network: None, }, - ), + ], ) .into(), ), diff --git a/runtime/integration-tests/src/generic/cases/restricted_transfers.rs b/runtime/integration-tests/src/generic/cases/restricted_transfers.rs index 7cc55bb548..ee539b0465 100644 --- a/runtime/integration-tests/src/generic/cases/restricted_transfers.rs +++ b/runtime/integration-tests/src/generic/cases/restricted_transfers.rs @@ -13,7 +13,7 @@ mod cfg { use cfg_primitives::{currency_decimals, Balance}; use cfg_types::{ - locations::Location, + locations::RestrictedTransferLocation, tokens::{CurrencyId, FilterCurrency}, }; use frame_support::{assert_ok, dispatch::RawOrigin}; @@ -51,7 +51,7 @@ mod cfg { pallet_transfer_allowlist::Pallet::::add_transfer_allowance( RawOrigin::Signed(Keyring::Alice.into()).into(), filter, - Location::Local(Keyring::Bob.to_account_id()) + RestrictedTransferLocation::Local(Keyring::Bob.to_account_id()) ) ); @@ -214,14 +214,14 @@ mod cfg { } fn transfer_ok() -> pallet_balances::Call { - pallet_balances::Call::::transfer { + pallet_balances::Call::::transfer_allow_death { dest: Keyring::Bob.into(), value: cfg(TRANSFER_AMOUNT), } } fn transfer_fail() -> pallet_balances::Call { - pallet_balances::Call::::transfer { + pallet_balances::Call::::transfer_allow_death { dest: Keyring::Charlie.into(), value: cfg(TRANSFER_AMOUNT), } diff --git a/runtime/integration-tests/src/generic/config.rs b/runtime/integration-tests/src/generic/config.rs index ef2f6e568a..df368a9015 100644 --- a/runtime/integration-tests/src/generic/config.rs +++ b/runtime/integration-tests/src/generic/config.rs @@ -9,7 +9,7 @@ use cfg_types::{ domain_address::Domain, fixed_point::{Quantity, Rate, Ratio}, investments::InvestmentPortfolio, - locations::Location, + locations::RestrictedTransferLocation, oracles::OracleKey, permissions::{PermissionScope, Role}, tokens::{AssetStringLimit, CurrencyId, CustomMetadata, FilterCurrency, TrancheCurrency}, @@ -93,7 +93,7 @@ pub trait Runtime: PriceId = OracleKey, Moment = Millis, > + orml_tokens::Config - + orml_asset_registry::Config< + + orml_asset_registry::module::Config< AssetId = CurrencyId, CustomMetadata = CustomMetadata, Balance = Balance, @@ -111,7 +111,7 @@ pub trait Runtime: Balance = Balance, NativeFungible = pallet_balances::Pallet, > + cumulus_pallet_parachain_system::Config - + parachain_info::Config + + staging_parachain_info::Config + pallet_oracle_feed::Config + pallet_oracle_collection::Config< OracleKey = OracleKey, @@ -123,8 +123,10 @@ pub trait Runtime: + pallet_proxy::Config + pallet_restricted_tokens::Config + pallet_restricted_xtokens::Config - + pallet_transfer_allowlist::Config - + pallet_liquidity_pools::Config< + + pallet_transfer_allowlist::Config< + CurrencyId = FilterCurrency, + Location = RestrictedTransferLocation, + > + pallet_liquidity_pools::Config< CurrencyId = CurrencyId, Balance = Balance, PoolId = PoolId, diff --git a/runtime/integration-tests/src/generic/envs/fudge_env.rs b/runtime/integration-tests/src/generic/envs/fudge_env.rs index fafa45e860..ffae30929b 100644 --- a/runtime/integration-tests/src/generic/envs/fudge_env.rs +++ b/runtime/integration-tests/src/generic/envs/fudge_env.rs @@ -24,6 +24,8 @@ pub trait FudgeSupport: Runtime { type FudgeHandle: FudgeHandle; } +pub type FudgeRelayRuntime = <::FudgeHandle as FudgeHandle>::RelayRuntime; + /// Evironment that uses fudge to interact with the runtime pub struct FudgeEnv { handle: T::FudgeHandle, diff --git a/runtime/integration-tests/src/generic/envs/fudge_env/handle.rs b/runtime/integration-tests/src/generic/envs/fudge_env/handle.rs index 573cb5bc1b..0e5321df5e 100644 --- a/runtime/integration-tests/src/generic/envs/fudge_env/handle.rs +++ b/runtime/integration-tests/src/generic/envs/fudge_env/handle.rs @@ -23,7 +23,7 @@ use sp_consensus_aura::{sr25519::AuthorityId, AuraApi}; use sp_consensus_babe::BabeApi; use sp_consensus_slots::SlotDuration; use sp_core::{crypto::AccountId32, ByteArray, H256}; -use sp_runtime::{traits::AccountIdLookup, BuildStorage, Storage}; +use sp_runtime::{BuildStorage, Storage}; use sp_transaction_pool::runtime_api::TaggedTransactionQueue; use tokio::runtime::Handle; @@ -78,7 +78,7 @@ pub type RelayClient = TFullClient = TFullClient; pub trait FudgeHandle { - type RelayRuntime: frame_system::Config> + type RelayRuntime: frame_system::Config + polkadot_runtime_parachains::paras::Config + polkadot_runtime_parachains::session_info::Config + polkadot_runtime_parachains::initializer::Config @@ -159,20 +159,7 @@ pub trait FudgeHandle { Self::RelayRuntime, >::default(); - let mut host_config = HostConfiguration::default(); - host_config.max_downward_message_size = 1024; - host_config.hrmp_channel_max_capacity = 100; - host_config.hrmp_channel_max_message_size = 1024; - host_config.hrmp_channel_max_total_size = 1024; - host_config.hrmp_max_parachain_outbound_channels = 10; - host_config.hrmp_max_parachain_inbound_channels = 10; - host_config.hrmp_max_message_num_per_candidate = 100; - host_config.max_upward_queue_count = 10; - host_config.max_upward_queue_size = 1024; - host_config.max_upward_message_size = 1024; - host_config.max_upward_message_num_per_candidate = 100; - - configuration.config = host_config; + configuration.config = hrmp_host_config(); state .insert_storage( @@ -185,7 +172,6 @@ pub trait FudgeHandle { state .insert_storage( frame_system::GenesisConfig:: { - code: code.to_vec(), _config: Default::default(), } .build_storage() @@ -250,8 +236,16 @@ pub trait FudgeHandle { Ok(digest) }); - RelaychainBuilder::new(init, |client| (cidp(client), dp)) - .expect("ESSENTIAL: Relaychain Builder can be created.") + let mut runtime = RelaychainBuilder::new(init, |client| (cidp(client), dp)) + .expect("ESSENTIAL: Relaychain Builder can be created."); + + runtime + .with_mut_state(|| { + frame_system::Pallet::::update_code_in_storage(code); + }) + .unwrap(); + + runtime } fn new_parachain_builder( @@ -269,7 +263,6 @@ pub trait FudgeHandle { state .insert_storage( frame_system::GenesisConfig:: { - code: code.to_vec(), _config: Default::default(), } .build_storage() @@ -287,7 +280,7 @@ pub trait FudgeHandle { .expect("ESSENTIAL: Storage can be inserted"); state .insert_storage( - parachain_info::GenesisConfig:: { + staging_parachain_info::GenesisConfig:: { _config: Default::default(), parachain_id: para_id, } @@ -345,7 +338,32 @@ pub trait FudgeHandle { }) }; - ParachainBuilder::new(para_id, init, |client| (cidp, dp(client))) - .expect("ESSENTIAL: Parachain Builder can be created.") + let mut runtime = ParachainBuilder::new(para_id, init, |client| (cidp, dp(client))) + .expect("ESSENTIAL: Parachain Builder can be created."); + + runtime + .with_mut_state(|| { + frame_system::Pallet::::update_code_in_storage(code); + }) + .unwrap(); + + runtime + } +} + +pub fn hrmp_host_config>() -> HostConfiguration { + HostConfiguration { + max_downward_message_size: 1024, + hrmp_channel_max_capacity: 100, + hrmp_channel_max_message_size: 1024, + hrmp_channel_max_total_size: 1024, + hrmp_max_parachain_outbound_channels: 10, + hrmp_max_parachain_inbound_channels: 10, + hrmp_max_message_num_per_candidate: 100, + max_upward_queue_count: 10, + max_upward_queue_size: 1024, + max_upward_message_size: 1024, + max_upward_message_num_per_candidate: 100, + ..Default::default() } } diff --git a/runtime/integration-tests/src/generic/impls.rs b/runtime/integration-tests/src/generic/impls.rs index 88916f4997..777f81cceb 100644 --- a/runtime/integration-tests/src/generic/impls.rs +++ b/runtime/integration-tests/src/generic/impls.rs @@ -188,8 +188,8 @@ impl_fudge_support!( impl_fudge_support!( FudgeAltair, - staging_kusama_runtime, - default_kusama_session_keys(), + rococo_runtime, + default_rococo_session_keys(), altair_runtime, 2088, 2089 @@ -197,8 +197,8 @@ impl_fudge_support!( impl_fudge_support!( FudgeCentrifuge, - polkadot_runtime, - default_polkadot_session_keys(), + rococo_runtime, + default_rococo_session_keys(), centrifuge_runtime, 2031, 2032 @@ -208,8 +208,6 @@ pub fn default_rococo_session_keys() -> rococo_runtime::SessionKeys { rococo_runtime::SessionKeys { grandpa: pallet_grandpa::AuthorityId::from_slice([0u8; 32].as_slice()).unwrap(), babe: pallet_babe::AuthorityId::from_slice([0u8; 32].as_slice()).unwrap(), - im_online: pallet_im_online::sr25519::AuthorityId::from_slice([0u8; 32].as_slice()) - .unwrap(), para_validator: ValidatorId::from_slice([0u8; 32].as_slice()).unwrap(), para_assignment: AssignmentId::from_slice([0u8; 32].as_slice()).unwrap(), authority_discovery: AuthorityDiscoveryId::from_slice([0u8; 32].as_slice()).unwrap(), @@ -217,29 +215,3 @@ pub fn default_rococo_session_keys() -> rococo_runtime::SessionKeys { .unwrap(), } } - -pub fn default_kusama_session_keys() -> staging_kusama_runtime::SessionKeys { - staging_kusama_runtime::SessionKeys { - grandpa: pallet_grandpa::AuthorityId::from_slice([0u8; 32].as_slice()).unwrap(), - babe: pallet_babe::AuthorityId::from_slice([0u8; 32].as_slice()).unwrap(), - im_online: pallet_im_online::sr25519::AuthorityId::from_slice([0u8; 32].as_slice()) - .unwrap(), - para_validator: ValidatorId::from_slice([0u8; 32].as_slice()).unwrap(), - para_assignment: AssignmentId::from_slice([0u8; 32].as_slice()).unwrap(), - authority_discovery: AuthorityDiscoveryId::from_slice([0u8; 32].as_slice()).unwrap(), - beefy: sp_consensus_beefy::ecdsa_crypto::AuthorityId::from_slice([0u8; 33].as_slice()) - .unwrap(), - } -} - -pub fn default_polkadot_session_keys() -> polkadot_runtime::SessionKeys { - polkadot_runtime::SessionKeys { - grandpa: pallet_grandpa::AuthorityId::from_slice([0u8; 32].as_slice()).unwrap(), - babe: pallet_babe::AuthorityId::from_slice([0u8; 32].as_slice()).unwrap(), - im_online: pallet_im_online::sr25519::AuthorityId::from_slice([0u8; 32].as_slice()) - .unwrap(), - para_validator: ValidatorId::from_slice([0u8; 32].as_slice()).unwrap(), - para_assignment: AssignmentId::from_slice([0u8; 32].as_slice()).unwrap(), - authority_discovery: AuthorityDiscoveryId::from_slice([0u8; 32].as_slice()).unwrap(), - } -} diff --git a/runtime/integration-tests/src/generic/utils/currency.rs b/runtime/integration-tests/src/generic/utils/currency.rs index 4dff21775e..5715ae3171 100644 --- a/runtime/integration-tests/src/generic/utils/currency.rs +++ b/runtime/integration-tests/src/generic/utils/currency.rs @@ -31,7 +31,7 @@ pub trait CurrencyInfo { &self.symbol() } - fn location(&self) -> Option { + fn location(&self) -> Option { None } @@ -153,7 +153,7 @@ pub fn register_currency( ) { let mut meta = currency.metadata(); adaptor(&mut meta); - assert_ok!(orml_asset_registry::Pallet::::register_asset( + assert_ok!(orml_asset_registry::module::Pallet::::register_asset( ::RuntimeOrigin::root(), meta, Some(currency.id()) diff --git a/runtime/integration-tests/src/generic/utils/genesis.rs b/runtime/integration-tests/src/generic/utils/genesis.rs index 102f1d7ac1..4f6e306f7d 100644 --- a/runtime/integration-tests/src/generic/utils/genesis.rs +++ b/runtime/integration-tests/src/generic/utils/genesis.rs @@ -54,7 +54,7 @@ pub fn tokens(values: Vec<(CurrencyId, Balance)>) -> impl BuildStora } pub fn assets(currency_ids: Vec>) -> impl BuildStorage { - orml_asset_registry::GenesisConfig:: { + orml_asset_registry::module::GenesisConfig:: { assets: currency_ids .into_iter() .map(|currency_id| (currency_id.id(), currency_id.metadata().encode())) diff --git a/runtime/integration-tests/src/generic/utils/mod.rs b/runtime/integration-tests/src/generic/utils/mod.rs index 4ccf3176c4..9434463aca 100644 --- a/runtime/integration-tests/src/generic/utils/mod.rs +++ b/runtime/integration-tests/src/generic/utils/mod.rs @@ -11,6 +11,7 @@ pub mod currency; pub mod democracy; pub mod genesis; +pub mod xcm; use cfg_primitives::{AccountId, Balance, CollectionId, ItemId, PoolId, TrancheId}; use cfg_traits::{investments::TrancheCurrency as _, Seconds, TimeAsSecs}; diff --git a/runtime/integration-tests/src/generic/utils/xcm.rs b/runtime/integration-tests/src/generic/utils/xcm.rs new file mode 100644 index 0000000000..97c788071b --- /dev/null +++ b/runtime/integration-tests/src/generic/utils/xcm.rs @@ -0,0 +1,69 @@ +use frame_support::{assert_ok, traits::OriginTrait}; +use polkadot_parachain_primitives::primitives::Id; +use staging_xcm::{ + prelude::XCM_VERSION, + v4::{Junction, Location}, +}; + +use crate::generic::{ + config::Runtime, + env::{Blocks, Env}, + envs::fudge_env::{handle::FudgeHandle, FudgeEnv, FudgeRelayRuntime, FudgeSupport}, +}; + +pub fn setup_xcm(env: &mut FudgeEnv) { + env.parachain_state_mut(|| { + // Set the XCM version used when sending XCM messages to sibling. + assert_ok!(pallet_xcm::Pallet::::force_xcm_version( + ::RuntimeOrigin::root(), + Box::new(Location::new( + 1, + Junction::Parachain(T::FudgeHandle::SIBLING_ID), + )), + XCM_VERSION, + )); + }); + + env.sibling_state_mut(|| { + // Set the XCM version used when sending XCM messages to parachain. + assert_ok!(pallet_xcm::Pallet::::force_xcm_version( + ::RuntimeOrigin::root(), + Box::new(Location::new( + 1, + Junction::Parachain(T::FudgeHandle::PARA_ID), + )), + XCM_VERSION, + )); + }); + + env.relay_state_mut(|| { + assert_ok!(polkadot_runtime_parachains::hrmp::Pallet::< + FudgeRelayRuntime, + >::force_open_hrmp_channel( + as frame_system::Config>::RuntimeOrigin::root(), + Id::from(T::FudgeHandle::PARA_ID), + Id::from(T::FudgeHandle::SIBLING_ID), + 10, + 1024, + )); + + assert_ok!(polkadot_runtime_parachains::hrmp::Pallet::< + FudgeRelayRuntime, + >::force_open_hrmp_channel( + as frame_system::Config>::RuntimeOrigin::root(), + Id::from(T::FudgeHandle::SIBLING_ID), + Id::from(T::FudgeHandle::PARA_ID), + 10, + 1024, + )); + + assert_ok!(polkadot_runtime_parachains::hrmp::Pallet::< + FudgeRelayRuntime, + >::force_process_hrmp_open( + as frame_system::Config>::RuntimeOrigin::root(), + 2, + )); + }); + + env.pass(Blocks::ByNumber(1)); +} diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 669d2c3e87..0689b0e167 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "nightly-2024-02-06" # 1.78.0-nightly +channel = "1.77.2" components = [ "rustfmt", "clippy" ] targets = [ "wasm32-unknown-unknown" ] profile = "minimal" diff --git a/scripts/export_parachain_files.sh b/scripts/export_parachain_files.sh index 8fef73db32..74b8ebbce2 100755 --- a/scripts/export_parachain_files.sh +++ b/scripts/export_parachain_files.sh @@ -25,5 +25,5 @@ if [[ $should_build == "true" ]]; then fi echo "Exporting State & Wasm" -$PWD/target/release/centrifuge-chain export-genesis-state --chain node/res/$chain_name-spec-raw.json > $chain_name-genesis-state +$PWD/target/release/centrifuge-chain export-genesis-head --chain node/res/$chain_name-spec-raw.json > $chain_name-genesis-state $PWD/target/release/centrifuge-chain export-genesis-wasm --chain node/res/$chain_name-spec-raw.json > $chain_name-genesis-wasm diff --git a/scripts/init.sh b/scripts/init.sh index 911eca2544..5f38851df3 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -74,10 +74,10 @@ onboard-parachain) wasm_location="$onboard_dir/${parachain}-${para_id}.wasm" if [ "$docker_onboard" == "true" ]; then - genesis=$(docker run centrifugeio/centrifuge-chain:${cc_docker_image_tag} export-genesis-state --chain="${parachain}" --parachain-id="${para_id}") + genesis=$(docker run centrifugeio/centrifuge-chain:${cc_docker_image_tag} export-genesis-head --chain="${parachain}") docker run centrifugeio/centrifuge-chain:${cc_docker_image_tag} export-genesis-wasm --chain="${parachain}" > $wasm_location else - genesis=$(./target/release/centrifuge-chain export-genesis-state --chain="${parachain}" --parachain-id="${para_id}") + genesis=$(./target/release/centrifuge-chain export-genesis-head --chain="${parachain}") ./target/release/centrifuge-chain export-genesis-wasm --chain="${parachain}" > $wasm_location fi diff --git a/scripts/install_toolchain.sh b/scripts/install_toolchain.sh index 5d924e8559..8f579f0a25 100755 --- a/scripts/install_toolchain.sh +++ b/scripts/install_toolchain.sh @@ -11,7 +11,10 @@ echo "*** Initializing WASM build environment" rustup update $RUST_TOOLCHAIN rustup toolchain install $RUST_TOOLCHAIN +rustup toolchain install nightly rustup default $RUST_TOOLCHAIN rustup component add rustfmt +rustup component add rust-src +rustup component add --toolchain nightly rustfmt rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN diff --git a/scripts/runtime_benchmarks.sh b/scripts/runtime_benchmarks.sh index ba363a395a..06eff7e9df 100755 --- a/scripts/runtime_benchmarks.sh +++ b/scripts/runtime_benchmarks.sh @@ -41,7 +41,7 @@ echo "Benchmarking pallets for runtime ${runtime}..." if [[ $runtime == "development" ]]; then runtime_path="runtime/development" - chain="development-local" + chain="development" elif [[ $runtime == "centrifuge" ]]; then runtime_path="runtime/centrifuge" diff --git a/scripts/update-parity-only-deps.sh b/scripts/update-parity-only-deps.sh deleted file mode 100755 index c95750a999..0000000000 --- a/scripts/update-parity-only-deps.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash - -declare -a deps=("https://github.com/paritytech/substrate" "https://github.com/paritytech/cumulus" "https://github.com/paritytech/polkadot" "https://github.com/open-web3-stack/open-runtime-module-library" "https://github.com/centrifuge/chainbridge-substrate" "https://github.com/centrifuge/unique-assets" ) -declare -a parity_deps=() - -for dep in ${deps[@]}; do - echo $dep - tomls=$(find ./ -type f -iname "*.toml" -exec grep -l "${dep}" {} \;) - for tml in ${tomls[@]}; do - inner_deps=$(cat $tml | grep "${dep}" | awk '{print $1}') - for indep in ${inner_deps}; do - if [[ $indep = "grandpa" ]] - then - parity_deps+=("sc-finality-grandpa") - elif [[ $indep = "grandpa-primitives" ]] - then - parity_deps+=("sp-finality-grandpa") - else - parity_deps+=($indep) - fi - done - done -done - -uniq_deps=($(for v in "${parity_deps[@]}"; do echo "$v";done| sort| uniq| xargs)) - -update_params="" -for value in "${uniq_deps[@]}" -do - update_params+=" -p $value" -done - -echo "${update_params}" - -cargo update $update_params - From b1a000b3f19ddbae32957ff18d5de0c8caf6dc07 Mon Sep 17 00:00:00 2001 From: William Freudenberger Date: Tue, 11 Jun 2024 10:38:35 +0200 Subject: [PATCH 14/21] Release v0.11.0 (#1868) * fix: deprecated CLI * feat: shared spec version * docs: fix comment * chore: update centrifuge weights * chore: altair weights * chore: update dev weights --- Cargo.lock | 8 +- Cargo.toml | 1 + node/Cargo.toml | 2 +- runtime/altair/Cargo.toml | 2 +- runtime/altair/src/lib.rs | 4 +- runtime/altair/src/migrations.rs | 2 +- .../src/weights/cumulus_pallet_xcmp_queue.rs | 109 ++- runtime/altair/src/weights/mod.rs | 1 - runtime/altair/src/weights/pallet_anchors.rs | 911 +++++++++-------- runtime/altair/src/weights/pallet_balances.rs | 91 +- .../src/weights/pallet_block_rewards.rs | 47 +- .../src/weights/pallet_collator_allowlist.rs | 35 +- .../src/weights/pallet_collator_selection.rs | 311 +++--- .../altair/src/weights/pallet_collective.rs | 331 ++++--- .../altair/src/weights/pallet_democracy.rs | 493 +++++----- .../src/weights/pallet_elections_phragmen.rs | 335 +++---- runtime/altair/src/weights/pallet_fees.rs | 17 +- runtime/altair/src/weights/pallet_identity.rs | 460 +++++---- .../src/weights/pallet_interest_accrual.rs | 17 +- .../altair/src/weights/pallet_investments.rs | 169 ++-- runtime/altair/src/weights/pallet_keystore.rs | 57 +- .../src/weights/pallet_liquidity_rewards.rs | 141 ++- runtime/altair/src/weights/pallet_loans.rs | 559 ++++++----- runtime/altair/src/weights/pallet_multisig.rs | 103 +- .../src/weights/pallet_oracle_collection.rs | 93 +- .../altair/src/weights/pallet_oracle_feed.rs | 37 +- .../altair/src/weights/pallet_order_book.rs | 133 ++- .../altair/src/weights/pallet_permissions.rs | 73 +- .../altair/src/weights/pallet_pool_fees.rs | 141 ++- .../src/weights/pallet_pool_registry.rs | 245 +++-- .../altair/src/weights/pallet_pool_system.rs | 393 ++++---- runtime/altair/src/weights/pallet_preimage.rs | 235 +++-- runtime/altair/src/weights/pallet_proxy.rs | 165 ++-- runtime/altair/src/weights/pallet_remarks.rs | 17 +- .../src/weights/pallet_restricted_tokens.rs | 177 ++-- .../altair/src/weights/pallet_scheduler.rs | 133 +-- runtime/altair/src/weights/pallet_session.rs | 45 +- .../altair/src/weights/pallet_timestamp.rs | 25 +- .../altair/src/weights/pallet_token_mux.rs | 87 +- .../src/weights/pallet_transfer_allowlist.rs | 209 ++-- runtime/altair/src/weights/pallet_treasury.rs | 139 --- runtime/altair/src/weights/pallet_uniques.rs | 397 ++++---- runtime/altair/src/weights/pallet_utility.rs | 41 +- runtime/altair/src/weights/pallet_vesting.rs | 253 ++--- runtime/altair/src/weights/pallet_xcm.rs | 332 +++---- runtime/centrifuge/Cargo.toml | 2 +- runtime/centrifuge/src/lib.rs | 4 +- runtime/centrifuge/src/migrations.rs | 4 +- .../src/weights/cumulus_pallet_xcmp_queue.rs | 109 ++- runtime/centrifuge/src/weights/mod.rs | 1 - .../centrifuge/src/weights/pallet_anchors.rs | 911 +++++++++-------- .../centrifuge/src/weights/pallet_balances.rs | 91 +- .../src/weights/pallet_block_rewards.rs | 47 +- .../src/weights/pallet_collator_allowlist.rs | 35 +- .../src/weights/pallet_collator_selection.rs | 322 +++--- .../src/weights/pallet_collective.rs | 331 ++++--- .../src/weights/pallet_democracy.rs | 493 +++++----- .../src/weights/pallet_elections_phragmen.rs | 337 ++++--- runtime/centrifuge/src/weights/pallet_fees.rs | 17 +- .../centrifuge/src/weights/pallet_identity.rs | 460 +++++---- .../src/weights/pallet_interest_accrual.rs | 17 +- .../src/weights/pallet_investments.rs | 169 ++-- .../centrifuge/src/weights/pallet_keystore.rs | 57 +- .../src/weights/pallet_liquidity_rewards.rs | 141 ++- .../centrifuge/src/weights/pallet_loans.rs | 559 ++++++----- .../centrifuge/src/weights/pallet_multisig.rs | 101 +- .../src/weights/pallet_oracle_collection.rs | 93 +- .../src/weights/pallet_oracle_feed.rs | 37 +- .../src/weights/pallet_order_book.rs | 133 ++- .../src/weights/pallet_permissions.rs | 73 +- .../src/weights/pallet_pool_fees.rs | 141 ++- .../src/weights/pallet_pool_registry.rs | 249 +++-- .../src/weights/pallet_pool_system.rs | 393 ++++---- .../centrifuge/src/weights/pallet_preimage.rs | 235 +++-- .../centrifuge/src/weights/pallet_proxy.rs | 161 ++- .../centrifuge/src/weights/pallet_remarks.rs | 17 +- .../src/weights/pallet_restricted_tokens.rs | 177 ++-- .../src/weights/pallet_scheduler.rs | 133 +-- .../centrifuge/src/weights/pallet_session.rs | 45 +- .../src/weights/pallet_timestamp.rs | 25 +- .../src/weights/pallet_token_mux.rs | 87 +- .../src/weights/pallet_transfer_allowlist.rs | 209 ++-- .../centrifuge/src/weights/pallet_treasury.rs | 139 --- .../centrifuge/src/weights/pallet_uniques.rs | 397 ++++---- .../centrifuge/src/weights/pallet_utility.rs | 41 +- .../centrifuge/src/weights/pallet_vesting.rs | 251 ++--- runtime/centrifuge/src/weights/pallet_xcm.rs | 332 +++---- runtime/development/Cargo.toml | 2 +- runtime/development/src/lib.rs | 4 +- runtime/development/src/migrations.rs | 2 +- .../src/weights/cumulus_pallet_xcmp_queue.rs | 111 ++- .../development/src/weights/frame_system.rs | 47 +- runtime/development/src/weights/mod.rs | 2 +- .../development/src/weights/pallet_anchors.rs | 913 +++++++++--------- .../src/weights/pallet_balances.rs | 93 +- .../src/weights/pallet_block_rewards.rs | 47 +- .../src/weights/pallet_collator_allowlist.rs | 31 +- .../src/weights/pallet_collator_selection.rs | 316 +++--- .../src/weights/pallet_collective.rs | 333 ++++--- .../src/weights/pallet_democracy.rs | 507 +++++----- .../src/weights/pallet_elections_phragmen.rs | 371 ++++--- .../development/src/weights/pallet_fees.rs | 19 +- .../src/weights/pallet_identity.rs | 462 +++++---- .../src/weights/pallet_interest_accrual.rs | 19 +- .../src/weights/pallet_investments.rs | 179 ++-- .../src/weights/pallet_keystore.rs | 59 +- .../src/weights/pallet_liquidity_rewards.rs | 158 +++ .../development/src/weights/pallet_loans.rs | 569 ++++++----- .../src/weights/pallet_multisig.rs | 105 +- .../src/weights/pallet_oracle_collection.rs | 99 +- .../src/weights/pallet_oracle_feed.rs | 39 +- .../src/weights/pallet_order_book.rs | 135 ++- .../src/weights/pallet_permissions.rs | 75 +- .../src/weights/pallet_pool_fees.rs | 143 ++- .../src/weights/pallet_pool_registry.rs | 251 +++-- .../src/weights/pallet_pool_system.rs | 395 ++++---- .../src/weights/pallet_preimage.rs | 237 +++-- .../development/src/weights/pallet_proxy.rs | 163 ++-- .../development/src/weights/pallet_remarks.rs | 19 +- .../src/weights/pallet_restricted_tokens.rs | 179 ++-- .../src/weights/pallet_scheduler.rs | 135 +-- .../development/src/weights/pallet_session.rs | 35 +- .../src/weights/pallet_timestamp.rs | 29 +- .../src/weights/pallet_token_mux.rs | 89 +- .../src/weights/pallet_transfer_allowlist.rs | 211 ++-- .../src/weights/pallet_treasury.rs | 139 --- .../development/src/weights/pallet_uniques.rs | 449 ++++----- .../development/src/weights/pallet_utility.rs | 43 +- .../development/src/weights/pallet_vesting.rs | 285 +++--- runtime/development/src/weights/pallet_xcm.rs | 334 +++---- scripts/export_parachain_files.sh | 2 +- scripts/init.sh | 4 +- 132 files changed, 11777 insertions(+), 11214 deletions(-) delete mode 100644 runtime/altair/src/weights/pallet_treasury.rs delete mode 100644 runtime/centrifuge/src/weights/pallet_treasury.rs create mode 100644 runtime/development/src/weights/pallet_liquidity_rewards.rs delete mode 100644 runtime/development/src/weights/pallet_treasury.rs diff --git a/Cargo.lock b/Cargo.lock index b24b43185f..19a2c77ca9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -121,7 +121,7 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "altair-runtime" -version = "0.10.35" +version = "0.11.0" dependencies = [ "axelar-gateway-precompile", "cfg-primitives", @@ -1371,7 +1371,7 @@ dependencies = [ [[package]] name = "centrifuge-chain" -version = "0.10.39" +version = "0.11.0" dependencies = [ "altair-runtime", "async-trait", @@ -1464,7 +1464,7 @@ dependencies = [ [[package]] name = "centrifuge-runtime" -version = "0.10.29" +version = "0.11.0" dependencies = [ "axelar-gateway-precompile", "cfg-primitives", @@ -3093,7 +3093,7 @@ dependencies = [ [[package]] name = "development-runtime" -version = "0.10.46" +version = "0.11.0" dependencies = [ "axelar-gateway-precompile", "cfg-primitives", diff --git a/Cargo.toml b/Cargo.toml index 03a3b0506a..72ca487ae2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,6 +52,7 @@ license = "LGPL-3.0" homepage = "https://centrifuge.io/" repository = "https://github.com/centrifuge/centrifuge-chain" documentation = "https://reference.centrifuge.io/centrifuge_chain/index.html" +version = "0.11.0" [workspace.dependencies] hex-literal = { version = "0.4.1" } diff --git a/node/Cargo.toml b/node/Cargo.toml index 774011eaa1..4976195d90 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -6,10 +6,10 @@ is-it-maintained-open-issues = { repository = "centrifuge/centrifuge-chain" } [package] name = "centrifuge-chain" -version = "0.10.39" description = "Centrifuge chain implementation in Rust." build = "build.rs" default-run = "centrifuge-chain" +version.workspace = true authors.workspace = true edition.workspace = true license.workspace = true diff --git a/runtime/altair/Cargo.toml b/runtime/altair/Cargo.toml index 91a5c59e12..0f6ee23f09 100644 --- a/runtime/altair/Cargo.toml +++ b/runtime/altair/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "altair-runtime" -version = "0.10.35" build = "build.rs" +version.workspace = true authors.workspace = true edition.workspace = true license.workspace = true diff --git a/runtime/altair/src/lib.rs b/runtime/altair/src/lib.rs index 64106e2e71..891917613e 100644 --- a/runtime/altair/src/lib.rs +++ b/runtime/altair/src/lib.rs @@ -163,7 +163,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("altair"), impl_name: create_runtime_str!("altair"), authoring_version: 1, - spec_version: 1035, + spec_version: 1100, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 2, @@ -1967,7 +1967,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - migrations::UpgradeAltair1035, + migrations::UpgradeAltair1100, >; // Frame Order in this block dictates the index of each one in the metadata diff --git a/runtime/altair/src/migrations.rs b/runtime/altair/src/migrations.rs index 13fff00f13..300d5e24f9 100644 --- a/runtime/altair/src/migrations.rs +++ b/runtime/altair/src/migrations.rs @@ -17,7 +17,7 @@ const IDENTITY_MIGRATION_KEY_LIMIT: u64 = 1000; /// The migration set for Altair @ Kusama. /// It includes all the migrations that have to be applied on that chain. -pub type UpgradeAltair1035 = ( +pub type UpgradeAltair1100 = ( runtime_common::migrations::increase_storage_version::Migration, runtime_common::migrations::increase_storage_version::Migration, runtime_common::migrations::increase_storage_version::Migration, diff --git a/runtime/altair/src/weights/cumulus_pallet_xcmp_queue.rs b/runtime/altair/src/weights/cumulus_pallet_xcmp_queue.rs index 644b444fb3..d5b8e21dfe 100644 --- a/runtime/altair/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/runtime/altair/src/weights/cumulus_pallet_xcmp_queue.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `cumulus_pallet_xcmp_queue` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=cumulus_pallet_xcmp_queue // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/cumulus_pallet_xcmp_queue.rs @@ -32,40 +31,106 @@ use core::marker::PhantomData; /// Weight functions for `cumulus_pallet_xcmp_queue`. pub struct WeightInfo(PhantomData); impl cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo { - /// Storage: XcmpQueue QueueConfig (r:1 w:1) - /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:1) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_config_with_u32() -> Weight { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1594` - // Minimum execution time: 9_007_000 picoseconds. - Weight::from_parts(9_237_000, 0) + // Minimum execution time: 6_182_000 picoseconds. + Weight::from_parts(6_412_000, 0) .saturating_add(Weight::from_parts(0, 1594)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0) + /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn enqueue_xcmp_message() -> Weight { - Weight::zero() + // Proof Size summary in bytes: + // Measured: `115` + // Estimated: `3517` + // Minimum execution time: 17_342_000 picoseconds. + Weight::from_parts(17_753_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) } - + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn suspend_channel() -> Weight { - Weight::zero() + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 3_506_000 picoseconds. + Weight::from_parts(3_737_000, 0) + .saturating_add(Weight::from_parts(0, 1594)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn resume_channel() -> Weight { - Weight::zero() + // Proof Size summary in bytes: + // Measured: `144` + // Estimated: `1629` + // Minimum execution time: 4_809_000 picoseconds. + Weight::from_parts(5_009_000, 0) + .saturating_add(Weight::from_parts(0, 1629)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - fn take_first_concatenated_xcm() -> Weight { - Weight::zero() + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 10_980_000 picoseconds. + Weight::from_parts(11_281_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0) + /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn on_idle_good_msg() -> Weight { - Weight::from_parts(1, 1) + // Proof Size summary in bytes: + // Measured: `65744` + // Estimated: `69209` + // Minimum execution time: 128_890_000 picoseconds. + Weight::from_parts(130_303_000, 0) + .saturating_add(Weight::from_parts(0, 69209)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(5)) } - - fn on_idle_large_msg() -> Weight { - Weight::from_parts(1, 1) + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65743` + // Estimated: `69208` + // Minimum execution time: 56_836_000 picoseconds. + Weight::from_parts(60_172_000, 0) + .saturating_add(Weight::from_parts(0, 69208)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } } diff --git a/runtime/altair/src/weights/mod.rs b/runtime/altair/src/weights/mod.rs index 3c26b723b1..659c89486d 100644 --- a/runtime/altair/src/weights/mod.rs +++ b/runtime/altair/src/weights/mod.rs @@ -43,7 +43,6 @@ pub mod pallet_session; pub mod pallet_timestamp; pub mod pallet_token_mux; pub mod pallet_transfer_allowlist; -pub mod pallet_treasury; pub mod pallet_uniques; pub mod pallet_utility; pub mod pallet_vesting; diff --git a/runtime/altair/src/weights/pallet_anchors.rs b/runtime/altair/src/weights/pallet_anchors.rs index e74f9f63f7..dc0d021c73 100644 --- a/runtime/altair/src/weights/pallet_anchors.rs +++ b/runtime/altair/src/weights/pallet_anchors.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_anchors` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_anchors // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_anchors.rs @@ -32,482 +31,482 @@ use core::marker::PhantomData; /// Weight functions for `pallet_anchors`. pub struct WeightInfo(PhantomData); impl pallet_anchors::WeightInfo for WeightInfo { - /// Storage: Anchor AnchorEvictDates (r:1 w:0) - /// Proof: Anchor AnchorEvictDates (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) - /// Storage: Anchor PreCommits (r:1 w:1) - /// Proof: Anchor PreCommits (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen) - /// Storage: Fees FeeBalances (r:1 w:0) - /// Proof: Fees FeeBalances (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) + /// Storage: `Anchor::AnchorEvictDates` (r:1 w:0) + /// Proof: `Anchor::AnchorEvictDates` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `Anchor::PreCommits` (r:1 w:1) + /// Proof: `Anchor::PreCommits` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `Fees::FeeBalances` (r:1 w:0) + /// Proof: `Fees::FeeBalances` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) fn pre_commit() -> Weight { // Proof Size summary in bytes: - // Measured: `334` + // Measured: `301` // Estimated: `3581` - // Minimum execution time: 42_600_000 picoseconds. - Weight::from_parts(43_291_000, 0) + // Minimum execution time: 38_802_000 picoseconds. + Weight::from_parts(39_623_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Anchor AnchorEvictDates (r:1 w:1) - /// Proof: Anchor AnchorEvictDates (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) - /// Storage: Anchor PreCommits (r:1 w:1) - /// Proof: Anchor PreCommits (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen) - /// Storage: Fees FeeBalances (r:1 w:0) - /// Proof: Fees FeeBalances (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Authorship Author (r:1 w:0) - /// Proof: Authorship Author (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: System Digest (r:1 w:0) - /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Anchor LatestAnchorIndex (r:1 w:1) - /// Proof: Anchor LatestAnchorIndex (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Anchor AnchorIndexes (r:0 w:1) - /// Proof: Anchor AnchorIndexes (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - /// Storage: unknown `0xdb4faa73ca6d2016e53c7156087c176b79b169c409b8a0063a07964f3187f9e9` (r:0 w:1) - /// Proof Skipped: unknown `0xdb4faa73ca6d2016e53c7156087c176b79b169c409b8a0063a07964f3187f9e9` (r:0 w:1) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Anchor::AnchorEvictDates` (r:1 w:1) + /// Proof: `Anchor::AnchorEvictDates` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `Anchor::PreCommits` (r:1 w:1) + /// Proof: `Anchor::PreCommits` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `Fees::FeeBalances` (r:1 w:0) + /// Proof: `Fees::FeeBalances` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Authorship::Author` (r:1 w:0) + /// Proof: `Authorship::Author` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + /// Storage: `System::Digest` (r:1 w:0) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Anchor::LatestAnchorIndex` (r:1 w:1) + /// Proof: `Anchor::LatestAnchorIndex` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Anchor::AnchorIndexes` (r:0 w:1) + /// Proof: `Anchor::AnchorIndexes` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xdb4faa73ca6d2016e53c7156087c176b79b169c409b8a0063a07964f3187f9e9` (r:0 w:1) + /// Proof: UNKNOWN KEY `0xdb4faa73ca6d2016e53c7156087c176b79b169c409b8a0063a07964f3187f9e9` (r:0 w:1) fn commit() -> Weight { // Proof Size summary in bytes: - // Measured: `668` + // Measured: `635` // Estimated: `3581` - // Minimum execution time: 74_199_000 picoseconds. - Weight::from_parts(74_830_000, 0) + // Minimum execution time: 65_622_000 picoseconds. + Weight::from_parts(66_775_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: Anchor PreCommits (r:100 w:100) - /// Proof: Anchor PreCommits (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen) + /// Storage: `Anchor::PreCommits` (r:100 w:100) + /// Proof: `Anchor::PreCommits` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn evict_pre_commits() -> Weight { // Proof Size summary in bytes: // Measured: `12450` // Estimated: `260090` - // Minimum execution time: 2_299_661_000 picoseconds. - Weight::from_parts(2_331_731_000, 0) + // Minimum execution time: 1_940_047_000 picoseconds. + Weight::from_parts(1_960_465_000, 0) .saturating_add(Weight::from_parts(0, 260090)) .saturating_add(T::DbWeight::get().reads(100)) .saturating_add(T::DbWeight::get().writes(100)) } - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Anchor LatestEvictedDate (r:1 w:1) - /// Proof: Anchor LatestEvictedDate (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Anchor EvictedAnchorRoots (r:100 w:100) - /// Proof: Anchor EvictedAnchorRoots (max_values: None, max_size: Some(65), added: 2540, mode: MaxEncodedLen) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72010000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72010000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72020000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72020000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72030000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72030000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72040000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72040000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72050000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72050000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72060000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72060000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72070000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72070000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72080000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72080000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72090000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72090000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720a0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720a0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720b0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720b0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720c0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720c0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720d0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720d0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720e0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720e0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720f0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720f0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72100000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72100000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72110000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72110000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72120000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72120000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72130000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72130000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72140000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72140000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72150000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72150000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72160000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72160000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72170000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72170000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72180000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72180000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72190000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72190000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721a0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721a0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721b0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721b0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721c0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721c0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721d0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721d0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721e0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721e0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721f0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721f0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72200000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72200000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72210000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72210000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72220000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72220000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72230000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72230000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72240000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72240000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72250000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72250000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72260000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72260000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72270000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72270000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72280000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72280000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72290000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72290000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722a0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722a0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722b0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722b0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722c0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722c0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722d0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722d0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722e0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722e0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722f0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722f0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72300000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72300000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72310000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72310000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72320000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72320000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72330000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72330000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72340000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72340000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72350000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72350000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72360000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72360000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72370000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72370000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72380000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72380000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72390000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72390000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723a0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723a0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723b0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723b0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723c0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723c0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723d0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723d0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723e0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723e0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723f0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723f0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72400000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72400000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72410000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72410000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72420000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72420000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72430000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72430000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72440000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72440000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72450000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72450000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72460000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72460000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72470000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72470000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72480000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72480000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72490000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72490000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724a0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724a0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724b0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724b0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724c0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724c0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724d0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724d0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724e0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724e0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724f0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724f0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72500000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72500000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72510000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72510000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72520000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72520000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72530000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72530000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72540000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72540000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72550000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72550000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72560000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72560000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72570000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72570000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72580000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72580000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72590000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72590000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725a0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725a0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725b0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725b0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725c0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725c0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725d0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725d0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725e0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725e0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725f0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725f0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72600000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72600000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72610000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72610000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72620000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72620000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72630000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72630000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72640000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72640000` (r:1 w:0) - /// Storage: Anchor LatestEvictedAnchorIndex (r:1 w:1) - /// Proof: Anchor LatestEvictedAnchorIndex (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Anchor LatestAnchorIndex (r:1 w:0) - /// Proof: Anchor LatestAnchorIndex (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Anchor AnchorIndexes (r:100 w:100) - /// Proof: Anchor AnchorIndexes (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - /// Storage: Anchor AnchorEvictDates (r:100 w:100) - /// Proof: Anchor AnchorEvictDates (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) - /// Storage: unknown `0x01d5998dcaa249dfa2a455ae4c045d761623f268227068931dbabca3732aa41f` (r:1 w:1) - /// Proof Skipped: unknown `0x01d5998dcaa249dfa2a455ae4c045d761623f268227068931dbabca3732aa41f` (r:1 w:1) - /// Storage: unknown `0x04575ee0699f1fa86cccfdcf4285aa81b9bfa0f8837cf533346d722970f1a704` (r:1 w:1) - /// Proof Skipped: unknown `0x04575ee0699f1fa86cccfdcf4285aa81b9bfa0f8837cf533346d722970f1a704` (r:1 w:1) - /// Storage: unknown `0x0959721f200e92d5090cee3c2c4546c11f9bfd16ded1e70e6781d2402880f1f3` (r:1 w:1) - /// Proof Skipped: unknown `0x0959721f200e92d5090cee3c2c4546c11f9bfd16ded1e70e6781d2402880f1f3` (r:1 w:1) - /// Storage: unknown `0x0a958b15afac1ffb0c6e73c553bd8b4ba94ad2d0cc118dcd2a7bc8802e2e772a` (r:1 w:1) - /// Proof Skipped: unknown `0x0a958b15afac1ffb0c6e73c553bd8b4ba94ad2d0cc118dcd2a7bc8802e2e772a` (r:1 w:1) - /// Storage: unknown `0x0c4c531cd9dcf8573a6350d0ac9fb060d273156bdee4fdae0043b6fee5bda27c` (r:1 w:1) - /// Proof Skipped: unknown `0x0c4c531cd9dcf8573a6350d0ac9fb060d273156bdee4fdae0043b6fee5bda27c` (r:1 w:1) - /// Storage: unknown `0x0cd3f3ee9420f9c3b2e70862996e8d02e87d1f148632a36b8f72c9548b10b856` (r:1 w:1) - /// Proof Skipped: unknown `0x0cd3f3ee9420f9c3b2e70862996e8d02e87d1f148632a36b8f72c9548b10b856` (r:1 w:1) - /// Storage: unknown `0x10876da12e1227a2c04872ce311f768aaf3e21458e6ad1c04f044c97fe8e214e` (r:1 w:1) - /// Proof Skipped: unknown `0x10876da12e1227a2c04872ce311f768aaf3e21458e6ad1c04f044c97fe8e214e` (r:1 w:1) - /// Storage: unknown `0x10b360a66313de6ab2d43019c5fd7ea0db088efb3e1d4a24d89775e66e089cff` (r:1 w:1) - /// Proof Skipped: unknown `0x10b360a66313de6ab2d43019c5fd7ea0db088efb3e1d4a24d89775e66e089cff` (r:1 w:1) - /// Storage: unknown `0x16d33ce142442dfbe857e2c9e0648d026c6bb367d467d6922c2c1133aaa3d7b8` (r:1 w:1) - /// Proof Skipped: unknown `0x16d33ce142442dfbe857e2c9e0648d026c6bb367d467d6922c2c1133aaa3d7b8` (r:1 w:1) - /// Storage: unknown `0x16e133fb9e42d5a2a9a2e21b2e0efd735fccb527162a21cf520c3aecd84c89ed` (r:1 w:1) - /// Proof Skipped: unknown `0x16e133fb9e42d5a2a9a2e21b2e0efd735fccb527162a21cf520c3aecd84c89ed` (r:1 w:1) - /// Storage: unknown `0x16fcb5e799a48fa04deaaaa71c85bc8e9126bd4b5dbcb3a1f8068ab14bc1c26f` (r:1 w:1) - /// Proof Skipped: unknown `0x16fcb5e799a48fa04deaaaa71c85bc8e9126bd4b5dbcb3a1f8068ab14bc1c26f` (r:1 w:1) - /// Storage: unknown `0x1b3289127bc95ed117e77d479ccd3ac4477ef8d32df7265bbd42c75bf1945464` (r:1 w:1) - /// Proof Skipped: unknown `0x1b3289127bc95ed117e77d479ccd3ac4477ef8d32df7265bbd42c75bf1945464` (r:1 w:1) - /// Storage: unknown `0x1ecb14235f21b57f49e32ac4f35a1af6a71f96867f0bc61bc5905b8d437b6bde` (r:1 w:1) - /// Proof Skipped: unknown `0x1ecb14235f21b57f49e32ac4f35a1af6a71f96867f0bc61bc5905b8d437b6bde` (r:1 w:1) - /// Storage: unknown `0x1f8b0dafc67f9d378cf0596c5d49f220e5880b9c74ccaadac2206a35ec92715a` (r:1 w:1) - /// Proof Skipped: unknown `0x1f8b0dafc67f9d378cf0596c5d49f220e5880b9c74ccaadac2206a35ec92715a` (r:1 w:1) - /// Storage: unknown `0x24a8d9c362d9365f46f899adb37f6b61134dceaa80f96a9cda6b059a1301f380` (r:1 w:1) - /// Proof Skipped: unknown `0x24a8d9c362d9365f46f899adb37f6b61134dceaa80f96a9cda6b059a1301f380` (r:1 w:1) - /// Storage: unknown `0x2a00fca93dceceb635a80a95e8f785b189a4ce35f90a17acba5d1bcacf895a84` (r:1 w:1) - /// Proof Skipped: unknown `0x2a00fca93dceceb635a80a95e8f785b189a4ce35f90a17acba5d1bcacf895a84` (r:1 w:1) - /// Storage: unknown `0x2b318def38ef5f2f8db787e365834ece79fbde70c22cf7bd6c9326995fd4c07f` (r:1 w:1) - /// Proof Skipped: unknown `0x2b318def38ef5f2f8db787e365834ece79fbde70c22cf7bd6c9326995fd4c07f` (r:1 w:1) - /// Storage: unknown `0x2fbeff7b90831a847716e729a30f028899726193b4406a1c91fce4e97beb61b5` (r:1 w:1) - /// Proof Skipped: unknown `0x2fbeff7b90831a847716e729a30f028899726193b4406a1c91fce4e97beb61b5` (r:1 w:1) - /// Storage: unknown `0x30dc983a9ad263028d0e91a8a0cf703a2a7fd3834b1102f1ff3f8c8876a207bf` (r:1 w:1) - /// Proof Skipped: unknown `0x30dc983a9ad263028d0e91a8a0cf703a2a7fd3834b1102f1ff3f8c8876a207bf` (r:1 w:1) - /// Storage: unknown `0x3187d0cdac28db7ec343a07f0b2e44fc56986f0a9c2062d5fa60f99419707bea` (r:1 w:1) - /// Proof Skipped: unknown `0x3187d0cdac28db7ec343a07f0b2e44fc56986f0a9c2062d5fa60f99419707bea` (r:1 w:1) - /// Storage: unknown `0x3596cd6b45e209629c71765c804f324ed440f7a1cb2ff6cb542156fd5d213de2` (r:1 w:1) - /// Proof Skipped: unknown `0x3596cd6b45e209629c71765c804f324ed440f7a1cb2ff6cb542156fd5d213de2` (r:1 w:1) - /// Storage: unknown `0x3645890bd8ab0cc13921468d56eee7da40fbe28dc05bc30a64f05a2c03a1912e` (r:1 w:1) - /// Proof Skipped: unknown `0x3645890bd8ab0cc13921468d56eee7da40fbe28dc05bc30a64f05a2c03a1912e` (r:1 w:1) - /// Storage: unknown `0x384b604969634cf37d988e886b5267a51baeb797e09a1d1a0893e5be8fc553df` (r:1 w:1) - /// Proof Skipped: unknown `0x384b604969634cf37d988e886b5267a51baeb797e09a1d1a0893e5be8fc553df` (r:1 w:1) - /// Storage: unknown `0x3c056a888ea28c9294c91723916f5891141a824048335e32532e6605ce0457e0` (r:1 w:1) - /// Proof Skipped: unknown `0x3c056a888ea28c9294c91723916f5891141a824048335e32532e6605ce0457e0` (r:1 w:1) - /// Storage: unknown `0x3c5fd1d5c95885c6b44e0f3995886046d906821de1ed5ee95b51b17c42d3295b` (r:1 w:1) - /// Proof Skipped: unknown `0x3c5fd1d5c95885c6b44e0f3995886046d906821de1ed5ee95b51b17c42d3295b` (r:1 w:1) - /// Storage: unknown `0x3e74dfe3befcf6fa20eb902c2007ba7fd831619013aa99e016284597b896115b` (r:1 w:1) - /// Proof Skipped: unknown `0x3e74dfe3befcf6fa20eb902c2007ba7fd831619013aa99e016284597b896115b` (r:1 w:1) - /// Storage: unknown `0x42f1cff854d41b18ae379b012a1e712f036bcd839244d5c6324f12c28f6fd6e9` (r:1 w:1) - /// Proof Skipped: unknown `0x42f1cff854d41b18ae379b012a1e712f036bcd839244d5c6324f12c28f6fd6e9` (r:1 w:1) - /// Storage: unknown `0x457803d743c32f50866dbf7aabb339a1d8b6b759783b0627128f0cfd3d6c8775` (r:1 w:1) - /// Proof Skipped: unknown `0x457803d743c32f50866dbf7aabb339a1d8b6b759783b0627128f0cfd3d6c8775` (r:1 w:1) - /// Storage: unknown `0x4cb17fd2f1d1b2eff69f0ffa1a97ff13e7bf4f05a7a99dd06e503e7546b23906` (r:1 w:1) - /// Proof Skipped: unknown `0x4cb17fd2f1d1b2eff69f0ffa1a97ff13e7bf4f05a7a99dd06e503e7546b23906` (r:1 w:1) - /// Storage: unknown `0x58357c4f5a9881658ffc42faa5f48e2810169bf85c8c78011696a17b59728ef5` (r:1 w:1) - /// Proof Skipped: unknown `0x58357c4f5a9881658ffc42faa5f48e2810169bf85c8c78011696a17b59728ef5` (r:1 w:1) - /// Storage: unknown `0x5baa983aa91ad92c66e17d16e0757ec4a67ec2ce5b95f4d02ec22fba0e485da0` (r:1 w:1) - /// Proof Skipped: unknown `0x5baa983aa91ad92c66e17d16e0757ec4a67ec2ce5b95f4d02ec22fba0e485da0` (r:1 w:1) - /// Storage: unknown `0x5da83d0712f41714545470b781e0a43c65a0ac977327475baa98b5cd94938f17` (r:1 w:1) - /// Proof Skipped: unknown `0x5da83d0712f41714545470b781e0a43c65a0ac977327475baa98b5cd94938f17` (r:1 w:1) - /// Storage: unknown `0x6365aeecd6b54d3166f3df46d8c7b404711ca54b4284e8faf67eb014fa3685f8` (r:1 w:1) - /// Proof Skipped: unknown `0x6365aeecd6b54d3166f3df46d8c7b404711ca54b4284e8faf67eb014fa3685f8` (r:1 w:1) - /// Storage: unknown `0x683b74d821a8019cbfc9dbe47b50b0f377e0eef16dbc52f7f931ae713fd3f644` (r:1 w:1) - /// Proof Skipped: unknown `0x683b74d821a8019cbfc9dbe47b50b0f377e0eef16dbc52f7f931ae713fd3f644` (r:1 w:1) - /// Storage: unknown `0x6b02568ad8557dc3d66463abfd1d7f298a0b314fe4bf7d5be79b66768096ed90` (r:1 w:1) - /// Proof Skipped: unknown `0x6b02568ad8557dc3d66463abfd1d7f298a0b314fe4bf7d5be79b66768096ed90` (r:1 w:1) - /// Storage: unknown `0x6b05c068aecc171915a61cf59146e7f9a69b9bba39f4df50cecfeb454850b4c9` (r:1 w:1) - /// Proof Skipped: unknown `0x6b05c068aecc171915a61cf59146e7f9a69b9bba39f4df50cecfeb454850b4c9` (r:1 w:1) - /// Storage: unknown `0x6b5529ac614dcbd6113176256a4f5809eb667bddab2e22579306de0a1f83f287` (r:1 w:1) - /// Proof Skipped: unknown `0x6b5529ac614dcbd6113176256a4f5809eb667bddab2e22579306de0a1f83f287` (r:1 w:1) - /// Storage: unknown `0x6cd1381490331969f37f1e6575081f42f1bd8ae0cc79d70fc52ed178b5d75bd0` (r:1 w:1) - /// Proof Skipped: unknown `0x6cd1381490331969f37f1e6575081f42f1bd8ae0cc79d70fc52ed178b5d75bd0` (r:1 w:1) - /// Storage: unknown `0x6f5b021a9f57d7669ed7269e7d8785acf255f15785bf452a03a4decc184fd403` (r:1 w:1) - /// Proof Skipped: unknown `0x6f5b021a9f57d7669ed7269e7d8785acf255f15785bf452a03a4decc184fd403` (r:1 w:1) - /// Storage: unknown `0x764bac7888f79c071087d351a356a09cb2490cb6ea6d71f0cd391de89a885cd2` (r:1 w:1) - /// Proof Skipped: unknown `0x764bac7888f79c071087d351a356a09cb2490cb6ea6d71f0cd391de89a885cd2` (r:1 w:1) - /// Storage: unknown `0x7aedb653a5de5739b9d3594196693fd51653fcd59b442e0eb9f64265db188044` (r:1 w:1) - /// Proof Skipped: unknown `0x7aedb653a5de5739b9d3594196693fd51653fcd59b442e0eb9f64265db188044` (r:1 w:1) - /// Storage: unknown `0x7ca04bdeb932896fd908eb86d4136e9e2462575ebdf981001c1cd3ca6a2faaec` (r:1 w:1) - /// Proof Skipped: unknown `0x7ca04bdeb932896fd908eb86d4136e9e2462575ebdf981001c1cd3ca6a2faaec` (r:1 w:1) - /// Storage: unknown `0x7ceee738f5af899bd2f967a928019e4a0ecb8715509668dcc039badfe148b45e` (r:1 w:1) - /// Proof Skipped: unknown `0x7ceee738f5af899bd2f967a928019e4a0ecb8715509668dcc039badfe148b45e` (r:1 w:1) - /// Storage: unknown `0x7e700ce9c411e35485babec60c2b68f40c512bc8399c5cee0c1e4264e63f36d1` (r:1 w:1) - /// Proof Skipped: unknown `0x7e700ce9c411e35485babec60c2b68f40c512bc8399c5cee0c1e4264e63f36d1` (r:1 w:1) - /// Storage: unknown `0x80c020f2e70a170ee2f34af3daeda4c2097d14a35f5b1f2d23c2287e5e930f55` (r:1 w:1) - /// Proof Skipped: unknown `0x80c020f2e70a170ee2f34af3daeda4c2097d14a35f5b1f2d23c2287e5e930f55` (r:1 w:1) - /// Storage: unknown `0x8101d04cf92ee55f6c2a798c7b16da4cc8c511fd822b13093d0f53f5523718d0` (r:1 w:1) - /// Proof Skipped: unknown `0x8101d04cf92ee55f6c2a798c7b16da4cc8c511fd822b13093d0f53f5523718d0` (r:1 w:1) - /// Storage: unknown `0x85172de32d6b5871235d50648541b1bd007807512231f9b81f25cb5e20141820` (r:1 w:1) - /// Proof Skipped: unknown `0x85172de32d6b5871235d50648541b1bd007807512231f9b81f25cb5e20141820` (r:1 w:1) - /// Storage: unknown `0x85e9ccd05d28607dcce0dc5be4f34a7d56d3b83b6c63162b2787fc0e6decf2a7` (r:1 w:1) - /// Proof Skipped: unknown `0x85e9ccd05d28607dcce0dc5be4f34a7d56d3b83b6c63162b2787fc0e6decf2a7` (r:1 w:1) - /// Storage: unknown `0x87b3d065618080e576b534cf68b60d09c4cca0b71a8b6321337cc23be47e7329` (r:1 w:1) - /// Proof Skipped: unknown `0x87b3d065618080e576b534cf68b60d09c4cca0b71a8b6321337cc23be47e7329` (r:1 w:1) - /// Storage: unknown `0x892ec564231143cc6294a8750b924df2207d91ea3508501d2bd84bee7947b9d0` (r:1 w:1) - /// Proof Skipped: unknown `0x892ec564231143cc6294a8750b924df2207d91ea3508501d2bd84bee7947b9d0` (r:1 w:1) - /// Storage: unknown `0x8980988eacf42b40c4fc8aa995ae2e059a66c6935626c3e30f1d6842335368d0` (r:1 w:1) - /// Proof Skipped: unknown `0x8980988eacf42b40c4fc8aa995ae2e059a66c6935626c3e30f1d6842335368d0` (r:1 w:1) - /// Storage: unknown `0x8db2380506697daa88c7a72906d747535ffb12c0ca2a4a6443074bb0fdd8f256` (r:1 w:1) - /// Proof Skipped: unknown `0x8db2380506697daa88c7a72906d747535ffb12c0ca2a4a6443074bb0fdd8f256` (r:1 w:1) - /// Storage: unknown `0x8e098b9b896a97df275aba887f591c3076220e02adf682c98808e4ba53e6a773` (r:1 w:1) - /// Proof Skipped: unknown `0x8e098b9b896a97df275aba887f591c3076220e02adf682c98808e4ba53e6a773` (r:1 w:1) - /// Storage: unknown `0x8e590007efc113bc10a61c478d26803cdae5572d4c70547b3c9813b3ce396826` (r:1 w:1) - /// Proof Skipped: unknown `0x8e590007efc113bc10a61c478d26803cdae5572d4c70547b3c9813b3ce396826` (r:1 w:1) - /// Storage: unknown `0x96e31df89b1f00b96c993bd9de31e32e7e59c0a185cd0b31adc4e969746c8ea6` (r:1 w:1) - /// Proof Skipped: unknown `0x96e31df89b1f00b96c993bd9de31e32e7e59c0a185cd0b31adc4e969746c8ea6` (r:1 w:1) - /// Storage: unknown `0x9ae7305289647b636a8702b2316e5482f1a807fa398687068fb653527368f9bc` (r:1 w:1) - /// Proof Skipped: unknown `0x9ae7305289647b636a8702b2316e5482f1a807fa398687068fb653527368f9bc` (r:1 w:1) - /// Storage: unknown `0x9b9660b6fc1992a09573eaa9110c4a08d40c1f439304a47b9776645bc278fc75` (r:1 w:1) - /// Proof Skipped: unknown `0x9b9660b6fc1992a09573eaa9110c4a08d40c1f439304a47b9776645bc278fc75` (r:1 w:1) - /// Storage: unknown `0xa04f2ef3bb509dfec9d7a97c4778ab2e477af9c5cbda3a1c6e57514314a3f9a5` (r:1 w:1) - /// Proof Skipped: unknown `0xa04f2ef3bb509dfec9d7a97c4778ab2e477af9c5cbda3a1c6e57514314a3f9a5` (r:1 w:1) - /// Storage: unknown `0xa16d64c1e08b47144c2c8e37872486cf440dda823e2ea05f480fedfe83060f17` (r:1 w:1) - /// Proof Skipped: unknown `0xa16d64c1e08b47144c2c8e37872486cf440dda823e2ea05f480fedfe83060f17` (r:1 w:1) - /// Storage: unknown `0xa4ad0a32c2781a59ea8a6d58e26fa7dc0b2a08f8c4c938661f5f3ccd8f8eb8ce` (r:1 w:1) - /// Proof Skipped: unknown `0xa4ad0a32c2781a59ea8a6d58e26fa7dc0b2a08f8c4c938661f5f3ccd8f8eb8ce` (r:1 w:1) - /// Storage: unknown `0xab9797fb6926376ee3b6be73e5501e0a3af18d0bc6dfca0d3b5f498602016956` (r:1 w:1) - /// Proof Skipped: unknown `0xab9797fb6926376ee3b6be73e5501e0a3af18d0bc6dfca0d3b5f498602016956` (r:1 w:1) - /// Storage: unknown `0xac4d9f6628449fe129d24b384441fdb445962d2d6bca7603fea0c20f3d04351c` (r:1 w:1) - /// Proof Skipped: unknown `0xac4d9f6628449fe129d24b384441fdb445962d2d6bca7603fea0c20f3d04351c` (r:1 w:1) - /// Storage: unknown `0xafecb421bedaa0f8bd89ef18897b77ce61738af42f8a66e3257a079a3d04bef1` (r:1 w:1) - /// Proof Skipped: unknown `0xafecb421bedaa0f8bd89ef18897b77ce61738af42f8a66e3257a079a3d04bef1` (r:1 w:1) - /// Storage: unknown `0xb292dc48cc1057cce335f1d84f295271a2b16aee7018f1bd444febd77f7e5cbb` (r:1 w:1) - /// Proof Skipped: unknown `0xb292dc48cc1057cce335f1d84f295271a2b16aee7018f1bd444febd77f7e5cbb` (r:1 w:1) - /// Storage: unknown `0xb48b9d9955158dbd87abb433511a5968c21cf78f8085088407e24d6ee26f7f56` (r:1 w:1) - /// Proof Skipped: unknown `0xb48b9d9955158dbd87abb433511a5968c21cf78f8085088407e24d6ee26f7f56` (r:1 w:1) - /// Storage: unknown `0xb5a7df612d6fb3bc16c1716414897ba5928835d883003371f02106d5a92abd78` (r:1 w:1) - /// Proof Skipped: unknown `0xb5a7df612d6fb3bc16c1716414897ba5928835d883003371f02106d5a92abd78` (r:1 w:1) - /// Storage: unknown `0xb684abf2ee5018a16a8dbef6633bcb94a07a2cdf4a173e4fec130da86e8ab987` (r:1 w:1) - /// Proof Skipped: unknown `0xb684abf2ee5018a16a8dbef6633bcb94a07a2cdf4a173e4fec130da86e8ab987` (r:1 w:1) - /// Storage: unknown `0xb86c8391d2a3eb28b9e3b603cf6929849d50e439e0bbc79781b2555f9cbaa013` (r:1 w:1) - /// Proof Skipped: unknown `0xb86c8391d2a3eb28b9e3b603cf6929849d50e439e0bbc79781b2555f9cbaa013` (r:1 w:1) - /// Storage: unknown `0xba070ba6cf5f2489f98b6841d238eee4fc403d3065b57f9e3e38ca540971024d` (r:1 w:1) - /// Proof Skipped: unknown `0xba070ba6cf5f2489f98b6841d238eee4fc403d3065b57f9e3e38ca540971024d` (r:1 w:1) - /// Storage: unknown `0xbcb96e5fc092d3ac258a81b5390671817730859598470874ef02f998518bbf58` (r:1 w:1) - /// Proof Skipped: unknown `0xbcb96e5fc092d3ac258a81b5390671817730859598470874ef02f998518bbf58` (r:1 w:1) - /// Storage: unknown `0xc008db6f6d721d80fab2eab8b6dda4f19bd5def30aa7db86dadd6eb799c2f5ad` (r:1 w:1) - /// Proof Skipped: unknown `0xc008db6f6d721d80fab2eab8b6dda4f19bd5def30aa7db86dadd6eb799c2f5ad` (r:1 w:1) - /// Storage: unknown `0xc054c4045e44e28cef1884c0aa86d0049b76eaff493a6d694394df7b0cee8136` (r:1 w:1) - /// Proof Skipped: unknown `0xc054c4045e44e28cef1884c0aa86d0049b76eaff493a6d694394df7b0cee8136` (r:1 w:1) - /// Storage: unknown `0xc315216d50f4dd95914d6d102976dc09ec4474da5c314a15f09972ded6e71ddb` (r:1 w:1) - /// Proof Skipped: unknown `0xc315216d50f4dd95914d6d102976dc09ec4474da5c314a15f09972ded6e71ddb` (r:1 w:1) - /// Storage: unknown `0xc4a2c3fa3cc7ed1611651510eb6e225abab30676f0fad28c115482c7dd61f8e0` (r:1 w:1) - /// Proof Skipped: unknown `0xc4a2c3fa3cc7ed1611651510eb6e225abab30676f0fad28c115482c7dd61f8e0` (r:1 w:1) - /// Storage: unknown `0xc6cc01d59d3c86a1c12a167e149d784295fcd13862e4afb0a39a8459e6e25561` (r:1 w:1) - /// Proof Skipped: unknown `0xc6cc01d59d3c86a1c12a167e149d784295fcd13862e4afb0a39a8459e6e25561` (r:1 w:1) - /// Storage: unknown `0xc712d8fa08dd521e5f901ca6d36134807c5ec0510e3b52e8ae5a15f7c13d2ebd` (r:1 w:1) - /// Proof Skipped: unknown `0xc712d8fa08dd521e5f901ca6d36134807c5ec0510e3b52e8ae5a15f7c13d2ebd` (r:1 w:1) - /// Storage: unknown `0xc7e2bc91ff1b307f6995683b76f1904ccdada3cf8f00528c08d4f65911c4888a` (r:1 w:1) - /// Proof Skipped: unknown `0xc7e2bc91ff1b307f6995683b76f1904ccdada3cf8f00528c08d4f65911c4888a` (r:1 w:1) - /// Storage: unknown `0xccbca45304d59a1167eaf9b459e09cffce3d90c087ee9edf8e7e2dc40349373b` (r:1 w:1) - /// Proof Skipped: unknown `0xccbca45304d59a1167eaf9b459e09cffce3d90c087ee9edf8e7e2dc40349373b` (r:1 w:1) - /// Storage: unknown `0xccc17a821dda11e5239ea8dbedee5bd6622fc8dd63ee229fc3bd2dead22e8ae2` (r:1 w:1) - /// Proof Skipped: unknown `0xccc17a821dda11e5239ea8dbedee5bd6622fc8dd63ee229fc3bd2dead22e8ae2` (r:1 w:1) - /// Storage: unknown `0xccee04c4c0534d4245892ed24d7814cd14a41aeed7e94591354315f5b74d89f5` (r:1 w:1) - /// Proof Skipped: unknown `0xccee04c4c0534d4245892ed24d7814cd14a41aeed7e94591354315f5b74d89f5` (r:1 w:1) - /// Storage: unknown `0xcf67e9890d936f6bd205710c9a5cedc653d88fba3c74b7a2b9fe8ce7fce0bd0c` (r:1 w:1) - /// Proof Skipped: unknown `0xcf67e9890d936f6bd205710c9a5cedc653d88fba3c74b7a2b9fe8ce7fce0bd0c` (r:1 w:1) - /// Storage: unknown `0xcfdb7c67ada01beee8308b04c3f32e4c078603d0c84c0e28e605a8ea56dcc362` (r:1 w:1) - /// Proof Skipped: unknown `0xcfdb7c67ada01beee8308b04c3f32e4c078603d0c84c0e28e605a8ea56dcc362` (r:1 w:1) - /// Storage: unknown `0xd0d54b0c405fea6ff90809070bfd270c88e9a26ad83138eeb077d8f9602670bc` (r:1 w:1) - /// Proof Skipped: unknown `0xd0d54b0c405fea6ff90809070bfd270c88e9a26ad83138eeb077d8f9602670bc` (r:1 w:1) - /// Storage: unknown `0xd1d4eefa482f2ece90773426cd76c1da272ef0e72c1172a4a71b84c1f5f6c7c7` (r:1 w:1) - /// Proof Skipped: unknown `0xd1d4eefa482f2ece90773426cd76c1da272ef0e72c1172a4a71b84c1f5f6c7c7` (r:1 w:1) - /// Storage: unknown `0xd282fcd4ae056e61acbc8950a306910569f227182c41e5b88159aed160ba2a58` (r:1 w:1) - /// Proof Skipped: unknown `0xd282fcd4ae056e61acbc8950a306910569f227182c41e5b88159aed160ba2a58` (r:1 w:1) - /// Storage: unknown `0xd37f5ea81d5d617ed7490c928e4f3a1eba6f234787ba84f31e204e8733cd039f` (r:1 w:1) - /// Proof Skipped: unknown `0xd37f5ea81d5d617ed7490c928e4f3a1eba6f234787ba84f31e204e8733cd039f` (r:1 w:1) - /// Storage: unknown `0xd6780cc86f71e3b9d0f0f6977d180e26166b517ee3ee227701f9f36cccae3171` (r:1 w:1) - /// Proof Skipped: unknown `0xd6780cc86f71e3b9d0f0f6977d180e26166b517ee3ee227701f9f36cccae3171` (r:1 w:1) - /// Storage: unknown `0xd79237f18c61e22111652b0e9b809fbe8ca41552b3a927877a294a732b338f63` (r:1 w:1) - /// Proof Skipped: unknown `0xd79237f18c61e22111652b0e9b809fbe8ca41552b3a927877a294a732b338f63` (r:1 w:1) - /// Storage: unknown `0xd8825b3a03921d36a1543c344d9b3cacce95765f29c735cf3ed72dc9c37ff81b` (r:1 w:1) - /// Proof Skipped: unknown `0xd8825b3a03921d36a1543c344d9b3cacce95765f29c735cf3ed72dc9c37ff81b` (r:1 w:1) - /// Storage: unknown `0xdd012b8629cc16d3ad36b73df7dd7d38e8c11ac479b99dedffb10b5007c8049a` (r:1 w:1) - /// Proof Skipped: unknown `0xdd012b8629cc16d3ad36b73df7dd7d38e8c11ac479b99dedffb10b5007c8049a` (r:1 w:1) - /// Storage: unknown `0xdec56d85d6fffd793180a2ce033397f67fb3b9b7ac3e2b0ef6be2f15e7de435f` (r:1 w:1) - /// Proof Skipped: unknown `0xdec56d85d6fffd793180a2ce033397f67fb3b9b7ac3e2b0ef6be2f15e7de435f` (r:1 w:1) - /// Storage: unknown `0xe1f270fea944a3a9db5550d742e3acb3dd449cafb73dce65c1705d0752c1343b` (r:1 w:1) - /// Proof Skipped: unknown `0xe1f270fea944a3a9db5550d742e3acb3dd449cafb73dce65c1705d0752c1343b` (r:1 w:1) - /// Storage: unknown `0xe4002351550f1b106219729b86aa4776fb907737c9cd7e957c5ce80062a8ff8a` (r:1 w:1) - /// Proof Skipped: unknown `0xe4002351550f1b106219729b86aa4776fb907737c9cd7e957c5ce80062a8ff8a` (r:1 w:1) - /// Storage: unknown `0xe45f26671be0fb4144ed09c40b9493c4584affb2c1d1fe6cb067aa2df802027e` (r:1 w:1) - /// Proof Skipped: unknown `0xe45f26671be0fb4144ed09c40b9493c4584affb2c1d1fe6cb067aa2df802027e` (r:1 w:1) - /// Storage: unknown `0xe6b4a4991b976360dacf2c942d16326dd53584aca6ed1ae4e78f668d7b1163c1` (r:1 w:1) - /// Proof Skipped: unknown `0xe6b4a4991b976360dacf2c942d16326dd53584aca6ed1ae4e78f668d7b1163c1` (r:1 w:1) - /// Storage: unknown `0xe8150db238f56576dcf5e1b98f3915361092aa174b16e6cda3e78c28b6444dc8` (r:1 w:1) - /// Proof Skipped: unknown `0xe8150db238f56576dcf5e1b98f3915361092aa174b16e6cda3e78c28b6444dc8` (r:1 w:1) - /// Storage: unknown `0xebc5f1d9670cdeb0655d79e95c9602ec1d85ad989ce78194dfd1a31e9fb4994c` (r:1 w:1) - /// Proof Skipped: unknown `0xebc5f1d9670cdeb0655d79e95c9602ec1d85ad989ce78194dfd1a31e9fb4994c` (r:1 w:1) - /// Storage: unknown `0xed0df01311d268fc75f0da4859b6508e1c445e713847efbc18528d731316cf48` (r:1 w:1) - /// Proof Skipped: unknown `0xed0df01311d268fc75f0da4859b6508e1c445e713847efbc18528d731316cf48` (r:1 w:1) - /// Storage: unknown `0xee60c64e1e32117f948ee71d391f978e8ac98c2bd869322fc25164502e3f7a9b` (r:1 w:1) - /// Proof Skipped: unknown `0xee60c64e1e32117f948ee71d391f978e8ac98c2bd869322fc25164502e3f7a9b` (r:1 w:1) - /// Storage: unknown `0xf7e4b8a5415405a940e730546df85583c8c23956d99a3be18e09eebf3639d312` (r:1 w:1) - /// Proof Skipped: unknown `0xf7e4b8a5415405a940e730546df85583c8c23956d99a3be18e09eebf3639d312` (r:1 w:1) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Anchor::LatestEvictedDate` (r:1 w:1) + /// Proof: `Anchor::LatestEvictedDate` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Anchor::EvictedAnchorRoots` (r:100 w:100) + /// Proof: `Anchor::EvictedAnchorRoots` (`max_values`: None, `max_size`: Some(65), added: 2540, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72010000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72010000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72020000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72020000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72030000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72030000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72040000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72040000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72050000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72050000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72060000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72060000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72070000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72070000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72080000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72080000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72090000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72090000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720a0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720a0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720b0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720b0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720c0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720c0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720d0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720d0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720e0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720e0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720f0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720f0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72100000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72100000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72110000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72110000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72120000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72120000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72130000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72130000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72140000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72140000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72150000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72150000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72160000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72160000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72170000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72170000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72180000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72180000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72190000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72190000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721a0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721a0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721b0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721b0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721c0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721c0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721d0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721d0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721e0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721e0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721f0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721f0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72200000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72200000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72210000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72210000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72220000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72220000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72230000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72230000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72240000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72240000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72250000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72250000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72260000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72260000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72270000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72270000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72280000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72280000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72290000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72290000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722a0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722a0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722b0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722b0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722c0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722c0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722d0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722d0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722e0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722e0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722f0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722f0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72300000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72300000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72310000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72310000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72320000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72320000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72330000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72330000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72340000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72340000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72350000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72350000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72360000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72360000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72370000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72370000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72380000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72380000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72390000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72390000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723a0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723a0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723b0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723b0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723c0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723c0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723d0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723d0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723e0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723e0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723f0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723f0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72400000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72400000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72410000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72410000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72420000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72420000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72430000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72430000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72440000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72440000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72450000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72450000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72460000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72460000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72470000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72470000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72480000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72480000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72490000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72490000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724a0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724a0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724b0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724b0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724c0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724c0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724d0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724d0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724e0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724e0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724f0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724f0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72500000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72500000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72510000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72510000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72520000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72520000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72530000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72530000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72540000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72540000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72550000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72550000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72560000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72560000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72570000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72570000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72580000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72580000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72590000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72590000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725a0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725a0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725b0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725b0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725c0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725c0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725d0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725d0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725e0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725e0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725f0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725f0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72600000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72600000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72610000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72610000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72620000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72620000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72630000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72630000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72640000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72640000` (r:1 w:0) + /// Storage: `Anchor::LatestEvictedAnchorIndex` (r:1 w:1) + /// Proof: `Anchor::LatestEvictedAnchorIndex` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Anchor::LatestAnchorIndex` (r:1 w:0) + /// Proof: `Anchor::LatestAnchorIndex` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Anchor::AnchorIndexes` (r:100 w:100) + /// Proof: `Anchor::AnchorIndexes` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + /// Storage: `Anchor::AnchorEvictDates` (r:100 w:100) + /// Proof: `Anchor::AnchorEvictDates` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0x01d5998dcaa249dfa2a455ae4c045d761623f268227068931dbabca3732aa41f` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x01d5998dcaa249dfa2a455ae4c045d761623f268227068931dbabca3732aa41f` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x04575ee0699f1fa86cccfdcf4285aa81b9bfa0f8837cf533346d722970f1a704` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x04575ee0699f1fa86cccfdcf4285aa81b9bfa0f8837cf533346d722970f1a704` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x0959721f200e92d5090cee3c2c4546c11f9bfd16ded1e70e6781d2402880f1f3` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x0959721f200e92d5090cee3c2c4546c11f9bfd16ded1e70e6781d2402880f1f3` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x0a958b15afac1ffb0c6e73c553bd8b4ba94ad2d0cc118dcd2a7bc8802e2e772a` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x0a958b15afac1ffb0c6e73c553bd8b4ba94ad2d0cc118dcd2a7bc8802e2e772a` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x0c4c531cd9dcf8573a6350d0ac9fb060d273156bdee4fdae0043b6fee5bda27c` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x0c4c531cd9dcf8573a6350d0ac9fb060d273156bdee4fdae0043b6fee5bda27c` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x0cd3f3ee9420f9c3b2e70862996e8d02e87d1f148632a36b8f72c9548b10b856` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x0cd3f3ee9420f9c3b2e70862996e8d02e87d1f148632a36b8f72c9548b10b856` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x10876da12e1227a2c04872ce311f768aaf3e21458e6ad1c04f044c97fe8e214e` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x10876da12e1227a2c04872ce311f768aaf3e21458e6ad1c04f044c97fe8e214e` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x10b360a66313de6ab2d43019c5fd7ea0db088efb3e1d4a24d89775e66e089cff` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x10b360a66313de6ab2d43019c5fd7ea0db088efb3e1d4a24d89775e66e089cff` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x16d33ce142442dfbe857e2c9e0648d026c6bb367d467d6922c2c1133aaa3d7b8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x16d33ce142442dfbe857e2c9e0648d026c6bb367d467d6922c2c1133aaa3d7b8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x16e133fb9e42d5a2a9a2e21b2e0efd735fccb527162a21cf520c3aecd84c89ed` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x16e133fb9e42d5a2a9a2e21b2e0efd735fccb527162a21cf520c3aecd84c89ed` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x16fcb5e799a48fa04deaaaa71c85bc8e9126bd4b5dbcb3a1f8068ab14bc1c26f` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x16fcb5e799a48fa04deaaaa71c85bc8e9126bd4b5dbcb3a1f8068ab14bc1c26f` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x1b3289127bc95ed117e77d479ccd3ac4477ef8d32df7265bbd42c75bf1945464` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x1b3289127bc95ed117e77d479ccd3ac4477ef8d32df7265bbd42c75bf1945464` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x1ecb14235f21b57f49e32ac4f35a1af6a71f96867f0bc61bc5905b8d437b6bde` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x1ecb14235f21b57f49e32ac4f35a1af6a71f96867f0bc61bc5905b8d437b6bde` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x1f8b0dafc67f9d378cf0596c5d49f220e5880b9c74ccaadac2206a35ec92715a` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x1f8b0dafc67f9d378cf0596c5d49f220e5880b9c74ccaadac2206a35ec92715a` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x24a8d9c362d9365f46f899adb37f6b61134dceaa80f96a9cda6b059a1301f380` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x24a8d9c362d9365f46f899adb37f6b61134dceaa80f96a9cda6b059a1301f380` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x2a00fca93dceceb635a80a95e8f785b189a4ce35f90a17acba5d1bcacf895a84` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x2a00fca93dceceb635a80a95e8f785b189a4ce35f90a17acba5d1bcacf895a84` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x2b318def38ef5f2f8db787e365834ece79fbde70c22cf7bd6c9326995fd4c07f` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x2b318def38ef5f2f8db787e365834ece79fbde70c22cf7bd6c9326995fd4c07f` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x2fbeff7b90831a847716e729a30f028899726193b4406a1c91fce4e97beb61b5` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x2fbeff7b90831a847716e729a30f028899726193b4406a1c91fce4e97beb61b5` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x30dc983a9ad263028d0e91a8a0cf703a2a7fd3834b1102f1ff3f8c8876a207bf` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x30dc983a9ad263028d0e91a8a0cf703a2a7fd3834b1102f1ff3f8c8876a207bf` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x3187d0cdac28db7ec343a07f0b2e44fc56986f0a9c2062d5fa60f99419707bea` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x3187d0cdac28db7ec343a07f0b2e44fc56986f0a9c2062d5fa60f99419707bea` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x3596cd6b45e209629c71765c804f324ed440f7a1cb2ff6cb542156fd5d213de2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x3596cd6b45e209629c71765c804f324ed440f7a1cb2ff6cb542156fd5d213de2` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x3645890bd8ab0cc13921468d56eee7da40fbe28dc05bc30a64f05a2c03a1912e` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x3645890bd8ab0cc13921468d56eee7da40fbe28dc05bc30a64f05a2c03a1912e` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x384b604969634cf37d988e886b5267a51baeb797e09a1d1a0893e5be8fc553df` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x384b604969634cf37d988e886b5267a51baeb797e09a1d1a0893e5be8fc553df` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x3c056a888ea28c9294c91723916f5891141a824048335e32532e6605ce0457e0` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x3c056a888ea28c9294c91723916f5891141a824048335e32532e6605ce0457e0` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x3c5fd1d5c95885c6b44e0f3995886046d906821de1ed5ee95b51b17c42d3295b` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x3c5fd1d5c95885c6b44e0f3995886046d906821de1ed5ee95b51b17c42d3295b` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x3e74dfe3befcf6fa20eb902c2007ba7fd831619013aa99e016284597b896115b` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x3e74dfe3befcf6fa20eb902c2007ba7fd831619013aa99e016284597b896115b` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x42f1cff854d41b18ae379b012a1e712f036bcd839244d5c6324f12c28f6fd6e9` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x42f1cff854d41b18ae379b012a1e712f036bcd839244d5c6324f12c28f6fd6e9` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x457803d743c32f50866dbf7aabb339a1d8b6b759783b0627128f0cfd3d6c8775` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x457803d743c32f50866dbf7aabb339a1d8b6b759783b0627128f0cfd3d6c8775` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x4cb17fd2f1d1b2eff69f0ffa1a97ff13e7bf4f05a7a99dd06e503e7546b23906` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x4cb17fd2f1d1b2eff69f0ffa1a97ff13e7bf4f05a7a99dd06e503e7546b23906` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x58357c4f5a9881658ffc42faa5f48e2810169bf85c8c78011696a17b59728ef5` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x58357c4f5a9881658ffc42faa5f48e2810169bf85c8c78011696a17b59728ef5` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x5baa983aa91ad92c66e17d16e0757ec4a67ec2ce5b95f4d02ec22fba0e485da0` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x5baa983aa91ad92c66e17d16e0757ec4a67ec2ce5b95f4d02ec22fba0e485da0` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x5da83d0712f41714545470b781e0a43c65a0ac977327475baa98b5cd94938f17` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x5da83d0712f41714545470b781e0a43c65a0ac977327475baa98b5cd94938f17` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x6365aeecd6b54d3166f3df46d8c7b404711ca54b4284e8faf67eb014fa3685f8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x6365aeecd6b54d3166f3df46d8c7b404711ca54b4284e8faf67eb014fa3685f8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x683b74d821a8019cbfc9dbe47b50b0f377e0eef16dbc52f7f931ae713fd3f644` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x683b74d821a8019cbfc9dbe47b50b0f377e0eef16dbc52f7f931ae713fd3f644` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x6b02568ad8557dc3d66463abfd1d7f298a0b314fe4bf7d5be79b66768096ed90` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x6b02568ad8557dc3d66463abfd1d7f298a0b314fe4bf7d5be79b66768096ed90` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x6b05c068aecc171915a61cf59146e7f9a69b9bba39f4df50cecfeb454850b4c9` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x6b05c068aecc171915a61cf59146e7f9a69b9bba39f4df50cecfeb454850b4c9` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x6b5529ac614dcbd6113176256a4f5809eb667bddab2e22579306de0a1f83f287` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x6b5529ac614dcbd6113176256a4f5809eb667bddab2e22579306de0a1f83f287` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x6cd1381490331969f37f1e6575081f42f1bd8ae0cc79d70fc52ed178b5d75bd0` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x6cd1381490331969f37f1e6575081f42f1bd8ae0cc79d70fc52ed178b5d75bd0` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x6f5b021a9f57d7669ed7269e7d8785acf255f15785bf452a03a4decc184fd403` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x6f5b021a9f57d7669ed7269e7d8785acf255f15785bf452a03a4decc184fd403` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x764bac7888f79c071087d351a356a09cb2490cb6ea6d71f0cd391de89a885cd2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x764bac7888f79c071087d351a356a09cb2490cb6ea6d71f0cd391de89a885cd2` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7aedb653a5de5739b9d3594196693fd51653fcd59b442e0eb9f64265db188044` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7aedb653a5de5739b9d3594196693fd51653fcd59b442e0eb9f64265db188044` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7ca04bdeb932896fd908eb86d4136e9e2462575ebdf981001c1cd3ca6a2faaec` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7ca04bdeb932896fd908eb86d4136e9e2462575ebdf981001c1cd3ca6a2faaec` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7ceee738f5af899bd2f967a928019e4a0ecb8715509668dcc039badfe148b45e` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7ceee738f5af899bd2f967a928019e4a0ecb8715509668dcc039badfe148b45e` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7e700ce9c411e35485babec60c2b68f40c512bc8399c5cee0c1e4264e63f36d1` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7e700ce9c411e35485babec60c2b68f40c512bc8399c5cee0c1e4264e63f36d1` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x80c020f2e70a170ee2f34af3daeda4c2097d14a35f5b1f2d23c2287e5e930f55` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x80c020f2e70a170ee2f34af3daeda4c2097d14a35f5b1f2d23c2287e5e930f55` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x8101d04cf92ee55f6c2a798c7b16da4cc8c511fd822b13093d0f53f5523718d0` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x8101d04cf92ee55f6c2a798c7b16da4cc8c511fd822b13093d0f53f5523718d0` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x85172de32d6b5871235d50648541b1bd007807512231f9b81f25cb5e20141820` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x85172de32d6b5871235d50648541b1bd007807512231f9b81f25cb5e20141820` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x85e9ccd05d28607dcce0dc5be4f34a7d56d3b83b6c63162b2787fc0e6decf2a7` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x85e9ccd05d28607dcce0dc5be4f34a7d56d3b83b6c63162b2787fc0e6decf2a7` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x87b3d065618080e576b534cf68b60d09c4cca0b71a8b6321337cc23be47e7329` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x87b3d065618080e576b534cf68b60d09c4cca0b71a8b6321337cc23be47e7329` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x892ec564231143cc6294a8750b924df2207d91ea3508501d2bd84bee7947b9d0` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x892ec564231143cc6294a8750b924df2207d91ea3508501d2bd84bee7947b9d0` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x8980988eacf42b40c4fc8aa995ae2e059a66c6935626c3e30f1d6842335368d0` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x8980988eacf42b40c4fc8aa995ae2e059a66c6935626c3e30f1d6842335368d0` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x8db2380506697daa88c7a72906d747535ffb12c0ca2a4a6443074bb0fdd8f256` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x8db2380506697daa88c7a72906d747535ffb12c0ca2a4a6443074bb0fdd8f256` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x8e098b9b896a97df275aba887f591c3076220e02adf682c98808e4ba53e6a773` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x8e098b9b896a97df275aba887f591c3076220e02adf682c98808e4ba53e6a773` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x8e590007efc113bc10a61c478d26803cdae5572d4c70547b3c9813b3ce396826` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x8e590007efc113bc10a61c478d26803cdae5572d4c70547b3c9813b3ce396826` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x96e31df89b1f00b96c993bd9de31e32e7e59c0a185cd0b31adc4e969746c8ea6` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x96e31df89b1f00b96c993bd9de31e32e7e59c0a185cd0b31adc4e969746c8ea6` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x9ae7305289647b636a8702b2316e5482f1a807fa398687068fb653527368f9bc` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x9ae7305289647b636a8702b2316e5482f1a807fa398687068fb653527368f9bc` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x9b9660b6fc1992a09573eaa9110c4a08d40c1f439304a47b9776645bc278fc75` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x9b9660b6fc1992a09573eaa9110c4a08d40c1f439304a47b9776645bc278fc75` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xa04f2ef3bb509dfec9d7a97c4778ab2e477af9c5cbda3a1c6e57514314a3f9a5` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xa04f2ef3bb509dfec9d7a97c4778ab2e477af9c5cbda3a1c6e57514314a3f9a5` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xa16d64c1e08b47144c2c8e37872486cf440dda823e2ea05f480fedfe83060f17` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xa16d64c1e08b47144c2c8e37872486cf440dda823e2ea05f480fedfe83060f17` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xa4ad0a32c2781a59ea8a6d58e26fa7dc0b2a08f8c4c938661f5f3ccd8f8eb8ce` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xa4ad0a32c2781a59ea8a6d58e26fa7dc0b2a08f8c4c938661f5f3ccd8f8eb8ce` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xab9797fb6926376ee3b6be73e5501e0a3af18d0bc6dfca0d3b5f498602016956` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xab9797fb6926376ee3b6be73e5501e0a3af18d0bc6dfca0d3b5f498602016956` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xac4d9f6628449fe129d24b384441fdb445962d2d6bca7603fea0c20f3d04351c` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xac4d9f6628449fe129d24b384441fdb445962d2d6bca7603fea0c20f3d04351c` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xafecb421bedaa0f8bd89ef18897b77ce61738af42f8a66e3257a079a3d04bef1` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xafecb421bedaa0f8bd89ef18897b77ce61738af42f8a66e3257a079a3d04bef1` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xb292dc48cc1057cce335f1d84f295271a2b16aee7018f1bd444febd77f7e5cbb` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xb292dc48cc1057cce335f1d84f295271a2b16aee7018f1bd444febd77f7e5cbb` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xb48b9d9955158dbd87abb433511a5968c21cf78f8085088407e24d6ee26f7f56` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xb48b9d9955158dbd87abb433511a5968c21cf78f8085088407e24d6ee26f7f56` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xb5a7df612d6fb3bc16c1716414897ba5928835d883003371f02106d5a92abd78` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xb5a7df612d6fb3bc16c1716414897ba5928835d883003371f02106d5a92abd78` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xb684abf2ee5018a16a8dbef6633bcb94a07a2cdf4a173e4fec130da86e8ab987` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xb684abf2ee5018a16a8dbef6633bcb94a07a2cdf4a173e4fec130da86e8ab987` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xb86c8391d2a3eb28b9e3b603cf6929849d50e439e0bbc79781b2555f9cbaa013` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xb86c8391d2a3eb28b9e3b603cf6929849d50e439e0bbc79781b2555f9cbaa013` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xba070ba6cf5f2489f98b6841d238eee4fc403d3065b57f9e3e38ca540971024d` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xba070ba6cf5f2489f98b6841d238eee4fc403d3065b57f9e3e38ca540971024d` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xbcb96e5fc092d3ac258a81b5390671817730859598470874ef02f998518bbf58` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xbcb96e5fc092d3ac258a81b5390671817730859598470874ef02f998518bbf58` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xc008db6f6d721d80fab2eab8b6dda4f19bd5def30aa7db86dadd6eb799c2f5ad` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xc008db6f6d721d80fab2eab8b6dda4f19bd5def30aa7db86dadd6eb799c2f5ad` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xc054c4045e44e28cef1884c0aa86d0049b76eaff493a6d694394df7b0cee8136` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xc054c4045e44e28cef1884c0aa86d0049b76eaff493a6d694394df7b0cee8136` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xc315216d50f4dd95914d6d102976dc09ec4474da5c314a15f09972ded6e71ddb` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xc315216d50f4dd95914d6d102976dc09ec4474da5c314a15f09972ded6e71ddb` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xc4a2c3fa3cc7ed1611651510eb6e225abab30676f0fad28c115482c7dd61f8e0` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xc4a2c3fa3cc7ed1611651510eb6e225abab30676f0fad28c115482c7dd61f8e0` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xc6cc01d59d3c86a1c12a167e149d784295fcd13862e4afb0a39a8459e6e25561` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xc6cc01d59d3c86a1c12a167e149d784295fcd13862e4afb0a39a8459e6e25561` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xc712d8fa08dd521e5f901ca6d36134807c5ec0510e3b52e8ae5a15f7c13d2ebd` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xc712d8fa08dd521e5f901ca6d36134807c5ec0510e3b52e8ae5a15f7c13d2ebd` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xc7e2bc91ff1b307f6995683b76f1904ccdada3cf8f00528c08d4f65911c4888a` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xc7e2bc91ff1b307f6995683b76f1904ccdada3cf8f00528c08d4f65911c4888a` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xccbca45304d59a1167eaf9b459e09cffce3d90c087ee9edf8e7e2dc40349373b` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xccbca45304d59a1167eaf9b459e09cffce3d90c087ee9edf8e7e2dc40349373b` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xccc17a821dda11e5239ea8dbedee5bd6622fc8dd63ee229fc3bd2dead22e8ae2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xccc17a821dda11e5239ea8dbedee5bd6622fc8dd63ee229fc3bd2dead22e8ae2` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xccee04c4c0534d4245892ed24d7814cd14a41aeed7e94591354315f5b74d89f5` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xccee04c4c0534d4245892ed24d7814cd14a41aeed7e94591354315f5b74d89f5` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcf67e9890d936f6bd205710c9a5cedc653d88fba3c74b7a2b9fe8ce7fce0bd0c` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcf67e9890d936f6bd205710c9a5cedc653d88fba3c74b7a2b9fe8ce7fce0bd0c` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcfdb7c67ada01beee8308b04c3f32e4c078603d0c84c0e28e605a8ea56dcc362` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcfdb7c67ada01beee8308b04c3f32e4c078603d0c84c0e28e605a8ea56dcc362` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xd0d54b0c405fea6ff90809070bfd270c88e9a26ad83138eeb077d8f9602670bc` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xd0d54b0c405fea6ff90809070bfd270c88e9a26ad83138eeb077d8f9602670bc` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xd1d4eefa482f2ece90773426cd76c1da272ef0e72c1172a4a71b84c1f5f6c7c7` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xd1d4eefa482f2ece90773426cd76c1da272ef0e72c1172a4a71b84c1f5f6c7c7` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xd282fcd4ae056e61acbc8950a306910569f227182c41e5b88159aed160ba2a58` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xd282fcd4ae056e61acbc8950a306910569f227182c41e5b88159aed160ba2a58` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xd37f5ea81d5d617ed7490c928e4f3a1eba6f234787ba84f31e204e8733cd039f` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xd37f5ea81d5d617ed7490c928e4f3a1eba6f234787ba84f31e204e8733cd039f` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xd6780cc86f71e3b9d0f0f6977d180e26166b517ee3ee227701f9f36cccae3171` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xd6780cc86f71e3b9d0f0f6977d180e26166b517ee3ee227701f9f36cccae3171` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xd79237f18c61e22111652b0e9b809fbe8ca41552b3a927877a294a732b338f63` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xd79237f18c61e22111652b0e9b809fbe8ca41552b3a927877a294a732b338f63` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xd8825b3a03921d36a1543c344d9b3cacce95765f29c735cf3ed72dc9c37ff81b` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xd8825b3a03921d36a1543c344d9b3cacce95765f29c735cf3ed72dc9c37ff81b` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xdd012b8629cc16d3ad36b73df7dd7d38e8c11ac479b99dedffb10b5007c8049a` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xdd012b8629cc16d3ad36b73df7dd7d38e8c11ac479b99dedffb10b5007c8049a` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xdec56d85d6fffd793180a2ce033397f67fb3b9b7ac3e2b0ef6be2f15e7de435f` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xdec56d85d6fffd793180a2ce033397f67fb3b9b7ac3e2b0ef6be2f15e7de435f` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xe1f270fea944a3a9db5550d742e3acb3dd449cafb73dce65c1705d0752c1343b` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xe1f270fea944a3a9db5550d742e3acb3dd449cafb73dce65c1705d0752c1343b` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xe4002351550f1b106219729b86aa4776fb907737c9cd7e957c5ce80062a8ff8a` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xe4002351550f1b106219729b86aa4776fb907737c9cd7e957c5ce80062a8ff8a` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xe45f26671be0fb4144ed09c40b9493c4584affb2c1d1fe6cb067aa2df802027e` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xe45f26671be0fb4144ed09c40b9493c4584affb2c1d1fe6cb067aa2df802027e` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xe6b4a4991b976360dacf2c942d16326dd53584aca6ed1ae4e78f668d7b1163c1` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xe6b4a4991b976360dacf2c942d16326dd53584aca6ed1ae4e78f668d7b1163c1` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xe8150db238f56576dcf5e1b98f3915361092aa174b16e6cda3e78c28b6444dc8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xe8150db238f56576dcf5e1b98f3915361092aa174b16e6cda3e78c28b6444dc8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xebc5f1d9670cdeb0655d79e95c9602ec1d85ad989ce78194dfd1a31e9fb4994c` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xebc5f1d9670cdeb0655d79e95c9602ec1d85ad989ce78194dfd1a31e9fb4994c` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xed0df01311d268fc75f0da4859b6508e1c445e713847efbc18528d731316cf48` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xed0df01311d268fc75f0da4859b6508e1c445e713847efbc18528d731316cf48` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xee60c64e1e32117f948ee71d391f978e8ac98c2bd869322fc25164502e3f7a9b` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xee60c64e1e32117f948ee71d391f978e8ac98c2bd869322fc25164502e3f7a9b` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xf7e4b8a5415405a940e730546df85583c8c23956d99a3be18e09eebf3639d312` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xf7e4b8a5415405a940e730546df85583c8c23956d99a3be18e09eebf3639d312` (r:1 w:1) fn evict_anchors() -> Weight { // Proof Size summary in bytes: - // Measured: `18324` + // Measured: `18325` // Estimated: `254990` - // Minimum execution time: 2_049_781_000 picoseconds. - Weight::from_parts(2_069_889_000, 0) + // Minimum execution time: 1_993_527_000 picoseconds. + Weight::from_parts(2_031_267_000, 0) .saturating_add(Weight::from_parts(0, 254990)) .saturating_add(T::DbWeight::get().reads(504)) .saturating_add(T::DbWeight::get().writes(402)) diff --git a/runtime/altair/src/weights/pallet_balances.rs b/runtime/altair/src/weights/pallet_balances.rs index e039260aad..0e35da7120 100644 --- a/runtime/altair/src/weights/pallet_balances.rs +++ b/runtime/altair/src/weights/pallet_balances.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_balances` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_balances // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_balances.rs @@ -32,108 +31,112 @@ use core::marker::PhantomData; /// Weight functions for `pallet_balances`. pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_allow_death() -> Weight { // Proof Size summary in bytes: // Measured: `52` // Estimated: `3593` - // Minimum execution time: 92_233_000 picoseconds. - Weight::from_parts(93_315_000, 0) + // Minimum execution time: 71_153_000 picoseconds. + Weight::from_parts(73_037_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_keep_alive() -> Weight { // Proof Size summary in bytes: // Measured: `52` // Estimated: `3593` - // Minimum execution time: 69_450_000 picoseconds. - Weight::from_parts(70_522_000, 0) + // Minimum execution time: 57_367_000 picoseconds. + Weight::from_parts(58_438_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_set_balance_creating() -> Weight { // Proof Size summary in bytes: // Measured: `245` // Estimated: `3593` - // Minimum execution time: 26_109_000 picoseconds. - Weight::from_parts(26_460_000, 0) + // Minimum execution time: 21_480_000 picoseconds. + Weight::from_parts(21_921_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_set_balance_killing() -> Weight { // Proof Size summary in bytes: // Measured: `245` // Estimated: `3593` - // Minimum execution time: 38_171_000 picoseconds. - Weight::from_parts(39_053_000, 0) + // Minimum execution time: 28_934_000 picoseconds. + Weight::from_parts(29_585_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_transfer() -> Weight { // Proof Size summary in bytes: // Measured: `192` // Estimated: `6196` - // Minimum execution time: 95_259_000 picoseconds. - Weight::from_parts(97_092_000, 0) + // Minimum execution time: 75_050_000 picoseconds. + Weight::from_parts(76_904_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_all() -> Weight { // Proof Size summary in bytes: // Measured: `52` // Estimated: `3593` - // Minimum execution time: 87_033_000 picoseconds. - Weight::from_parts(87_745_000, 0) + // Minimum execution time: 72_455_000 picoseconds. + Weight::from_parts(73_347_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_unreserve() -> Weight { // Proof Size summary in bytes: // Measured: `245` // Estimated: `3593` - // Minimum execution time: 30_808_000 picoseconds. - Weight::from_parts(31_258_000, 0) + // Minimum execution time: 26_259_000 picoseconds. + Weight::from_parts(26_920_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: System Account (r:999 w:999) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:999 w:999) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `u` is `[1, 1000]`. fn upgrade_accounts(u: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `176 + u * (136 ±0)` + // Measured: `143 + u * (136 ±0)` // Estimated: `990 + u * (2603 ±0)` - // Minimum execution time: 28_694_000 picoseconds. - Weight::from_parts(29_165_000, 0) + // Minimum execution time: 24_366_000 picoseconds. + Weight::from_parts(24_646_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 12_713 - .saturating_add(Weight::from_parts(22_707_946, 0).saturating_mul(u.into())) + // Standard Error: 13_626 + .saturating_add(Weight::from_parts(20_193_487, 0).saturating_mul(u.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into())) } - - fn force_adjust_total_issuance() -> Weight { - Weight::zero() - } + fn force_adjust_total_issuance() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 9_007_000 picoseconds. + Weight::from_parts(9_367_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } } diff --git a/runtime/altair/src/weights/pallet_block_rewards.rs b/runtime/altair/src/weights/pallet_block_rewards.rs index 2fcc0b7167..a584d2c034 100644 --- a/runtime/altair/src/weights/pallet_block_rewards.rs +++ b/runtime/altair/src/weights/pallet_block_rewards.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_block_rewards` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_block_rewards // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_block_rewards.rs @@ -32,44 +31,44 @@ use core::marker::PhantomData; /// Weight functions for `pallet_block_rewards`. pub struct WeightInfo(PhantomData); impl pallet_block_rewards::WeightInfo for WeightInfo { - /// Storage: BlockRewardsBase Currency (r:1 w:0) - /// Proof: BlockRewardsBase Currency (max_values: None, max_size: Some(79), added: 2554, mode: MaxEncodedLen) - /// Storage: BlockRewardsBase Group (r:1 w:0) - /// Proof: BlockRewardsBase Group (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: BlockRewardsBase StakeAccount (r:1 w:1) - /// Proof: BlockRewardsBase StakeAccount (max_values: None, max_size: Some(123), added: 2598, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `BlockRewardsBase::Currency` (r:1 w:0) + /// Proof: `BlockRewardsBase::Currency` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`) + /// Storage: `BlockRewardsBase::Group` (r:1 w:0) + /// Proof: `BlockRewardsBase::Group` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `BlockRewardsBase::StakeAccount` (r:1 w:1) + /// Proof: `BlockRewardsBase::StakeAccount` (`max_values`: None, `max_size`: Some(123), added: 2598, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn claim_reward() -> Weight { // Proof Size summary in bytes: - // Measured: `583` + // Measured: `516` // Estimated: `6196` - // Minimum execution time: 92_032_000 picoseconds. - Weight::from_parts(93_797_000, 0) + // Minimum execution time: 80_059_000 picoseconds. + Weight::from_parts(81_492_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: BlockRewards NextSessionChanges (r:1 w:1) - /// Proof: BlockRewards NextSessionChanges (max_values: Some(1), max_size: Some(2097), added: 2592, mode: MaxEncodedLen) + /// Storage: `BlockRewards::NextSessionChanges` (r:1 w:1) + /// Proof: `BlockRewards::NextSessionChanges` (`max_values`: Some(1), `max_size`: Some(2097), added: 2592, mode: `MaxEncodedLen`) fn set_collator_reward_per_session() -> Weight { // Proof Size summary in bytes: // Measured: `41` // Estimated: `3582` - // Minimum execution time: 8_967_000 picoseconds. - Weight::from_parts(9_287_000, 0) + // Minimum execution time: 6_251_000 picoseconds. + Weight::from_parts(6_622_000, 0) .saturating_add(Weight::from_parts(0, 3582)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: BlockRewards NextSessionChanges (r:1 w:1) - /// Proof: BlockRewards NextSessionChanges (max_values: Some(1), max_size: Some(2097), added: 2592, mode: MaxEncodedLen) + /// Storage: `BlockRewards::NextSessionChanges` (r:1 w:1) + /// Proof: `BlockRewards::NextSessionChanges` (`max_values`: Some(1), `max_size`: Some(2097), added: 2592, mode: `MaxEncodedLen`) fn set_annual_treasury_inflation_rate() -> Weight { // Proof Size summary in bytes: // Measured: `41` // Estimated: `3582` - // Minimum execution time: 8_957_000 picoseconds. - Weight::from_parts(9_308_000, 0) + // Minimum execution time: 6_422_000 picoseconds. + Weight::from_parts(6_592_000, 0) .saturating_add(Weight::from_parts(0, 3582)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/altair/src/weights/pallet_collator_allowlist.rs b/runtime/altair/src/weights/pallet_collator_allowlist.rs index 3205da0862..9c92aea622 100644 --- a/runtime/altair/src/weights/pallet_collator_allowlist.rs +++ b/runtime/altair/src/weights/pallet_collator_allowlist.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_collator_allowlist` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_collator_allowlist // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_collator_allowlist.rs @@ -32,28 +31,28 @@ use core::marker::PhantomData; /// Weight functions for `pallet_collator_allowlist`. pub struct WeightInfo(PhantomData); impl pallet_collator_allowlist::WeightInfo for WeightInfo { - /// Storage: Session NextKeys (r:1 w:0) - /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - /// Storage: CollatorAllowlist Allowlist (r:1 w:1) - /// Proof: CollatorAllowlist Allowlist (max_values: None, max_size: Some(32), added: 2507, mode: MaxEncodedLen) + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorAllowlist::Allowlist` (r:1 w:1) + /// Proof: `CollatorAllowlist::Allowlist` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) fn add() -> Weight { // Proof Size summary in bytes: - // Measured: `524` - // Estimated: `3989` - // Minimum execution time: 26_499_000 picoseconds. - Weight::from_parts(27_461_000, 0) - .saturating_add(Weight::from_parts(0, 3989)) + // Measured: `452` + // Estimated: `3917` + // Minimum execution time: 20_398_000 picoseconds. + Weight::from_parts(21_200_000, 0) + .saturating_add(Weight::from_parts(0, 3917)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: CollatorAllowlist Allowlist (r:1 w:1) - /// Proof: CollatorAllowlist Allowlist (max_values: None, max_size: Some(32), added: 2507, mode: MaxEncodedLen) + /// Storage: `CollatorAllowlist::Allowlist` (r:1 w:1) + /// Proof: `CollatorAllowlist::Allowlist` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) fn remove() -> Weight { // Proof Size summary in bytes: // Measured: `232` // Estimated: `3497` - // Minimum execution time: 19_957_000 picoseconds. - Weight::from_parts(20_668_000, 0) + // Minimum execution time: 14_517_000 picoseconds. + Weight::from_parts(15_068_000, 0) .saturating_add(Weight::from_parts(0, 3497)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/altair/src/weights/pallet_collator_selection.rs b/runtime/altair/src/weights/pallet_collator_selection.rs index b0638a6c71..94ab9f6452 100644 --- a/runtime/altair/src/weights/pallet_collator_selection.rs +++ b/runtime/altair/src/weights/pallet_collator_selection.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_collator_selection` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_collator_selection // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_collator_selection.rs @@ -32,155 +31,239 @@ use core::marker::PhantomData; /// Weight functions for `pallet_collator_selection`. pub struct WeightInfo(PhantomData); impl pallet_collator_selection::WeightInfo for WeightInfo { - /// Storage: CollatorAllowlist Allowlist (r:100 w:0) - /// Proof: CollatorAllowlist Allowlist (max_values: None, max_size: Some(32), added: 2507, mode: MaxEncodedLen) - /// Storage: Session NextKeys (r:100 w:0) - /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - /// Storage: CollatorSelection Invulnerables (r:0 w:1) - /// Proof: CollatorSelection Invulnerables (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: `CollatorAllowlist::Allowlist` (r:100 w:0) + /// Proof: `CollatorAllowlist::Allowlist` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + /// Storage: `Session::NextKeys` (r:100 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::Invulnerables` (r:0 w:1) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 100]`. fn set_invulnerables(b: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `466 + b * (112 ±0)` - // Estimated: `1453 + b * (2588 ±0)` - // Minimum execution time: 25_368_000 picoseconds. - Weight::from_parts(22_752_174, 0) - .saturating_add(Weight::from_parts(0, 1453)) - // Standard Error: 6_025 - .saturating_add(Weight::from_parts(6_117_029, 0).saturating_mul(b.into())) + // Measured: `393 + b * (112 ±0)` + // Estimated: `1382 + b * (2588 ±0)` + // Minimum execution time: 21_761_000 picoseconds. + Weight::from_parts(19_713_118, 0) + .saturating_add(Weight::from_parts(0, 1382)) + // Standard Error: 8_605 + .saturating_add(Weight::from_parts(6_198_845, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(b.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 2588).saturating_mul(b.into())) } - /// Storage: CollatorSelection DesiredCandidates (r:0 w:1) - /// Proof: CollatorSelection DesiredCandidates (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: `CollatorAllowlist::Allowlist` (r:1 w:0) + /// Proof: `CollatorAllowlist::Allowlist` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:1) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(961), added: 1456, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 99]`. + /// The range of component `c` is `[1, 19]`. + fn add_invulnerable(b: u32, c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `1273 + b * (37 ±0) + c * (48 ±0)` + // Estimated: `4693 + b * (37 ±0) + c * (53 ±0)` + // Minimum execution time: 60_674_000 picoseconds. + Weight::from_parts(59_889_490, 0) + .saturating_add(Weight::from_parts(0, 4693)) + // Standard Error: 2_332 + .saturating_add(Weight::from_parts(121_551, 0).saturating_mul(b.into())) + // Standard Error: 12_306 + .saturating_add(Weight::from_parts(106_035, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 53).saturating_mul(c.into())) + } + /// Storage: `CollatorSelection::CandidateList` (r:1 w:0) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(961), added: 1456, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:1) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// The range of component `b` is `[6, 100]`. + fn remove_invulnerable(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `285 + b * (32 ±0)` + // Estimated: `4687` + // Minimum execution time: 15_729_000 picoseconds. + Weight::from_parts(16_493_057, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 866 + .saturating_add(Weight::from_parts(59_214, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `CollatorSelection::DesiredCandidates` (r:0 w:1) + /// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn set_desired_candidates() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 15_079_000 picoseconds. - Weight::from_parts(15_380_000, 0) + // Minimum execution time: 6_793_000 picoseconds. + Weight::from_parts(7_183_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: CollatorSelection CandidacyBond (r:0 w:1) - /// Proof: CollatorSelection CandidacyBond (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) - fn set_candidacy_bond(_: u32, _: u32) -> Weight { + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:1) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(961), added: 1456, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:20 w:20) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:20) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// The range of component `c` is `[0, 20]`. + /// The range of component `k` is `[0, 20]`. + fn set_candidacy_bond(c: u32, k: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 11_181_000 picoseconds. - Weight::from_parts(11_612_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Measured: `0 + c * (201 ±0) + k * (152 ±0)` + // Estimated: `3593 + c * (848 ±30) + k * (848 ±30)` + // Minimum execution time: 12_914_000 picoseconds. + Weight::from_parts(13_335_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + // Standard Error: 227_323 + .saturating_add(Weight::from_parts(7_651_358, 0).saturating_mul(c.into())) + // Standard Error: 227_323 + .saturating_add(Weight::from_parts(7_425_473, 0).saturating_mul(k.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) + .saturating_add(Weight::from_parts(0, 848).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 848).saturating_mul(k.into())) + } + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(961), added: 1456, mode: `MaxEncodedLen`) + /// The range of component `c` is `[5, 20]`. + fn update_bond(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `529 + c * (48 ±0)` + // Estimated: `2446` + // Minimum execution time: 34_805_000 picoseconds. + Weight::from_parts(35_818_201, 0) + .saturating_add(Weight::from_parts(0, 2446)) + // Standard Error: 6_216 + .saturating_add(Weight::from_parts(92_092, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: CollatorSelection Candidates (r:1 w:1) - /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(961), added: 1456, mode: MaxEncodedLen) - /// Storage: CollatorSelection DesiredCandidates (r:1 w:0) - /// Proof: CollatorSelection DesiredCandidates (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: CollatorSelection Invulnerables (r:1 w:0) - /// Proof: CollatorSelection Invulnerables (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: CollatorAllowlist Allowlist (r:1 w:0) - /// Proof: CollatorAllowlist Allowlist (max_values: None, max_size: Some(32), added: 2507, mode: MaxEncodedLen) - /// Storage: Session NextKeys (r:1 w:0) - /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - /// Storage: CollatorSelection CandidacyBond (r:1 w:0) - /// Proof: CollatorSelection CandidacyBond (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) - /// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) - /// Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(961), added: 1456, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `CollatorAllowlist::Allowlist` (r:1 w:0) + /// Proof: `CollatorAllowlist::Allowlist` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) /// The range of component `c` is `[1, 19]`. fn register_as_candidate(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1035 + c * (59 ±0)` - // Estimated: `4687 + c * (60 ±0)` - // Minimum execution time: 68_369_000 picoseconds. - Weight::from_parts(70_064_119, 0) + // Measured: `892 + c * (61 ±0)` + // Estimated: `4687 + c * (62 ±0)` + // Minimum execution time: 54_151_000 picoseconds. + Weight::from_parts(55_736_070, 0) .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 4_016 - .saturating_add(Weight::from_parts(250_510, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(6)) + // Standard Error: 5_085 + .saturating_add(Weight::from_parts(278_216, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 60).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 62).saturating_mul(c.into())) + } + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `CollatorAllowlist::Allowlist` (r:1 w:0) + /// Proof: `CollatorAllowlist::Allowlist` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(961), added: 1456, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:2) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// The range of component `c` is `[5, 20]`. + fn take_candidate_slot(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `984 + c * (62 ±0)` + // Estimated: `4687 + c * (62 ±0)` + // Minimum execution time: 76_863_000 picoseconds. + Weight::from_parts(77_750_668, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 5_997 + .saturating_add(Weight::from_parts(257_579, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(Weight::from_parts(0, 62).saturating_mul(c.into())) } - /// Storage: CollatorSelection Candidates (r:1 w:1) - /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(961), added: 1456, mode: MaxEncodedLen) - /// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) - /// Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) - /// The range of component `c` is `[6, 20]`. + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(961), added: 1456, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// The range of component `c` is `[5, 20]`. fn leave_intent(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `549 + c * (44 ±0)` - // Estimated: `2446` - // Minimum execution time: 47_479_000 picoseconds. - Weight::from_parts(49_006_465, 0) - .saturating_add(Weight::from_parts(0, 2446)) - // Standard Error: 5_387 - .saturating_add(Weight::from_parts(82_913, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(1)) + // Measured: `476 + c * (48 ±0)` + // Estimated: `4687` + // Minimum execution time: 40_495_000 picoseconds. + Weight::from_parts(41_308_584, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 3_724 + .saturating_add(Weight::from_parts(110_837, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: System BlockWeight (r:1 w:1) - /// Proof: System BlockWeight (max_values: Some(1), max_size: Some(48), added: 543, mode: MaxEncodedLen) - /// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) - /// Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) fn note_author() -> Weight { // Proof Size summary in bytes: // Measured: `192` // Estimated: `6196` - // Minimum execution time: 74_981_000 picoseconds. - Weight::from_parts(76_313_000, 0) + // Minimum execution time: 59_922_000 picoseconds. + Weight::from_parts(61_765_000, 0) .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: CollatorSelection Candidates (r:1 w:0) - /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(961), added: 1456, mode: MaxEncodedLen) - /// Storage: CollatorSelection LastAuthoredBlock (r:20 w:0) - /// Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) - /// Storage: CollatorSelection Invulnerables (r:1 w:0) - /// Proof: CollatorSelection Invulnerables (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: System BlockWeight (r:1 w:1) - /// Proof: System BlockWeight (max_values: Some(1), max_size: Some(48), added: 543, mode: MaxEncodedLen) - /// Storage: System Account (r:15 w:15) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:0) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(961), added: 1456, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:20 w:0) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::DesiredCandidates` (r:1 w:0) + /// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:16 w:16) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. /// The range of component `c` is `[1, 20]`. fn new_session(r: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `578 + c * (98 ±0) + r * (142 ±0)` - // Estimated: `4687 + c * (2519 ±9) + r * (2259 ±17)` - // Minimum execution time: 25_056_000 picoseconds. - Weight::from_parts(25_488_000, 0) - .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 471_127 - .saturating_add(Weight::from_parts(18_642_610, 0).saturating_mul(c.into())) + // Measured: `416 + c * (98 ±0) + r * (154 ±0)` + // Estimated: `16266974136295046 + c * (2519 ±0) + r * (2393 ±14)` + // Minimum execution time: 25_748_000 picoseconds. + Weight::from_parts(26_199_000, 0) + .saturating_add(Weight::from_parts(0, 16266974136295046)) + // Standard Error: 360_665 + .saturating_add(Weight::from_parts(16_710_136, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) - .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) .saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into())) - .saturating_add(Weight::from_parts(0, 2259).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(0, 2393).saturating_mul(r.into())) } - - fn add_invulnerable(_: u32, _: u32) -> Weight { - // Pending to generate - Weight::default() - } - - fn remove_invulnerable(_: u32) -> Weight { - // Pending to generate - Weight::default() - } - - fn update_bond(_: u32) -> Weight { - // Pending to generate - Weight::default() - } - - fn take_candidate_slot(_: u32) -> Weight { - // Pending to generate - Weight::default() - } } diff --git a/runtime/altair/src/weights/pallet_collective.rs b/runtime/altair/src/weights/pallet_collective.rs index 999824cebf..50f68bd6ca 100644 --- a/runtime/altair/src/weights/pallet_collective.rs +++ b/runtime/altair/src/weights/pallet_collective.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_collective` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_collective // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_collective.rs @@ -32,28 +31,28 @@ use core::marker::PhantomData; /// Weight functions for `pallet_collective`. pub struct WeightInfo(PhantomData); impl pallet_collective::WeightInfo for WeightInfo { - /// Storage: Council Members (r:1 w:1) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:0) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Voting (r:100 w:100) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Prime (r:0 w:1) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Council::Members` (r:1 w:1) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:0) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Voting` (r:100 w:100) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:0 w:1) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `m` is `[0, 100]`. /// The range of component `n` is `[0, 100]`. /// The range of component `p` is `[0, 100]`. fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + m * (3232 ±0) + p * (3190 ±0)` - // Estimated: `15762 + m * (1967 ±23) + p * (4332 ±23)` - // Minimum execution time: 23_374_000 picoseconds. - Weight::from_parts(23_504_000, 0) - .saturating_add(Weight::from_parts(0, 15762)) - // Standard Error: 60_192 - .saturating_add(Weight::from_parts(4_633_199, 0).saturating_mul(m.into())) - // Standard Error: 60_192 - .saturating_add(Weight::from_parts(8_698_431, 0).saturating_mul(p.into())) + // Estimated: `15728 + m * (1967 ±23) + p * (4332 ±23)` + // Minimum execution time: 20_168_000 picoseconds. + Weight::from_parts(20_378_000, 0) + .saturating_add(Weight::from_parts(0, 15728)) + // Standard Error: 67_745 + .saturating_add(Weight::from_parts(4_991_723, 0).saturating_mul(m.into())) + // Standard Error: 67_745 + .saturating_add(Weight::from_parts(9_516_473, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(2)) @@ -61,225 +60,225 @@ impl pallet_collective::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 1967).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 4332).saturating_mul(p.into())) } - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[1, 100]`. fn execute(b: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `103 + m * (32 ±0)` - // Estimated: `1589 + m * (32 ±0)` - // Minimum execution time: 24_135_000 picoseconds. - Weight::from_parts(22_966_882, 0) - .saturating_add(Weight::from_parts(0, 1589)) - // Standard Error: 46 - .saturating_add(Weight::from_parts(1_997, 0).saturating_mul(b.into())) - // Standard Error: 480 - .saturating_add(Weight::from_parts(20_320, 0).saturating_mul(m.into())) + // Measured: `69 + m * (32 ±0)` + // Estimated: `1555 + m * (32 ±0)` + // Minimum execution time: 17_863_000 picoseconds. + Weight::from_parts(16_825_917, 0) + .saturating_add(Weight::from_parts(0, 1555)) + // Standard Error: 47 + .saturating_add(Weight::from_parts(1_631, 0).saturating_mul(b.into())) + // Standard Error: 484 + .saturating_add(Weight::from_parts(19_800, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:1 w:0) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:1 w:0) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[1, 100]`. fn propose_execute(b: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `103 + m * (32 ±0)` - // Estimated: `3569 + m * (32 ±0)` - // Minimum execution time: 28_223_000 picoseconds. - Weight::from_parts(26_956_940, 0) - .saturating_add(Weight::from_parts(0, 3569)) - // Standard Error: 38 - .saturating_add(Weight::from_parts(2_106, 0).saturating_mul(b.into())) - // Standard Error: 401 - .saturating_add(Weight::from_parts(32_690, 0).saturating_mul(m.into())) + // Measured: `69 + m * (32 ±0)` + // Estimated: `3535 + m * (32 ±0)` + // Minimum execution time: 22_021_000 picoseconds. + Weight::from_parts(20_559_271, 0) + .saturating_add(Weight::from_parts(0, 3535)) + // Standard Error: 58 + .saturating_add(Weight::from_parts(2_310, 0).saturating_mul(b.into())) + // Standard Error: 598 + .saturating_add(Weight::from_parts(34_169, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:1 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalCount (r:1 w:1) - /// Proof Skipped: Council ProposalCount (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Voting (r:0 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:1 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalCount` (r:1 w:1) + /// Proof: `Council::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Voting` (r:0 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[2, 100]`. /// The range of component `p` is `[1, 100]`. fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `393 + m * (32 ±0) + p * (36 ±0)` - // Estimated: `3785 + m * (33 ±0) + p * (36 ±0)` - // Minimum execution time: 36_949_000 picoseconds. - Weight::from_parts(36_552_537, 0) - .saturating_add(Weight::from_parts(0, 3785)) - // Standard Error: 93 - .saturating_add(Weight::from_parts(3_308, 0).saturating_mul(b.into())) - // Standard Error: 979 - .saturating_add(Weight::from_parts(29_061, 0).saturating_mul(m.into())) - // Standard Error: 967 - .saturating_add(Weight::from_parts(235_816, 0).saturating_mul(p.into())) + // Measured: `359 + m * (32 ±0) + p * (36 ±0)` + // Estimated: `3751 + m * (33 ±0) + p * (36 ±0)` + // Minimum execution time: 28_624_000 picoseconds. + Weight::from_parts(28_370_286, 0) + .saturating_add(Weight::from_parts(0, 3751)) + // Standard Error: 111 + .saturating_add(Weight::from_parts(3_203, 0).saturating_mul(b.into())) + // Standard Error: 1_163 + .saturating_add(Weight::from_parts(24_185, 0).saturating_mul(m.into())) + // Standard Error: 1_148 + .saturating_add(Weight::from_parts(264_716, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 33).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) } - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Voting` (r:1 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `m` is `[5, 100]`. fn vote(m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `842 + m * (64 ±0)` - // Estimated: `4306 + m * (64 ±0)` - // Minimum execution time: 31_420_000 picoseconds. - Weight::from_parts(31_931_080, 0) - .saturating_add(Weight::from_parts(0, 4306)) - // Standard Error: 746 - .saturating_add(Weight::from_parts(47_123, 0).saturating_mul(m.into())) + // Measured: `808 + m * (64 ±0)` + // Estimated: `4272 + m * (64 ±0)` + // Minimum execution time: 25_808_000 picoseconds. + Weight::from_parts(26_813_711, 0) + .saturating_add(Weight::from_parts(0, 4272)) + // Standard Error: 1_518 + .saturating_add(Weight::from_parts(46_212, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) } - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:0 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: `Council::Voting` (r:1 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:0 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_early_disapproved(m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `431 + m * (64 ±0) + p * (36 ±0)` - // Estimated: `3876 + m * (65 ±0) + p * (36 ±0)` - // Minimum execution time: 40_307_000 picoseconds. - Weight::from_parts(39_986_377, 0) - .saturating_add(Weight::from_parts(0, 3876)) - // Standard Error: 867 - .saturating_add(Weight::from_parts(34_369, 0).saturating_mul(m.into())) - // Standard Error: 845 - .saturating_add(Weight::from_parts(229_930, 0).saturating_mul(p.into())) + // Measured: `397 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `3842 + m * (65 ±0) + p * (36 ±0)` + // Minimum execution time: 31_148_000 picoseconds. + Weight::from_parts(31_291_102, 0) + .saturating_add(Weight::from_parts(0, 3842)) + // Standard Error: 1_331 + .saturating_add(Weight::from_parts(26_407, 0).saturating_mul(m.into())) + // Standard Error: 1_297 + .saturating_add(Weight::from_parts(258_062, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) } - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:1 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Council::Voting` (r:1 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:1 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `733 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` - // Estimated: `4050 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` - // Minimum execution time: 59_182_000 picoseconds. - Weight::from_parts(58_407_416, 0) - .saturating_add(Weight::from_parts(0, 4050)) - // Standard Error: 198 - .saturating_add(Weight::from_parts(2_797, 0).saturating_mul(b.into())) - // Standard Error: 2_101 - .saturating_add(Weight::from_parts(13_039, 0).saturating_mul(m.into())) - // Standard Error: 2_048 - .saturating_add(Weight::from_parts(281_668, 0).saturating_mul(p.into())) + // Measured: `699 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `4016 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` + // Minimum execution time: 44_864_000 picoseconds. + Weight::from_parts(43_464_920, 0) + .saturating_add(Weight::from_parts(0, 4016)) + // Standard Error: 226 + .saturating_add(Weight::from_parts(3_120, 0).saturating_mul(b.into())) + // Standard Error: 2_391 + .saturating_add(Weight::from_parts(42_023, 0).saturating_mul(m.into())) + // Standard Error: 2_331 + .saturating_add(Weight::from_parts(311_089, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) .saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) } - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:1 w:0) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:0 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: `Council::Voting` (r:1 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:1 w:0) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:0 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_disapproved(m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `451 + m * (64 ±0) + p * (36 ±0)` - // Estimated: `3896 + m * (65 ±0) + p * (36 ±0)` - // Minimum execution time: 44_323_000 picoseconds. - Weight::from_parts(43_743_185, 0) - .saturating_add(Weight::from_parts(0, 3896)) - // Standard Error: 919 - .saturating_add(Weight::from_parts(37_849, 0).saturating_mul(m.into())) - // Standard Error: 896 - .saturating_add(Weight::from_parts(230_841, 0).saturating_mul(p.into())) + // Measured: `417 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `3862 + m * (65 ±0) + p * (36 ±0)` + // Minimum execution time: 33_622_000 picoseconds. + Weight::from_parts(32_647_996, 0) + .saturating_add(Weight::from_parts(0, 3862)) + // Standard Error: 1_662 + .saturating_add(Weight::from_parts(35_027, 0).saturating_mul(m.into())) + // Standard Error: 1_620 + .saturating_add(Weight::from_parts(264_644, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) } - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:1 w:0) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:1 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Council::Voting` (r:1 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:1 w:0) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:1 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `753 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` - // Estimated: `4070 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` - // Minimum execution time: 62_588_000 picoseconds. - Weight::from_parts(62_848_298, 0) - .saturating_add(Weight::from_parts(0, 4070)) - // Standard Error: 150 - .saturating_add(Weight::from_parts(2_185, 0).saturating_mul(b.into())) - // Standard Error: 1_592 - .saturating_add(Weight::from_parts(33_764, 0).saturating_mul(m.into())) - // Standard Error: 1_552 - .saturating_add(Weight::from_parts(267_125, 0).saturating_mul(p.into())) + // Measured: `719 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `4036 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` + // Minimum execution time: 47_879_000 picoseconds. + Weight::from_parts(53_428_347, 0) + .saturating_add(Weight::from_parts(0, 4036)) + // Standard Error: 228 + .saturating_add(Weight::from_parts(573, 0).saturating_mul(b.into())) + // Standard Error: 2_414 + .saturating_add(Weight::from_parts(3_988, 0).saturating_mul(m.into())) + // Standard Error: 2_353 + .saturating_add(Weight::from_parts(286_186, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) .saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) } - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Voting (r:0 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:0 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Voting` (r:0 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:0 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `p` is `[1, 100]`. fn disapprove_proposal(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `260 + p * (32 ±0)` - // Estimated: `1745 + p * (32 ±0)` - // Minimum execution time: 23_224_000 picoseconds. - Weight::from_parts(24_703_918, 0) - .saturating_add(Weight::from_parts(0, 1745)) - // Standard Error: 693 - .saturating_add(Weight::from_parts(216_290, 0).saturating_mul(p.into())) + // Measured: `226 + p * (32 ±0)` + // Estimated: `1711 + p * (32 ±0)` + // Minimum execution time: 17_001_000 picoseconds. + Weight::from_parts(18_171_314, 0) + .saturating_add(Weight::from_parts(0, 1711)) + // Standard Error: 730 + .saturating_add(Weight::from_parts(246_569, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into())) diff --git a/runtime/altair/src/weights/pallet_democracy.rs b/runtime/altair/src/weights/pallet_democracy.rs index 0c9b0cfed3..cbbb2de756 100644 --- a/runtime/altair/src/weights/pallet_democracy.rs +++ b/runtime/altair/src/weights/pallet_democracy.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_democracy` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_democracy // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_democracy.rs @@ -32,477 +31,483 @@ use core::marker::PhantomData; /// Weight functions for `pallet_democracy`. pub struct WeightInfo(PhantomData); impl pallet_democracy::WeightInfo for WeightInfo { - /// Storage: Democracy PublicPropCount (r:1 w:1) - /// Proof: Democracy PublicPropCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy PublicProps (r:1 w:1) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Democracy Blacklist (r:1 w:0) - /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) - /// Storage: Democracy DepositOf (r:0 w:1) - /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) + /// Storage: `Democracy::PublicPropCount` (r:1 w:1) + /// Proof: `Democracy::PublicPropCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Democracy::PublicProps` (r:1 w:1) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) + /// Storage: `Democracy::Blacklist` (r:1 w:0) + /// Proof: `Democracy::Blacklist` (`max_values`: None, `max_size`: Some(3238), added: 5713, mode: `MaxEncodedLen`) + /// Storage: `Democracy::DepositOf` (r:0 w:1) + /// Proof: `Democracy::DepositOf` (`max_values`: None, `max_size`: Some(3230), added: 5705, mode: `MaxEncodedLen`) fn propose() -> Weight { // Proof Size summary in bytes: // Measured: `4768` // Estimated: `18187` - // Minimum execution time: 59_613_000 picoseconds. - Weight::from_parts(60_644_000, 0) + // Minimum execution time: 50_003_000 picoseconds. + Weight::from_parts(50_915_000, 0) .saturating_add(Weight::from_parts(0, 18187)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Democracy DepositOf (r:1 w:1) - /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) + /// Storage: `Democracy::DepositOf` (r:1 w:1) + /// Proof: `Democracy::DepositOf` (`max_values`: None, `max_size`: Some(3230), added: 5705, mode: `MaxEncodedLen`) fn second() -> Weight { // Proof Size summary in bytes: // Measured: `3523` // Estimated: `6695` - // Minimum execution time: 52_940_000 picoseconds. - Weight::from_parts(54_773_000, 0) + // Minimum execution time: 46_507_000 picoseconds. + Weight::from_parts(47_719_000, 0) .saturating_add(Weight::from_parts(0, 6695)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::VotingOf` (r:1 w:1) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) fn vote_new() -> Weight { // Proof Size summary in bytes: // Measured: `3400` // Estimated: `7260` - // Minimum execution time: 66_846_000 picoseconds. - Weight::from_parts(67_848_000, 0) + // Minimum execution time: 65_672_000 picoseconds. + Weight::from_parts(67_986_000, 0) .saturating_add(Weight::from_parts(0, 7260)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::VotingOf` (r:1 w:1) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) fn vote_existing() -> Weight { // Proof Size summary in bytes: // Measured: `3422` // Estimated: `7260` - // Minimum execution time: 73_378_000 picoseconds. - Weight::from_parts(75_562_000, 0) + // Minimum execution time: 69_098_000 picoseconds. + Weight::from_parts(70_421_000, 0) .saturating_add(Weight::from_parts(0, 7260)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy Cancellations (r:1 w:1) - /// Proof: Democracy Cancellations (max_values: None, max_size: Some(33), added: 2508, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::Cancellations` (r:1 w:1) + /// Proof: `Democracy::Cancellations` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn emergency_cancel() -> Weight { // Proof Size summary in bytes: // Measured: `333` // Estimated: `3666` - // Minimum execution time: 39_905_000 picoseconds. - Weight::from_parts(40_647_000, 0) + // Minimum execution time: 31_018_000 picoseconds. + Weight::from_parts(32_010_000, 0) .saturating_add(Weight::from_parts(0, 3666)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Democracy PublicProps (r:1 w:1) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Democracy DepositOf (r:1 w:1) - /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:3 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - /// Storage: Democracy NextExternal (r:1 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy Blacklist (r:0 w:1) - /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) + /// Storage: `Democracy::PublicProps` (r:1 w:1) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) + /// Storage: `Democracy::DepositOf` (r:1 w:1) + /// Proof: `Democracy::DepositOf` (`max_values`: None, `max_size`: Some(3230), added: 5705, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:3 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) + /// Storage: `Democracy::NextExternal` (r:1 w:1) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::Blacklist` (r:0 w:1) + /// Proof: `Democracy::Blacklist` (`max_values`: None, `max_size`: Some(3238), added: 5713, mode: `MaxEncodedLen`) fn blacklist() -> Weight { // Proof Size summary in bytes: // Measured: `6249` // Estimated: `18187` - // Minimum execution time: 149_401_000 picoseconds. - Weight::from_parts(151_185_000, 0) + // Minimum execution time: 128_279_000 picoseconds. + Weight::from_parts(130_614_000, 0) .saturating_add(Weight::from_parts(0, 18187)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(8)) } - /// Storage: Democracy NextExternal (r:1 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy Blacklist (r:1 w:0) - /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) + /// Storage: `Democracy::NextExternal` (r:1 w:1) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Democracy::Blacklist` (r:1 w:0) + /// Proof: `Democracy::Blacklist` (`max_values`: None, `max_size`: Some(3238), added: 5713, mode: `MaxEncodedLen`) fn external_propose() -> Weight { // Proof Size summary in bytes: // Measured: `3383` // Estimated: `6703` - // Minimum execution time: 18_706_000 picoseconds. - Weight::from_parts(19_257_000, 0) + // Minimum execution time: 15_999_000 picoseconds. + Weight::from_parts(16_401_000, 0) .saturating_add(Weight::from_parts(0, 6703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy NextExternal (r:0 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) + /// Storage: `Democracy::NextExternal` (r:0 w:1) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) fn external_propose_majority() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_970_000 picoseconds. - Weight::from_parts(5_330_000, 0) + // Minimum execution time: 3_937_000 picoseconds. + Weight::from_parts(4_227_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy NextExternal (r:0 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) + /// Storage: `Democracy::NextExternal` (r:0 w:1) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) fn external_propose_default() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_889_000 picoseconds. - Weight::from_parts(5_170_000, 0) + // Minimum execution time: 3_937_000 picoseconds. + Weight::from_parts(4_148_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy NextExternal (r:1 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumCount (r:1 w:1) - /// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:2) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:0 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: `Democracy::NextExternal` (r:1 w:1) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumCount` (r:1 w:1) + /// Proof: `Democracy::ReferendumCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:2) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:0 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) fn fast_track() -> Weight { // Proof Size summary in bytes: // Measured: `253` // Estimated: `3518` - // Minimum execution time: 40_937_000 picoseconds. - Weight::from_parts(41_769_000, 0) + // Minimum execution time: 29_224_000 picoseconds. + Weight::from_parts(30_336_000, 0) .saturating_add(Weight::from_parts(0, 3518)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: Democracy NextExternal (r:1 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy Blacklist (r:1 w:1) - /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Democracy::NextExternal` (r:1 w:1) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Democracy::Blacklist` (r:1 w:1) + /// Proof: `Democracy::Blacklist` (`max_values`: None, `max_size`: Some(3238), added: 5713, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn veto_external() -> Weight { // Proof Size summary in bytes: // Measured: `3486` // Estimated: `6703` - // Minimum execution time: 43_001_000 picoseconds. - Weight::from_parts(44_283_000, 0) + // Minimum execution time: 33_212_000 picoseconds. + Weight::from_parts(34_173_000, 0) .saturating_add(Weight::from_parts(0, 6703)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Democracy PublicProps (r:1 w:1) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Democracy DepositOf (r:1 w:1) - /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Democracy::PublicProps` (r:1 w:1) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) + /// Storage: `Democracy::DepositOf` (r:1 w:1) + /// Proof: `Democracy::DepositOf` (`max_values`: None, `max_size`: Some(3230), added: 5705, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn cancel_proposal() -> Weight { // Proof Size summary in bytes: // Measured: `6160` // Estimated: `18187` - // Minimum execution time: 123_593_000 picoseconds. - Weight::from_parts(125_377_000, 0) + // Minimum execution time: 105_847_000 picoseconds. + Weight::from_parts(107_550_000, 0) .saturating_add(Weight::from_parts(0, 18187)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:0 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:0 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) fn cancel_referendum() -> Weight { // Proof Size summary in bytes: // Measured: `238` // Estimated: `3518` - // Minimum execution time: 29_746_000 picoseconds. - Weight::from_parts(30_097_000, 0) + // Minimum execution time: 21_220_000 picoseconds. + Weight::from_parts(21_871_000, 0) .saturating_add(Weight::from_parts(0, 3518)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Democracy LowestUnbaked (r:1 w:1) - /// Proof: Democracy LowestUnbaked (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumCount (r:1 w:0) - /// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:99 w:0) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: `Democracy::LowestUnbaked` (r:1 w:1) + /// Proof: `Democracy::LowestUnbaked` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumCount` (r:1 w:0) + /// Proof: `Democracy::ReferendumCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:99 w:0) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) /// The range of component `r` is `[0, 99]`. fn on_initialize_base(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `211 + r * (86 ±0)` // Estimated: `1489 + r * (2676 ±0)` - // Minimum execution time: 10_349_000 picoseconds. - Weight::from_parts(13_544_734, 0) + // Minimum execution time: 7_624_000 picoseconds. + Weight::from_parts(10_627_540, 0) .saturating_add(Weight::from_parts(0, 1489)) - // Standard Error: 5_038 - .saturating_add(Weight::from_parts(4_087_987, 0).saturating_mul(r.into())) + // Standard Error: 6_189 + .saturating_add(Weight::from_parts(4_137_589, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) } - /// Storage: Democracy LowestUnbaked (r:1 w:1) - /// Proof: Democracy LowestUnbaked (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumCount (r:1 w:0) - /// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy LastTabledWasExternal (r:1 w:0) - /// Proof: Democracy LastTabledWasExternal (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: Democracy NextExternal (r:1 w:0) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy PublicProps (r:1 w:0) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:99 w:0) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: `Democracy::LowestUnbaked` (r:1 w:1) + /// Proof: `Democracy::LowestUnbaked` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumCount` (r:1 w:0) + /// Proof: `Democracy::ReferendumCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Democracy::LastTabledWasExternal` (r:1 w:0) + /// Proof: `Democracy::LastTabledWasExternal` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `Democracy::NextExternal` (r:1 w:0) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Democracy::PublicProps` (r:1 w:0) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:99 w:0) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) /// The range of component `r` is `[0, 99]`. fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `211 + r * (86 ±0)` // Estimated: `18187 + r * (2676 ±0)` - // Minimum execution time: 15_469_000 picoseconds. - Weight::from_parts(18_869_189, 0) + // Minimum execution time: 10_830_000 picoseconds. + Weight::from_parts(12_799_589, 0) .saturating_add(Weight::from_parts(0, 18187)) - // Standard Error: 5_080 - .saturating_add(Weight::from_parts(4_088_151, 0).saturating_mul(r.into())) + // Standard Error: 8_117 + .saturating_add(Weight::from_parts(4_184_722, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) } - /// Storage: Democracy VotingOf (r:3 w:3) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:99 w:99) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Democracy::VotingOf` (r:3 w:3) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:99 w:99) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) /// The range of component `r` is `[0, 99]`. fn delegate(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `764 + r * (108 ±0)` // Estimated: `19800 + r * (2676 ±0)` - // Minimum execution time: 56_647_000 picoseconds. - Weight::from_parts(62_741_892, 0) + // Minimum execution time: 51_987_000 picoseconds. + Weight::from_parts(57_291_600, 0) .saturating_add(Weight::from_parts(0, 19800)) - // Standard Error: 6_476 - .saturating_add(Weight::from_parts(5_189_037, 0).saturating_mul(r.into())) + // Standard Error: 10_138 + .saturating_add(Weight::from_parts(5_342_781, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) } - /// Storage: Democracy VotingOf (r:2 w:2) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:99 w:99) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: `Democracy::VotingOf` (r:2 w:2) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:99 w:99) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) /// The range of component `r` is `[0, 99]`. fn undelegate(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `460 + r * (108 ±0)` // Estimated: `13530 + r * (2676 ±0)` - // Minimum execution time: 28_634_000 picoseconds. - Weight::from_parts(29_357_960, 0) + // Minimum execution time: 24_004_000 picoseconds. + Weight::from_parts(23_636_622, 0) .saturating_add(Weight::from_parts(0, 13530)) - // Standard Error: 6_380 - .saturating_add(Weight::from_parts(5_129_915, 0).saturating_mul(r.into())) + // Standard Error: 8_379 + .saturating_add(Weight::from_parts(5_370_192, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) } - /// Storage: Democracy PublicProps (r:0 w:1) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) + /// Storage: `Democracy::PublicProps` (r:0 w:1) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) fn clear_public_proposals() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_959_000 picoseconds. - Weight::from_parts(5_220_000, 0) + // Minimum execution time: 4_308_000 picoseconds. + Weight::from_parts(4_558_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Democracy::VotingOf` (r:1 w:1) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `r` is `[0, 99]`. fn unlock_remove(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `492` // Estimated: `7260` - // Minimum execution time: 33_984_000 picoseconds. - Weight::from_parts(52_092_292, 0) + // Minimum execution time: 31_148_000 picoseconds. + Weight::from_parts(44_370_848, 0) .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 4_027 - .saturating_add(Weight::from_parts(70_359, 0).saturating_mul(r.into())) + // Standard Error: 2_974 + .saturating_add(Weight::from_parts(66_137, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Democracy::VotingOf` (r:1 w:1) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `r` is `[0, 99]`. fn unlock_set(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `493 + r * (22 ±0)` // Estimated: `7260` - // Minimum execution time: 47_519_000 picoseconds. - Weight::from_parts(49_870_769, 0) + // Minimum execution time: 41_848_000 picoseconds. + Weight::from_parts(43_390_472, 0) .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 1_122 - .saturating_add(Weight::from_parts(85_346, 0).saturating_mul(r.into())) + // Standard Error: 1_049 + .saturating_add(Weight::from_parts(97_162, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::VotingOf` (r:1 w:1) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 100]`. fn remove_vote(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `695 + r * (26 ±0)` // Estimated: `7260` - // Minimum execution time: 21_260_000 picoseconds. - Weight::from_parts(23_945_514, 0) + // Minimum execution time: 21_039_000 picoseconds. + Weight::from_parts(24_175_612, 0) .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 1_027 - .saturating_add(Weight::from_parts(92_014, 0).saturating_mul(r.into())) + // Standard Error: 1_344 + .saturating_add(Weight::from_parts(94_940, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::VotingOf` (r:1 w:1) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 100]`. fn remove_other_vote(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `695 + r * (26 ±0)` // Estimated: `7260` - // Minimum execution time: 21_190_000 picoseconds. - Weight::from_parts(24_157_354, 0) + // Minimum execution time: 20_879_000 picoseconds. + Weight::from_parts(24_094_323, 0) .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 1_086 - .saturating_add(Weight::from_parts(92_539, 0).saturating_mul(r.into())) + // Standard Error: 1_350 + .saturating_add(Weight::from_parts(98_655, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Democracy NextExternal (r:1 w:0) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Preimage StatusFor (r:1 w:0) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:0 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Democracy::NextExternal` (r:1 w:0) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:0) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:0 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn set_external_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `357` // Estimated: `3556` - // Minimum execution time: 27_100_000 picoseconds. - Weight::from_parts(27_642_000, 0) + // Minimum execution time: 23_814_000 picoseconds. + Weight::from_parts(24_615_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy NextExternal (r:1 w:0) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Democracy::NextExternal` (r:1 w:0) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn clear_external_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `253` // Estimated: `3518` - // Minimum execution time: 24_206_000 picoseconds. - Weight::from_parts(24_637_000, 0) + // Minimum execution time: 19_196_000 picoseconds. + Weight::from_parts(19_997_000, 0) .saturating_add(Weight::from_parts(0, 3518)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy PublicProps (r:1 w:0) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Preimage StatusFor (r:1 w:0) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:0 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Democracy::PublicProps` (r:1 w:0) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:0) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:0 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn set_proposal_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `4889` // Estimated: `18187` - // Minimum execution time: 54_913_000 picoseconds. - Weight::from_parts(56_827_000, 0) + // Minimum execution time: 53_660_000 picoseconds. + Weight::from_parts(55_965_000, 0) .saturating_add(Weight::from_parts(0, 18187)) - .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy PublicProps (r:1 w:0) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Democracy::PublicProps` (r:1 w:0) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn clear_proposal_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `4789` // Estimated: `18187` - // Minimum execution time: 51_206_000 picoseconds. - Weight::from_parts(53_050_000, 0) + // Minimum execution time: 47_659_000 picoseconds. + Weight::from_parts(48_671_000, 0) .saturating_add(Weight::from_parts(0, 18187)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Preimage StatusFor (r:1 w:0) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:0 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:0) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:0 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn set_referendum_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `178` // Estimated: `3556` - // Minimum execution time: 21_741_000 picoseconds. - Weight::from_parts(22_272_000, 0) + // Minimum execution time: 19_897_000 picoseconds. + Weight::from_parts(20_518_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy ReferendumInfoOf (r:1 w:0) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:0) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn clear_referendum_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `269` // Estimated: `3666` - // Minimum execution time: 27_020_000 picoseconds. - Weight::from_parts(27_521_000, 0) + // Minimum execution time: 23_383_000 picoseconds. + Weight::from_parts(23_965_000, 0) .saturating_add(Weight::from_parts(0, 3666)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/altair/src/weights/pallet_elections_phragmen.rs b/runtime/altair/src/weights/pallet_elections_phragmen.rs index 8e6ba1a923..b4be03bdb2 100644 --- a/runtime/altair/src/weights/pallet_elections_phragmen.rs +++ b/runtime/altair/src/weights/pallet_elections_phragmen.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_elections_phragmen` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_elections_phragmen // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_elections_phragmen.rs @@ -32,170 +31,170 @@ use core::marker::PhantomData; /// Weight functions for `pallet_elections_phragmen`. pub struct WeightInfo(PhantomData); impl pallet_elections_phragmen::WeightInfo for WeightInfo { - /// Storage: Elections Candidates (r:1 w:0) - /// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Members (r:1 w:0) - /// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections RunnersUp (r:1 w:0) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Voting (r:1 w:1) - /// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Elections::Candidates` (r:1 w:0) + /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Members` (r:1 w:0) + /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::RunnersUp` (r:1 w:0) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Voting` (r:1 w:1) + /// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) /// The range of component `v` is `[1, 5]`. fn vote_equal(v: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `397 + v * (80 ±0)` // Estimated: `4764 + v * (80 ±0)` - // Minimum execution time: 45_766_000 picoseconds. - Weight::from_parts(47_049_779, 0) + // Minimum execution time: 39_624_000 picoseconds. + Weight::from_parts(40_998_021, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 9_976 - .saturating_add(Weight::from_parts(152_113, 0).saturating_mul(v.into())) + // Standard Error: 9_894 + .saturating_add(Weight::from_parts(165_213, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 80).saturating_mul(v.into())) } - /// Storage: Elections Candidates (r:1 w:0) - /// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Members (r:1 w:0) - /// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections RunnersUp (r:1 w:0) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Voting (r:1 w:1) - /// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Elections::Candidates` (r:1 w:0) + /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Members` (r:1 w:0) + /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::RunnersUp` (r:1 w:0) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Voting` (r:1 w:1) + /// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) /// The range of component `v` is `[2, 5]`. fn vote_more(v: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `366 + v * (80 ±0)` // Estimated: `4764 + v * (80 ±0)` - // Minimum execution time: 65_413_000 picoseconds. - Weight::from_parts(66_686_953, 0) + // Minimum execution time: 54_722_000 picoseconds. + Weight::from_parts(56_247_947, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 17_172 - .saturating_add(Weight::from_parts(141_651, 0).saturating_mul(v.into())) + // Standard Error: 16_357 + .saturating_add(Weight::from_parts(168_341, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 80).saturating_mul(v.into())) } - /// Storage: Elections Candidates (r:1 w:0) - /// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Members (r:1 w:0) - /// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections RunnersUp (r:1 w:0) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Voting (r:1 w:1) - /// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Elections::Candidates` (r:1 w:0) + /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Members` (r:1 w:0) + /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::RunnersUp` (r:1 w:0) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Voting` (r:1 w:1) + /// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) /// The range of component `v` is `[2, 5]`. fn vote_less(v: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `398 + v * (80 ±0)` // Estimated: `4764 + v * (80 ±0)` - // Minimum execution time: 65_173_000 picoseconds. - Weight::from_parts(66_348_928, 0) + // Minimum execution time: 54_872_000 picoseconds. + Weight::from_parts(56_262_886, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 17_934 - .saturating_add(Weight::from_parts(232_091, 0).saturating_mul(v.into())) + // Standard Error: 19_358 + .saturating_add(Weight::from_parts(327_852, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 80).saturating_mul(v.into())) } - /// Storage: Elections Voting (r:1 w:1) - /// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Elections::Voting` (r:1 w:1) + /// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) fn remove_voter() -> Weight { // Proof Size summary in bytes: // Measured: `568` // Estimated: `4764` - // Minimum execution time: 68_740_000 picoseconds. - Weight::from_parts(70_252_000, 0) + // Minimum execution time: 56_185_000 picoseconds. + Weight::from_parts(57_116_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Elections Candidates (r:1 w:1) - /// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Members (r:1 w:0) - /// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections RunnersUp (r:1 w:0) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Elections::Candidates` (r:1 w:1) + /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Members` (r:1 w:0) + /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::RunnersUp` (r:1 w:0) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `c` is `[1, 20]`. fn submit_candidacy(c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1475 + c * (48 ±0)` // Estimated: `2960 + c * (48 ±0)` - // Minimum execution time: 49_002_000 picoseconds. - Weight::from_parts(50_158_093, 0) + // Minimum execution time: 39_964_000 picoseconds. + Weight::from_parts(41_511_145, 0) .saturating_add(Weight::from_parts(0, 2960)) - // Standard Error: 2_741 - .saturating_add(Weight::from_parts(98_664, 0).saturating_mul(c.into())) + // Standard Error: 2_918 + .saturating_add(Weight::from_parts(60_761, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 48).saturating_mul(c.into())) } - /// Storage: Elections Candidates (r:1 w:1) - /// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Elections::Candidates` (r:1 w:1) + /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `c` is `[1, 20]`. fn renounce_candidacy_candidate(c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `318 + c * (48 ±0)` // Estimated: `1803 + c * (48 ±0)` - // Minimum execution time: 45_425_000 picoseconds. - Weight::from_parts(46_408_689, 0) + // Minimum execution time: 35_145_000 picoseconds. + Weight::from_parts(36_520_172, 0) .saturating_add(Weight::from_parts(0, 1803)) - // Standard Error: 2_628 - .saturating_add(Weight::from_parts(73_603, 0).saturating_mul(c.into())) + // Standard Error: 3_288 + .saturating_add(Weight::from_parts(58_174, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 48).saturating_mul(c.into())) } - /// Storage: Elections Members (r:1 w:1) - /// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections RunnersUp (r:1 w:1) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:1 w:1) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:0) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Members (r:0 w:1) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Elections::Members` (r:1 w:1) + /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::RunnersUp` (r:1 w:1) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:1 w:1) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:0) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:0 w:1) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn renounce_candidacy_members() -> Weight { // Proof Size summary in bytes: - // Measured: `1655` - // Estimated: `3140` - // Minimum execution time: 62_568_000 picoseconds. - Weight::from_parts(63_770_000, 0) - .saturating_add(Weight::from_parts(0, 3140)) + // Measured: `1621` + // Estimated: `3106` + // Minimum execution time: 51_015_000 picoseconds. + Weight::from_parts(52_037_000, 0) + .saturating_add(Weight::from_parts(0, 3106)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: Elections RunnersUp (r:1 w:1) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Elections::RunnersUp` (r:1 w:1) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn renounce_candidacy_runners_up() -> Weight { // Proof Size summary in bytes: // Measured: `1023` // Estimated: `2508` - // Minimum execution time: 45_546_000 picoseconds. - Weight::from_parts(46_267_000, 0) + // Minimum execution time: 35_436_000 picoseconds. + Weight::from_parts(36_829_000, 0) .saturating_add(Weight::from_parts(0, 2508)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Benchmark Override (r:0 w:0) - /// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn remove_member_without_replacement() -> Weight { // Proof Size summary in bytes: // Measured: `0` @@ -204,93 +203,95 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn Weight::from_parts(500_000_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: Elections Members (r:1 w:1) - /// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Elections RunnersUp (r:1 w:1) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:1 w:1) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:0) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Members (r:0 w:1) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Elections::Members` (r:1 w:1) + /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Elections::RunnersUp` (r:1 w:1) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:1 w:1) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:0) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:0 w:1) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn remove_member_with_replacement() -> Weight { // Proof Size summary in bytes: - // Measured: `1758` + // Measured: `1724` // Estimated: `6196` - // Minimum execution time: 95_860_000 picoseconds. - Weight::from_parts(97_203_000, 0) + // Minimum execution time: 69_800_000 picoseconds. + Weight::from_parts(71_453_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(6)) } - /// Storage: Elections Voting (r:101 w:100) - /// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Elections Members (r:1 w:0) - /// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections RunnersUp (r:1 w:0) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Candidates (r:1 w:0) - /// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Balances Locks (r:100 w:100) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:100 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: System Account (r:100 w:100) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Elections::Voting` (r:51 w:50) + /// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Members` (r:1 w:0) + /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::RunnersUp` (r:1 w:0) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Candidates` (r:1 w:0) + /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:50 w:50) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:50 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:50 w:50) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `v` is `[50, 100]`. /// The range of component `d` is `[0, 50]`. fn clean_defunct_voters(v: u32, d: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1226 + v * (457 ±0)` - // Estimated: `4528 + d * (1 ±0) + v * (3774 ±0)` - // Minimum execution time: 3_868_142_000 picoseconds. - Weight::from_parts(3_877_579_000, 0) - .saturating_add(Weight::from_parts(0, 4528)) - // Standard Error: 302_857 - .saturating_add(Weight::from_parts(45_086_130, 0).saturating_mul(v.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(v.into()))) - .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(v.into()))) - .saturating_add(Weight::from_parts(0, 1).saturating_mul(d.into())) - .saturating_add(Weight::from_parts(0, 3774).saturating_mul(v.into())) + // Measured: `0 + d * (494 ±0) + v * (62 ±0)` + // Estimated: `8032 + d * (3774 ±0) + v * (27 ±0)` + // Minimum execution time: 5_730_000 picoseconds. + Weight::from_parts(1_574_067, 0) + .saturating_add(Weight::from_parts(0, 8032)) + // Standard Error: 27_444 + .saturating_add(Weight::from_parts(422_637, 0).saturating_mul(v.into())) + // Standard Error: 27_444 + .saturating_add(Weight::from_parts(55_295_420, 0).saturating_mul(d.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(d.into()))) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(d.into()))) + .saturating_add(Weight::from_parts(0, 3774).saturating_mul(d.into())) + .saturating_add(Weight::from_parts(0, 27).saturating_mul(v.into())) } - /// Storage: Elections Candidates (r:1 w:1) - /// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Members (r:1 w:1) - /// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections RunnersUp (r:1 w:1) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Voting (r:101 w:0) - /// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:0) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: System Account (r:3 w:3) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Elections ElectionRounds (r:1 w:1) - /// Proof Skipped: Elections ElectionRounds (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Members (r:0 w:1) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:0 w:1) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Elections::Candidates` (r:1 w:1) + /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Members` (r:1 w:1) + /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::RunnersUp` (r:1 w:1) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Voting` (r:101 w:0) + /// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:0) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:3 w:3) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Elections::ElectionRounds` (r:1 w:1) + /// Proof: `Elections::ElectionRounds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:0 w:1) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:0 w:1) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `c` is `[1, 20]`. /// The range of component `v` is `[1, 100]`. /// The range of component `e` is `[100, 500]`. fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + e * (23 ±0) + v * (241 ±0)` - // Estimated: `9351 + c * (154 ±35) + e * (19 ±0) + v * (2526 ±2)` - // Minimum execution time: 326_914_000 picoseconds. - Weight::from_parts(328_347_000, 0) - .saturating_add(Weight::from_parts(0, 9351)) - // Standard Error: 649_623 - .saturating_add(Weight::from_parts(2_462_336, 0).saturating_mul(c.into())) - // Standard Error: 129_227 - .saturating_add(Weight::from_parts(7_589_292, 0).saturating_mul(v.into())) - // Standard Error: 28_063 - .saturating_add(Weight::from_parts(163_681, 0).saturating_mul(e.into())) + // Estimated: `9323 + c * (154 ±35) + e * (19 ±0) + v * (2526 ±2)` + // Minimum execution time: 290_281_000 picoseconds. + Weight::from_parts(292_836_000, 0) + .saturating_add(Weight::from_parts(0, 9323)) + // Standard Error: 772_015 + .saturating_add(Weight::from_parts(1_683_502, 0).saturating_mul(c.into())) + // Standard Error: 153_574 + .saturating_add(Weight::from_parts(8_339_715, 0).saturating_mul(v.into())) + // Standard Error: 33_351 + .saturating_add(Weight::from_parts(245_281, 0).saturating_mul(e.into())) .saturating_add(T::DbWeight::get().reads(17)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into()))) .saturating_add(T::DbWeight::get().writes(7)) diff --git a/runtime/altair/src/weights/pallet_fees.rs b/runtime/altair/src/weights/pallet_fees.rs index 3819b181ed..b60e5d1caf 100644 --- a/runtime/altair/src/weights/pallet_fees.rs +++ b/runtime/altair/src/weights/pallet_fees.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_fees` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_fees // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_fees.rs @@ -32,14 +31,14 @@ use core::marker::PhantomData; /// Weight functions for `pallet_fees`. pub struct WeightInfo(PhantomData); impl pallet_fees::WeightInfo for WeightInfo { - /// Storage: Fees FeeBalances (r:0 w:1) - /// Proof: Fees FeeBalances (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) + /// Storage: `Fees::FeeBalances` (r:0 w:1) + /// Proof: `Fees::FeeBalances` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) fn set_fee() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 12_884_000 picoseconds. - Weight::from_parts(13_476_000, 0) + // Minimum execution time: 9_097_000 picoseconds. + Weight::from_parts(9_538_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/altair/src/weights/pallet_identity.rs b/runtime/altair/src/weights/pallet_identity.rs index 9c57f67b3b..918096d6eb 100644 --- a/runtime/altair/src/weights/pallet_identity.rs +++ b/runtime/altair/src/weights/pallet_identity.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_identity` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_identity // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_identity.rs @@ -32,266 +31,389 @@ use core::marker::PhantomData; /// Weight functions for `pallet_identity`. pub struct WeightInfo(PhantomData); impl pallet_identity::WeightInfo for WeightInfo { - /// Storage: Identity Registrars (r:1 w:1) - /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) + /// Storage: `Identity::Registrars` (r:1 w:1) + /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 19]`. fn add_registrar(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `31 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 17_984_000 picoseconds. - Weight::from_parts(19_196_076, 0) + // Minimum execution time: 11_071_000 picoseconds. + Weight::from_parts(11_956_420, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 2_244 - .saturating_add(Weight::from_parts(93_804, 0).saturating_mul(r.into())) + // Standard Error: 2_013 + .saturating_add(Weight::from_parts(113_475, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity IdentityOf (r:1 w:1) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[0, 100]`. - fn set_identity(_: u32) -> Weight { - Weight::default() + fn set_identity(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `6977 + r * (5 ±0)` + // Estimated: `11037` + // Minimum execution time: 185_687_000 picoseconds. + Weight::from_parts(190_458_359, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 9_985 + .saturating_add(Weight::from_parts(118_924, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity IdentityOf (r:1 w:0) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) - /// Storage: Identity SubsOf (r:1 w:1) - /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) - /// Storage: Identity SuperOf (r:100 w:100) - /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:100 w:100) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 100]`. fn set_subs_new(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `100` - // Estimated: `11003 + s * (2589 ±0)` - // Minimum execution time: 13_385_000 picoseconds. - Weight::from_parts(35_012_175, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 5_579 - .saturating_add(Weight::from_parts(5_033_322, 0).saturating_mul(s.into())) + // Estimated: `11037 + s * (2589 ±0)` + // Minimum execution time: 13_476_000 picoseconds. + Weight::from_parts(31_626_105, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 5_424 + .saturating_add(Weight::from_parts(5_141_499, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(s.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) .saturating_add(Weight::from_parts(0, 2589).saturating_mul(s.into())) } - /// Storage: Identity IdentityOf (r:1 w:0) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) - /// Storage: Identity SubsOf (r:1 w:1) - /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) - /// Storage: Identity SuperOf (r:0 w:100) - /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:0 w:100) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) /// The range of component `p` is `[0, 100]`. fn set_subs_old(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `193 + p * (32 ±0)` - // Estimated: `11003` - // Minimum execution time: 13_555_000 picoseconds. - Weight::from_parts(34_449_259, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 4_793 - .saturating_add(Weight::from_parts(2_021_801, 0).saturating_mul(p.into())) + // Estimated: `11037` + // Minimum execution time: 13_575_000 picoseconds. + Weight::from_parts(30_421_544, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 4_675 + .saturating_add(Weight::from_parts(2_072_423, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) } - /// Storage: Identity SubsOf (r:1 w:1) - /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) - /// Storage: Identity IdentityOf (r:1 w:1) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) - /// Storage: Identity SuperOf (r:0 w:100) - /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:0 w:100) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. /// The range of component `s` is `[0, 100]`. - /// The range of component `x` is `[0, 100]`. - fn clear_identity(_: u32, _: u32) -> Weight { - Weight::default() + fn clear_identity(r: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `7069 + r * (5 ±0) + s * (32 ±0)` + // Estimated: `11037` + // Minimum execution time: 81_903_000 picoseconds. + Weight::from_parts(83_404_495, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 13_949 + .saturating_add(Weight::from_parts(100_282, 0).saturating_mul(r.into())) + // Standard Error: 2_721 + .saturating_add(Weight::from_parts(2_046_604, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) } - /// Storage: Identity Registrars (r:1 w:0) - /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) - /// Storage: Identity IdentityOf (r:1 w:1) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: `Identity::Registrars` (r:1 w:0) + /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[0, 100]`. - fn request_judgement(_: u32) -> Weight { - Weight::default() + fn request_judgement(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `6967 + r * (57 ±0)` + // Estimated: `11037` + // Minimum execution time: 121_377_000 picoseconds. + Weight::from_parts(124_676_842, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 6_660 + .saturating_add(Weight::from_parts(92_087, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity IdentityOf (r:1 w:1) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[0, 100]`. - fn cancel_request(_: u32) -> Weight { - Weight::default() + fn cancel_request(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `6998` + // Estimated: `11037` + // Minimum execution time: 118_111_000 picoseconds. + Weight::from_parts(121_516_033, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 6_943 + .saturating_add(Weight::from_parts(53_399, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity Registrars (r:1 w:1) - /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) + /// Storage: `Identity::Registrars` (r:1 w:1) + /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 19]`. fn set_fee(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `88 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 10_800_000 picoseconds. - Weight::from_parts(11_560_340, 0) + // Minimum execution time: 8_255_000 picoseconds. + Weight::from_parts(8_828_967, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 1_436 - .saturating_add(Weight::from_parts(65_728, 0).saturating_mul(r.into())) + // Standard Error: 1_075 + .saturating_add(Weight::from_parts(74_131, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity Registrars (r:1 w:1) - /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) + /// Storage: `Identity::Registrars` (r:1 w:1) + /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 19]`. fn set_account_id(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `88 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 10_149_000 picoseconds. - Weight::from_parts(10_749_756, 0) + // Minimum execution time: 8_475_000 picoseconds. + Weight::from_parts(8_900_103, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 1_211 - .saturating_add(Weight::from_parts(73_627, 0).saturating_mul(r.into())) + // Standard Error: 950 + .saturating_add(Weight::from_parts(73_969, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity Registrars (r:1 w:1) - /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) + /// Storage: `Identity::Registrars` (r:1 w:1) + /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 19]`. fn set_fields(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `88 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 9_828_000 picoseconds. - Weight::from_parts(10_486_472, 0) + // Minimum execution time: 8_286_000 picoseconds. + Weight::from_parts(8_679_161, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 1_079 - .saturating_add(Weight::from_parts(56_775, 0).saturating_mul(r.into())) + // Standard Error: 1_203 + .saturating_add(Weight::from_parts(73_566, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity Registrars (r:1 w:0) - /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) - /// Storage: Identity IdentityOf (r:1 w:1) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: `Identity::Registrars` (r:1 w:0) + /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 19]`. - /// The range of component `x` is `[0, 100]`. - fn provide_judgement(_: u32) -> Weight { - Weight::default() + fn provide_judgement(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `7045 + r * (57 ±0)` + // Estimated: `11037` + // Minimum execution time: 157_844_000 picoseconds. + Weight::from_parts(163_504_852, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 8_336 + .saturating_add(Weight::from_parts(111_210, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity SubsOf (r:1 w:1) - /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) - /// Storage: Identity IdentityOf (r:1 w:1) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Identity SuperOf (r:0 w:100) - /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:0 w:100) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. /// The range of component `s` is `[0, 100]`. - /// The range of component `x` is `[0, 100]`. - fn kill_identity(_: u32, _: u32) -> Weight { - Weight::default() + fn kill_identity(r: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `7396 + r * (15 ±0) + s * (32 ±0)` + // Estimated: `11037` + // Minimum execution time: 103_394_000 picoseconds. + Weight::from_parts(103_065_236, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 14_066 + .saturating_add(Weight::from_parts(192_397, 0).saturating_mul(r.into())) + // Standard Error: 2_744 + .saturating_add(Weight::from_parts(2_071_673, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) } - /// Storage: Identity IdentityOf (r:1 w:0) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) - /// Storage: Identity SuperOf (r:1 w:1) - /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) - /// Storage: Identity SubsOf (r:1 w:1) - /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:1 w:1) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 99]`. fn add_sub(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `474 + s * (36 ±0)` - // Estimated: `11003` - // Minimum execution time: 44_634_000 picoseconds. - Weight::from_parts(49_922_675, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 1_300 - .saturating_add(Weight::from_parts(66_943, 0).saturating_mul(s.into())) + // Estimated: `11037` + // Minimum execution time: 38_401_000 picoseconds. + Weight::from_parts(43_707_969, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 1_715 + .saturating_add(Weight::from_parts(54_583, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Identity IdentityOf (r:1 w:0) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) - /// Storage: Identity SuperOf (r:1 w:1) - /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:1 w:1) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) /// The range of component `s` is `[1, 100]`. fn rename_sub(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `590 + s * (3 ±0)` - // Estimated: `11003` - // Minimum execution time: 18_374_000 picoseconds. - Weight::from_parts(20_536_491, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 565 - .saturating_add(Weight::from_parts(18_611, 0).saturating_mul(s.into())) + // Estimated: `11037` + // Minimum execution time: 18_194_000 picoseconds. + Weight::from_parts(20_768_301, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 635 + .saturating_add(Weight::from_parts(23_190, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity IdentityOf (r:1 w:0) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) - /// Storage: Identity SuperOf (r:1 w:1) - /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) - /// Storage: Identity SubsOf (r:1 w:1) - /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:1 w:1) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) /// The range of component `s` is `[1, 100]`. fn remove_sub(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `637 + s * (35 ±0)` - // Estimated: `11003` - // Minimum execution time: 48_681_000 picoseconds. - Weight::from_parts(51_302_602, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 890 - .saturating_add(Weight::from_parts(56_097, 0).saturating_mul(s.into())) + // Estimated: `11037` + // Minimum execution time: 40_616_000 picoseconds. + Weight::from_parts(44_077_435, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 1_047 + .saturating_add(Weight::from_parts(56_654, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Identity SuperOf (r:1 w:1) - /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) - /// Storage: Identity SubsOf (r:1 w:1) - /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Identity::SuperOf` (r:1 w:1) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 99]`. fn quit_sub(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `770 + s * (37 ±0)` // Estimated: `6723` - // Minimum execution time: 35_296_000 picoseconds. - Weight::from_parts(37_766_079, 0) + // Minimum execution time: 30_647_000 picoseconds. + Weight::from_parts(33_495_929, 0) .saturating_add(Weight::from_parts(0, 6723)) - // Standard Error: 809 - .saturating_add(Weight::from_parts(61_292, 0).saturating_mul(s.into())) + // Standard Error: 864 + .saturating_add(Weight::from_parts(63_359, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - - fn add_username_authority() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn remove_username_authority() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn set_username_for() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn accept_username() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn remove_expired_approval() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn set_primary_username() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn remove_dangling_username() -> cumulus_primitives_core::Weight { - Weight::default() - } + /// Storage: `Identity::UsernameAuthorities` (r:0 w:1) + /// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + fn add_username_authority() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 9_598_000 picoseconds. + Weight::from_parts(10_038_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::UsernameAuthorities` (r:1 w:1) + /// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + fn remove_username_authority() -> Weight { + // Proof Size summary in bytes: + // Measured: `79` + // Estimated: `3517` + // Minimum execution time: 12_603_000 picoseconds. + Weight::from_parts(13_135_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::UsernameAuthorities` (r:1 w:1) + /// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Identity::AccountOfUsername` (r:1 w:1) + /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) + /// Storage: `Identity::PendingUsernames` (r:1 w:0) + /// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + fn set_username_for() -> Weight { + // Proof Size summary in bytes: + // Measured: `79` + // Estimated: `11037` + // Minimum execution time: 82_033_000 picoseconds. + Weight::from_parts(83_586_000, 0) + .saturating_add(Weight::from_parts(0, 11037)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Identity::PendingUsernames` (r:1 w:1) + /// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `Identity::AccountOfUsername` (r:0 w:1) + /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) + fn accept_username() -> Weight { + // Proof Size summary in bytes: + // Measured: `114` + // Estimated: `11037` + // Minimum execution time: 29_906_000 picoseconds. + Weight::from_parts(30_357_000, 0) + .saturating_add(Weight::from_parts(0, 11037)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Identity::PendingUsernames` (r:1 w:1) + /// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) + fn remove_expired_approval() -> Weight { + // Proof Size summary in bytes: + // Measured: `114` + // Estimated: `3550` + // Minimum execution time: 21_831_000 picoseconds. + Weight::from_parts(31_329_000, 0) + .saturating_add(Weight::from_parts(0, 3550)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::AccountOfUsername` (r:1 w:0) + /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + fn set_primary_username() -> Weight { + // Proof Size summary in bytes: + // Measured: `256` + // Estimated: `11037` + // Minimum execution time: 23_885_000 picoseconds. + Weight::from_parts(24_787_000, 0) + .saturating_add(Weight::from_parts(0, 11037)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::AccountOfUsername` (r:1 w:1) + /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + fn remove_dangling_username() -> Weight { + // Proof Size summary in bytes: + // Measured: `97` + // Estimated: `11037` + // Minimum execution time: 16_560_000 picoseconds. + Weight::from_parts(16_931_000, 0) + .saturating_add(Weight::from_parts(0, 11037)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/runtime/altair/src/weights/pallet_interest_accrual.rs b/runtime/altair/src/weights/pallet_interest_accrual.rs index 26f0b0b783..b63ab0ff63 100644 --- a/runtime/altair/src/weights/pallet_interest_accrual.rs +++ b/runtime/altair/src/weights/pallet_interest_accrual.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_interest_accrual` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_interest_accrual // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_interest_accrual.rs @@ -37,10 +36,10 @@ impl pallet_interest_accrual::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 692_000 picoseconds. - Weight::from_parts(224_143, 0) + // Minimum execution time: 841_000 picoseconds. + Weight::from_parts(235_636, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 235 - .saturating_add(Weight::from_parts(587_336, 0).saturating_mul(n.into())) + // Standard Error: 604 + .saturating_add(Weight::from_parts(723_257, 0).saturating_mul(n.into())) } } diff --git a/runtime/altair/src/weights/pallet_investments.rs b/runtime/altair/src/weights/pallet_investments.rs index 7697fbc707..aaa0942aeb 100644 --- a/runtime/altair/src/weights/pallet_investments.rs +++ b/runtime/altair/src/weights/pallet_investments.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_investments` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_investments // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_investments.rs @@ -32,115 +31,115 @@ use core::marker::PhantomData; /// Weight functions for `pallet_investments`. pub struct WeightInfo(PhantomData); impl pallet_investments::WeightInfo for WeightInfo { - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: Investments ActiveInvestOrders (r:1 w:1) - /// Proof: Investments ActiveInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InvestOrders (r:1 w:1) - /// Proof: Investments InvestOrders (max_values: None, max_size: Some(112), added: 2587, mode: MaxEncodedLen) - /// Storage: Investments InvestOrderId (r:1 w:0) - /// Proof: Investments InvestOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveInvestOrders` (r:1 w:1) + /// Proof: `Investments::ActiveInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InvestOrders` (r:1 w:1) + /// Proof: `Investments::InvestOrders` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`) + /// Storage: `Investments::InvestOrderId` (r:1 w:0) + /// Proof: `Investments::InvestOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) fn update_invest_order() -> Weight { // Proof Size summary in bytes: - // Measured: `2122` + // Measured: `2024` // Estimated: `6198` - // Minimum execution time: 102_202_000 picoseconds. - Weight::from_parts(103_535_000, 0) + // Minimum execution time: 93_043_000 picoseconds. + Weight::from_parts(94_196_000, 0) .saturating_add(Weight::from_parts(0, 6198)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: Investments ActiveRedeemOrders (r:1 w:1) - /// Proof: Investments ActiveRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments RedeemOrders (r:1 w:1) - /// Proof: Investments RedeemOrders (max_values: None, max_size: Some(112), added: 2587, mode: MaxEncodedLen) - /// Storage: Investments RedeemOrderId (r:1 w:0) - /// Proof: Investments RedeemOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveRedeemOrders` (r:1 w:1) + /// Proof: `Investments::ActiveRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::RedeemOrders` (r:1 w:1) + /// Proof: `Investments::RedeemOrders` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`) + /// Storage: `Investments::RedeemOrderId` (r:1 w:0) + /// Proof: `Investments::RedeemOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) fn update_redeem_order() -> Weight { // Proof Size summary in bytes: - // Measured: `2018` + // Measured: `1948` // Estimated: `6198` - // Minimum execution time: 101_270_000 picoseconds. - Weight::from_parts(102_953_000, 0) + // Minimum execution time: 93_844_000 picoseconds. + Weight::from_parts(95_328_000, 0) .saturating_add(Weight::from_parts(0, 6198)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: Investments InvestOrders (r:1 w:1) - /// Proof: Investments InvestOrders (max_values: None, max_size: Some(112), added: 2587, mode: MaxEncodedLen) - /// Storage: Investments InvestOrderId (r:1 w:0) - /// Proof: Investments InvestOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Investments ClearedInvestOrders (r:10 w:0) - /// Proof: Investments ClearedInvestOrders (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: ForeignInvestments ForeignInvestmentInfo (r:1 w:1) - /// Proof: ForeignInvestments ForeignInvestmentInfo (max_values: None, max_size: Some(161), added: 2636, mode: MaxEncodedLen) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `Investments::InvestOrders` (r:1 w:1) + /// Proof: `Investments::InvestOrders` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`) + /// Storage: `Investments::InvestOrderId` (r:1 w:0) + /// Proof: `Investments::InvestOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Investments::ClearedInvestOrders` (r:10 w:0) + /// Proof: `Investments::ClearedInvestOrders` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ForeignInvestments::ForeignInvestmentInfo` (r:1 w:1) + /// Proof: `ForeignInvestments::ForeignInvestmentInfo` (`max_values`: None, `max_size`: Some(161), added: 2636, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 10]`. fn collect_investments(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2392 + n * (44 ±0)` + // Measured: `2322 + n * (44 ±0)` // Estimated: `6198 + n * (2555 ±0)` - // Minimum execution time: 113_794_000 picoseconds. - Weight::from_parts(109_408_854, 0) + // Minimum execution time: 103_173_000 picoseconds. + Weight::from_parts(98_299_805, 0) .saturating_add(Weight::from_parts(0, 6198)) - // Standard Error: 27_755 - .saturating_add(Weight::from_parts(5_251_523, 0).saturating_mul(n.into())) + // Standard Error: 29_380 + .saturating_add(Weight::from_parts(5_646_049, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 2555).saturating_mul(n.into())) } - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: Investments RedeemOrders (r:1 w:1) - /// Proof: Investments RedeemOrders (max_values: None, max_size: Some(112), added: 2587, mode: MaxEncodedLen) - /// Storage: Investments RedeemOrderId (r:1 w:0) - /// Proof: Investments RedeemOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Investments ClearedRedeemOrders (r:10 w:0) - /// Proof: Investments ClearedRedeemOrders (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: ForeignInvestments ForeignRedemptionInfo (r:1 w:1) - /// Proof: ForeignInvestments ForeignRedemptionInfo (max_values: None, max_size: Some(161), added: 2636, mode: MaxEncodedLen) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `Investments::RedeemOrders` (r:1 w:1) + /// Proof: `Investments::RedeemOrders` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`) + /// Storage: `Investments::RedeemOrderId` (r:1 w:0) + /// Proof: `Investments::RedeemOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Investments::ClearedRedeemOrders` (r:10 w:0) + /// Proof: `Investments::ClearedRedeemOrders` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ForeignInvestments::ForeignRedemptionInfo` (r:1 w:1) + /// Proof: `ForeignInvestments::ForeignRedemptionInfo` (`max_values`: None, `max_size`: Some(161), added: 2636, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 10]`. fn collect_redemptions(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2429 + n * (44 ±0)` + // Measured: `2331 + n * (44 ±0)` // Estimated: `6198 + n * (2555 ±0)` - // Minimum execution time: 111_810_000 picoseconds. - Weight::from_parts(107_373_697, 0) + // Minimum execution time: 99_706_000 picoseconds. + Weight::from_parts(94_699_603, 0) .saturating_add(Weight::from_parts(0, 6198)) - // Standard Error: 21_896 - .saturating_add(Weight::from_parts(5_295_761, 0).saturating_mul(n.into())) + // Standard Error: 27_256 + .saturating_add(Weight::from_parts(5_533_296, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(4)) diff --git a/runtime/altair/src/weights/pallet_keystore.rs b/runtime/altair/src/weights/pallet_keystore.rs index fecb66d1d2..8c0a7985d4 100644 --- a/runtime/altair/src/weights/pallet_keystore.rs +++ b/runtime/altair/src/weights/pallet_keystore.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_keystore` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_keystore // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_keystore.rs @@ -32,54 +31,54 @@ use core::marker::PhantomData; /// Weight functions for `pallet_keystore`. pub struct WeightInfo(PhantomData); impl pallet_keystore::WeightInfo for WeightInfo { - /// Storage: Keystore KeyDeposit (r:1 w:0) - /// Proof: Keystore KeyDeposit (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Keystore Keys (r:10 w:10) - /// Proof: Keystore Keys (max_values: None, max_size: Some(120), added: 2595, mode: MaxEncodedLen) - /// Storage: Keystore LastKeyByPurpose (r:0 w:1) - /// Proof: Keystore LastKeyByPurpose (max_values: None, max_size: Some(97), added: 2572, mode: MaxEncodedLen) + /// Storage: `Keystore::KeyDeposit` (r:1 w:0) + /// Proof: `Keystore::KeyDeposit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Keystore::Keys` (r:10 w:10) + /// Proof: `Keystore::Keys` (`max_values`: None, `max_size`: Some(120), added: 2595, mode: `MaxEncodedLen`) + /// Storage: `Keystore::LastKeyByPurpose` (r:0 w:1) + /// Proof: `Keystore::LastKeyByPurpose` (`max_values`: None, `max_size`: Some(97), added: 2572, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 10]`. fn add_keys(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `250` + // Measured: `216` // Estimated: `3593 + n * (2595 ±0)` - // Minimum execution time: 46_918_000 picoseconds. - Weight::from_parts(19_221_192, 0) + // Minimum execution time: 38_191_000 picoseconds. + Weight::from_parts(16_275_427, 0) .saturating_add(Weight::from_parts(0, 3593)) - // Standard Error: 17_991 - .saturating_add(Weight::from_parts(29_077_517, 0).saturating_mul(n.into())) + // Standard Error: 11_880 + .saturating_add(Weight::from_parts(23_377_597, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) .saturating_add(Weight::from_parts(0, 2595).saturating_mul(n.into())) } - /// Storage: Keystore Keys (r:10 w:10) - /// Proof: Keystore Keys (max_values: None, max_size: Some(120), added: 2595, mode: MaxEncodedLen) + /// Storage: `Keystore::Keys` (r:10 w:10) + /// Proof: `Keystore::Keys` (`max_values`: None, `max_size`: Some(120), added: 2595, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 10]`. fn revoke_keys(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `148 + n * (75 ±0)` + // Measured: `114 + n * (75 ±0)` // Estimated: `990 + n * (2595 ±0)` - // Minimum execution time: 22_933_000 picoseconds. - Weight::from_parts(10_256_118, 0) + // Minimum execution time: 17_442_000 picoseconds. + Weight::from_parts(8_682_939, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 12_762 - .saturating_add(Weight::from_parts(13_843_760, 0).saturating_mul(n.into())) + // Standard Error: 17_995 + .saturating_add(Weight::from_parts(10_026_691, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) .saturating_add(Weight::from_parts(0, 2595).saturating_mul(n.into())) } - /// Storage: Keystore KeyDeposit (r:0 w:1) - /// Proof: Keystore KeyDeposit (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + /// Storage: `Keystore::KeyDeposit` (r:0 w:1) + /// Proof: `Keystore::KeyDeposit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn set_deposit() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 11_953_000 picoseconds. - Weight::from_parts(12_383_000, 0) + // Minimum execution time: 6_922_000 picoseconds. + Weight::from_parts(7_294_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/altair/src/weights/pallet_liquidity_rewards.rs b/runtime/altair/src/weights/pallet_liquidity_rewards.rs index a0a8a8dd0e..71719e57f5 100644 --- a/runtime/altair/src/weights/pallet_liquidity_rewards.rs +++ b/runtime/altair/src/weights/pallet_liquidity_rewards.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_liquidity_rewards` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_liquidity_rewards // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_liquidity_rewards.rs @@ -32,126 +31,126 @@ use core::marker::PhantomData; /// Weight functions for `pallet_liquidity_rewards`. pub struct WeightInfo(PhantomData); impl pallet_liquidity_rewards::WeightInfo for WeightInfo { - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: LiquidityRewards EndOfEpoch (r:1 w:0) - /// Proof: LiquidityRewards EndOfEpoch (max_values: Some(1), max_size: Some(8), added: 503, 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: `LiquidityRewards::EndOfEpoch` (r:1 w:0) + /// Proof: `LiquidityRewards::EndOfEpoch` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) /// The range of component `x` is `[0, 20]`. /// The range of component `y` is `[0, 50]`. /// The range of component `z` is `[0, 50]`. fn on_initialize(x: u32, y: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `295` + // Measured: `262` // Estimated: `1493` - // Minimum execution time: 9_157_000 picoseconds. - Weight::from_parts(9_685_142, 0) + // Minimum execution time: 6_522_000 picoseconds. + Weight::from_parts(6_634_447, 0) .saturating_add(Weight::from_parts(0, 1493)) - // Standard Error: 571 - .saturating_add(Weight::from_parts(2_972, 0).saturating_mul(x.into())) - // Standard Error: 234 - .saturating_add(Weight::from_parts(934, 0).saturating_mul(y.into())) - // Standard Error: 234 - .saturating_add(Weight::from_parts(9_504, 0).saturating_mul(z.into())) + // Standard Error: 484 + .saturating_add(Weight::from_parts(4_525, 0).saturating_mul(x.into())) + // Standard Error: 198 + .saturating_add(Weight::from_parts(1_798, 0).saturating_mul(y.into())) + // Standard Error: 198 + .saturating_add(Weight::from_parts(10_365, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) } - /// Storage: LiquidityRewardsBase Currency (r:1 w:1) - /// Proof: LiquidityRewardsBase Currency (max_values: None, max_size: Some(863), added: 3338, mode: MaxEncodedLen) - /// Storage: LiquidityRewardsBase Group (r:1 w:1) - /// Proof: LiquidityRewardsBase Group (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) - /// Storage: LiquidityRewardsBase StakeAccount (r:1 w:1) - /// Proof: LiquidityRewardsBase StakeAccount (max_values: None, max_size: Some(143), added: 2618, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:1 w:0) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + /// Storage: `LiquidityRewardsBase::Currency` (r:1 w:1) + /// Proof: `LiquidityRewardsBase::Currency` (`max_values`: None, `max_size`: Some(863), added: 3338, mode: `MaxEncodedLen`) + /// Storage: `LiquidityRewardsBase::Group` (r:1 w:1) + /// Proof: `LiquidityRewardsBase::Group` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `LiquidityRewardsBase::StakeAccount` (r:1 w:1) + /// Proof: `LiquidityRewardsBase::StakeAccount` (`max_values`: None, `max_size`: Some(143), added: 2618, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:1 w:0) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) fn stake() -> Weight { // Proof Size summary in bytes: - // Measured: `539` - // Estimated: `4328` - // Minimum execution time: 41_418_000 picoseconds. - Weight::from_parts(42_219_000, 0) - .saturating_add(Weight::from_parts(0, 4328)) + // Measured: `467` + // Estimated: `4407` + // Minimum execution time: 36_007_000 picoseconds. + Weight::from_parts(36_889_000, 0) + .saturating_add(Weight::from_parts(0, 4407)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: LiquidityRewardsBase Currency (r:1 w:1) - /// Proof: LiquidityRewardsBase Currency (max_values: None, max_size: Some(863), added: 3338, mode: MaxEncodedLen) - /// Storage: LiquidityRewardsBase Group (r:1 w:1) - /// Proof: LiquidityRewardsBase Group (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) - /// Storage: LiquidityRewardsBase StakeAccount (r:1 w:1) - /// Proof: LiquidityRewardsBase StakeAccount (max_values: None, max_size: Some(143), added: 2618, mode: MaxEncodedLen) + /// Storage: `LiquidityRewardsBase::Currency` (r:1 w:1) + /// Proof: `LiquidityRewardsBase::Currency` (`max_values`: None, `max_size`: Some(863), added: 3338, mode: `MaxEncodedLen`) + /// Storage: `LiquidityRewardsBase::Group` (r:1 w:1) + /// Proof: `LiquidityRewardsBase::Group` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `LiquidityRewardsBase::StakeAccount` (r:1 w:1) + /// Proof: `LiquidityRewardsBase::StakeAccount` (`max_values`: None, `max_size`: Some(143), added: 2618, mode: `MaxEncodedLen`) fn unstake() -> Weight { // Proof Size summary in bytes: // Measured: `176` // Estimated: `4328` - // Minimum execution time: 28_353_000 picoseconds. - Weight::from_parts(29_225_000, 0) + // Minimum execution time: 24_044_000 picoseconds. + Weight::from_parts(24_495_000, 0) .saturating_add(Weight::from_parts(0, 4328)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: LiquidityRewardsBase Currency (r:1 w:0) - /// Proof: LiquidityRewardsBase Currency (max_values: None, max_size: Some(863), added: 3338, mode: MaxEncodedLen) - /// Storage: LiquidityRewardsBase Group (r:1 w:0) - /// Proof: LiquidityRewardsBase Group (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) - /// Storage: LiquidityRewardsBase StakeAccount (r:1 w:1) - /// Proof: LiquidityRewardsBase StakeAccount (max_values: None, max_size: Some(143), added: 2618, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `LiquidityRewardsBase::Currency` (r:1 w:0) + /// Proof: `LiquidityRewardsBase::Currency` (`max_values`: None, `max_size`: Some(863), added: 3338, mode: `MaxEncodedLen`) + /// Storage: `LiquidityRewardsBase::Group` (r:1 w:0) + /// Proof: `LiquidityRewardsBase::Group` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `LiquidityRewardsBase::StakeAccount` (r:1 w:1) + /// Proof: `LiquidityRewardsBase::StakeAccount` (`max_values`: None, `max_size`: Some(143), added: 2618, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn claim_reward() -> Weight { // Proof Size summary in bytes: // Measured: `449` // Estimated: `4328` - // Minimum execution time: 59_472_000 picoseconds. - Weight::from_parts(60_865_000, 0) + // Minimum execution time: 51_085_000 picoseconds. + Weight::from_parts(52_357_000, 0) .saturating_add(Weight::from_parts(0, 4328)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: LiquidityRewards NextEpochChanges (r:1 w:1) - /// Proof: LiquidityRewards NextEpochChanges (max_values: Some(1), max_size: Some(2078), added: 2573, mode: MaxEncodedLen) + /// Storage: `LiquidityRewards::NextEpochChanges` (r:1 w:1) + /// Proof: `LiquidityRewards::NextEpochChanges` (`max_values`: Some(1), `max_size`: Some(2078), added: 2573, mode: `MaxEncodedLen`) fn set_distributed_reward() -> Weight { // Proof Size summary in bytes: - // Measured: `142` + // Measured: `109` // Estimated: `3563` - // Minimum execution time: 8_967_000 picoseconds. - Weight::from_parts(9_377_000, 0) + // Minimum execution time: 6_372_000 picoseconds. + Weight::from_parts(6_602_000, 0) .saturating_add(Weight::from_parts(0, 3563)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: LiquidityRewards NextEpochChanges (r:1 w:1) - /// Proof: LiquidityRewards NextEpochChanges (max_values: Some(1), max_size: Some(2078), added: 2573, mode: MaxEncodedLen) + /// Storage: `LiquidityRewards::NextEpochChanges` (r:1 w:1) + /// Proof: `LiquidityRewards::NextEpochChanges` (`max_values`: Some(1), `max_size`: Some(2078), added: 2573, mode: `MaxEncodedLen`) fn set_epoch_duration() -> Weight { // Proof Size summary in bytes: - // Measured: `142` + // Measured: `109` // Estimated: `3563` - // Minimum execution time: 8_836_000 picoseconds. - Weight::from_parts(9_278_000, 0) + // Minimum execution time: 6_372_000 picoseconds. + Weight::from_parts(6_702_000, 0) .saturating_add(Weight::from_parts(0, 3563)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: LiquidityRewards NextEpochChanges (r:1 w:1) - /// Proof: LiquidityRewards NextEpochChanges (max_values: Some(1), max_size: Some(2078), added: 2573, mode: MaxEncodedLen) + /// Storage: `LiquidityRewards::NextEpochChanges` (r:1 w:1) + /// Proof: `LiquidityRewards::NextEpochChanges` (`max_values`: Some(1), `max_size`: Some(2078), added: 2573, mode: `MaxEncodedLen`) fn set_group_weight() -> Weight { // Proof Size summary in bytes: - // Measured: `142` + // Measured: `109` // Estimated: `3563` - // Minimum execution time: 9_458_000 picoseconds. - Weight::from_parts(9_608_000, 0) + // Minimum execution time: 6_672_000 picoseconds. + Weight::from_parts(7_033_000, 0) .saturating_add(Weight::from_parts(0, 3563)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: LiquidityRewards NextEpochChanges (r:1 w:1) - /// Proof: LiquidityRewards NextEpochChanges (max_values: Some(1), max_size: Some(2078), added: 2573, mode: MaxEncodedLen) + /// Storage: `LiquidityRewards::NextEpochChanges` (r:1 w:1) + /// Proof: `LiquidityRewards::NextEpochChanges` (`max_values`: Some(1), `max_size`: Some(2078), added: 2573, mode: `MaxEncodedLen`) fn set_currency_group() -> Weight { // Proof Size summary in bytes: - // Measured: `142` + // Measured: `109` // Estimated: `3563` - // Minimum execution time: 9_348_000 picoseconds. - Weight::from_parts(9_628_000, 0) + // Minimum execution time: 6_852_000 picoseconds. + Weight::from_parts(7_123_000, 0) .saturating_add(Weight::from_parts(0, 3563)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/altair/src/weights/pallet_loans.rs b/runtime/altair/src/weights/pallet_loans.rs index 3dab649919..3d22a648d9 100644 --- a/runtime/altair/src/weights/pallet_loans.rs +++ b/runtime/altair/src/weights/pallet_loans.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_loans` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_loans // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_loans.rs @@ -32,370 +31,368 @@ use core::marker::PhantomData; /// Weight functions for `pallet_loans`. pub struct WeightInfo(PhantomData); impl pallet_loans::WeightInfo for WeightInfo { - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, 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: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Loans LastLoanId (r:1 w:1) - /// Proof: Loans LastLoanId (max_values: None, max_size: Some(32), added: 2507, mode: MaxEncodedLen) - /// Storage: Loans CreatedLoan (r:0 w:1) - /// Proof: Loans CreatedLoan (max_values: None, max_size: Some(244), added: 2719, mode: MaxEncodedLen) - /// Storage: Uniques Account (r:0 w:2) - /// Proof: Uniques Account (max_values: None, max_size: Some(104), added: 2579, mode: MaxEncodedLen) - /// Storage: Uniques ItemPriceOf (r:0 w:1) - /// Proof: Uniques ItemPriceOf (max_values: None, max_size: Some(105), added: 2580, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, 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: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Loans::LastLoanId` (r:1 w:1) + /// Proof: `Loans::LastLoanId` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + /// Storage: `Loans::CreatedLoan` (r:0 w:1) + /// Proof: `Loans::CreatedLoan` (`max_values`: None, `max_size`: Some(245), added: 2720, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Account` (r:0 w:2) + /// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ItemPriceOf` (r:0 w:1) + /// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(105), added: 2580, mode: `MaxEncodedLen`) fn create() -> Weight { // Proof Size summary in bytes: // Measured: `1195` // Estimated: `4278` - // Minimum execution time: 83_587_000 picoseconds. - Weight::from_parts(85_240_000, 0) + // Minimum execution time: 75_201_000 picoseconds. + Weight::from_parts(78_006_000, 0) .saturating_add(Weight::from_parts(0, 4278)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(6)) } - /// Storage: Loans CreatedLoan (r:1 w:1) - /// Proof: Loans CreatedLoan (max_values: None, max_size: Some(244), added: 2719, 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: InterestAccrual Rates (r:1 w:1) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(10802), added: 11297, mode: MaxEncodedLen) - /// Storage: InterestAccrual LastUpdated (r:1 w:0) - /// Proof: InterestAccrual LastUpdated (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Loans PortfolioValuation (r:1 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:1) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Loans::CreatedLoan` (r:1 w:1) + /// Proof: `Loans::CreatedLoan` (`max_values`: None, `max_size`: Some(245), added: 2720, 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: `InterestAccrual::Rates` (r:1 w:1) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(10802), added: 11297, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::LastUpdated` (r:1 w:0) + /// Proof: `InterestAccrual::LastUpdated` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Loans::PortfolioValuation` (r:1 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:1) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. fn borrow(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `13046 + n * (340 ±0)` - // Estimated: `375491 + n * (340 ±0)` - // Minimum execution time: 188_133_000 picoseconds. - Weight::from_parts(191_809_796, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 22_907 - .saturating_add(Weight::from_parts(748_544, 0).saturating_mul(n.into())) + // Measured: `12846 + n * (340 ±0)` + // Estimated: `376491` + // Minimum execution time: 186_288_000 picoseconds. + Weight::from_parts(190_716_513, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 19_435 + .saturating_add(Weight::from_parts(587_402, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(7)) - .saturating_add(Weight::from_parts(0, 340).saturating_mul(n.into())) } - /// Storage: Loans PortfolioValuation (r:1 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:1) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, 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: InterestAccrual Rates (r:1 w:0) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(10802), added: 11297, mode: MaxEncodedLen) - /// Storage: InterestAccrual LastUpdated (r:1 w:0) - /// Proof: InterestAccrual LastUpdated (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Loans::PortfolioValuation` (r:1 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:1) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, 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: `InterestAccrual::Rates` (r:1 w:0) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(10802), added: 11297, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::LastUpdated` (r:1 w:0) + /// Proof: `InterestAccrual::LastUpdated` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. fn repay(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `13199 + n * (340 ±0)` - // Estimated: `375491 + n * (340 ±0)` - // Minimum execution time: 165_481_000 picoseconds. - Weight::from_parts(167_736_317, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 13_300 - .saturating_add(Weight::from_parts(592_762, 0).saturating_mul(n.into())) + // Measured: `13032 + n * (340 ±0)` + // Estimated: `376491` + // Minimum execution time: 165_729_000 picoseconds. + Weight::from_parts(167_843_939, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 22_614 + .saturating_add(Weight::from_parts(691_747, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(5)) - .saturating_add(Weight::from_parts(0, 340).saturating_mul(n.into())) } - /// Storage: Loans PortfolioValuation (r:1 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:1) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, mode: MaxEncodedLen) - /// Storage: Loans WriteOffPolicy (r:1 w:0) - /// Proof: Loans WriteOffPolicy (max_values: None, max_size: Some(5126), added: 7601, 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: InterestAccrual Rates (r:1 w:1) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(10802), added: 11297, mode: MaxEncodedLen) - /// Storage: InterestAccrual LastUpdated (r:1 w:0) - /// Proof: InterestAccrual LastUpdated (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: `Loans::PortfolioValuation` (r:1 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:1) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, mode: `MaxEncodedLen`) + /// Storage: `Loans::WriteOffPolicy` (r:1 w:0) + /// Proof: `Loans::WriteOffPolicy` (`max_values`: None, `max_size`: Some(5126), added: 7601, 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: `InterestAccrual::Rates` (r:1 w:1) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(10802), added: 11297, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::LastUpdated` (r:1 w:0) + /// Proof: `InterestAccrual::LastUpdated` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. fn write_off(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `15906 + n * (340 ±0)` - // Estimated: `375491` - // Minimum execution time: 269_847_000 picoseconds. - Weight::from_parts(274_204_051, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 22_816 - .saturating_add(Weight::from_parts(432_521, 0).saturating_mul(n.into())) + // Measured: `15833 + n * (340 ±0)` + // Estimated: `376491` + // Minimum execution time: 196_697_000 picoseconds. + Weight::from_parts(200_116_785, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 22_793 + .saturating_add(Weight::from_parts(426_786, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: Loans PortfolioValuation (r:1 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:1) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, mode: MaxEncodedLen) - /// Storage: Loans WriteOffPolicy (r:1 w:0) - /// Proof: Loans WriteOffPolicy (max_values: None, max_size: Some(5126), added: 7601, 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: InterestAccrual Rates (r:1 w:1) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(10802), added: 11297, mode: MaxEncodedLen) - /// Storage: InterestAccrual LastUpdated (r:1 w:0) - /// Proof: InterestAccrual LastUpdated (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `Loans::PortfolioValuation` (r:1 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:1) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, mode: `MaxEncodedLen`) + /// Storage: `Loans::WriteOffPolicy` (r:1 w:0) + /// Proof: `Loans::WriteOffPolicy` (`max_values`: None, `max_size`: Some(5126), added: 7601, 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: `InterestAccrual::Rates` (r:1 w:1) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(10802), added: 11297, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::LastUpdated` (r:1 w:0) + /// Proof: `InterestAccrual::LastUpdated` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. fn admin_write_off(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `16157 + n * (340 ±0)` - // Estimated: `375491` - // Minimum execution time: 285_956_000 picoseconds. - Weight::from_parts(289_862_120, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 23_319 - .saturating_add(Weight::from_parts(554_477, 0).saturating_mul(n.into())) + // Measured: `16084 + n * (340 ±0)` + // Estimated: `376491` + // Minimum execution time: 232_884_000 picoseconds. + Weight::from_parts(236_836_129, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 23_620 + .saturating_add(Weight::from_parts(527_055, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:0) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, 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: PoolSystem NotedChange (r:0 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(5184), added: 7659, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:0) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, 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: `PoolSystem::NotedChange` (r:0 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. fn propose_loan_mutation(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `938 + n * (316 ±0)` - // Estimated: `375491` - // Minimum execution time: 45_665_000 picoseconds. - Weight::from_parts(45_972_269, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 6_052 - .saturating_add(Weight::from_parts(533_126, 0).saturating_mul(n.into())) + // Estimated: `376491` + // Minimum execution time: 40_355_000 picoseconds. + Weight::from_parts(40_780_970, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 5_395 + .saturating_add(Weight::from_parts(448_479, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PoolSystem NotedChange (r:1 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(5184), added: 7659, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: Loans PortfolioValuation (r:1 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:1) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, 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: InterestAccrual Rates (r:1 w:0) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(10802), added: 11297, mode: MaxEncodedLen) - /// Storage: InterestAccrual LastUpdated (r:1 w:0) - /// Proof: InterestAccrual LastUpdated (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: `PoolSystem::NotedChange` (r:1 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `Loans::PortfolioValuation` (r:1 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:1) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, 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: `InterestAccrual::Rates` (r:1 w:0) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(10802), added: 11297, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::LastUpdated` (r:1 w:0) + /// Proof: `InterestAccrual::LastUpdated` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. fn apply_loan_mutation(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `12242 + n * (340 ±0)` - // Estimated: `375491` - // Minimum execution time: 90_289_000 picoseconds. - Weight::from_parts(91_278_745, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 9_175 - .saturating_add(Weight::from_parts(632_047, 0).saturating_mul(n.into())) + // Measured: `12169 + n * (340 ±0)` + // Estimated: `376491` + // Minimum execution time: 106_780_000 picoseconds. + Weight::from_parts(108_199_468, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 17_211 + .saturating_add(Weight::from_parts(729_848, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Loans CreatedLoan (r:1 w:0) - /// Proof: Loans CreatedLoan (max_values: None, max_size: Some(244), added: 2719, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:1) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, mode: MaxEncodedLen) - /// Storage: Loans PortfolioValuation (r:1 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: InterestAccrual Rates (r:1 w:1) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(10802), added: 11297, mode: MaxEncodedLen) - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Loans ClosedLoan (r:0 w:1) - /// Proof: Loans ClosedLoan (max_values: None, max_size: Some(280), added: 2755, mode: MaxEncodedLen) - /// Storage: Uniques Account (r:0 w:2) - /// Proof: Uniques Account (max_values: None, max_size: Some(104), added: 2579, mode: MaxEncodedLen) - /// Storage: Uniques ItemPriceOf (r:0 w:1) - /// Proof: Uniques ItemPriceOf (max_values: None, max_size: Some(105), added: 2580, mode: MaxEncodedLen) + /// Storage: `Loans::CreatedLoan` (r:1 w:0) + /// Proof: `Loans::CreatedLoan` (`max_values`: None, `max_size`: Some(245), added: 2720, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:1) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, mode: `MaxEncodedLen`) + /// Storage: `Loans::PortfolioValuation` (r:1 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::Rates` (r:1 w:1) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(10802), added: 11297, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Loans::ClosedLoan` (r:0 w:1) + /// Proof: `Loans::ClosedLoan` (`max_values`: None, `max_size`: Some(281), added: 2756, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Account` (r:0 w:2) + /// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ItemPriceOf` (r:0 w:1) + /// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(105), added: 2580, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. fn close(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `12102 + n * (373 ±0)` - // Estimated: `375491` - // Minimum execution time: 101_341_000 picoseconds. - Weight::from_parts(102_705_712, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 9_474 - .saturating_add(Weight::from_parts(658_589, 0).saturating_mul(n.into())) + // Measured: `12029 + n * (373 ±0)` + // Estimated: `376491` + // Minimum execution time: 92_222_000 picoseconds. + Weight::from_parts(93_656_922, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 13_832 + .saturating_add(Weight::from_parts(650_957, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(8)) } - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, 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: PoolSystem NotedChange (r:0 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(5184), added: 7659, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, 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: `PoolSystem::NotedChange` (r:0 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) fn propose_write_off_policy() -> Weight { // Proof Size summary in bytes: // Measured: `478` // Estimated: `4278` - // Minimum execution time: 106_640_000 picoseconds. - Weight::from_parts(108_834_000, 0) + // Minimum execution time: 103_723_000 picoseconds. + Weight::from_parts(105_928_000, 0) .saturating_add(Weight::from_parts(0, 4278)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PoolSystem NotedChange (r:1 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(5184), added: 7659, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: Loans WriteOffPolicy (r:0 w:1) - /// Proof: Loans WriteOffPolicy (max_values: None, max_size: Some(5126), added: 7601, mode: MaxEncodedLen) + /// Storage: `PoolSystem::NotedChange` (r:1 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `Loans::WriteOffPolicy` (r:0 w:1) + /// Proof: `Loans::WriteOffPolicy` (`max_values`: None, `max_size`: Some(5126), added: 7601, mode: `MaxEncodedLen`) fn apply_write_off_policy() -> Weight { // Proof Size summary in bytes: // Measured: `4854` // Estimated: `8649` - // Minimum execution time: 117_761_000 picoseconds. - Weight::from_parts(119_634_000, 0) + // Minimum execution time: 137_526_000 picoseconds. + Weight::from_parts(140_211_000, 0) .saturating_add(Weight::from_parts(0, 8649)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: InterestAccrual Rates (r:1 w:0) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(10802), added: 11297, mode: MaxEncodedLen) - /// Storage: OraclePriceCollection Collection (r:1 w:0) - /// Proof: OraclePriceCollection Collection (max_values: None, max_size: Some(7542), added: 10017, mode: MaxEncodedLen) - /// Storage: OraclePriceCollection CollectionInfo (r:1 w:0) - /// Proof: OraclePriceCollection CollectionInfo (max_values: None, max_size: Some(3058), added: 5533, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:0) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, 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 PortfolioValuation (r:0 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::Rates` (r:1 w:0) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(10802), added: 11297, mode: `MaxEncodedLen`) + /// Storage: `OraclePriceCollection::Collection` (r:1 w:0) + /// Proof: `OraclePriceCollection::Collection` (`max_values`: None, `max_size`: Some(7542), added: 10017, mode: `MaxEncodedLen`) + /// Storage: `OraclePriceCollection::CollectionInfo` (r:1 w:0) + /// Proof: `OraclePriceCollection::CollectionInfo` (`max_values`: None, `max_size`: Some(3058), added: 5533, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:0) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, 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::PortfolioValuation` (r:0 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 10]`. fn update_portfolio_valuation(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `11791 + n * (353 ±0)` - // Estimated: `375491` - // Minimum execution time: 82_074_000 picoseconds. - Weight::from_parts(73_837_079, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 8_940 - .saturating_add(Weight::from_parts(9_891_285, 0).saturating_mul(n.into())) + // Measured: `11718 + n * (353 ±0)` + // Estimated: `376491` + // Minimum execution time: 98_765_000 picoseconds. + Weight::from_parts(69_862_207, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 26_661 + .saturating_add(Weight::from_parts(31_411_063, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Loans PortfolioValuation (r:1 w:0) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:0) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, 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: InterestAccrual Rates (r:1 w:0) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(10802), added: 11297, mode: MaxEncodedLen) - /// Storage: InterestAccrual LastUpdated (r:1 w:0) - /// Proof: InterestAccrual LastUpdated (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Loans CreatedLoan (r:1 w:0) - /// Proof: Loans CreatedLoan (max_values: None, max_size: Some(244), added: 2719, mode: MaxEncodedLen) - /// Storage: PoolSystem NotedChange (r:0 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(5184), added: 7659, mode: MaxEncodedLen) + /// Storage: `Loans::PortfolioValuation` (r:1 w:0) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:0) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, 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: `InterestAccrual::Rates` (r:1 w:0) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(10802), added: 11297, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::LastUpdated` (r:1 w:0) + /// Proof: `InterestAccrual::LastUpdated` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Loans::CreatedLoan` (r:1 w:0) + /// Proof: `Loans::CreatedLoan` (`max_values`: None, `max_size`: Some(245), added: 2720, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::NotedChange` (r:0 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) /// The range of component `n` is `[2, 8]`. fn propose_transfer_debt(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `11909 + n * (340 ±0)` - // Estimated: `375491` - // Minimum execution time: 188_443_000 picoseconds. - Weight::from_parts(189_833_206, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 25_559 - .saturating_add(Weight::from_parts(1_093_689, 0).saturating_mul(n.into())) + // Measured: `11836 + n * (340 ±0)` + // Estimated: `376491` + // Minimum execution time: 211_504_000 picoseconds. + Weight::from_parts(216_578_752, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 34_460 + .saturating_add(Weight::from_parts(821_413, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PoolSystem NotedChange (r:1 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(5184), added: 7659, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: Loans PortfolioValuation (r:1 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:1) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, 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: InterestAccrual Rates (r:1 w:1) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(10802), added: 11297, mode: MaxEncodedLen) - /// Storage: InterestAccrual LastUpdated (r:1 w:0) - /// Proof: InterestAccrual LastUpdated (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Loans CreatedLoan (r:1 w:1) - /// Proof: Loans CreatedLoan (max_values: None, max_size: Some(244), added: 2719, mode: MaxEncodedLen) + /// Storage: `PoolSystem::NotedChange` (r:1 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `Loans::PortfolioValuation` (r:1 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:1) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, 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: `InterestAccrual::Rates` (r:1 w:1) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(10802), added: 11297, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::LastUpdated` (r:1 w:0) + /// Proof: `InterestAccrual::LastUpdated` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Loans::CreatedLoan` (r:1 w:1) + /// Proof: `Loans::CreatedLoan` (`max_values`: None, `max_size`: Some(245), added: 2720, mode: `MaxEncodedLen`) /// The range of component `n` is `[2, 8]`. fn apply_transfer_debt(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `12570 + n * (340 ±0)` - // Estimated: `375491` - // Minimum execution time: 196_158_000 picoseconds. - Weight::from_parts(197_046_349, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 22_399 - .saturating_add(Weight::from_parts(1_283_811, 0).saturating_mul(n.into())) + // Measured: `12497 + n * (340 ±0)` + // Estimated: `376491` + // Minimum execution time: 222_114_000 picoseconds. + Weight::from_parts(225_316_304, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 34_163 + .saturating_add(Weight::from_parts(948_074, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: Loans CreatedLoan (r:1 w:1) - /// Proof: Loans CreatedLoan (max_values: None, max_size: Some(244), added: 2719, 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: InterestAccrual Rates (r:1 w:1) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(10802), added: 11297, mode: MaxEncodedLen) - /// Storage: InterestAccrual LastUpdated (r:1 w:0) - /// Proof: InterestAccrual LastUpdated (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Loans PortfolioValuation (r:1 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:1) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, mode: MaxEncodedLen) + /// Storage: `Loans::CreatedLoan` (r:1 w:1) + /// Proof: `Loans::CreatedLoan` (`max_values`: None, `max_size`: Some(245), added: 2720, 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: `InterestAccrual::Rates` (r:1 w:1) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(10802), added: 11297, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::LastUpdated` (r:1 w:0) + /// Proof: `InterestAccrual::LastUpdated` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Loans::PortfolioValuation` (r:1 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:1) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. fn increase_debt(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `11569 + n * (340 ±0)` - // Estimated: `375491` - // Minimum execution time: 118_162_000 picoseconds. - Weight::from_parts(120_329_148, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 12_594 - .saturating_add(Weight::from_parts(662_691, 0).saturating_mul(n.into())) + // Measured: `11496 + n * (340 ±0)` + // Estimated: `376491` + // Minimum execution time: 128_950_000 picoseconds. + Weight::from_parts(131_986_528, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 15_405 + .saturating_add(Weight::from_parts(538_412, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/runtime/altair/src/weights/pallet_multisig.rs b/runtime/altair/src/weights/pallet_multisig.rs index eef580e362..2b14f64052 100644 --- a/runtime/altair/src/weights/pallet_multisig.rs +++ b/runtime/altair/src/weights/pallet_multisig.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_multisig` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_multisig // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_multisig.rs @@ -37,110 +36,110 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 16_460_000 picoseconds. - Weight::from_parts(17_330_672, 0) + // Minimum execution time: 15_920_000 picoseconds. + Weight::from_parts(16_791_683, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 3 - .saturating_add(Weight::from_parts(558, 0).saturating_mul(z.into())) + // Standard Error: 5 + .saturating_add(Weight::from_parts(494, 0).saturating_mul(z.into())) } - /// Storage: Multisig Multisigs (r:1 w:1) - /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `334 + s * (1 ±0)` // Estimated: `6811` - // Minimum execution time: 58_439_000 picoseconds. - Weight::from_parts(52_997_207, 0) + // Minimum execution time: 50_905_000 picoseconds. + Weight::from_parts(43_938_808, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 787 - .saturating_add(Weight::from_parts(75_612, 0).saturating_mul(s.into())) + // Standard Error: 750 + .saturating_add(Weight::from_parts(90_272, 0).saturating_mul(s.into())) // Standard Error: 7 - .saturating_add(Weight::from_parts(1_512, 0).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_537, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Multisig Multisigs (r:1 w:1) - /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) /// The range of component `s` is `[3, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `315` // Estimated: `6811` - // Minimum execution time: 35_397_000 picoseconds. - Weight::from_parts(29_031_825, 0) + // Minimum execution time: 31_800_000 picoseconds. + Weight::from_parts(24_763_259, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 481 - .saturating_add(Weight::from_parts(75_928, 0).saturating_mul(s.into())) - // Standard Error: 4 - .saturating_add(Weight::from_parts(1_588, 0).saturating_mul(z.into())) + // Standard Error: 637 + .saturating_add(Weight::from_parts(84_167, 0).saturating_mul(s.into())) + // Standard Error: 6 + .saturating_add(Weight::from_parts(1_526, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Multisig Multisigs (r:1 w:1) - /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `456 + s * (33 ±0)` // Estimated: `6811` - // Minimum execution time: 66_395_000 picoseconds. - Weight::from_parts(55_902_022, 0) + // Minimum execution time: 58_639_000 picoseconds. + Weight::from_parts(47_679_049, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 635 - .saturating_add(Weight::from_parts(113_333, 0).saturating_mul(s.into())) - // Standard Error: 6 - .saturating_add(Weight::from_parts(1_646, 0).saturating_mul(z.into())) + // Standard Error: 1_118 + .saturating_add(Weight::from_parts(126_990, 0).saturating_mul(s.into())) + // Standard Error: 10 + .saturating_add(Weight::from_parts(1_605, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Multisig Multisigs (r:1 w:1) - /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_create(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `334 + s * (1 ±0)` // Estimated: `6811` - // Minimum execution time: 48_711_000 picoseconds. - Weight::from_parts(49_779_996, 0) + // Minimum execution time: 40_445_000 picoseconds. + Weight::from_parts(41_735_038, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 761 - .saturating_add(Weight::from_parts(79_890, 0).saturating_mul(s.into())) + // Standard Error: 1_330 + .saturating_add(Weight::from_parts(95_912, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Multisig Multisigs (r:1 w:1) - /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_approve(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `315` // Estimated: `6811` - // Minimum execution time: 26_310_000 picoseconds. - Weight::from_parts(26_950_692, 0) + // Minimum execution time: 21_761_000 picoseconds. + Weight::from_parts(22_759_304, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 624 - .saturating_add(Weight::from_parts(75_150, 0).saturating_mul(s.into())) + // Standard Error: 690 + .saturating_add(Weight::from_parts(84_536, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Multisig Multisigs (r:1 w:1) - /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 100]`. fn cancel_as_multi(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `520 + s * (1 ±0)` // Estimated: `6811` - // Minimum execution time: 48_782_000 picoseconds. - Weight::from_parts(49_680_127, 0) + // Minimum execution time: 41_448_000 picoseconds. + Weight::from_parts(42_609_737, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 673 - .saturating_add(Weight::from_parts(79_663, 0).saturating_mul(s.into())) + // Standard Error: 774 + .saturating_add(Weight::from_parts(89_590, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/altair/src/weights/pallet_oracle_collection.rs b/runtime/altair/src/weights/pallet_oracle_collection.rs index f71935825b..8c3d26fe19 100644 --- a/runtime/altair/src/weights/pallet_oracle_collection.rs +++ b/runtime/altair/src/weights/pallet_oracle_collection.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_oracle_collection` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_oracle_collection // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_oracle_collection.rs @@ -32,73 +31,73 @@ use core::marker::PhantomData; /// Weight functions for `pallet_oracle_collection`. pub struct WeightInfo(PhantomData); impl pallet_oracle_collection::WeightInfo for WeightInfo { - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, 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: PoolSystem NotedChange (r:0 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(5184), added: 7659, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, 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: `PoolSystem::NotedChange` (r:0 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. fn propose_update_collection_info(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `222` // Estimated: `3693` - // Minimum execution time: 29_555_000 picoseconds. - Weight::from_parts(29_106_737, 0) + // Minimum execution time: 24_847_000 picoseconds. + Weight::from_parts(25_081_180, 0) .saturating_add(Weight::from_parts(0, 3693)) - // Standard Error: 8_606 - .saturating_add(Weight::from_parts(1_527_386, 0).saturating_mul(n.into())) + // Standard Error: 7_291 + .saturating_add(Weight::from_parts(604_140, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PoolSystem NotedChange (r:1 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(5184), added: 7659, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: OraclePriceCollection Collection (r:0 w:1) - /// Proof: OraclePriceCollection Collection (max_values: None, max_size: Some(7542), added: 10017, mode: MaxEncodedLen) - /// Storage: OraclePriceCollection CollectionInfo (r:0 w:1) - /// Proof: OraclePriceCollection CollectionInfo (max_values: None, max_size: Some(3058), added: 5533, mode: MaxEncodedLen) + /// Storage: `PoolSystem::NotedChange` (r:1 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `OraclePriceCollection::Collection` (r:0 w:1) + /// Proof: `OraclePriceCollection::Collection` (`max_values`: None, `max_size`: Some(7542), added: 10017, mode: `MaxEncodedLen`) + /// Storage: `OraclePriceCollection::CollectionInfo` (r:0 w:1) + /// Proof: `OraclePriceCollection::CollectionInfo` (`max_values`: None, `max_size`: Some(3058), added: 5533, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. fn apply_update_collection_info(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `657 + n * (34 ±0)` // Estimated: `8649` - // Minimum execution time: 35_506_000 picoseconds. - Weight::from_parts(35_372_352, 0) + // Minimum execution time: 35_075_000 picoseconds. + Weight::from_parts(35_750_191, 0) .saturating_add(Weight::from_parts(0, 8649)) - // Standard Error: 8_838 - .saturating_add(Weight::from_parts(1_595_845, 0).saturating_mul(n.into())) + // Standard Error: 8_835 + .saturating_add(Weight::from_parts(609_574, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: OraclePriceCollection Keys (r:101 w:0) - /// Proof: OraclePriceCollection Keys (max_values: None, max_size: Some(95), added: 2570, mode: MaxEncodedLen) - /// Storage: OraclePriceCollection CollectionInfo (r:1 w:0) - /// Proof: OraclePriceCollection CollectionInfo (max_values: None, max_size: Some(3058), added: 5533, mode: MaxEncodedLen) - /// Storage: OraclePriceFeed FedValues (r:500 w:0) - /// Proof: OraclePriceFeed FedValues (max_values: None, max_size: Some(711), added: 3186, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OraclePriceCollection Collection (r:0 w:1) - /// Proof: OraclePriceCollection Collection (max_values: None, max_size: Some(7542), added: 10017, 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: `OraclePriceCollection::Keys` (r:101 w:0) + /// Proof: `OraclePriceCollection::Keys` (`max_values`: None, `max_size`: Some(95), added: 2570, mode: `MaxEncodedLen`) + /// Storage: `OraclePriceCollection::CollectionInfo` (r:1 w:0) + /// Proof: `OraclePriceCollection::CollectionInfo` (`max_values`: None, `max_size`: Some(3058), added: 5533, mode: `MaxEncodedLen`) + /// Storage: `OraclePriceFeed::FedValues` (r:500 w:0) + /// Proof: `OraclePriceFeed::FedValues` (`max_values`: None, `max_size`: Some(711), added: 3186, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OraclePriceCollection::Collection` (r:0 w:1) + /// Proof: `OraclePriceCollection::Collection` (`max_values`: None, `max_size`: Some(7542), added: 10017, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[1, 100]`. fn update_collection(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + m * (326 ±0) + n * (5851 ±0)` // Estimated: `16920 + m * (6039 ±0) + n * (100600 ±3_323)` - // Minimum execution time: 165_330_000 picoseconds. - Weight::from_parts(166_182_000, 0) + // Minimum execution time: 131_405_000 picoseconds. + Weight::from_parts(132_817_000, 0) .saturating_add(Weight::from_parts(0, 16920)) - // Standard Error: 22_542_608 - .saturating_add(Weight::from_parts(713_580_761, 0).saturating_mul(n.into())) - // Standard Error: 1_116_560 - .saturating_add(Weight::from_parts(36_976_362, 0).saturating_mul(m.into())) + // Standard Error: 15_695_531 + .saturating_add(Weight::from_parts(487_953_152, 0).saturating_mul(n.into())) + // Standard Error: 777_416 + .saturating_add(Weight::from_parts(31_272_607, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().reads((31_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(m.into()))) diff --git a/runtime/altair/src/weights/pallet_oracle_feed.rs b/runtime/altair/src/weights/pallet_oracle_feed.rs index c2bb3f04d2..9844f6cd53 100644 --- a/runtime/altair/src/weights/pallet_oracle_feed.rs +++ b/runtime/altair/src/weights/pallet_oracle_feed.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_oracle_feed` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_oracle_feed // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_oracle_feed.rs @@ -32,32 +31,32 @@ use core::marker::PhantomData; /// Weight functions for `pallet_oracle_feed`. pub struct WeightInfo(PhantomData); impl pallet_oracle_feed::WeightInfo for WeightInfo { - /// Storage: OraclePriceFeed FedValues (r:1 w:1) - /// Proof: OraclePriceFeed FedValues (max_values: None, max_size: Some(711), added: 3186, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, 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: `OraclePriceFeed::FedValues` (r:1 w:1) + /// Proof: `OraclePriceFeed::FedValues` (`max_values`: None, `max_size`: Some(711), added: 3186, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn feed_with_fee() -> Weight { // Proof Size summary in bytes: // Measured: `354` // Estimated: `4176` - // Minimum execution time: 68_549_000 picoseconds. - Weight::from_parts(70_262_000, 0) + // Minimum execution time: 50_514_000 picoseconds. + Weight::from_parts(51_516_000, 0) .saturating_add(Weight::from_parts(0, 4176)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: OraclePriceFeed FedValues (r:1 w:1) - /// Proof: OraclePriceFeed FedValues (max_values: None, max_size: Some(711), added: 3186, 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: `OraclePriceFeed::FedValues` (r:1 w:1) + /// Proof: `OraclePriceFeed::FedValues` (`max_values`: None, `max_size`: Some(711), added: 3186, mode: `MaxEncodedLen`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn feed_without_fee() -> Weight { // Proof Size summary in bytes: // Measured: `380` // Estimated: `4176` - // Minimum execution time: 23_885_000 picoseconds. - Weight::from_parts(24_597_000, 0) + // Minimum execution time: 19_046_000 picoseconds. + Weight::from_parts(19_857_000, 0) .saturating_add(Weight::from_parts(0, 4176)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/altair/src/weights/pallet_order_book.rs b/runtime/altair/src/weights/pallet_order_book.rs index 576731ae8c..93946824e1 100644 --- a/runtime/altair/src/weights/pallet_order_book.rs +++ b/runtime/altair/src/weights/pallet_order_book.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_order_book` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_order_book // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_order_book.rs @@ -32,94 +31,94 @@ use core::marker::PhantomData; /// Weight functions for `pallet_order_book`. pub struct WeightInfo(PhantomData); impl pallet_order_book::WeightInfo for WeightInfo { - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OrderBook OrderIdNonceStore (r:1 w:1) - /// Proof: OrderBook OrderIdNonceStore (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:1 w:1) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrderBook Orders (r:0 w:1) - /// Proof: OrderBook Orders (max_values: None, max_size: Some(171), added: 2646, mode: MaxEncodedLen) - /// Storage: OrderBook UserOrders (r:0 w:1) - /// Proof: OrderBook UserOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OrderBook::OrderIdNonceStore` (r:1 w:1) + /// Proof: `OrderBook::OrderIdNonceStore` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:1 w:1) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrderBook::Orders` (r:0 w:1) + /// Proof: `OrderBook::Orders` (`max_values`: None, `max_size`: Some(171), added: 2646, mode: `MaxEncodedLen`) + /// Storage: `OrderBook::UserOrders` (r:0 w:1) + /// Proof: `OrderBook::UserOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) fn place_order() -> Weight { // Proof Size summary in bytes: - // Measured: `709` - // Estimated: `4174` - // Minimum execution time: 55_925_000 picoseconds. - Weight::from_parts(56_907_000, 0) - .saturating_add(Weight::from_parts(0, 4174)) + // Measured: `659` + // Estimated: `4407` + // Minimum execution time: 45_015_000 picoseconds. + Weight::from_parts(45_785_000, 0) + .saturating_add(Weight::from_parts(0, 4407)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: OrderBook Orders (r:1 w:1) - /// Proof: OrderBook Orders (max_values: None, max_size: Some(171), added: 2646, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OrmlTokens Accounts (r:1 w:1) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) + /// Storage: `OrderBook::Orders` (r:1 w:1) + /// Proof: `OrderBook::Orders` (`max_values`: None, `max_size`: Some(171), added: 2646, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:1 w:1) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) fn update_order() -> Weight { // Proof Size summary in bytes: - // Measured: `913` - // Estimated: `4378` - // Minimum execution time: 51_047_000 picoseconds. - Weight::from_parts(51_417_000, 0) - .saturating_add(Weight::from_parts(0, 4378)) + // Measured: `863` + // Estimated: `4407` + // Minimum execution time: 43_541_000 picoseconds. + Weight::from_parts(44_272_000, 0) + .saturating_add(Weight::from_parts(0, 4407)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: OrderBook Orders (r:1 w:1) - /// Proof: OrderBook Orders (max_values: None, max_size: Some(171), added: 2646, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:1 w:1) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OrderBook UserOrders (r:0 w:1) - /// Proof: OrderBook UserOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + /// Storage: `OrderBook::Orders` (r:1 w:1) + /// Proof: `OrderBook::Orders` (`max_values`: None, `max_size`: Some(171), added: 2646, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:1 w:1) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OrderBook::UserOrders` (r:0 w:1) + /// Proof: `OrderBook::UserOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) fn cancel_order() -> Weight { // Proof Size summary in bytes: - // Measured: `913` - // Estimated: `4378` - // Minimum execution time: 53_310_000 picoseconds. - Weight::from_parts(54_232_000, 0) - .saturating_add(Weight::from_parts(0, 4378)) + // Measured: `863` + // Estimated: `4407` + // Minimum execution time: 47_188_000 picoseconds. + Weight::from_parts(48_060_000, 0) + .saturating_add(Weight::from_parts(0, 4407)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: OrderBook Orders (r:1 w:1) - /// Proof: OrderBook Orders (max_values: None, max_size: Some(171), added: 2646, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:2 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OrderBook MarketFeederId (r:1 w:0) - /// Proof: OrderBook MarketFeederId (max_values: Some(1), max_size: Some(604), added: 1099, mode: MaxEncodedLen) - /// Storage: OraclePriceFeed FedValues (r:1 w:0) - /// Proof: OraclePriceFeed FedValues (max_values: None, max_size: Some(711), added: 3186, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:4 w:4) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Swaps OrderIdToSwapId (r:1 w:0) - /// Proof: Swaps OrderIdToSwapId (max_values: None, max_size: Some(81), added: 2556, mode: MaxEncodedLen) - /// Storage: OrderBook UserOrders (r:0 w:1) - /// Proof: OrderBook UserOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + /// Storage: `OrderBook::Orders` (r:1 w:1) + /// Proof: `OrderBook::Orders` (`max_values`: None, `max_size`: Some(171), added: 2646, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:2 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OrderBook::MarketFeederId` (r:1 w:0) + /// Proof: `OrderBook::MarketFeederId` (`max_values`: Some(1), `max_size`: Some(604), added: 1099, mode: `MaxEncodedLen`) + /// Storage: `OraclePriceFeed::FedValues` (r:1 w:0) + /// Proof: `OraclePriceFeed::FedValues` (`max_values`: None, `max_size`: Some(711), added: 3186, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:4 w:4) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Swaps::OrderIdToSwapId` (r:1 w:0) + /// Proof: `Swaps::OrderIdToSwapId` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) + /// Storage: `OrderBook::UserOrders` (r:0 w:1) + /// Proof: `OrderBook::UserOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) fn fill_order() -> Weight { // Proof Size summary in bytes: - // Measured: `1665` + // Measured: `1562` // Estimated: `11406` - // Minimum execution time: 172_604_000 picoseconds. - Weight::from_parts(175_290_000, 0) + // Minimum execution time: 145_291_000 picoseconds. + Weight::from_parts(147_665_000, 0) .saturating_add(Weight::from_parts(0, 11406)) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(8)) } - /// Storage: OrderBook MarketFeederId (r:0 w:1) - /// Proof: OrderBook MarketFeederId (max_values: Some(1), max_size: Some(604), added: 1099, mode: MaxEncodedLen) + /// Storage: `OrderBook::MarketFeederId` (r:0 w:1) + /// Proof: `OrderBook::MarketFeederId` (`max_values`: Some(1), `max_size`: Some(604), added: 1099, mode: `MaxEncodedLen`) fn set_market_feeder() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 13_405_000 picoseconds. - Weight::from_parts(13_706_000, 0) + // Minimum execution time: 7_654_000 picoseconds. + Weight::from_parts(7_945_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/altair/src/weights/pallet_permissions.rs b/runtime/altair/src/weights/pallet_permissions.rs index b7270da4a7..261db5044c 100644 --- a/runtime/altair/src/weights/pallet_permissions.rs +++ b/runtime/altair/src/weights/pallet_permissions.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_permissions` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_permissions // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_permissions.rs @@ -32,82 +31,82 @@ use core::marker::PhantomData; /// Weight functions for `pallet_permissions`. pub struct WeightInfo(PhantomData); impl pallet_permissions::WeightInfo for WeightInfo { - /// Storage: Permissions PermissionCount (r:1 w:1) - /// Proof: Permissions PermissionCount (max_values: None, max_size: Some(46), added: 2521, mode: MaxEncodedLen) - /// Storage: Permissions Permission (r:1 w:1) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) + /// Storage: `Permissions::PermissionCount` (r:1 w:1) + /// Proof: `Permissions::PermissionCount` (`max_values`: None, `max_size`: Some(46), added: 2521, mode: `MaxEncodedLen`) + /// Storage: `Permissions::Permission` (r:1 w:1) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) fn add_as_admin() -> Weight { // Proof Size summary in bytes: // Measured: `3` // Estimated: `3693` - // Minimum execution time: 21_561_000 picoseconds. - Weight::from_parts(22_312_000, 0) + // Minimum execution time: 17_362_000 picoseconds. + Weight::from_parts(17_893_000, 0) .saturating_add(Weight::from_parts(0, 3693)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Permissions Permission (r:2 w:1) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: Permissions PermissionCount (r:1 w:1) - /// Proof: Permissions PermissionCount (max_values: None, max_size: Some(46), added: 2521, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:2 w:1) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `Permissions::PermissionCount` (r:1 w:1) + /// Proof: `Permissions::PermissionCount` (`max_values`: None, `max_size`: Some(46), added: 2521, mode: `MaxEncodedLen`) fn add_as_editor() -> Weight { // Proof Size summary in bytes: // Measured: `162` // Estimated: `6396` - // Minimum execution time: 29_095_000 picoseconds. - Weight::from_parts(29_876_000, 0) + // Minimum execution time: 24_696_000 picoseconds. + Weight::from_parts(25_117_000, 0) .saturating_add(Weight::from_parts(0, 6396)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Permissions PermissionCount (r:1 w:1) - /// Proof: Permissions PermissionCount (max_values: None, max_size: Some(46), added: 2521, mode: MaxEncodedLen) - /// Storage: Permissions Permission (r:1 w:1) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) + /// Storage: `Permissions::PermissionCount` (r:1 w:1) + /// Proof: `Permissions::PermissionCount` (`max_values`: None, `max_size`: Some(46), added: 2521, mode: `MaxEncodedLen`) + /// Storage: `Permissions::Permission` (r:1 w:1) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) fn remove_as_admin() -> Weight { // Proof Size summary in bytes: // Measured: `162` // Estimated: `3693` - // Minimum execution time: 25_067_000 picoseconds. - Weight::from_parts(25_979_000, 0) + // Minimum execution time: 20_288_000 picoseconds. + Weight::from_parts(20_960_000, 0) .saturating_add(Weight::from_parts(0, 3693)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Permissions Permission (r:2 w:1) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: Permissions PermissionCount (r:1 w:1) - /// Proof: Permissions PermissionCount (max_values: None, max_size: Some(46), added: 2521, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:2 w:1) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `Permissions::PermissionCount` (r:1 w:1) + /// Proof: `Permissions::PermissionCount` (`max_values`: None, `max_size`: Some(46), added: 2521, mode: `MaxEncodedLen`) fn remove_as_editor() -> Weight { // Proof Size summary in bytes: // Measured: `256` // Estimated: `6396` - // Minimum execution time: 31_639_000 picoseconds. - Weight::from_parts(32_441_000, 0) + // Minimum execution time: 26_650_000 picoseconds. + Weight::from_parts(27_863_000, 0) .saturating_add(Weight::from_parts(0, 6396)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Permissions Permission (r:1 w:1) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:1) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) fn purge() -> Weight { // Proof Size summary in bytes: // Measured: `146` // Estimated: `3693` - // Minimum execution time: 21_851_000 picoseconds. - Weight::from_parts(22_432_000, 0) + // Minimum execution time: 17_252_000 picoseconds. + Weight::from_parts(17_583_000, 0) .saturating_add(Weight::from_parts(0, 3693)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Permissions Permission (r:1 w:1) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:1) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) fn admin_purge() -> Weight { // Proof Size summary in bytes: // Measured: `146` // Estimated: `3693` - // Minimum execution time: 22_372_000 picoseconds. - Weight::from_parts(22_683_000, 0) + // Minimum execution time: 17_503_000 picoseconds. + Weight::from_parts(17_994_000, 0) .saturating_add(Weight::from_parts(0, 3693)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/altair/src/weights/pallet_pool_fees.rs b/runtime/altair/src/weights/pallet_pool_fees.rs index 3d60170c98..11e923805f 100644 --- a/runtime/altair/src/weights/pallet_pool_fees.rs +++ b/runtime/altair/src/weights/pallet_pool_fees.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_pool_fees` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_pool_fees // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_pool_fees.rs @@ -32,122 +31,122 @@ use core::marker::PhantomData; /// Weight functions for `pallet_pool_fees`. pub struct WeightInfo(PhantomData); impl pallet_pool_fees::WeightInfo for WeightInfo { - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: PoolFees LastFeeId (r:1 w:1) - /// Proof: PoolFees LastFeeId (max_values: Some(1), max_size: Some(8), added: 503, 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: PoolSystem NotedChange (r:0 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(5184), added: 7659, mode: MaxEncodedLen) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::LastFeeId` (r:1 w:1) + /// Proof: `PoolFees::LastFeeId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, 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: `PoolSystem::NotedChange` (r:0 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) fn propose_new_fee() -> Weight { // Proof Size summary in bytes: // Measured: `548` // Estimated: `4278` - // Minimum execution time: 43_652_000 picoseconds. - Weight::from_parts(44_444_000, 0) + // Minimum execution time: 35_326_000 picoseconds. + Weight::from_parts(36_288_000, 0) .saturating_add(Weight::from_parts(0, 4278)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: PoolSystem NotedChange (r:1 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(5184), added: 7659, mode: MaxEncodedLen) - /// Storage: PoolFees FeeIdsToPoolBucket (r:1 w:1) - /// Proof: PoolFees FeeIdsToPoolBucket (max_values: None, max_size: Some(33), added: 2508, mode: MaxEncodedLen) - /// Storage: PoolFees FeeIds (r:1 w:1) - /// Proof: PoolFees FeeIds (max_values: None, max_size: Some(843), added: 3318, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::NotedChange` (r:1 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::FeeIdsToPoolBucket` (r:1 w:1) + /// Proof: `PoolFees::FeeIdsToPoolBucket` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::FeeIds` (r:1 w:1) + /// Proof: `PoolFees::FeeIds` (`max_values`: None, `max_size`: Some(843), added: 3318, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 99]`. fn apply_new_fee(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1362 + n * (137 ±0)` // Estimated: `17508` - // Minimum execution time: 55_645_000 picoseconds. - Weight::from_parts(56_508_588, 0) + // Minimum execution time: 57_377_000 picoseconds. + Weight::from_parts(58_210_849, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 2_096 - .saturating_add(Weight::from_parts(277_336, 0).saturating_mul(n.into())) + // Standard Error: 2_014 + .saturating_add(Weight::from_parts(279_465, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: PoolFees FeeIdsToPoolBucket (r:1 w:1) - /// Proof: PoolFees FeeIdsToPoolBucket (max_values: None, max_size: Some(33), added: 2508, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) - /// Storage: PoolFees FeeIds (r:1 w:1) - /// Proof: PoolFees FeeIds (max_values: None, max_size: Some(843), added: 3318, mode: MaxEncodedLen) + /// Storage: `PoolFees::FeeIdsToPoolBucket` (r:1 w:1) + /// Proof: `PoolFees::FeeIdsToPoolBucket` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::FeeIds` (r:1 w:1) + /// Proof: `PoolFees::FeeIds` (`max_values`: None, `max_size`: Some(843), added: 3318, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 100]`. fn remove_fee(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `676 + n * (136 ±0)` // Estimated: `17508` - // Minimum execution time: 37_951_000 picoseconds. - Weight::from_parts(38_599_094, 0) + // Minimum execution time: 34_505_000 picoseconds. + Weight::from_parts(35_151_831, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 3_366 - .saturating_add(Weight::from_parts(412_182, 0).saturating_mul(n.into())) + // Standard Error: 4_044 + .saturating_add(Weight::from_parts(428_154, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: PoolFees FeeIdsToPoolBucket (r:1 w:0) - /// Proof: PoolFees FeeIdsToPoolBucket (max_values: None, max_size: Some(33), added: 2508, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) + /// Storage: `PoolFees::FeeIdsToPoolBucket` (r:1 w:0) + /// Proof: `PoolFees::FeeIdsToPoolBucket` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 99]`. fn charge_fee(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `762 + n * (129 ±0)` // Estimated: `17508` - // Minimum execution time: 27_703_000 picoseconds. - Weight::from_parts(27_482_913, 0) + // Minimum execution time: 24_004_000 picoseconds. + Weight::from_parts(24_168_211, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 2_076 - .saturating_add(Weight::from_parts(256_479, 0).saturating_mul(n.into())) + // Standard Error: 2_074 + .saturating_add(Weight::from_parts(258_865, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PoolFees FeeIdsToPoolBucket (r:1 w:0) - /// Proof: PoolFees FeeIdsToPoolBucket (max_values: None, max_size: Some(33), added: 2508, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) + /// Storage: `PoolFees::FeeIdsToPoolBucket` (r:1 w:0) + /// Proof: `PoolFees::FeeIdsToPoolBucket` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 99]`. fn uncharge_fee(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `762 + n * (129 ±0)` // Estimated: `17508` - // Minimum execution time: 27_111_000 picoseconds. - Weight::from_parts(26_637_232, 0) + // Minimum execution time: 23_454_000 picoseconds. + Weight::from_parts(23_197_809, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 2_224 - .saturating_add(Weight::from_parts(260_103, 0).saturating_mul(n.into())) + // Standard Error: 2_199 + .saturating_add(Weight::from_parts(259_697, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: PoolFees PortfolioValuation (r:1 w:1) - /// Proof: PoolFees PortfolioValuation (max_values: None, max_size: Some(4850), added: 7325, 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: PoolFees AssetsUnderManagement (r:1 w:0) - /// Proof: PoolFees AssetsUnderManagement (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::PortfolioValuation` (r:1 w:1) + /// Proof: `PoolFees::PortfolioValuation` (`max_values`: None, `max_size`: Some(4850), added: 7325, 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: `PoolFees::AssetsUnderManagement` (r:1 w:0) + /// Proof: `PoolFees::AssetsUnderManagement` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 100]`. fn update_portfolio_valuation(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `570 + n * (124 ±0)` // Estimated: `17508` - // Minimum execution time: 50_234_000 picoseconds. - Weight::from_parts(42_753_052, 0) + // Minimum execution time: 41_287_000 picoseconds. + Weight::from_parts(38_210_123, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 5_307 - .saturating_add(Weight::from_parts(6_476_364, 0).saturating_mul(n.into())) + // Standard Error: 3_690 + .saturating_add(Weight::from_parts(3_052_827, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/altair/src/weights/pallet_pool_registry.rs b/runtime/altair/src/weights/pallet_pool_registry.rs index 023a470d48..0757cd64d7 100644 --- a/runtime/altair/src/weights/pallet_pool_registry.rs +++ b/runtime/altair/src/weights/pallet_pool_registry.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_pool_registry` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_pool_registry // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_pool_registry.rs @@ -32,169 +31,169 @@ use core::marker::PhantomData; /// Weight functions for `pallet_pool_registry`. pub struct WeightInfo(PhantomData); impl pallet_pool_registry::WeightInfo for WeightInfo { - /// Storage: PoolRegistry Pools (r:1 w:1) - /// Proof: PoolRegistry Pools (max_values: None, max_size: Some(25), added: 2500, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:6 w:5) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: PoolSystem AccountDeposit (r:1 w:1) - /// Proof: PoolSystem AccountDeposit (max_values: None, max_size: Some(64), added: 2539, 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: PoolFees LastFeeId (r:1 w:1) - /// Proof: PoolFees LastFeeId (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: PoolFees FeeIdsToPoolBucket (r:100 w:100) - /// Proof: PoolFees FeeIdsToPoolBucket (max_values: None, max_size: Some(33), added: 2508, mode: MaxEncodedLen) - /// Storage: PoolFees FeeIds (r:1 w:1) - /// Proof: PoolFees FeeIds (max_values: None, max_size: Some(843), added: 3318, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) - /// Storage: Permissions PermissionCount (r:1 w:1) - /// Proof: Permissions PermissionCount (max_values: None, max_size: Some(46), added: 2521, mode: MaxEncodedLen) - /// Storage: Permissions Permission (r:1 w:1) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: Loans WriteOffPolicy (r:0 w:1) - /// Proof: Loans WriteOffPolicy (max_values: None, max_size: Some(5126), added: 7601, mode: MaxEncodedLen) - /// Storage: PoolSystem PoolDeposit (r:0 w:1) - /// Proof: PoolSystem PoolDeposit (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: `PoolRegistry::Pools` (r:1 w:1) + /// Proof: `PoolRegistry::Pools` (`max_values`: None, `max_size`: Some(25), added: 2500, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:6 w:5) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::AccountDeposit` (r:1 w:1) + /// Proof: `PoolSystem::AccountDeposit` (`max_values`: None, `max_size`: Some(64), added: 2539, 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: `PoolFees::LastFeeId` (r:1 w:1) + /// Proof: `PoolFees::LastFeeId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::FeeIdsToPoolBucket` (r:100 w:100) + /// Proof: `PoolFees::FeeIdsToPoolBucket` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::FeeIds` (r:1 w:1) + /// Proof: `PoolFees::FeeIds` (`max_values`: None, `max_size`: Some(843), added: 3318, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) + /// Storage: `Permissions::PermissionCount` (r:1 w:1) + /// Proof: `Permissions::PermissionCount` (`max_values`: None, `max_size`: Some(46), added: 2521, mode: `MaxEncodedLen`) + /// Storage: `Permissions::Permission` (r:1 w:1) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `Loans::WriteOffPolicy` (r:0 w:1) + /// Proof: `Loans::WriteOffPolicy` (`max_values`: None, `max_size`: Some(5126), added: 7601, mode: `MaxEncodedLen`) + /// Storage: `PoolRegistry::PoolMetadata` (r:0 w:1) + /// Proof: `PoolRegistry::PoolMetadata` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::PoolDeposit` (r:0 w:1) + /// Proof: `PoolSystem::PoolDeposit` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[0, 100]`. fn register(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `441` - // Estimated: `17508 + m * (2508 ±0) + n * (2475 ±0)` - // Minimum execution time: 232_456_000 picoseconds. - Weight::from_parts(104_353_702, 0) + // Measured: `422` + // Estimated: `17508 + m * (2508 ±0) + n * (3417 ±0)` + // Minimum execution time: 186_748_000 picoseconds. + Weight::from_parts(123_689_120, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 82_581 - .saturating_add(Weight::from_parts(28_423_981, 0).saturating_mul(m.into())) + // Standard Error: 81_503 + .saturating_add(Weight::from_parts(24_132_712, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into()))) - .saturating_add(T::DbWeight::get().writes(10)) + .saturating_add(T::DbWeight::get().writes(11)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m.into()))) .saturating_add(Weight::from_parts(0, 2508).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 2475).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 3417).saturating_mul(n.into())) } - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: PoolSystem EpochExecution (r:1 w:0) - /// Proof: PoolSystem EpochExecution (max_values: None, max_size: Some(754), added: 3229, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, 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: Investments ActiveRedeemOrders (r:5 w:0) - /// Proof: Investments ActiveRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:0) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) - /// Storage: PoolSystem ScheduledUpdate (r:0 w:1) - /// Proof: PoolSystem ScheduledUpdate (max_values: None, max_size: Some(1019), added: 3494, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::EpochExecution` (r:1 w:0) + /// Proof: `PoolSystem::EpochExecution` (`max_values`: None, `max_size`: Some(754), added: 3229, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, 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: `Investments::ActiveRedeemOrders` (r:5 w:0) + /// Proof: `Investments::ActiveRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:0) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::ScheduledUpdate` (r:0 w:1) + /// Proof: `PoolSystem::ScheduledUpdate` (`max_values`: None, `max_size`: Some(1504), added: 3979, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[0, 100]`. fn update_no_execution(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `924 + m * (124 ±0) + n * (133 ±0)` // Estimated: `17508 + n * (2531 ±0)` - // Minimum execution time: 66_094_000 picoseconds. - Weight::from_parts(56_905_727, 0) + // Minimum execution time: 58_940_000 picoseconds. + Weight::from_parts(50_984_763, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 37_239 - .saturating_add(Weight::from_parts(3_213_798, 0).saturating_mul(n.into())) - // Standard Error: 1_699 - .saturating_add(Weight::from_parts(219_086, 0).saturating_mul(m.into())) + // Standard Error: 38_828 + .saturating_add(Weight::from_parts(2_943_073, 0).saturating_mul(n.into())) + // Standard Error: 1_771 + .saturating_add(Weight::from_parts(217_699, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 2531).saturating_mul(n.into())) } - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: PoolSystem EpochExecution (r:1 w:0) - /// Proof: PoolSystem EpochExecution (max_values: None, max_size: Some(754), added: 3229, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, 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: Investments ActiveRedeemOrders (r:5 w:0) - /// Proof: Investments ActiveRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:2 w:1) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: PoolFees ActiveFees (r:1 w:0) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) - /// Storage: PoolSystem ScheduledUpdate (r:0 w:1) - /// Proof: PoolSystem ScheduledUpdate (max_values: None, max_size: Some(1019), added: 3494, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::EpochExecution` (r:1 w:0) + /// Proof: `PoolSystem::EpochExecution` (`max_values`: None, `max_size`: Some(754), added: 3229, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, 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: `Investments::ActiveRedeemOrders` (r:5 w:0) + /// Proof: `Investments::ActiveRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:5 w:1) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:0) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::ScheduledUpdate` (r:0 w:1) + /// Proof: `PoolSystem::ScheduledUpdate` (`max_values`: None, `max_size`: Some(1504), added: 3979, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[0, 100]`. fn update_and_execute(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `988 + m * (124 ±0) + n * (167 ±0)` - // Estimated: `17508 + m * (124 ±0) + n * (2531 ±0)` - // Minimum execution time: 117_640_000 picoseconds. - Weight::from_parts(86_928_788, 0) + // Measured: `927 + m * (124 ±0) + n * (200 ±0)` + // Estimated: `17508 + n * (3417 ±0)` + // Minimum execution time: 101_439_000 picoseconds. + Weight::from_parts(70_893_079, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 41_212 - .saturating_add(Weight::from_parts(10_004_690, 0).saturating_mul(n.into())) - // Standard Error: 1_880 - .saturating_add(Weight::from_parts(234_201, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) + // Standard Error: 47_685 + .saturating_add(Weight::from_parts(10_729_260, 0).saturating_mul(n.into())) + // Standard Error: 2_176 + .saturating_add(Weight::from_parts(229_716, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 124).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 2531).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 3417).saturating_mul(n.into())) } - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: PoolSystem EpochExecution (r:1 w:0) - /// Proof: PoolSystem EpochExecution (max_values: None, max_size: Some(754), added: 3229, mode: MaxEncodedLen) - /// Storage: PoolSystem ScheduledUpdate (r:1 w:1) - /// Proof: PoolSystem ScheduledUpdate (max_values: None, max_size: Some(1019), added: 3494, 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: Investments ActiveRedeemOrders (r:5 w:0) - /// Proof: Investments ActiveRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:2 w:1) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: PoolFees ActiveFees (r:1 w:0) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::EpochExecution` (r:1 w:0) + /// Proof: `PoolSystem::EpochExecution` (`max_values`: None, `max_size`: Some(754), added: 3229, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::ScheduledUpdate` (r:1 w:1) + /// Proof: `PoolSystem::ScheduledUpdate` (`max_values`: None, `max_size`: Some(1504), added: 3979, 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: `Investments::ActiveRedeemOrders` (r:5 w:0) + /// Proof: `Investments::ActiveRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:5 w:1) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:0) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[0, 100]`. fn execute_update(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `976 + m * (124 ±0) + n * (194 ±0)` - // Estimated: `17508 + m * (124 ±0) + n * (2531 ±0)` - // Minimum execution time: 102_502_000 picoseconds. - Weight::from_parts(73_321_614, 0) + // Measured: `915 + m * (124 ±0) + n * (227 ±0)` + // Estimated: `17508 + n * (3417 ±0)` + // Minimum execution time: 94_327_000 picoseconds. + Weight::from_parts(61_924_136, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 37_447 - .saturating_add(Weight::from_parts(10_091_703, 0).saturating_mul(n.into())) - // Standard Error: 1_708 - .saturating_add(Weight::from_parts(216_539, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) + // Standard Error: 60_907 + .saturating_add(Weight::from_parts(11_430_089, 0).saturating_mul(n.into())) + // Standard Error: 2_779 + .saturating_add(Weight::from_parts(226_144, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 124).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 2531).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 3417).saturating_mul(n.into())) } - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: PoolRegistry PoolMetadata (r:0 w:1) - /// Proof: PoolRegistry PoolMetadata (max_values: None, max_size: Some(71), added: 2546, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolRegistry::PoolMetadata` (r:0 w:1) + /// Proof: `PoolRegistry::PoolMetadata` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 46]`. /// The range of component `m` is `[0, 100]`. fn set_metadata(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `146` // Estimated: `3693` - // Minimum execution time: 23_554_000 picoseconds. - Weight::from_parts(24_240_005, 0) + // Minimum execution time: 19_066_000 picoseconds. + Weight::from_parts(19_700_503, 0) .saturating_add(Weight::from_parts(0, 3693)) - // Standard Error: 696 - .saturating_add(Weight::from_parts(6_016, 0).saturating_mul(n.into())) - // Standard Error: 323 - .saturating_add(Weight::from_parts(22_810, 0).saturating_mul(m.into())) + // Standard Error: 1_506 + .saturating_add(Weight::from_parts(7_088, 0).saturating_mul(n.into())) + // Standard Error: 700 + .saturating_add(Weight::from_parts(30_038, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/altair/src/weights/pallet_pool_system.rs b/runtime/altair/src/weights/pallet_pool_system.rs index 6002e8dd0b..37686587b5 100644 --- a/runtime/altair/src/weights/pallet_pool_system.rs +++ b/runtime/altair/src/weights/pallet_pool_system.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_pool_system` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_pool_system // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_pool_system.rs @@ -32,253 +31,259 @@ use core::marker::PhantomData; /// Weight functions for `pallet_pool_system`. pub struct WeightInfo(PhantomData); impl pallet_pool_system::WeightInfo for WeightInfo { - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) /// The range of component `m` is `[0, 100]`. fn set_max_reserve(m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `592` + // Measured: `554` // Estimated: `4278` - // Minimum execution time: 29_416_000 picoseconds. - Weight::from_parts(30_938_668, 0) + // Minimum execution time: 24_425_000 picoseconds. + Weight::from_parts(25_132_176, 0) .saturating_add(Weight::from_parts(0, 4278)) - // Standard Error: 459 - .saturating_add(Weight::from_parts(28_705, 0).saturating_mul(m.into())) + // Standard Error: 539 + .saturating_add(Weight::from_parts(31_636, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: PoolSystem EpochExecution (r:1 w:0) - /// Proof: PoolSystem EpochExecution (max_values: None, max_size: Some(754), added: 3229, 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 PortfolioValuation (r:1 w:0) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: PoolFees PortfolioValuation (r:1 w:1) - /// Proof: PoolFees PortfolioValuation (max_values: None, max_size: Some(4850), added: 7325, mode: MaxEncodedLen) - /// Storage: PoolFees AssetsUnderManagement (r:1 w:1) - /// Proof: PoolFees AssetsUnderManagement (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) - /// Storage: OrmlTokens TotalIssuance (r:5 w:0) - /// Proof: OrmlTokens TotalIssuance (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) - /// Storage: Investments ActiveInvestOrders (r:5 w:5) - /// Proof: Investments ActiveInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InProcessingInvestOrders (r:5 w:5) - /// Proof: Investments InProcessingInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InvestOrderId (r:5 w:5) - /// Proof: Investments InvestOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Investments ActiveRedeemOrders (r:5 w:5) - /// Proof: Investments ActiveRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InProcessingRedeemOrders (r:5 w:5) - /// Proof: Investments InProcessingRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments RedeemOrderId (r:5 w:5) - /// Proof: Investments RedeemOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:5 w:0) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: Investments ClearedInvestOrders (r:0 w:5) - /// Proof: Investments ClearedInvestOrders (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen) - /// Storage: Investments ClearedRedeemOrders (r:0 w:5) - /// Proof: Investments ClearedRedeemOrders (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::EpochExecution` (r:1 w:0) + /// Proof: `PoolSystem::EpochExecution` (`max_values`: None, `max_size`: Some(754), added: 3229, 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::PortfolioValuation` (r:1 w:0) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::PortfolioValuation` (r:1 w:1) + /// Proof: `PoolFees::PortfolioValuation` (`max_values`: None, `max_size`: Some(4850), added: 7325, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::AssetsUnderManagement` (r:1 w:1) + /// Proof: `PoolFees::AssetsUnderManagement` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::TotalIssuance` (r:5 w:0) + /// Proof: `OrmlTokens::TotalIssuance` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveInvestOrders` (r:5 w:5) + /// Proof: `Investments::ActiveInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InProcessingInvestOrders` (r:5 w:5) + /// Proof: `Investments::InProcessingInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InvestOrderId` (r:5 w:5) + /// Proof: `Investments::InvestOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveRedeemOrders` (r:5 w:5) + /// Proof: `Investments::ActiveRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InProcessingRedeemOrders` (r:5 w:5) + /// Proof: `Investments::InProcessingRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::RedeemOrderId` (r:5 w:5) + /// Proof: `Investments::RedeemOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:5 w:0) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `Investments::ClearedInvestOrders` (r:0 w:5) + /// Proof: `Investments::ClearedInvestOrders` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) + /// Storage: `Investments::ClearedRedeemOrders` (r:0 w:5) + /// Proof: `Investments::ClearedRedeemOrders` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[1, 100]`. fn close_epoch_no_orders(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1014 + m * (124 ±0) + n * (133 ±0)` + // Measured: `1150 + m * (124 ±0) + n * (133 ±0)` // Estimated: `27515 + n * (2604 ±0)` - // Minimum execution time: 513_134_000 picoseconds. - Weight::from_parts(88_468_897, 0) + // Minimum execution time: 442_405_000 picoseconds. + Weight::from_parts(84_600_408, 0) .saturating_add(Weight::from_parts(0, 27515)) - // Standard Error: 145_706 - .saturating_add(Weight::from_parts(83_992_022, 0).saturating_mul(n.into())) - // Standard Error: 6_729 - .saturating_add(Weight::from_parts(6_815_360, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(7)) + // Standard Error: 136_918 + .saturating_add(Weight::from_parts(71_704_522, 0).saturating_mul(n.into())) + // Standard Error: 6_323 + .saturating_add(Weight::from_parts(3_447_067, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().reads((8_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((8_u64).saturating_mul(n.into()))) .saturating_add(Weight::from_parts(0, 2604).saturating_mul(n.into())) } - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: PoolSystem EpochExecution (r:1 w:1) - /// Proof: PoolSystem EpochExecution (max_values: None, max_size: Some(754), added: 3229, 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 PortfolioValuation (r:1 w:0) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: PoolFees PortfolioValuation (r:1 w:1) - /// Proof: PoolFees PortfolioValuation (max_values: None, max_size: Some(4850), added: 7325, mode: MaxEncodedLen) - /// Storage: PoolFees AssetsUnderManagement (r:1 w:1) - /// Proof: PoolFees AssetsUnderManagement (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) - /// Storage: OrmlTokens TotalIssuance (r:5 w:0) - /// Proof: OrmlTokens TotalIssuance (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) - /// Storage: Investments ActiveInvestOrders (r:5 w:5) - /// Proof: Investments ActiveInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InProcessingInvestOrders (r:5 w:5) - /// Proof: Investments InProcessingInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InvestOrderId (r:5 w:5) - /// Proof: Investments InvestOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Investments ActiveRedeemOrders (r:5 w:5) - /// Proof: Investments ActiveRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InProcessingRedeemOrders (r:5 w:5) - /// Proof: Investments InProcessingRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments RedeemOrderId (r:5 w:5) - /// Proof: Investments RedeemOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::EpochExecution` (r:1 w:1) + /// Proof: `PoolSystem::EpochExecution` (`max_values`: None, `max_size`: Some(754), added: 3229, 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::PortfolioValuation` (r:1 w:0) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::PortfolioValuation` (r:1 w:1) + /// Proof: `PoolFees::PortfolioValuation` (`max_values`: None, `max_size`: Some(4850), added: 7325, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::AssetsUnderManagement` (r:1 w:1) + /// Proof: `PoolFees::AssetsUnderManagement` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::TotalIssuance` (r:5 w:0) + /// Proof: `OrmlTokens::TotalIssuance` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveInvestOrders` (r:5 w:5) + /// Proof: `Investments::ActiveInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InProcessingInvestOrders` (r:5 w:5) + /// Proof: `Investments::InProcessingInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InvestOrderId` (r:5 w:5) + /// Proof: `Investments::InvestOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveRedeemOrders` (r:5 w:5) + /// Proof: `Investments::ActiveRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InProcessingRedeemOrders` (r:5 w:5) + /// Proof: `Investments::InProcessingRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::RedeemOrderId` (r:5 w:5) + /// Proof: `Investments::RedeemOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[0, 100]`. fn close_epoch_no_execution(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1178 + m * (124 ±0) + n * (133 ±0)` + // Measured: `1362 + m * (124 ±0) + n * (133 ±0)` // Estimated: `27515 + n * (2531 ±0)` - // Minimum execution time: 257_853_000 picoseconds. - Weight::from_parts(89_178_439, 0) + // Minimum execution time: 227_845_000 picoseconds. + Weight::from_parts(97_065_667, 0) .saturating_add(Weight::from_parts(0, 27515)) - // Standard Error: 124_848 - .saturating_add(Weight::from_parts(35_129_226, 0).saturating_mul(n.into())) - // Standard Error: 5_697 - .saturating_add(Weight::from_parts(6_644_224, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(7)) + // Standard Error: 103_500 + .saturating_add(Weight::from_parts(27_629_142, 0).saturating_mul(n.into())) + // Standard Error: 4_723 + .saturating_add(Weight::from_parts(3_198_067, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(5)) .saturating_add(T::DbWeight::get().writes((6_u64).saturating_mul(n.into()))) .saturating_add(Weight::from_parts(0, 2531).saturating_mul(n.into())) } - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: PoolSystem EpochExecution (r:1 w:0) - /// Proof: PoolSystem EpochExecution (max_values: None, max_size: Some(754), added: 3229, 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 PortfolioValuation (r:1 w:0) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: PoolFees PortfolioValuation (r:1 w:1) - /// Proof: PoolFees PortfolioValuation (max_values: None, max_size: Some(4850), added: 7325, mode: MaxEncodedLen) - /// Storage: PoolFees AssetsUnderManagement (r:1 w:1) - /// Proof: PoolFees AssetsUnderManagement (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) - /// Storage: OrmlTokens TotalIssuance (r:5 w:1) - /// Proof: OrmlTokens TotalIssuance (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) - /// Storage: Investments ActiveInvestOrders (r:5 w:5) - /// Proof: Investments ActiveInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InProcessingInvestOrders (r:5 w:5) - /// Proof: Investments InProcessingInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InvestOrderId (r:5 w:5) - /// Proof: Investments InvestOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Investments ActiveRedeemOrders (r:5 w:5) - /// Proof: Investments ActiveRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InProcessingRedeemOrders (r:5 w:5) - /// Proof: Investments InProcessingRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments RedeemOrderId (r:5 w:5) - /// Proof: Investments RedeemOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:7 w:3) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:2 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Investments ClearedInvestOrders (r:0 w:5) - /// Proof: Investments ClearedInvestOrders (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen) - /// Storage: Investments ClearedRedeemOrders (r:0 w:5) - /// Proof: Investments ClearedRedeemOrders (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::EpochExecution` (r:1 w:0) + /// Proof: `PoolSystem::EpochExecution` (`max_values`: None, `max_size`: Some(754), added: 3229, 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::PortfolioValuation` (r:1 w:0) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::PortfolioValuation` (r:1 w:1) + /// Proof: `PoolFees::PortfolioValuation` (`max_values`: None, `max_size`: Some(4850), added: 7325, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::AssetsUnderManagement` (r:1 w:1) + /// Proof: `PoolFees::AssetsUnderManagement` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::TotalIssuance` (r:5 w:1) + /// Proof: `OrmlTokens::TotalIssuance` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveInvestOrders` (r:5 w:5) + /// Proof: `Investments::ActiveInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InProcessingInvestOrders` (r:5 w:5) + /// Proof: `Investments::InProcessingInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InvestOrderId` (r:5 w:5) + /// Proof: `Investments::InvestOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveRedeemOrders` (r:5 w:5) + /// Proof: `Investments::ActiveRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InProcessingRedeemOrders` (r:5 w:5) + /// Proof: `Investments::InProcessingRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::RedeemOrderId` (r:5 w:5) + /// Proof: `Investments::RedeemOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:7 w:3) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:2 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Investments::ClearedInvestOrders` (r:0 w:5) + /// Proof: `Investments::ClearedInvestOrders` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) + /// Storage: `Investments::ClearedRedeemOrders` (r:0 w:5) + /// Proof: `Investments::ClearedRedeemOrders` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[0, 100]`. fn close_epoch_execute(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1989 + m * (124 ±0) + n * (167 ±0)` - // Estimated: `27515 + m * (124 ±0) + n * (2604 ±0)` - // Minimum execution time: 630_764_000 picoseconds. - Weight::from_parts(208_124_486, 0) + // Measured: `2054 + m * (124 ±0) + n * (167 ±0)` + // Estimated: `27515 + n * (2604 ±0)` + // Minimum execution time: 537_503_000 picoseconds. + Weight::from_parts(180_573_847, 0) .saturating_add(Weight::from_parts(0, 27515)) - // Standard Error: 183_068 - .saturating_add(Weight::from_parts(86_193_666, 0).saturating_mul(n.into())) - // Standard Error: 8_354 - .saturating_add(Weight::from_parts(6_815_530, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(13)) + // Standard Error: 169_949 + .saturating_add(Weight::from_parts(74_071_744, 0).saturating_mul(n.into())) + // Standard Error: 7_755 + .saturating_add(Weight::from_parts(3_460_352, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(14)) .saturating_add(T::DbWeight::get().reads((8_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(10)) .saturating_add(T::DbWeight::get().writes((8_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_parts(0, 124).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 2604).saturating_mul(n.into())) } - /// Storage: PoolSystem EpochExecution (r:1 w:1) - /// Proof: PoolSystem EpochExecution (max_values: None, max_size: Some(754), added: 3229, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:0) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) + /// Storage: `PoolSystem::EpochExecution` (r:1 w:1) + /// Proof: `PoolSystem::EpochExecution` (`max_values`: None, `max_size`: Some(754), added: 3229, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:0) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[0, 100]`. fn submit_solution(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `788 + m * (124 ±0) + n * (249 ±0)` // Estimated: `17508` - // Minimum execution time: 43_101_000 picoseconds. - Weight::from_parts(37_259_107, 0) + // Minimum execution time: 39_894_000 picoseconds. + Weight::from_parts(33_385_816, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 33_433 - .saturating_add(Weight::from_parts(1_679_944, 0).saturating_mul(n.into())) - // Standard Error: 1_525 - .saturating_add(Weight::from_parts(205_031, 0).saturating_mul(m.into())) + // Standard Error: 36_096 + .saturating_add(Weight::from_parts(1_602_761, 0).saturating_mul(n.into())) + // Standard Error: 1_647 + .saturating_add(Weight::from_parts(207_846, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PoolSystem EpochExecution (r:1 w:1) - /// Proof: PoolSystem EpochExecution (max_values: None, max_size: Some(754), added: 3229, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) - /// Storage: Investments InProcessingInvestOrders (r:5 w:5) - /// Proof: Investments InProcessingInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:7 w:3) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:2 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: OrmlTokens TotalIssuance (r:1 w:1) - /// Proof: OrmlTokens TotalIssuance (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) - /// Storage: Investments InvestOrderId (r:5 w:0) - /// Proof: Investments InvestOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Investments ActiveInvestOrders (r:5 w:5) - /// Proof: Investments ActiveInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InProcessingRedeemOrders (r:5 w:5) - /// Proof: Investments InProcessingRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments RedeemOrderId (r:5 w:0) - /// Proof: Investments RedeemOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Investments ActiveRedeemOrders (r:5 w:5) - /// Proof: Investments ActiveRedeemOrders (max_values: None, max_size: Some(56), added: 2531, 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: Investments ClearedInvestOrders (r:0 w:5) - /// Proof: Investments ClearedInvestOrders (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen) - /// Storage: Investments ClearedRedeemOrders (r:0 w:5) - /// Proof: Investments ClearedRedeemOrders (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::EpochExecution` (r:1 w:1) + /// Proof: `PoolSystem::EpochExecution` (`max_values`: None, `max_size`: Some(754), added: 3229, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) + /// Storage: `Investments::InProcessingInvestOrders` (r:5 w:5) + /// Proof: `Investments::InProcessingInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:7 w:3) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:2 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::TotalIssuance` (r:1 w:1) + /// Proof: `OrmlTokens::TotalIssuance` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `Investments::InvestOrderId` (r:5 w:0) + /// Proof: `Investments::InvestOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveInvestOrders` (r:5 w:5) + /// Proof: `Investments::ActiveInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InProcessingRedeemOrders` (r:5 w:5) + /// Proof: `Investments::InProcessingRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::RedeemOrderId` (r:5 w:0) + /// Proof: `Investments::RedeemOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveRedeemOrders` (r:5 w:5) + /// Proof: `Investments::ActiveRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, 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: `Investments::ClearedInvestOrders` (r:0 w:5) + /// Proof: `Investments::ClearedInvestOrders` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) + /// Storage: `Investments::ClearedRedeemOrders` (r:0 w:5) + /// Proof: `Investments::ClearedRedeemOrders` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[0, 100]`. fn execute_epoch(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1944 + m * (124 ±0) + n * (633 ±0)` - // Estimated: `17508 + m * (124 ±0) + n * (2604 ±0)` - // Minimum execution time: 259_918_000 picoseconds. - Weight::from_parts(163_308_268, 0) + // Measured: `2009 + m * (124 ±0) + n * (633 ±0)` + // Estimated: `17508 + n * (2604 ±0)` + // Minimum execution time: 240_970_000 picoseconds. + Weight::from_parts(149_766_811, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 100_494 - .saturating_add(Weight::from_parts(62_607_725, 0).saturating_mul(n.into())) - // Standard Error: 4_585 - .saturating_add(Weight::from_parts(393_529, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(11)) + // Standard Error: 115_506 + .saturating_add(Weight::from_parts(56_480_792, 0).saturating_mul(n.into())) + // Standard Error: 5_271 + .saturating_add(Weight::from_parts(391_702, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(9)) .saturating_add(T::DbWeight::get().writes((6_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_parts(0, 124).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 2604).saturating_mul(n.into())) } } diff --git a/runtime/altair/src/weights/pallet_preimage.rs b/runtime/altair/src/weights/pallet_preimage.rs index b7dcdcc9f9..450b9b8cd5 100644 --- a/runtime/altair/src/weights/pallet_preimage.rs +++ b/runtime/altair/src/weights/pallet_preimage.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_preimage` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_preimage // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_preimage.rs @@ -32,173 +31,219 @@ use core::marker::PhantomData; /// Weight functions for `pallet_preimage`. pub struct WeightInfo(PhantomData); impl pallet_preimage::WeightInfo for WeightInfo { - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Preimage PreimageFor (r:0 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 4194304]`. fn note_preimage(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `178` - // Estimated: `3556` - // Minimum execution time: 45_225_000 picoseconds. - Weight::from_parts(488_614_451, 0) - .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 18 - .saturating_add(Weight::from_parts(2_063, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `76` + // Estimated: `3568` + // Minimum execution time: 68_257_000 picoseconds. + Weight::from_parts(42_838_135, 0) + .saturating_add(Weight::from_parts(0, 3568)) + // Standard Error: 7 + .saturating_add(Weight::from_parts(2_650, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Preimage PreimageFor (r:0 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 4194304]`. fn note_requested_preimage(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3556` - // Minimum execution time: 24_646_000 picoseconds. - Weight::from_parts(25_731_125, 0) + // Minimum execution time: 22_061_000 picoseconds. + Weight::from_parts(1_292_114, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 10 - .saturating_add(Weight::from_parts(2_720, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) + // Standard Error: 7 + .saturating_add(Weight::from_parts(2_711, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Preimage PreimageFor (r:0 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 4194304]`. fn note_no_deposit_preimage(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3556` - // Minimum execution time: 23_644_000 picoseconds. - Weight::from_parts(49_338_396, 0) + // Minimum execution time: 20_799_000 picoseconds. + Weight::from_parts(8_852_912, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 7 - .saturating_add(Weight::from_parts(2_689, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) + // Standard Error: 8 + .saturating_add(Weight::from_parts(2_671, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Preimage PreimageFor (r:0 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) fn unnote_preimage() -> Weight { // Proof Size summary in bytes: - // Measured: `324` - // Estimated: `3556` - // Minimum execution time: 50_284_000 picoseconds. - Weight::from_parts(51_306_000, 0) - .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `277` + // Estimated: `3568` + // Minimum execution time: 73_818_000 picoseconds. + Weight::from_parts(78_236_000, 0) + .saturating_add(Weight::from_parts(0, 3568)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Preimage PreimageFor (r:0 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) fn unnote_no_deposit_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `178` // Estimated: `3556` - // Minimum execution time: 27_592_000 picoseconds. - Weight::from_parts(28_163_000, 0) + // Minimum execution time: 31_880_000 picoseconds. + Weight::from_parts(34_274_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn request_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `222` // Estimated: `3556` - // Minimum execution time: 24_175_000 picoseconds. - Weight::from_parts(24_857_000, 0) + // Minimum execution time: 31_730_000 picoseconds. + Weight::from_parts(33_522_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn request_no_deposit_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `178` // Estimated: `3556` - // Minimum execution time: 14_027_000 picoseconds. - Weight::from_parts(14_617_000, 0) + // Minimum execution time: 21_340_000 picoseconds. + Weight::from_parts(25_457_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn request_unnoted_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3556` - // Minimum execution time: 21_300_000 picoseconds. - Weight::from_parts(22_111_000, 0) + // Minimum execution time: 18_805_000 picoseconds. + Weight::from_parts(19_897_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn request_requested_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3556` - // Minimum execution time: 12_653_000 picoseconds. - Weight::from_parts(12_995_000, 0) + // Minimum execution time: 13_856_000 picoseconds. + Weight::from_parts(14_287_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Preimage PreimageFor (r:0 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) fn unrequest_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `178` // Estimated: `3556` - // Minimum execution time: 25_539_000 picoseconds. - Weight::from_parts(26_329_000, 0) + // Minimum execution time: 32_280_000 picoseconds. + Weight::from_parts(35_397_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn unrequest_unnoted_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3556` - // Minimum execution time: 12_534_000 picoseconds. - Weight::from_parts(12_915_000, 0) + // Minimum execution time: 13_666_000 picoseconds. + Weight::from_parts(14_677_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn unrequest_multi_referenced_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3556` - // Minimum execution time: 12_163_000 picoseconds. - Weight::from_parts(12_714_000, 0) + // Minimum execution time: 13_565_000 picoseconds. + Weight::from_parts(14_467_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - - fn ensure_updated(_: u32) -> cumulus_primitives_core::Weight { - Weight::default() - } + /// Storage: `Preimage::StatusFor` (r:1023 w:1023) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1023 w:1023) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1023 w:1023) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:0 w:1023) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// The range of component `n` is `[1, 1024]`. + fn ensure_updated(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `404 + n * (227 ±0)` + // Estimated: `990 + n * (2603 ±0)` + // Minimum execution time: 77_264_000 picoseconds. + Weight::from_parts(78_006_000, 0) + .saturating_add(Weight::from_parts(0, 990)) + // Standard Error: 59_312 + .saturating_add(Weight::from_parts(75_852_773, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(n.into()))) + .saturating_add(Weight::from_parts(0, 2603).saturating_mul(n.into())) + } } diff --git a/runtime/altair/src/weights/pallet_proxy.rs b/runtime/altair/src/weights/pallet_proxy.rs index 6605cd4af7..a50f427608 100644 --- a/runtime/altair/src/weights/pallet_proxy.rs +++ b/runtime/altair/src/weights/pallet_proxy.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_proxy` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_proxy // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_proxy.rs @@ -32,172 +31,174 @@ use core::marker::PhantomData; /// Weight functions for `pallet_proxy`. pub struct WeightInfo(PhantomData); impl pallet_proxy::WeightInfo for WeightInfo { - /// Storage: Proxy Proxies (r:1 w:0) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:0) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn proxy(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `293 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 22_682_000 picoseconds. - Weight::from_parts(23_626_656, 0) + // Minimum execution time: 18_755_000 picoseconds. + Weight::from_parts(19_430_116, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_195 - .saturating_add(Weight::from_parts(43_622, 0).saturating_mul(p.into())) + // Standard Error: 1_535 + .saturating_add(Weight::from_parts(57_787, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) } - /// Storage: Proxy Proxies (r:1 w:0) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) - /// Storage: Proxy Announcements (r:1 w:1) - /// Proof: Proxy Announcements (max_values: None, max_size: Some(2233), added: 4708, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:0) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) + /// Storage: `Proxy::Announcements` (r:1 w:1) + /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn proxy_announced(a: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `620 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5698` - // Minimum execution time: 54_021_000 picoseconds. - Weight::from_parts(54_133_706, 0) + // Minimum execution time: 47_058_000 picoseconds. + Weight::from_parts(46_388_893, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 2_347 - .saturating_add(Weight::from_parts(218_295, 0).saturating_mul(a.into())) - // Standard Error: 2_425 - .saturating_add(Weight::from_parts(39_645, 0).saturating_mul(p.into())) + // Standard Error: 3_568 + .saturating_add(Weight::from_parts(284_927, 0).saturating_mul(a.into())) + // Standard Error: 3_687 + .saturating_add(Weight::from_parts(60_485, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Proxy Announcements (r:1 w:1) - /// Proof: Proxy Announcements (max_values: None, max_size: Some(2233), added: 4708, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Proxy::Announcements` (r:1 w:1) + /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. - fn remove_announcement(a: u32, _p: u32, ) -> Weight { + fn remove_announcement(a: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `535 + a * (68 ±0)` // Estimated: `5698` - // Minimum execution time: 34_495_000 picoseconds. - Weight::from_parts(35_308_038, 0) + // Minimum execution time: 31_589_000 picoseconds. + Weight::from_parts(32_405_583, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_920 - .saturating_add(Weight::from_parts(225_401, 0).saturating_mul(a.into())) + // Standard Error: 2_190 + .saturating_add(Weight::from_parts(259_616, 0).saturating_mul(a.into())) + // Standard Error: 2_263 + .saturating_add(Weight::from_parts(3_862, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Proxy Announcements (r:1 w:1) - /// Proof: Proxy Announcements (max_values: None, max_size: Some(2233), added: 4708, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Proxy::Announcements` (r:1 w:1) + /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn reject_announcement(a: u32, _p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `535 + a * (68 ±0)` // Estimated: `5698` - // Minimum execution time: 34_585_000 picoseconds. - Weight::from_parts(35_391_113, 0) + // Minimum execution time: 32_060_000 picoseconds. + Weight::from_parts(32_893_728, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_909 - .saturating_add(Weight::from_parts(224_163, 0).saturating_mul(a.into())) + // Standard Error: 2_346 + .saturating_add(Weight::from_parts(247_852, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Proxy Proxies (r:1 w:0) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) - /// Storage: Proxy Announcements (r:1 w:1) - /// Proof: Proxy Announcements (max_values: None, max_size: Some(2233), added: 4708, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:0) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) + /// Storage: `Proxy::Announcements` (r:1 w:1) + /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn announce(a: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `552 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5698` - // Minimum execution time: 48_201_000 picoseconds. - Weight::from_parts(48_084_637, 0) + // Minimum execution time: 42_179_000 picoseconds. + Weight::from_parts(41_591_157, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 2_057 - .saturating_add(Weight::from_parts(230_408, 0).saturating_mul(a.into())) - // Standard Error: 2_126 - .saturating_add(Weight::from_parts(40_514, 0).saturating_mul(p.into())) + // Standard Error: 2_820 + .saturating_add(Weight::from_parts(260_852, 0).saturating_mul(a.into())) + // Standard Error: 2_914 + .saturating_add(Weight::from_parts(44_647, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Proxy Proxies (r:1 w:1) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn add_proxy(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `293 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 37_080_000 picoseconds. - Weight::from_parts(37_982_672, 0) + // Minimum execution time: 30_417_000 picoseconds. + Weight::from_parts(31_448_011, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_243 - .saturating_add(Weight::from_parts(38_662, 0).saturating_mul(p.into())) + // Standard Error: 1_871 + .saturating_add(Weight::from_parts(47_052, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Proxy Proxies (r:1 w:1) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn remove_proxy(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `293 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 36_899_000 picoseconds. - Weight::from_parts(38_243_962, 0) + // Minimum execution time: 30_346_000 picoseconds. + Weight::from_parts(31_845_009, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 2_414 - .saturating_add(Weight::from_parts(32_643, 0).saturating_mul(p.into())) + // Standard Error: 2_729 + .saturating_add(Weight::from_parts(46_592, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Proxy Proxies (r:1 w:1) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn remove_proxies(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `293 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 32_241_000 picoseconds. - Weight::from_parts(33_245_118, 0) + // Minimum execution time: 29_625_000 picoseconds. + Weight::from_parts(30_774_855, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_355 - .saturating_add(Weight::from_parts(38_915, 0).saturating_mul(p.into())) + // Standard Error: 1_392 + .saturating_add(Weight::from_parts(36_394, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Proxy Proxies (r:1 w:1) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn create_pure(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `305` // Estimated: `4706` - // Minimum execution time: 39_765_000 picoseconds. - Weight::from_parts(40_958_812, 0) + // Minimum execution time: 33_042_000 picoseconds. + Weight::from_parts(34_089_300, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_551 - .saturating_add(Weight::from_parts(13_834, 0).saturating_mul(p.into())) + // Standard Error: 1_653 + .saturating_add(Weight::from_parts(18_548, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Proxy Proxies (r:1 w:1) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[0, 30]`. fn kill_pure(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `330 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 33_612_000 picoseconds. - Weight::from_parts(34_704_279, 0) + // Minimum execution time: 30_888_000 picoseconds. + Weight::from_parts(31_957_207, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_497 - .saturating_add(Weight::from_parts(41_081, 0).saturating_mul(p.into())) + // Standard Error: 1_557 + .saturating_add(Weight::from_parts(35_258, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/altair/src/weights/pallet_remarks.rs b/runtime/altair/src/weights/pallet_remarks.rs index 6d922f8847..5f8df1887a 100644 --- a/runtime/altair/src/weights/pallet_remarks.rs +++ b/runtime/altair/src/weights/pallet_remarks.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_remarks` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_remarks // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_remarks.rs @@ -37,10 +36,10 @@ impl pallet_remarks::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 17_924_000 picoseconds. - Weight::from_parts(18_247_001, 0) + // Minimum execution time: 12_684_000 picoseconds. + Weight::from_parts(13_030_137, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_713 - .saturating_add(Weight::from_parts(116_940, 0).saturating_mul(n.into())) + // Standard Error: 2_965 + .saturating_add(Weight::from_parts(131_231, 0).saturating_mul(n.into())) } } diff --git a/runtime/altair/src/weights/pallet_restricted_tokens.rs b/runtime/altair/src/weights/pallet_restricted_tokens.rs index dfb1f88157..a0e6595257 100644 --- a/runtime/altair/src/weights/pallet_restricted_tokens.rs +++ b/runtime/altair/src/weights/pallet_restricted_tokens.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_restricted_tokens` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_restricted_tokens // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_restricted_tokens.rs @@ -32,157 +31,157 @@ use core::marker::PhantomData; /// Weight functions for `pallet_restricted_tokens`. pub struct WeightInfo(PhantomData); impl pallet_restricted_tokens::WeightInfo for WeightInfo { - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:2 w:0) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:2 w:0) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_native() -> Weight { // Proof Size summary in bytes: // Measured: `505` // Estimated: `6124` - // Minimum execution time: 101_651_000 picoseconds. - Weight::from_parts(103_054_000, 0) + // Minimum execution time: 82_103_000 picoseconds. + Weight::from_parts(83_786_000, 0) .saturating_add(Weight::from_parts(0, 6124)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:2 w:0) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:2 w:0) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_other() -> Weight { // Proof Size summary in bytes: - // Measured: `923` + // Measured: `856` // Estimated: `6198` - // Minimum execution time: 78_086_000 picoseconds. - Weight::from_parts(79_820_000, 0) + // Minimum execution time: 65_603_000 picoseconds. + Weight::from_parts(67_325_000, 0) .saturating_add(Weight::from_parts(0, 6198)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:2 w:0) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:2 w:0) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_keep_alive_native() -> Weight { // Proof Size summary in bytes: // Measured: `505` // Estimated: `6124` - // Minimum execution time: 87_805_000 picoseconds. - Weight::from_parts(88_787_000, 0) + // Minimum execution time: 71_984_000 picoseconds. + Weight::from_parts(73_547_000, 0) .saturating_add(Weight::from_parts(0, 6124)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:2 w:0) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:2 w:0) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_keep_alive_other() -> Weight { // Proof Size summary in bytes: - // Measured: `820` + // Measured: `753` // Estimated: `6198` - // Minimum execution time: 73_608_000 picoseconds. - Weight::from_parts(74_510_000, 0) + // Minimum execution time: 58_399_000 picoseconds. + Weight::from_parts(59_791_000, 0) .saturating_add(Weight::from_parts(0, 6198)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:2 w:0) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:2 w:0) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_all_native() -> Weight { // Proof Size summary in bytes: // Measured: `505` // Estimated: `6124` - // Minimum execution time: 105_829_000 picoseconds. - Weight::from_parts(106_991_000, 0) + // Minimum execution time: 86_071_000 picoseconds. + Weight::from_parts(87_543_000, 0) .saturating_add(Weight::from_parts(0, 6124)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:2 w:0) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:2 w:0) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_all_other() -> Weight { // Proof Size summary in bytes: - // Measured: `923` + // Measured: `856` // Estimated: `6198` - // Minimum execution time: 82_786_000 picoseconds. - Weight::from_parts(83_808_000, 0) + // Minimum execution time: 70_261_000 picoseconds. + Weight::from_parts(71_664_000, 0) .saturating_add(Weight::from_parts(0, 6198)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_transfer_native() -> Weight { // Proof Size summary in bytes: // Measured: `259` // Estimated: `3593` - // Minimum execution time: 92_494_000 picoseconds. - Weight::from_parts(93_696_000, 0) + // Minimum execution time: 72_936_000 picoseconds. + Weight::from_parts(74_128_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_transfer_other() -> Weight { // Proof Size summary in bytes: - // Measured: `677` + // Measured: `610` // Estimated: `6198` - // Minimum execution time: 68_739_000 picoseconds. - Weight::from_parts(70_422_000, 0) + // Minimum execution time: 54_031_000 picoseconds. + Weight::from_parts(55_103_000, 0) .saturating_add(Weight::from_parts(0, 6198)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Balances Holds (r:1 w:1) - /// Proof: Balances Holds (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn set_balance_native() -> Weight { // Proof Size summary in bytes: - // Measured: `298` - // Estimated: `3674` - // Minimum execution time: 183_716_000 picoseconds. - Weight::from_parts(185_028_000, 0) - .saturating_add(Weight::from_parts(0, 3674)) + // Measured: `300` + // Estimated: `3593` + // Minimum execution time: 160_088_000 picoseconds. + Weight::from_parts(162_652_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: OrmlTokens Accounts (r:1 w:1) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OrmlTokens TotalIssuance (r:1 w:1) - /// Proof: OrmlTokens TotalIssuance (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) + /// Storage: `OrmlTokens::Accounts` (r:1 w:1) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::TotalIssuance` (r:1 w:1) + /// Proof: `OrmlTokens::TotalIssuance` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) fn set_balance_other() -> Weight { // Proof Size summary in bytes: - // Measured: `467` - // Estimated: `3932` - // Minimum execution time: 108_784_000 picoseconds. - Weight::from_parts(110_137_000, 0) - .saturating_add(Weight::from_parts(0, 3932)) + // Measured: `400` + // Estimated: `4407` + // Minimum execution time: 91_290_000 picoseconds. + Weight::from_parts(92_642_000, 0) + .saturating_add(Weight::from_parts(0, 4407)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/altair/src/weights/pallet_scheduler.rs b/runtime/altair/src/weights/pallet_scheduler.rs index 969755b5b1..9569e14905 100644 --- a/runtime/altair/src/weights/pallet_scheduler.rs +++ b/runtime/altair/src/weights/pallet_scheduler.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_scheduler` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_scheduler // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_scheduler.rs @@ -32,30 +31,30 @@ use core::marker::PhantomData; /// Weight functions for `pallet_scheduler`. pub struct WeightInfo(PhantomData); impl pallet_scheduler::WeightInfo for WeightInfo { - /// Storage: Scheduler IncompleteSince (r:1 w:1) - /// Proof: Scheduler IncompleteSince (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: `Scheduler::IncompleteSince` (r:1 w:1) + /// Proof: `Scheduler::IncompleteSince` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn service_agendas_base() -> Weight { // Proof Size summary in bytes: // Measured: `31` // Estimated: `1489` - // Minimum execution time: 6_042_000 picoseconds. - Weight::from_parts(6_432_000, 0) + // Minimum execution time: 3_907_000 picoseconds. + Weight::from_parts(4_047_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Scheduler Agenda (r:1 w:1) - /// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 50]`. fn service_agenda_base(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `78 + s * (177 ±0)` // Estimated: `42428` - // Minimum execution time: 6_022_000 picoseconds. - Weight::from_parts(8_519_098, 0) + // Minimum execution time: 5_891_000 picoseconds. + Weight::from_parts(8_788_365, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 3_359 - .saturating_add(Weight::from_parts(1_209_012, 0).saturating_mul(s.into())) + // Standard Error: 3_879 + .saturating_add(Weight::from_parts(692_278, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -63,36 +62,38 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_936_000 picoseconds. - Weight::from_parts(9_368_000, 0) + // Minimum execution time: 5_239_000 picoseconds. + Weight::from_parts(5_400_000, 0) .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: Preimage PreimageFor (r:1 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: Measured) - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: `Preimage::PreimageFor` (r:1 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// The range of component `s` is `[128, 4194304]`. fn service_task_fetched(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `213 + s * (1 ±0)` // Estimated: `3678 + s * (1 ±0)` - // Minimum execution time: 31_059_000 picoseconds. - Weight::from_parts(31_409_000, 0) + // Minimum execution time: 27_902_000 picoseconds. + Weight::from_parts(28_433_000, 0) .saturating_add(Weight::from_parts(0, 3678)) - // Standard Error: 11 - .saturating_add(Weight::from_parts(1_400, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(2)) + // Standard Error: 9 + .saturating_add(Weight::from_parts(1_103, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into())) } - /// Storage: Scheduler Lookup (r:0 w:1) - /// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) + /// Storage: `Scheduler::Lookup` (r:0 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) fn service_task_named() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 11_521_000 picoseconds. - Weight::from_parts(11_872_000, 0) + // Minimum execution time: 8_055_000 picoseconds. + Weight::from_parts(8_385_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -100,89 +101,89 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_987_000 picoseconds. - Weight::from_parts(9_247_000, 0) + // Minimum execution time: 5_260_000 picoseconds. + Weight::from_parts(5_511_000, 0) .saturating_add(Weight::from_parts(0, 0)) } fn execute_dispatch_signed() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_438_000 picoseconds. - Weight::from_parts(4_679_000, 0) + // Minimum execution time: 4_248_000 picoseconds. + Weight::from_parts(4_489_000, 0) .saturating_add(Weight::from_parts(0, 0)) } fn execute_dispatch_unsigned() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_419_000 picoseconds. - Weight::from_parts(4_599_000, 0) + // Minimum execution time: 4_228_000 picoseconds. + Weight::from_parts(4_368_000, 0) .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: Scheduler Agenda (r:1 w:1) - /// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 49]`. fn schedule(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `78 + s * (177 ±0)` // Estimated: `42428` - // Minimum execution time: 20_709_000 picoseconds. - Weight::from_parts(23_734_264, 0) + // Minimum execution time: 16_220_000 picoseconds. + Weight::from_parts(19_357_790, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 3_968 - .saturating_add(Weight::from_parts(1_190_970, 0).saturating_mul(s.into())) + // Standard Error: 3_878 + .saturating_add(Weight::from_parts(683_717, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Scheduler Agenda (r:1 w:1) - /// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen) - /// Storage: Scheduler Lookup (r:0 w:1) - /// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Lookup` (r:0 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// The range of component `s` is `[1, 50]`. fn cancel(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `78 + s * (177 ±0)` // Estimated: `42428` - // Minimum execution time: 27_201_000 picoseconds. - Weight::from_parts(23_886_573, 0) + // Minimum execution time: 22_242_000 picoseconds. + Weight::from_parts(20_460_753, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 4_738 - .saturating_add(Weight::from_parts(2_182_054, 0).saturating_mul(s.into())) + // Standard Error: 5_201 + .saturating_add(Weight::from_parts(1_089_906, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Scheduler Lookup (r:1 w:1) - /// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Scheduler Agenda (r:1 w:1) - /// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen) + /// Storage: `Scheduler::Lookup` (r:1 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 49]`. fn schedule_named(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `255 + s * (185 ±0)` // Estimated: `42428` - // Minimum execution time: 25_618_000 picoseconds. - Weight::from_parts(29_927_463, 0) + // Minimum execution time: 22_021_000 picoseconds. + Weight::from_parts(26_377_210, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 4_185 - .saturating_add(Weight::from_parts(1_213_999, 0).saturating_mul(s.into())) + // Standard Error: 4_774 + .saturating_add(Weight::from_parts(721_327, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Scheduler Lookup (r:1 w:1) - /// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Scheduler Agenda (r:1 w:1) - /// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen) + /// Storage: `Scheduler::Lookup` (r:1 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) /// The range of component `s` is `[1, 50]`. fn cancel_named(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `281 + s * (185 ±0)` // Estimated: `42428` - // Minimum execution time: 28_533_000 picoseconds. - Weight::from_parts(26_799_743, 0) + // Minimum execution time: 24_976_000 picoseconds. + Weight::from_parts(23_854_027, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 5_540 - .saturating_add(Weight::from_parts(2_186_022, 0).saturating_mul(s.into())) + // Standard Error: 5_583 + .saturating_add(Weight::from_parts(1_153_301, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/altair/src/weights/pallet_session.rs b/runtime/altair/src/weights/pallet_session.rs index 863e86a0b0..77c2046c37 100644 --- a/runtime/altair/src/weights/pallet_session.rs +++ b/runtime/altair/src/weights/pallet_session.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_session` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_session // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_session.rs @@ -32,31 +31,31 @@ use core::marker::PhantomData; /// Weight functions for `pallet_session`. pub struct WeightInfo(PhantomData); impl pallet_session::WeightInfo for WeightInfo { - /// Storage: Session NextKeys (r:1 w:1) - /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - /// Storage: Session KeyOwner (r:1 w:1) - /// Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) + /// Storage: `Session::NextKeys` (r:1 w:1) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Session::KeyOwner` (r:1 w:1) + /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `369` - // Estimated: `3834` - // Minimum execution time: 27_882_000 picoseconds. - Weight::from_parts(28_924_000, 0) - .saturating_add(Weight::from_parts(0, 3834)) + // Measured: `308` + // Estimated: `3773` + // Minimum execution time: 28_333_000 picoseconds. + Weight::from_parts(29_194_000, 0) + .saturating_add(Weight::from_parts(0, 3773)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Session NextKeys (r:1 w:1) - /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - /// Storage: Session KeyOwner (r:0 w:1) - /// Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) + /// Storage: `Session::NextKeys` (r:1 w:1) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Session::KeyOwner` (r:0 w:1) + /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn purge_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `386` - // Estimated: `3851` - // Minimum execution time: 19_066_000 picoseconds. - Weight::from_parts(19_717_000, 0) - .saturating_add(Weight::from_parts(0, 3851)) + // Measured: `315` + // Estimated: `3780` + // Minimum execution time: 18_845_000 picoseconds. + Weight::from_parts(19_196_000, 0) + .saturating_add(Weight::from_parts(0, 3780)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/altair/src/weights/pallet_timestamp.rs b/runtime/altair/src/weights/pallet_timestamp.rs index be2a6d6ea1..bc775bf539 100644 --- a/runtime/altair/src/weights/pallet_timestamp.rs +++ b/runtime/altair/src/weights/pallet_timestamp.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_timestamp` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_timestamp // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_timestamp.rs @@ -32,16 +31,16 @@ use core::marker::PhantomData; /// Weight functions for `pallet_timestamp`. pub struct WeightInfo(PhantomData); impl pallet_timestamp::WeightInfo for WeightInfo { - /// Storage: Timestamp Now (r:1 w:1) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Aura CurrentSlot (r:1 w:0) - /// Proof: Aura CurrentSlot (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: `Timestamp::Now` (r:1 w:1) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Aura::CurrentSlot` (r:1 w:0) + /// Proof: `Aura::CurrentSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set() -> Weight { // Proof Size summary in bytes: // Measured: `223` // Estimated: `1493` - // Minimum execution time: 14_137_000 picoseconds. - Weight::from_parts(14_678_000, 0) + // Minimum execution time: 10_319_000 picoseconds. + Weight::from_parts(10_740_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -50,8 +49,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `128` // Estimated: `0` - // Minimum execution time: 6_201_000 picoseconds. - Weight::from_parts(6_452_000, 0) + // Minimum execution time: 4_658_000 picoseconds. + Weight::from_parts(4_849_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/runtime/altair/src/weights/pallet_token_mux.rs b/runtime/altair/src/weights/pallet_token_mux.rs index 2b7acfcff1..bf87cce8d4 100644 --- a/runtime/altair/src/weights/pallet_token_mux.rs +++ b/runtime/altair/src/weights/pallet_token_mux.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_token_mux` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_token_mux // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_token_mux.rs @@ -32,62 +31,62 @@ use core::marker::PhantomData; /// Weight functions for `pallet_token_mux`. pub struct WeightInfo(PhantomData); impl pallet_token_mux::WeightInfo for WeightInfo { - /// Storage: OrmlAssetRegistry Metadata (r:2 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OrmlTokens Accounts (r:3 w:3) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: OrmlTokens TotalIssuance (r:1 w:1) - /// Proof: OrmlTokens TotalIssuance (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) + /// Storage: `OrmlAssetRegistry::Metadata` (r:2 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:3 w:3) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::TotalIssuance` (r:1 w:1) + /// Proof: `OrmlTokens::TotalIssuance` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) fn deposit() -> Weight { // Proof Size summary in bytes: - // Measured: `803` + // Measured: `690` // Estimated: `8802` - // Minimum execution time: 123_462_000 picoseconds. - Weight::from_parts(125_617_000, 0) + // Minimum execution time: 99_465_000 picoseconds. + Weight::from_parts(100_737_000, 0) .saturating_add(Weight::from_parts(0, 8802)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(6)) } - /// Storage: OrmlAssetRegistry Metadata (r:2 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OrmlTokens Accounts (r:3 w:3) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlTokens TotalIssuance (r:1 w:1) - /// Proof: OrmlTokens TotalIssuance (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `OrmlAssetRegistry::Metadata` (r:2 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:3 w:3) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::TotalIssuance` (r:1 w:1) + /// Proof: `OrmlTokens::TotalIssuance` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn burn() -> Weight { // Proof Size summary in bytes: - // Measured: `1093` + // Measured: `980` // Estimated: `8802` - // Minimum execution time: 110_277_000 picoseconds. - Weight::from_parts(111_640_000, 0) + // Minimum execution time: 94_045_000 picoseconds. + Weight::from_parts(95_177_000, 0) .saturating_add(Weight::from_parts(0, 8802)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: OrderBook Orders (r:1 w:1) - /// Proof: OrderBook Orders (max_values: None, max_size: Some(171), added: 2646, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:2 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OrmlTokens Accounts (r:4 w:4) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlTokens TotalIssuance (r:1 w:1) - /// Proof: OrmlTokens TotalIssuance (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Swaps OrderIdToSwapId (r:1 w:0) - /// Proof: Swaps OrderIdToSwapId (max_values: None, max_size: Some(81), added: 2556, mode: MaxEncodedLen) - /// Storage: OrderBook UserOrders (r:0 w:1) - /// Proof: OrderBook UserOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + /// Storage: `OrderBook::Orders` (r:1 w:1) + /// Proof: `OrderBook::Orders` (`max_values`: None, `max_size`: Some(171), added: 2646, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:2 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:4 w:4) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::TotalIssuance` (r:1 w:1) + /// Proof: `OrmlTokens::TotalIssuance` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Swaps::OrderIdToSwapId` (r:1 w:0) + /// Proof: `Swaps::OrderIdToSwapId` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) + /// Storage: `OrderBook::UserOrders` (r:0 w:1) + /// Proof: `OrderBook::UserOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) fn match_swap() -> Weight { // Proof Size summary in bytes: - // Measured: `1373` + // Measured: `1260` // Estimated: `11406` - // Minimum execution time: 219_272_000 picoseconds. - Weight::from_parts(221_907_000, 0) + // Minimum execution time: 179_224_000 picoseconds. + Weight::from_parts(180_897_000, 0) .saturating_add(Weight::from_parts(0, 11406)) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(9)) diff --git a/runtime/altair/src/weights/pallet_transfer_allowlist.rs b/runtime/altair/src/weights/pallet_transfer_allowlist.rs index ae7900e8b7..9dff9f647b 100644 --- a/runtime/altair/src/weights/pallet_transfer_allowlist.rs +++ b/runtime/altair/src/weights/pallet_transfer_allowlist.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_transfer_allowlist` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_transfer_allowlist // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_transfer_allowlist.rs @@ -32,183 +31,183 @@ use core::marker::PhantomData; /// Weight functions for `pallet_transfer_allowlist`. pub struct WeightInfo(PhantomData); impl pallet_transfer_allowlist::WeightInfo for WeightInfo { - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: TransferAllowList AccountCurrencyTransferAllowance (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferAllowance (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) - /// Storage: Fees FeeBalances (r:1 w:0) - /// Proof: Fees FeeBalances (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Balances Holds (r:1 w:1) - /// Proof: Balances Holds (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `TransferAllowList::AccountCurrencyTransferAllowance` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferAllowance` (`max_values`: None, `max_size`: Some(701), added: 3176, mode: `MaxEncodedLen`) + /// Storage: `Fees::FeeBalances` (r:1 w:0) + /// Proof: `Fees::FeeBalances` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) fn add_transfer_allowance_no_existing_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `603` - // Estimated: `3674` - // Minimum execution time: 94_919_000 picoseconds. - Weight::from_parts(97_413_000, 0) - .saturating_add(Weight::from_parts(0, 3674)) + // Measured: `570` + // Estimated: `4166` + // Minimum execution time: 90_779_000 picoseconds. + Weight::from_parts(92_353_000, 0) + .saturating_add(Weight::from_parts(0, 4166)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: TransferAllowList AccountCurrencyTransferAllowance (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferAllowance (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) - /// Storage: Fees FeeBalances (r:1 w:0) - /// Proof: Fees FeeBalances (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Balances Holds (r:1 w:1) - /// Proof: Balances Holds (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `TransferAllowList::AccountCurrencyTransferAllowance` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferAllowance` (`max_values`: None, `max_size`: Some(701), added: 3176, mode: `MaxEncodedLen`) + /// Storage: `Fees::FeeBalances` (r:1 w:0) + /// Proof: `Fees::FeeBalances` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) fn add_transfer_allowance_existing_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `697` - // Estimated: `3674` - // Minimum execution time: 98_375_000 picoseconds. - Weight::from_parts(99_767_000, 0) - .saturating_add(Weight::from_parts(0, 3674)) + // Measured: `664` + // Estimated: `4166` + // Minimum execution time: 93_394_000 picoseconds. + Weight::from_parts(94_747_000, 0) + .saturating_add(Weight::from_parts(0, 4166)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn add_allowance_delay_no_existing_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `246` // Estimated: `3557` - // Minimum execution time: 21_611_000 picoseconds. - Weight::from_parts(22_282_000, 0) + // Minimum execution time: 16_892_000 picoseconds. + Weight::from_parts(17_412_000, 0) .saturating_add(Weight::from_parts(0, 3557)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn add_allowance_delay_existing_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `370` // Estimated: `3557` - // Minimum execution time: 23_976_000 picoseconds. - Weight::from_parts(24_757_000, 0) + // Minimum execution time: 19_506_000 picoseconds. + Weight::from_parts(20_118_000, 0) .saturating_add(Weight::from_parts(0, 3557)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn toggle_allowance_delay_once_future_modifiable() -> Weight { // Proof Size summary in bytes: // Measured: `340` // Estimated: `3557` - // Minimum execution time: 23_815_000 picoseconds. - Weight::from_parts(24_646_000, 0) + // Minimum execution time: 19_165_000 picoseconds. + Weight::from_parts(19_747_000, 0) .saturating_add(Weight::from_parts(0, 3557)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn update_allowance_delay() -> Weight { // Proof Size summary in bytes: // Measured: `344` // Estimated: `3557` - // Minimum execution time: 24_136_000 picoseconds. - Weight::from_parts(24_727_000, 0) + // Minimum execution time: 19_026_000 picoseconds. + Weight::from_parts(19_747_000, 0) .saturating_add(Weight::from_parts(0, 3557)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn purge_allowance_delay_no_remaining_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `344` // Estimated: `3557` - // Minimum execution time: 23_675_000 picoseconds. - Weight::from_parts(24_356_000, 0) + // Minimum execution time: 18_935_000 picoseconds. + Weight::from_parts(19_727_000, 0) .saturating_add(Weight::from_parts(0, 3557)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn purge_allowance_delay_remaining_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `378` // Estimated: `3557` - // Minimum execution time: 24_927_000 picoseconds. - Weight::from_parts(25_689_000, 0) + // Minimum execution time: 20_017_000 picoseconds. + Weight::from_parts(20_478_000, 0) .saturating_add(Weight::from_parts(0, 3557)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:0) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: TransferAllowList AccountCurrencyTransferAllowance (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferAllowance (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:0) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `TransferAllowList::AccountCurrencyTransferAllowance` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferAllowance` (`max_values`: None, `max_size`: Some(701), added: 3176, mode: `MaxEncodedLen`) fn remove_transfer_allowance_delay_present() -> Weight { // Proof Size summary in bytes: // Measured: `473` - // Estimated: `3597` - // Minimum execution time: 36_348_000 picoseconds. - Weight::from_parts(37_160_000, 0) - .saturating_add(Weight::from_parts(0, 3597)) + // Estimated: `4166` + // Minimum execution time: 32_290_000 picoseconds. + Weight::from_parts(33_162_000, 0) + .saturating_add(Weight::from_parts(0, 4166)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:0) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: TransferAllowList AccountCurrencyTransferAllowance (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferAllowance (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:0) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `TransferAllowList::AccountCurrencyTransferAllowance` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferAllowance` (`max_values`: None, `max_size`: Some(701), added: 3176, mode: `MaxEncodedLen`) fn remove_transfer_allowance_no_delay() -> Weight { // Proof Size summary in bytes: // Measured: `469` - // Estimated: `3597` - // Minimum execution time: 35_887_000 picoseconds. - Weight::from_parts(37_120_000, 0) - .saturating_add(Weight::from_parts(0, 3597)) + // Estimated: `4166` + // Minimum execution time: 31_939_000 picoseconds. + Weight::from_parts(33_051_000, 0) + .saturating_add(Weight::from_parts(0, 4166)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferAllowance (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferAllowance (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) - /// Storage: Fees FeeBalances (r:1 w:0) - /// Proof: Fees FeeBalances (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Balances Holds (r:1 w:1) - /// Proof: Balances Holds (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferAllowance` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferAllowance` (`max_values`: None, `max_size`: Some(701), added: 3176, mode: `MaxEncodedLen`) + /// Storage: `Fees::FeeBalances` (r:1 w:0) + /// Proof: `Fees::FeeBalances` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn purge_transfer_allowance_no_remaining_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `879` - // Estimated: `3674` - // Minimum execution time: 86_853_000 picoseconds. - Weight::from_parts(88_557_000, 0) - .saturating_add(Weight::from_parts(0, 3674)) + // Measured: `848` + // Estimated: `4166` + // Minimum execution time: 83_335_000 picoseconds. + Weight::from_parts(85_199_000, 0) + .saturating_add(Weight::from_parts(0, 4166)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: TransferAllowList AccountCurrencyTransferAllowance (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferAllowance (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) - /// Storage: Fees FeeBalances (r:1 w:0) - /// Proof: Fees FeeBalances (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Balances Holds (r:1 w:1) - /// Proof: Balances Holds (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferAllowance` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferAllowance` (`max_values`: None, `max_size`: Some(701), added: 3176, mode: `MaxEncodedLen`) + /// Storage: `Fees::FeeBalances` (r:1 w:0) + /// Proof: `Fees::FeeBalances` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn purge_transfer_allowance_remaining_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `918` - // Estimated: `3674` - // Minimum execution time: 86_543_000 picoseconds. - Weight::from_parts(87_945_000, 0) - .saturating_add(Weight::from_parts(0, 3674)) + // Measured: `887` + // Estimated: `4166` + // Minimum execution time: 85_369_000 picoseconds. + Weight::from_parts(87_333_000, 0) + .saturating_add(Weight::from_parts(0, 4166)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/runtime/altair/src/weights/pallet_treasury.rs b/runtime/altair/src/weights/pallet_treasury.rs deleted file mode 100644 index 4e3fe41b9f..0000000000 --- a/runtime/altair/src/weights/pallet_treasury.rs +++ /dev/null @@ -1,139 +0,0 @@ - -//! Autogenerated weights for `pallet_treasury` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 - -// Executed Command: -// target/release/centrifuge-chain -// benchmark -// pallet -// --chain=altair-dev -// --steps=50 -// --repeat=20 -// --pallet=pallet_treasury -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --heap-pages=4096 -// --output=/tmp/runtime/altair/src/weights/pallet_treasury.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_treasury`. -pub struct WeightInfo(PhantomData); -impl pallet_treasury::WeightInfo for WeightInfo { - fn spend() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 391_000 picoseconds. - Weight::from_parts(461_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - /// Storage: Treasury ProposalCount (r:1 w:1) - /// Proof: Treasury ProposalCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Treasury Proposals (r:0 w:1) - /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - fn propose_spend() -> Weight { - // Proof Size summary in bytes: - // Measured: `144` - // Estimated: `1489` - // Minimum execution time: 41_859_000 picoseconds. - Weight::from_parts(42_720_000, 0) - .saturating_add(Weight::from_parts(0, 1489)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: Treasury Proposals (r:1 w:1) - /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - fn reject_proposal() -> Weight { - // Proof Size summary in bytes: - // Measured: `405` - // Estimated: `6196` - // Minimum execution time: 65_643_000 picoseconds. - Weight::from_parts(66_666_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: Treasury Proposals (r:1 w:0) - /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - /// Storage: Treasury Approvals (r:1 w:1) - /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) - /// The range of component `p` is `[0, 99]`. - fn approve_proposal(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `470 + p * (8 ±0)` - // Estimated: `3573` - // Minimum execution time: 14_477_000 picoseconds. - Weight::from_parts(17_712_520, 0) - .saturating_add(Weight::from_parts(0, 3573)) - // Standard Error: 1_251 - .saturating_add(Weight::from_parts(50_107, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Treasury Approvals (r:1 w:1) - /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) - fn remove_approval() -> Weight { - // Proof Size summary in bytes: - // Measured: `127` - // Estimated: `1887` - // Minimum execution time: 11_271_000 picoseconds. - Weight::from_parts(11_722_000, 0) - .saturating_add(Weight::from_parts(0, 1887)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Treasury Deactivated (r:1 w:1) - /// Proof: Treasury Deactivated (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) - /// Storage: Treasury Approvals (r:1 w:1) - /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) - /// Storage: Treasury Proposals (r:100 w:0) - /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - /// The range of component `p` is `[0, 100]`. - fn on_initialize_proposals(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `230 + p * (120 ±0)` - // Estimated: `3593 + p * (2583 ±0)` - // Minimum execution time: 41_588_000 picoseconds. - Weight::from_parts(38_538_825, 0) - .saturating_add(Weight::from_parts(0, 3593)) - // Standard Error: 5_722 - .saturating_add(Weight::from_parts(3_947_427, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 2583).saturating_mul(p.into())) - } - - fn spend_local() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn payout() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn check_status() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn void_spend() -> cumulus_primitives_core::Weight { - Weight::default() - } -} diff --git a/runtime/altair/src/weights/pallet_uniques.rs b/runtime/altair/src/weights/pallet_uniques.rs index c0eca9bbc2..63ae494240 100644 --- a/runtime/altair/src/weights/pallet_uniques.rs +++ b/runtime/altair/src/weights/pallet_uniques.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_uniques` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_uniques // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_uniques.rs @@ -32,50 +31,50 @@ use core::marker::PhantomData; /// Weight functions for `pallet_uniques`. pub struct WeightInfo(PhantomData); impl pallet_uniques::WeightInfo for WeightInfo { - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques ClassAccount (r:0 w:1) - /// Proof: Uniques ClassAccount (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ClassAccount` (r:0 w:1) + /// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) fn create() -> Weight { // Proof Size summary in bytes: // Measured: `249` // Estimated: `3647` - // Minimum execution time: 44_776_000 picoseconds. - Weight::from_parts(45_828_000, 0) + // Minimum execution time: 37_299_000 picoseconds. + Weight::from_parts(37_831_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques ClassAccount (r:0 w:1) - /// Proof: Uniques ClassAccount (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ClassAccount` (r:0 w:1) + /// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) fn force_create() -> Weight { // Proof Size summary in bytes: // Measured: `109` // Estimated: `3647` - // Minimum execution time: 22_153_000 picoseconds. - Weight::from_parts(22_584_000, 0) + // Minimum execution time: 17_021_000 picoseconds. + Weight::from_parts(17_473_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques Asset (r:1001 w:1000) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Uniques InstanceMetadataOf (r:1000 w:1000) - /// Proof: Uniques InstanceMetadataOf (max_values: None, max_size: Some(331), added: 2806, mode: MaxEncodedLen) - /// Storage: Uniques Attribute (r:1000 w:1000) - /// Proof: Uniques Attribute (max_values: None, max_size: Some(605), added: 3080, mode: MaxEncodedLen) - /// Storage: Uniques ClassAccount (r:0 w:1) - /// Proof: Uniques ClassAccount (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) - /// Storage: Uniques ClassMetadataOf (r:0 w:1) - /// Proof: Uniques ClassMetadataOf (max_values: None, max_size: Some(299), added: 2774, mode: MaxEncodedLen) - /// Storage: Uniques Account (r:0 w:1000) - /// Proof: Uniques Account (max_values: None, max_size: Some(104), added: 2579, mode: MaxEncodedLen) - /// Storage: Uniques CollectionMaxSupply (r:0 w:1) - /// Proof: Uniques CollectionMaxSupply (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Asset` (r:1001 w:1000) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Uniques::InstanceMetadataOf` (r:1000 w:1000) + /// Proof: `Uniques::InstanceMetadataOf` (`max_values`: None, `max_size`: Some(331), added: 2806, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Attribute` (r:1000 w:1000) + /// Proof: `Uniques::Attribute` (`max_values`: None, `max_size`: Some(605), added: 3080, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ClassAccount` (r:0 w:1) + /// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ClassMetadataOf` (r:0 w:1) + /// Proof: `Uniques::ClassMetadataOf` (`max_values`: None, `max_size`: Some(299), added: 2774, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Account` (r:0 w:1000) + /// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) + /// Storage: `Uniques::CollectionMaxSupply` (r:0 w:1) + /// Proof: `Uniques::CollectionMaxSupply` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 1000]`. /// The range of component `m` is `[0, 1000]`. /// The range of component `a` is `[0, 1000]`. @@ -83,15 +82,15 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `511 + a * (346 ±0) + m * (69 ±0) + n * (88 ±0)` // Estimated: `3647 + a * (3080 ±0) + m * (2806 ±0) + n * (2613 ±0)` - // Minimum execution time: 2_978_805_000 picoseconds. - Weight::from_parts(3_003_231_000, 0) + // Minimum execution time: 3_035_940_000 picoseconds. + Weight::from_parts(3_069_041_000, 0) .saturating_add(Weight::from_parts(0, 3647)) - // Standard Error: 28_093 - .saturating_add(Weight::from_parts(9_957_746, 0).saturating_mul(n.into())) - // Standard Error: 28_093 - .saturating_add(Weight::from_parts(230_320, 0).saturating_mul(m.into())) - // Standard Error: 28_093 - .saturating_add(Weight::from_parts(508_525, 0).saturating_mul(a.into())) + // Standard Error: 30_223 + .saturating_add(Weight::from_parts(10_725_405, 0).saturating_mul(n.into())) + // Standard Error: 30_223 + .saturating_add(Weight::from_parts(231_413, 0).saturating_mul(m.into())) + // Standard Error: 30_223 + .saturating_add(Weight::from_parts(479_242, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into()))) @@ -104,344 +103,346 @@ impl pallet_uniques::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 2806).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 2613).saturating_mul(n.into())) } - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques CollectionMaxSupply (r:1 w:0) - /// Proof: Uniques CollectionMaxSupply (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - /// Storage: Uniques Account (r:0 w:1) - /// Proof: Uniques Account (max_values: None, max_size: Some(104), added: 2579, mode: MaxEncodedLen) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::CollectionMaxSupply` (r:1 w:0) + /// Proof: `Uniques::CollectionMaxSupply` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Account` (r:0 w:1) + /// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) fn mint() -> Weight { // Proof Size summary in bytes: // Measured: `353` // Estimated: `3647` - // Minimum execution time: 53_821_000 picoseconds. - Weight::from_parts(54_693_000, 0) + // Minimum execution time: 48_310_000 picoseconds. + Weight::from_parts(49_152_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Uniques Account (r:0 w:1) - /// Proof: Uniques Account (max_values: None, max_size: Some(104), added: 2579, mode: MaxEncodedLen) - /// Storage: Uniques ItemPriceOf (r:0 w:1) - /// Proof: Uniques ItemPriceOf (max_values: None, max_size: Some(105), added: 2580, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Account` (r:0 w:1) + /// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ItemPriceOf` (r:0 w:1) + /// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(105), added: 2580, mode: `MaxEncodedLen`) fn burn() -> Weight { // Proof Size summary in bytes: // Measured: `516` // Estimated: `3647` - // Minimum execution time: 55_504_000 picoseconds. - Weight::from_parts(56_667_000, 0) + // Minimum execution time: 49_873_000 picoseconds. + Weight::from_parts(50_805_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Uniques Account (r:0 w:2) - /// Proof: Uniques Account (max_values: None, max_size: Some(104), added: 2579, mode: MaxEncodedLen) - /// Storage: Uniques ItemPriceOf (r:0 w:1) - /// Proof: Uniques ItemPriceOf (max_values: None, max_size: Some(105), added: 2580, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Account` (r:0 w:2) + /// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ItemPriceOf` (r:0 w:1) + /// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(105), added: 2580, mode: `MaxEncodedLen`) fn transfer() -> Weight { // Proof Size summary in bytes: // Measured: `516` // Estimated: `3647` - // Minimum execution time: 39_504_000 picoseconds. - Weight::from_parts(40_527_000, 0) + // Minimum execution time: 37_269_000 picoseconds. + Weight::from_parts(38_552_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques Asset (r:5000 w:5000) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Asset` (r:5000 w:5000) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) /// The range of component `i` is `[0, 5000]`. fn redeposit(i: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `821 + i * (88 ±0)` // Estimated: `3647 + i * (2613 ±0)` - // Minimum execution time: 20_408_000 picoseconds. - Weight::from_parts(20_869_000, 0) + // Minimum execution time: 16_661_000 picoseconds. + Weight::from_parts(16_901_000, 0) .saturating_add(Weight::from_parts(0, 3647)) - // Standard Error: 13_352 - .saturating_add(Weight::from_parts(25_703_685, 0).saturating_mul(i.into())) + // Standard Error: 18_938 + .saturating_add(Weight::from_parts(23_578_151, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) .saturating_add(Weight::from_parts(0, 2613).saturating_mul(i.into())) } - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) fn freeze() -> Weight { // Proof Size summary in bytes: // Measured: `516` // Estimated: `3647` - // Minimum execution time: 26_270_000 picoseconds. - Weight::from_parts(27_101_000, 0) + // Minimum execution time: 23_103_000 picoseconds. + Weight::from_parts(23_775_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) fn thaw() -> Weight { // Proof Size summary in bytes: // Measured: `516` // Estimated: `3647` - // Minimum execution time: 26_350_000 picoseconds. - Weight::from_parts(26_710_000, 0) + // Minimum execution time: 22_411_000 picoseconds. + Weight::from_parts(23_394_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) fn freeze_collection() -> Weight { // Proof Size summary in bytes: // Measured: `353` // Estimated: `3647` - // Minimum execution time: 19_026_000 picoseconds. - Weight::from_parts(19_356_000, 0) + // Minimum execution time: 14_928_000 picoseconds. + Weight::from_parts(15_729_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) fn thaw_collection() -> Weight { // Proof Size summary in bytes: // Measured: `353` // Estimated: `3647` - // Minimum execution time: 18_985_000 picoseconds. - Weight::from_parts(19_347_000, 0) + // Minimum execution time: 14_858_000 picoseconds. + Weight::from_parts(15_389_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques OwnershipAcceptance (r:1 w:1) - /// Proof: Uniques OwnershipAcceptance (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques ClassAccount (r:0 w:2) - /// Proof: Uniques ClassAccount (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: `Uniques::OwnershipAcceptance` (r:1 w:1) + /// Proof: `Uniques::OwnershipAcceptance` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ClassAccount` (r:0 w:2) + /// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) fn transfer_ownership() -> Weight { // Proof Size summary in bytes: - // Measured: `431` + // Measured: `638` // Estimated: `3647` - // Minimum execution time: 30_698_000 picoseconds. - Weight::from_parts(31_238_000, 0) + // Minimum execution time: 33_292_000 picoseconds. + Weight::from_parts(34_203_000, 0) .saturating_add(Weight::from_parts(0, 3647)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) fn set_team() -> Weight { // Proof Size summary in bytes: // Measured: `353` // Estimated: `3647` - // Minimum execution time: 18_876_000 picoseconds. - Weight::from_parts(19_547_000, 0) + // Minimum execution time: 15_649_000 picoseconds. + Weight::from_parts(16_050_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques ClassAccount (r:0 w:1) - /// Proof: Uniques ClassAccount (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ClassAccount` (r:0 w:1) + /// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) fn force_item_status() -> Weight { // Proof Size summary in bytes: // Measured: `353` // Estimated: `3647` - // Minimum execution time: 23_694_000 picoseconds. - Weight::from_parts(24_676_000, 0) + // Minimum execution time: 20_388_000 picoseconds. + Weight::from_parts(21_020_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques InstanceMetadataOf (r:1 w:0) - /// Proof: Uniques InstanceMetadataOf (max_values: None, max_size: Some(331), added: 2806, mode: MaxEncodedLen) - /// Storage: Uniques Attribute (r:1 w:1) - /// Proof: Uniques Attribute (max_values: None, max_size: Some(605), added: 3080, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::InstanceMetadataOf` (r:1 w:0) + /// Proof: `Uniques::InstanceMetadataOf` (`max_values`: None, `max_size`: Some(331), added: 2806, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Attribute` (r:1 w:1) + /// Proof: `Uniques::Attribute` (`max_values`: None, `max_size`: Some(605), added: 3080, mode: `MaxEncodedLen`) fn set_attribute() -> Weight { // Proof Size summary in bytes: // Measured: `775` // Estimated: `4070` - // Minimum execution time: 60_734_000 picoseconds. - Weight::from_parts(62_007_000, 0) + // Minimum execution time: 54_431_000 picoseconds. + Weight::from_parts(56_225_000, 0) .saturating_add(Weight::from_parts(0, 4070)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques InstanceMetadataOf (r:1 w:0) - /// Proof: Uniques InstanceMetadataOf (max_values: None, max_size: Some(331), added: 2806, mode: MaxEncodedLen) - /// Storage: Uniques Attribute (r:1 w:1) - /// Proof: Uniques Attribute (max_values: None, max_size: Some(605), added: 3080, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::InstanceMetadataOf` (r:1 w:0) + /// Proof: `Uniques::InstanceMetadataOf` (`max_values`: None, `max_size`: Some(331), added: 2806, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Attribute` (r:1 w:1) + /// Proof: `Uniques::Attribute` (`max_values`: None, `max_size`: Some(605), added: 3080, mode: `MaxEncodedLen`) fn clear_attribute() -> Weight { // Proof Size summary in bytes: // Measured: `1407` // Estimated: `4070` - // Minimum execution time: 58_620_000 picoseconds. - Weight::from_parts(59_472_000, 0) + // Minimum execution time: 51_737_000 picoseconds. + Weight::from_parts(52_798_000, 0) .saturating_add(Weight::from_parts(0, 4070)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques InstanceMetadataOf (r:1 w:1) - /// Proof: Uniques InstanceMetadataOf (max_values: None, max_size: Some(331), added: 2806, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::InstanceMetadataOf` (r:1 w:1) + /// Proof: `Uniques::InstanceMetadataOf` (`max_values`: None, `max_size`: Some(331), added: 2806, mode: `MaxEncodedLen`) fn set_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `419` // Estimated: `3796` - // Minimum execution time: 45_145_000 picoseconds. - Weight::from_parts(45_506_000, 0) + // Minimum execution time: 38_541_000 picoseconds. + Weight::from_parts(39_434_000, 0) .saturating_add(Weight::from_parts(0, 3796)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques InstanceMetadataOf (r:1 w:1) - /// Proof: Uniques InstanceMetadataOf (max_values: None, max_size: Some(331), added: 2806, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::InstanceMetadataOf` (r:1 w:1) + /// Proof: `Uniques::InstanceMetadataOf` (`max_values`: None, `max_size`: Some(331), added: 2806, mode: `MaxEncodedLen`) fn clear_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `775` // Estimated: `3796` - // Minimum execution time: 46_036_000 picoseconds. - Weight::from_parts(46_818_000, 0) + // Minimum execution time: 39_344_000 picoseconds. + Weight::from_parts(40_275_000, 0) .saturating_add(Weight::from_parts(0, 3796)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques ClassMetadataOf (r:1 w:1) - /// Proof: Uniques ClassMetadataOf (max_values: None, max_size: Some(299), added: 2774, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ClassMetadataOf` (r:1 w:1) + /// Proof: `Uniques::ClassMetadataOf` (`max_values`: None, `max_size`: Some(299), added: 2774, mode: `MaxEncodedLen`) fn set_collection_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `353` // Estimated: `3764` - // Minimum execution time: 46_197_000 picoseconds. - Weight::from_parts(47_068_000, 0) + // Minimum execution time: 39_293_000 picoseconds. + Weight::from_parts(40_556_000, 0) .saturating_add(Weight::from_parts(0, 3764)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques ClassMetadataOf (r:1 w:1) - /// Proof: Uniques ClassMetadataOf (max_values: None, max_size: Some(299), added: 2774, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ClassMetadataOf` (r:1 w:1) + /// Proof: `Uniques::ClassMetadataOf` (`max_values`: None, `max_size`: Some(299), added: 2774, mode: `MaxEncodedLen`) fn clear_collection_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `676` // Estimated: `3764` - // Minimum execution time: 45_054_000 picoseconds. - Weight::from_parts(45_596_000, 0) + // Minimum execution time: 37_540_000 picoseconds. + Weight::from_parts(38_792_000, 0) .saturating_add(Weight::from_parts(0, 3764)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) fn approve_transfer() -> Weight { // Proof Size summary in bytes: // Measured: `516` // Estimated: `3647` - // Minimum execution time: 27_001_000 picoseconds. - Weight::from_parts(28_002_000, 0) + // Minimum execution time: 23_434_000 picoseconds. + Weight::from_parts(24_205_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) fn cancel_approval() -> Weight { // Proof Size summary in bytes: // Measured: `549` // Estimated: `3647` - // Minimum execution time: 27_181_000 picoseconds. - Weight::from_parts(27_752_000, 0) + // Minimum execution time: 23_454_000 picoseconds. + Weight::from_parts(24_165_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques OwnershipAcceptance (r:1 w:1) - /// Proof: Uniques OwnershipAcceptance (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + /// Storage: `Uniques::OwnershipAcceptance` (r:1 w:1) + /// Proof: `Uniques::OwnershipAcceptance` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) fn set_accept_ownership() -> Weight { // Proof Size summary in bytes: // Measured: `109` // Estimated: `3521` - // Minimum execution time: 21_670_000 picoseconds. - Weight::from_parts(22_212_000, 0) + // Minimum execution time: 17_242_000 picoseconds. + Weight::from_parts(17_934_000, 0) .saturating_add(Weight::from_parts(0, 3521)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques CollectionMaxSupply (r:1 w:1) - /// Proof: Uniques CollectionMaxSupply (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) + /// Storage: `Uniques::CollectionMaxSupply` (r:1 w:1) + /// Proof: `Uniques::CollectionMaxSupply` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) fn set_collection_max_supply() -> Weight { // Proof Size summary in bytes: // Measured: `353` // Estimated: `3647` - // Minimum execution time: 23_455_000 picoseconds. - Weight::from_parts(23_904_000, 0) + // Minimum execution time: 19_977_000 picoseconds. + Weight::from_parts(20_589_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques Asset (r:1 w:0) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Uniques ItemPriceOf (r:0 w:1) - /// Proof: Uniques ItemPriceOf (max_values: None, max_size: Some(105), added: 2580, mode: MaxEncodedLen) + /// Storage: `Uniques::Asset` (r:1 w:0) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ItemPriceOf` (r:0 w:1) + /// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(105), added: 2580, mode: `MaxEncodedLen`) fn set_price() -> Weight { // Proof Size summary in bytes: // Measured: `343` // Estimated: `3603` - // Minimum execution time: 22_512_000 picoseconds. - Weight::from_parts(23_083_000, 0) + // Minimum execution time: 18_775_000 picoseconds. + Weight::from_parts(19_837_000, 0) .saturating_add(Weight::from_parts(0, 3603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Uniques ItemPriceOf (r:1 w:1) - /// Proof: Uniques ItemPriceOf (max_values: None, max_size: Some(105), added: 2580, mode: MaxEncodedLen) - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques Account (r:0 w:2) - /// Proof: Uniques Account (max_values: None, max_size: Some(104), added: 2579, mode: MaxEncodedLen) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ItemPriceOf` (r:1 w:1) + /// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(105), added: 2580, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Account` (r:0 w:2) + /// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) fn buy_item() -> Weight { // Proof Size summary in bytes: // Measured: `645` // Estimated: `3647` - // Minimum execution time: 55_594_000 picoseconds. - Weight::from_parts(57_207_000, 0) + // Minimum execution time: 48_250_000 picoseconds. + Weight::from_parts(49_041_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) diff --git a/runtime/altair/src/weights/pallet_utility.rs b/runtime/altair/src/weights/pallet_utility.rs index cb0861463d..48e987f8ff 100644 --- a/runtime/altair/src/weights/pallet_utility.rs +++ b/runtime/altair/src/weights/pallet_utility.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_utility` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_utility // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_utility.rs @@ -37,18 +36,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 11_061_000 picoseconds. - Weight::from_parts(4_150_025, 0) + // Minimum execution time: 6_693_000 picoseconds. + Weight::from_parts(8_850_353, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 3_208 - .saturating_add(Weight::from_parts(9_008_495, 0).saturating_mul(c.into())) + // Standard Error: 2_175 + .saturating_add(Weight::from_parts(4_783_853, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_825_000 picoseconds. - Weight::from_parts(8_025_000, 0) + // Minimum execution time: 6_872_000 picoseconds. + Weight::from_parts(7_153_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -56,18 +55,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 11_091_000 picoseconds. - Weight::from_parts(12_679_657, 0) + // Minimum execution time: 6_863_000 picoseconds. + Weight::from_parts(3_927_476, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_868 - .saturating_add(Weight::from_parts(9_478_944, 0).saturating_mul(c.into())) + // Standard Error: 2_107 + .saturating_add(Weight::from_parts(5_189_459, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 14_788_000 picoseconds. - Weight::from_parts(15_219_000, 0) + // Minimum execution time: 9_808_000 picoseconds. + Weight::from_parts(10_208_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -75,10 +74,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(11_012_665, 0) + // Minimum execution time: 6_863_000 picoseconds. + Weight::from_parts(2_458_096, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_910 - .saturating_add(Weight::from_parts(8_988_703, 0).saturating_mul(c.into())) + // Standard Error: 2_815 + .saturating_add(Weight::from_parts(4_821_094, 0).saturating_mul(c.into())) } } diff --git a/runtime/altair/src/weights/pallet_vesting.rs b/runtime/altair/src/weights/pallet_vesting.rs index 17e791c7eb..14c181e605 100644 --- a/runtime/altair/src/weights/pallet_vesting.rs +++ b/runtime/altair/src/weights/pallet_vesting.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_vesting` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_vesting // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_vesting.rs @@ -32,196 +31,216 @@ use core::marker::PhantomData; /// Weight functions for `pallet_vesting`. pub struct WeightInfo(PhantomData); impl pallet_vesting::WeightInfo for WeightInfo { - /// Storage: Vesting Vesting (r:1 w:1) - /// Proof: Vesting Vesting (max_values: None, max_size: Some(1057), added: 3532, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. fn vest_locked(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `272 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 48_030_000 picoseconds. - Weight::from_parts(47_379_481, 0) + // Minimum execution time: 40_916_000 picoseconds. + Weight::from_parts(40_159_949, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_067 - .saturating_add(Weight::from_parts(48_490, 0).saturating_mul(l.into())) - // Standard Error: 1_899 - .saturating_add(Weight::from_parts(90_491, 0).saturating_mul(s.into())) + // Standard Error: 891 + .saturating_add(Weight::from_parts(46_450, 0).saturating_mul(l.into())) + // Standard Error: 1_586 + .saturating_add(Weight::from_parts(88_303, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Vesting Vesting (r:1 w:1) - /// Proof: Vesting Vesting (max_values: None, max_size: Some(1057), added: 3532, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. fn vest_unlocked(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `272 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 54_312_000 picoseconds. - Weight::from_parts(54_619_434, 0) + // Minimum execution time: 43_591_000 picoseconds. + Weight::from_parts(43_386_692, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_773 - .saturating_add(Weight::from_parts(34_503, 0).saturating_mul(l.into())) - // Standard Error: 3_155 - .saturating_add(Weight::from_parts(74_475, 0).saturating_mul(s.into())) + // Standard Error: 1_408 + .saturating_add(Weight::from_parts(36_252, 0).saturating_mul(l.into())) + // Standard Error: 2_506 + .saturating_add(Weight::from_parts(82_425, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Vesting Vesting (r:1 w:1) - /// Proof: Vesting Vesting (max_values: None, max_size: Some(1057), added: 3532, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. fn vest_other_locked(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `375 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 51_346_000 picoseconds. - Weight::from_parts(50_861_695, 0) + // Minimum execution time: 43_401_000 picoseconds. + Weight::from_parts(42_617_940, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_032 - .saturating_add(Weight::from_parts(43_247, 0).saturating_mul(l.into())) - // Standard Error: 1_837 - .saturating_add(Weight::from_parts(85_424, 0).saturating_mul(s.into())) + // Standard Error: 1_041 + .saturating_add(Weight::from_parts(39_343, 0).saturating_mul(l.into())) + // Standard Error: 1_853 + .saturating_add(Weight::from_parts(86_848, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Vesting Vesting (r:1 w:1) - /// Proof: Vesting Vesting (max_values: None, max_size: Some(1057), added: 3532, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `375 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 57_980_000 picoseconds. - Weight::from_parts(57_868_431, 0) + // Minimum execution time: 45_726_000 picoseconds. + Weight::from_parts(45_191_847, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_726 - .saturating_add(Weight::from_parts(37_116, 0).saturating_mul(l.into())) - // Standard Error: 3_072 - .saturating_add(Weight::from_parts(65_443, 0).saturating_mul(s.into())) + // Standard Error: 1_167 + .saturating_add(Weight::from_parts(38_935, 0).saturating_mul(l.into())) + // Standard Error: 2_077 + .saturating_add(Weight::from_parts(86_610, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Vesting Vesting (r:1 w:1) - /// Proof: Vesting Vesting (max_values: None, max_size: Some(1057), added: 3532, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[0, 27]`. fn vested_transfer(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `479 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 110_938_000 picoseconds. - Weight::from_parts(111_856_166, 0) + // Minimum execution time: 93_083_000 picoseconds. + Weight::from_parts(94_135_389, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 2_053 - .saturating_add(Weight::from_parts(41_591, 0).saturating_mul(l.into())) - // Standard Error: 3_653 - .saturating_add(Weight::from_parts(103_746, 0).saturating_mul(s.into())) + // Standard Error: 1_774 + .saturating_add(Weight::from_parts(55_860, 0).saturating_mul(l.into())) + // Standard Error: 3_157 + .saturating_add(Weight::from_parts(112_150, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Vesting Vesting (r:1 w:1) - /// Proof: Vesting Vesting (max_values: None, max_size: Some(1057), added: 3532, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[0, 27]`. fn force_vested_transfer(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `619 + l * (25 ±0) + s * (36 ±0)` // Estimated: `6196` - // Minimum execution time: 113_523_000 picoseconds. - Weight::from_parts(114_143_178, 0) + // Minimum execution time: 95_709_000 picoseconds. + Weight::from_parts(96_999_648, 0) .saturating_add(Weight::from_parts(0, 6196)) - // Standard Error: 1_448 - .saturating_add(Weight::from_parts(55_175, 0).saturating_mul(l.into())) - // Standard Error: 2_576 - .saturating_add(Weight::from_parts(110_624, 0).saturating_mul(s.into())) + // Standard Error: 1_703 + .saturating_add(Weight::from_parts(44_988, 0).saturating_mul(l.into())) + // Standard Error: 3_031 + .saturating_add(Weight::from_parts(103_085, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: Vesting Vesting (r:1 w:1) - /// Proof: Vesting Vesting (max_values: None, max_size: Some(1057), added: 3532, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[2, 28]`. fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `374 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 52_168_000 picoseconds. - Weight::from_parts(51_592_891, 0) + // Minimum execution time: 43_281_000 picoseconds. + Weight::from_parts(42_871_130, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_301 - .saturating_add(Weight::from_parts(49_190, 0).saturating_mul(l.into())) - // Standard Error: 2_402 - .saturating_add(Weight::from_parts(92_945, 0).saturating_mul(s.into())) + // Standard Error: 1_047 + .saturating_add(Weight::from_parts(49_416, 0).saturating_mul(l.into())) + // Standard Error: 1_934 + .saturating_add(Weight::from_parts(97_804, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Vesting Vesting (r:1 w:1) - /// Proof: Vesting Vesting (max_values: None, max_size: Some(1057), added: 3532, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[2, 28]`. fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `374 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 59_351_000 picoseconds. - Weight::from_parts(58_852_699, 0) + // Minimum execution time: 46_547_000 picoseconds. + Weight::from_parts(46_278_694, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_077 - .saturating_add(Weight::from_parts(41_676, 0).saturating_mul(l.into())) - // Standard Error: 1_990 - .saturating_add(Weight::from_parts(84_168, 0).saturating_mul(s.into())) + // Standard Error: 1_245 + .saturating_add(Weight::from_parts(41_721, 0).saturating_mul(l.into())) + // Standard Error: 2_301 + .saturating_add(Weight::from_parts(93_028, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[2, 28]`. + fn force_remove_vesting_schedule(l: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `479 + l * (25 ±0) + s * (36 ±0)` + // Estimated: `4764` + // Minimum execution time: 49_332_000 picoseconds. + Weight::from_parts(48_562_292, 0) + .saturating_add(Weight::from_parts(0, 4764)) + // Standard Error: 1_024 + .saturating_add(Weight::from_parts(45_825, 0).saturating_mul(l.into())) + // Standard Error: 1_892 + .saturating_add(Weight::from_parts(96_634, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - - fn force_remove_vesting_schedule(_: u32, _: u32) -> cumulus_primitives_core::Weight { - Weight::default() - } } diff --git a/runtime/altair/src/weights/pallet_xcm.rs b/runtime/altair/src/weights/pallet_xcm.rs index b2a78e5853..ccfc230c08 100644 --- a/runtime/altair/src/weights/pallet_xcm.rs +++ b/runtime/altair/src/weights/pallet_xcm.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_xcm` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("altair-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=altair-dev +// --chain=altair-local // --steps=50 // --repeat=20 // --pallet=pallet_xcm // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/altair/src/weights/pallet_xcm.rs @@ -32,54 +31,48 @@ use core::marker::PhantomData; /// Weight functions for `pallet_xcm`. pub struct WeightInfo(PhantomData); impl pallet_xcm::WeightInfo for WeightInfo { - /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) - /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem HostConfiguration (r:1 w:0) - /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) - /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn send() -> Weight { // Proof Size summary in bytes: - // Measured: `278` - // Estimated: `3743` - // Minimum execution time: 42_460_000 picoseconds. - Weight::from_parts(43_621_000, 0) - .saturating_add(Weight::from_parts(0, 3743)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry LocationToAssetId (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry LocationToAssetId (max_values: None, max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn teleport_assets() -> Weight { // Proof Size summary in bytes: - // Measured: `203` - // Estimated: `3668` - // Minimum execution time: 41_288_000 picoseconds. - Weight::from_parts(41_949_000, 0) - .saturating_add(Weight::from_parts(0, 3668)) - .saturating_add(T::DbWeight::get().reads(2)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry LocationToAssetId (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry LocationToAssetId (max_values: None, max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn reserve_transfer_assets() -> Weight { // Proof Size summary in bytes: - // Measured: `203` - // Estimated: `3668` - // Minimum execution time: 40_897_000 picoseconds. - Weight::from_parts(41_518_000, 0) - .saturating_add(Weight::from_parts(0, 3668)) - .saturating_add(T::DbWeight::get().reads(2)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: Benchmark Override (r:0 w:0) - /// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute() -> Weight { // Proof Size summary in bytes: // Measured: `0` @@ -88,201 +81,156 @@ impl pallet_xcm::WeightInfo for WeightInfo { Weight::from_parts(18_446_744_073_709_551_000, 0) .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: PolkadotXcm SupportedVersion (r:0 w:1) - /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_xcm_version() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 14_978_000 picoseconds. - Weight::from_parts(15_379_000, 0) + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PolkadotXcm SafeXcmVersion (r:0 w:1) - /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) fn force_default_xcm_version() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_588_000 picoseconds. - Weight::from_parts(4_799_000, 0) + // Minimum execution time: 3_596_000 picoseconds. + Weight::from_parts(3_797_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PolkadotXcm VersionNotifiers (r:1 w:1) - /// Proof Skipped: PolkadotXcm VersionNotifiers (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm QueryCounter (r:1 w:1) - /// Proof Skipped: PolkadotXcm QueryCounter (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) - /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem HostConfiguration (r:1 w:0) - /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) - /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PolkadotXcm Queries (r:0 w:1) - /// Proof Skipped: PolkadotXcm Queries (max_values: None, max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_subscribe_version_notify() -> Weight { // Proof Size summary in bytes: - // Measured: `278` - // Estimated: `3743` - // Minimum execution time: 50_094_000 picoseconds. - Weight::from_parts(51_777_000, 0) - .saturating_add(Weight::from_parts(0, 3743)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(5)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: PolkadotXcm VersionNotifiers (r:1 w:1) - /// Proof Skipped: PolkadotXcm VersionNotifiers (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) - /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem HostConfiguration (r:1 w:0) - /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) - /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PolkadotXcm Queries (r:0 w:1) - /// Proof Skipped: PolkadotXcm Queries (max_values: None, max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_unsubscribe_version_notify() -> Weight { // Proof Size summary in bytes: - // Measured: `460` - // Estimated: `3925` - // Minimum execution time: 50_745_000 picoseconds. - Weight::from_parts(51_306_000, 0) - .saturating_add(Weight::from_parts(0, 3925)) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(4)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: PolkadotXcm XcmExecutionSuspended (r:0 w:1) - /// Proof Skipped: PolkadotXcm XcmExecutionSuspended (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `PolkadotXcm::XcmExecutionSuspended` (r:0 w:1) + /// Proof: `PolkadotXcm::XcmExecutionSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn force_suspension() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_639_000 picoseconds. - Weight::from_parts(4_829_000, 0) + // Minimum execution time: 3_677_000 picoseconds. + Weight::from_parts(3_837_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PolkadotXcm SupportedVersion (r:4 w:2) - /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: `PolkadotXcm::SupportedVersion` (r:5 w:2) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) fn migrate_supported_version() -> Weight { // Proof Size summary in bytes: - // Measured: `235` - // Estimated: `11125` - // Minimum execution time: 25_688_000 picoseconds. - Weight::from_parts(26_369_000, 0) - .saturating_add(Weight::from_parts(0, 11125)) - .saturating_add(T::DbWeight::get().reads(4)) + // Measured: `22` + // Estimated: `13387` + // Minimum execution time: 26_610_000 picoseconds. + Weight::from_parts(27_351_000, 0) + .saturating_add(Weight::from_parts(0, 13387)) + .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: PolkadotXcm VersionNotifiers (r:4 w:2) - /// Proof Skipped: PolkadotXcm VersionNotifiers (max_values: None, max_size: None, mode: Measured) + /// Storage: `PolkadotXcm::VersionNotifiers` (r:5 w:2) + /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) fn migrate_version_notifiers() -> Weight { // Proof Size summary in bytes: - // Measured: `239` - // Estimated: `11129` - // Minimum execution time: 25_729_000 picoseconds. - Weight::from_parts(26_380_000, 0) - .saturating_add(Weight::from_parts(0, 11129)) - .saturating_add(T::DbWeight::get().reads(4)) + // Measured: `26` + // Estimated: `13391` + // Minimum execution time: 25_558_000 picoseconds. + Weight::from_parts(25_839_000, 0) + .saturating_add(Weight::from_parts(0, 13391)) + .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: PolkadotXcm VersionNotifyTargets (r:5 w:0) - /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn already_notified_target() -> Weight { // Proof Size summary in bytes: - // Measured: `246` - // Estimated: `13611` - // Minimum execution time: 26_830_000 picoseconds. - Weight::from_parts(27_382_000, 0) - .saturating_add(Weight::from_parts(0, 13611)) - .saturating_add(T::DbWeight::get().reads(5)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 25_000_000 picoseconds. + Weight::from_parts(25_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: PolkadotXcm VersionNotifyTargets (r:2 w:1) - /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) - /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem HostConfiguration (r:1 w:0) - /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) - /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn notify_current_targets() -> Weight { // Proof Size summary in bytes: - // Measured: `345` - // Estimated: `6285` - // Minimum execution time: 47_129_000 picoseconds. - Weight::from_parts(48_281_000, 0) - .saturating_add(Weight::from_parts(0, 6285)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 325_000_000 picoseconds. + Weight::from_parts(325_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: PolkadotXcm VersionNotifyTargets (r:3 w:0) - /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:4 w:0) + /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) fn notify_target_migration_fail() -> Weight { // Proof Size summary in bytes: - // Measured: `206` - // Estimated: `8621` - // Minimum execution time: 14_327_000 picoseconds. - Weight::from_parts(14_798_000, 0) - .saturating_add(Weight::from_parts(0, 8621)) - .saturating_add(T::DbWeight::get().reads(3)) + // Measured: `69` + // Estimated: `10959` + // Minimum execution time: 20_008_000 picoseconds. + Weight::from_parts(20_309_000, 0) + .saturating_add(Weight::from_parts(0, 10959)) + .saturating_add(T::DbWeight::get().reads(4)) } - /// Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2) - /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:5 w:2) + /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) fn migrate_version_notify_targets() -> Weight { // Proof Size summary in bytes: - // Measured: `246` - // Estimated: `11136` - // Minimum execution time: 26_059_000 picoseconds. - Weight::from_parts(26_621_000, 0) - .saturating_add(Weight::from_parts(0, 11136)) - .saturating_add(T::DbWeight::get().reads(4)) + // Measured: `33` + // Estimated: `13398` + // Minimum execution time: 25_939_000 picoseconds. + Weight::from_parts(26_489_000, 0) + .saturating_add(Weight::from_parts(0, 13398)) + .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2) - /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) - /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem HostConfiguration (r:1 w:0) - /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) - /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn migrate_and_notify_old_targets() -> Weight { // Proof Size summary in bytes: - // Measured: `421` - // Estimated: `11311` - // Minimum execution time: 57_008_000 picoseconds. - Weight::from_parts(58_310_000, 0) - .saturating_add(Weight::from_parts(0, 11311)) - .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(4)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 325_000_000 picoseconds. + Weight::from_parts(325_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1) + /// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::Queries` (r:0 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn new_query() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 3_546_000 picoseconds. + Weight::from_parts(3_817_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `PolkadotXcm::Queries` (r:1 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn take_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `7576` + // Estimated: `11041` + // Minimum execution time: 42_499_000 picoseconds. + Weight::from_parts(43_902_000, 0) + .saturating_add(Weight::from_parts(0, 11041)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - - fn transfer_assets() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn new_query() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn take_response() -> cumulus_primitives_core::Weight { - Weight::default() - } } diff --git a/runtime/centrifuge/Cargo.toml b/runtime/centrifuge/Cargo.toml index 8d0e1c27f4..c1f0321c59 100644 --- a/runtime/centrifuge/Cargo.toml +++ b/runtime/centrifuge/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "centrifuge-runtime" -version = "0.10.29" build = "build.rs" +version.workspace = true authors.workspace = true edition.workspace = true license.workspace = true diff --git a/runtime/centrifuge/src/lib.rs b/runtime/centrifuge/src/lib.rs index cfa35b617c..269cb93138 100644 --- a/runtime/centrifuge/src/lib.rs +++ b/runtime/centrifuge/src/lib.rs @@ -165,7 +165,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("centrifuge"), impl_name: create_runtime_str!("centrifuge"), authoring_version: 1, - spec_version: 1029, + spec_version: 1100, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 2, @@ -2080,7 +2080,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - migrations::UpgradeCentrifuge1029, + migrations::UpgradeCentrifuge1100, >; // Frame Order in this block dictates the index of each one in the metadata diff --git a/runtime/centrifuge/src/migrations.rs b/runtime/centrifuge/src/migrations.rs index 1b3af54bcd..05d48c3d2a 100644 --- a/runtime/centrifuge/src/migrations.rs +++ b/runtime/centrifuge/src/migrations.rs @@ -21,7 +21,7 @@ const IDENTITY_MIGRATION_KEY_LIMIT: u64 = 1000; parameter_types! { // Address used by Anemoy to withdraw in AssetHub - // 4dTeMxuPJCK7zQGhFcgCivSJqBs9Wo2SuMSQeYCCuVJ9xrE2 --> 5Fc9NzKzJZwZvgjQBmSKtvZmJ5oP6B49DFC5dXZhTETjrSzo + // 4dTeMxuPJCK7zQGhFcgCivSJqBs9Wo2SuMSQeYCCuVJ9xrE2 --> 5CSfibAR9HHEwKpXbdsDHguAmLgKS6yKat2joTLA75DZ152L pub AccountMap: Vec<(AccountId, AccountId)> = vec![ ( AccountId::new(hex_literal::hex!("5dbb2cec05b6bda775f7945827b887b0e7b5245eae8b4ef266c60820c9377185")), @@ -32,7 +32,7 @@ parameter_types! { /// The migration set for Centrifuge @ Polkadot. /// It includes all the migrations that have to be applied on that chain. -pub type UpgradeCentrifuge1029 = ( +pub type UpgradeCentrifuge1100 = ( runtime_common::migrations::increase_storage_version::Migration, runtime_common::migrations::increase_storage_version::Migration, pallet_collator_selection::migration::v1::MigrateToV1, diff --git a/runtime/centrifuge/src/weights/cumulus_pallet_xcmp_queue.rs b/runtime/centrifuge/src/weights/cumulus_pallet_xcmp_queue.rs index fc48e1b1f4..1b2f3baa35 100644 --- a/runtime/centrifuge/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/runtime/centrifuge/src/weights/cumulus_pallet_xcmp_queue.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `cumulus_pallet_xcmp_queue` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=cumulus_pallet_xcmp_queue // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/cumulus_pallet_xcmp_queue.rs @@ -32,40 +31,106 @@ use core::marker::PhantomData; /// Weight functions for `cumulus_pallet_xcmp_queue`. pub struct WeightInfo(PhantomData); impl cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo { - /// Storage: XcmpQueue QueueConfig (r:1 w:1) - /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:1) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_config_with_u32() -> Weight { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1594` - // Minimum execution time: 8_697_000 picoseconds. - Weight::from_parts(9_047_000, 0) + // Minimum execution time: 6_322_000 picoseconds. + Weight::from_parts(6_612_000, 0) .saturating_add(Weight::from_parts(0, 1594)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0) + /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn enqueue_xcmp_message() -> Weight { - Weight::zero() + // Proof Size summary in bytes: + // Measured: `115` + // Estimated: `3517` + // Minimum execution time: 17_583_000 picoseconds. + Weight::from_parts(18_214_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) } - + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn suspend_channel() -> Weight { - Weight::zero() + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 3_627_000 picoseconds. + Weight::from_parts(3_857_000, 0) + .saturating_add(Weight::from_parts(0, 1594)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn resume_channel() -> Weight { - Weight::zero() + // Proof Size summary in bytes: + // Measured: `144` + // Estimated: `1629` + // Minimum execution time: 4_809_000 picoseconds. + Weight::from_parts(5_019_000, 0) + .saturating_add(Weight::from_parts(0, 1629)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - fn take_first_concatenated_xcm() -> Weight { - Weight::zero() + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 11_432_000 picoseconds. + Weight::from_parts(11_742_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0) + /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn on_idle_good_msg() -> Weight { - Weight::from_parts(1, 1) + // Proof Size summary in bytes: + // Measured: `65744` + // Estimated: `69209` + // Minimum execution time: 132_207_000 picoseconds. + Weight::from_parts(136_435_000, 0) + .saturating_add(Weight::from_parts(0, 69209)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(5)) } - - fn on_idle_large_msg() -> Weight { - Weight::from_parts(1, 1) + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65743` + // Estimated: `69208` + // Minimum execution time: 63_539_000 picoseconds. + Weight::from_parts(64_109_000, 0) + .saturating_add(Weight::from_parts(0, 69208)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } } diff --git a/runtime/centrifuge/src/weights/mod.rs b/runtime/centrifuge/src/weights/mod.rs index 3c26b723b1..659c89486d 100644 --- a/runtime/centrifuge/src/weights/mod.rs +++ b/runtime/centrifuge/src/weights/mod.rs @@ -43,7 +43,6 @@ pub mod pallet_session; pub mod pallet_timestamp; pub mod pallet_token_mux; pub mod pallet_transfer_allowlist; -pub mod pallet_treasury; pub mod pallet_uniques; pub mod pallet_utility; pub mod pallet_vesting; diff --git a/runtime/centrifuge/src/weights/pallet_anchors.rs b/runtime/centrifuge/src/weights/pallet_anchors.rs index b4a2ffbf92..1ff8ae7cc7 100644 --- a/runtime/centrifuge/src/weights/pallet_anchors.rs +++ b/runtime/centrifuge/src/weights/pallet_anchors.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_anchors` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_anchors // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_anchors.rs @@ -32,482 +31,482 @@ use core::marker::PhantomData; /// Weight functions for `pallet_anchors`. pub struct WeightInfo(PhantomData); impl pallet_anchors::WeightInfo for WeightInfo { - /// Storage: Anchor AnchorEvictDates (r:1 w:0) - /// Proof: Anchor AnchorEvictDates (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) - /// Storage: Anchor PreCommits (r:1 w:1) - /// Proof: Anchor PreCommits (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen) - /// Storage: Fees FeeBalances (r:1 w:0) - /// Proof: Fees FeeBalances (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) + /// Storage: `Anchor::AnchorEvictDates` (r:1 w:0) + /// Proof: `Anchor::AnchorEvictDates` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `Anchor::PreCommits` (r:1 w:1) + /// Proof: `Anchor::PreCommits` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `Fees::FeeBalances` (r:1 w:0) + /// Proof: `Fees::FeeBalances` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) fn pre_commit() -> Weight { // Proof Size summary in bytes: - // Measured: `334` + // Measured: `301` // Estimated: `3581` - // Minimum execution time: 40_876_000 picoseconds. - Weight::from_parts(41_417_000, 0) + // Minimum execution time: 38_893_000 picoseconds. + Weight::from_parts(39_884_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Anchor AnchorEvictDates (r:1 w:1) - /// Proof: Anchor AnchorEvictDates (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) - /// Storage: Anchor PreCommits (r:1 w:1) - /// Proof: Anchor PreCommits (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen) - /// Storage: Fees FeeBalances (r:1 w:0) - /// Proof: Fees FeeBalances (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Authorship Author (r:1 w:0) - /// Proof: Authorship Author (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: System Digest (r:1 w:0) - /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Anchor LatestAnchorIndex (r:1 w:1) - /// Proof: Anchor LatestAnchorIndex (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Anchor AnchorIndexes (r:0 w:1) - /// Proof: Anchor AnchorIndexes (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - /// Storage: unknown `0xdb4faa73ca6d2016e53c7156087c176b79b169c409b8a0063a07964f3187f9e9` (r:0 w:1) - /// Proof Skipped: unknown `0xdb4faa73ca6d2016e53c7156087c176b79b169c409b8a0063a07964f3187f9e9` (r:0 w:1) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Anchor::AnchorEvictDates` (r:1 w:1) + /// Proof: `Anchor::AnchorEvictDates` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `Anchor::PreCommits` (r:1 w:1) + /// Proof: `Anchor::PreCommits` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `Fees::FeeBalances` (r:1 w:0) + /// Proof: `Fees::FeeBalances` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Authorship::Author` (r:1 w:0) + /// Proof: `Authorship::Author` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + /// Storage: `System::Digest` (r:1 w:0) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Anchor::LatestAnchorIndex` (r:1 w:1) + /// Proof: `Anchor::LatestAnchorIndex` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Anchor::AnchorIndexes` (r:0 w:1) + /// Proof: `Anchor::AnchorIndexes` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xdb4faa73ca6d2016e53c7156087c176b79b169c409b8a0063a07964f3187f9e9` (r:0 w:1) + /// Proof: UNKNOWN KEY `0xdb4faa73ca6d2016e53c7156087c176b79b169c409b8a0063a07964f3187f9e9` (r:0 w:1) fn commit() -> Weight { // Proof Size summary in bytes: - // Measured: `668` + // Measured: `635` // Estimated: `3581` - // Minimum execution time: 71_232_000 picoseconds. - Weight::from_parts(72_526_000, 0) + // Minimum execution time: 65_643_000 picoseconds. + Weight::from_parts(66_685_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: Anchor PreCommits (r:100 w:100) - /// Proof: Anchor PreCommits (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen) + /// Storage: `Anchor::PreCommits` (r:100 w:100) + /// Proof: `Anchor::PreCommits` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn evict_pre_commits() -> Weight { // Proof Size summary in bytes: // Measured: `12450` // Estimated: `260090` - // Minimum execution time: 2_213_019_000 picoseconds. - Weight::from_parts(2_232_476_000, 0) + // Minimum execution time: 1_948_840_000 picoseconds. + Weight::from_parts(1_974_327_000, 0) .saturating_add(Weight::from_parts(0, 260090)) .saturating_add(T::DbWeight::get().reads(100)) .saturating_add(T::DbWeight::get().writes(100)) } - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Anchor LatestEvictedDate (r:1 w:1) - /// Proof: Anchor LatestEvictedDate (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Anchor EvictedAnchorRoots (r:100 w:100) - /// Proof: Anchor EvictedAnchorRoots (max_values: None, max_size: Some(65), added: 2540, mode: MaxEncodedLen) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72010000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72010000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72020000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72020000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72030000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72030000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72040000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72040000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72050000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72050000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72060000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72060000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72070000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72070000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72080000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72080000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72090000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72090000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720a0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720a0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720b0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720b0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720c0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720c0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720d0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720d0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720e0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720e0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720f0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720f0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72100000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72100000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72110000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72110000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72120000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72120000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72130000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72130000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72140000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72140000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72150000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72150000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72160000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72160000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72170000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72170000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72180000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72180000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72190000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72190000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721a0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721a0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721b0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721b0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721c0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721c0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721d0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721d0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721e0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721e0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721f0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721f0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72200000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72200000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72210000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72210000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72220000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72220000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72230000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72230000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72240000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72240000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72250000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72250000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72260000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72260000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72270000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72270000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72280000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72280000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72290000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72290000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722a0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722a0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722b0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722b0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722c0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722c0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722d0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722d0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722e0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722e0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722f0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722f0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72300000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72300000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72310000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72310000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72320000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72320000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72330000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72330000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72340000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72340000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72350000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72350000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72360000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72360000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72370000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72370000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72380000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72380000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72390000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72390000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723a0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723a0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723b0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723b0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723c0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723c0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723d0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723d0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723e0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723e0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723f0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723f0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72400000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72400000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72410000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72410000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72420000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72420000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72430000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72430000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72440000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72440000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72450000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72450000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72460000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72460000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72470000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72470000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72480000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72480000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72490000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72490000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724a0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724a0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724b0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724b0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724c0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724c0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724d0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724d0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724e0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724e0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724f0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724f0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72500000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72500000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72510000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72510000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72520000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72520000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72530000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72530000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72540000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72540000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72550000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72550000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72560000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72560000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72570000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72570000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72580000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72580000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72590000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72590000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725a0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725a0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725b0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725b0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725c0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725c0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725d0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725d0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725e0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725e0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725f0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725f0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72600000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72600000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72610000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72610000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72620000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72620000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72630000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72630000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72640000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72640000` (r:1 w:0) - /// Storage: Anchor LatestEvictedAnchorIndex (r:1 w:1) - /// Proof: Anchor LatestEvictedAnchorIndex (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Anchor LatestAnchorIndex (r:1 w:0) - /// Proof: Anchor LatestAnchorIndex (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Anchor AnchorIndexes (r:100 w:100) - /// Proof: Anchor AnchorIndexes (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - /// Storage: Anchor AnchorEvictDates (r:100 w:100) - /// Proof: Anchor AnchorEvictDates (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) - /// Storage: unknown `0x01d5998dcaa249dfa2a455ae4c045d761623f268227068931dbabca3732aa41f` (r:1 w:1) - /// Proof Skipped: unknown `0x01d5998dcaa249dfa2a455ae4c045d761623f268227068931dbabca3732aa41f` (r:1 w:1) - /// Storage: unknown `0x04575ee0699f1fa86cccfdcf4285aa81b9bfa0f8837cf533346d722970f1a704` (r:1 w:1) - /// Proof Skipped: unknown `0x04575ee0699f1fa86cccfdcf4285aa81b9bfa0f8837cf533346d722970f1a704` (r:1 w:1) - /// Storage: unknown `0x0959721f200e92d5090cee3c2c4546c11f9bfd16ded1e70e6781d2402880f1f3` (r:1 w:1) - /// Proof Skipped: unknown `0x0959721f200e92d5090cee3c2c4546c11f9bfd16ded1e70e6781d2402880f1f3` (r:1 w:1) - /// Storage: unknown `0x0a958b15afac1ffb0c6e73c553bd8b4ba94ad2d0cc118dcd2a7bc8802e2e772a` (r:1 w:1) - /// Proof Skipped: unknown `0x0a958b15afac1ffb0c6e73c553bd8b4ba94ad2d0cc118dcd2a7bc8802e2e772a` (r:1 w:1) - /// Storage: unknown `0x0c4c531cd9dcf8573a6350d0ac9fb060d273156bdee4fdae0043b6fee5bda27c` (r:1 w:1) - /// Proof Skipped: unknown `0x0c4c531cd9dcf8573a6350d0ac9fb060d273156bdee4fdae0043b6fee5bda27c` (r:1 w:1) - /// Storage: unknown `0x0cd3f3ee9420f9c3b2e70862996e8d02e87d1f148632a36b8f72c9548b10b856` (r:1 w:1) - /// Proof Skipped: unknown `0x0cd3f3ee9420f9c3b2e70862996e8d02e87d1f148632a36b8f72c9548b10b856` (r:1 w:1) - /// Storage: unknown `0x10876da12e1227a2c04872ce311f768aaf3e21458e6ad1c04f044c97fe8e214e` (r:1 w:1) - /// Proof Skipped: unknown `0x10876da12e1227a2c04872ce311f768aaf3e21458e6ad1c04f044c97fe8e214e` (r:1 w:1) - /// Storage: unknown `0x10b360a66313de6ab2d43019c5fd7ea0db088efb3e1d4a24d89775e66e089cff` (r:1 w:1) - /// Proof Skipped: unknown `0x10b360a66313de6ab2d43019c5fd7ea0db088efb3e1d4a24d89775e66e089cff` (r:1 w:1) - /// Storage: unknown `0x16d33ce142442dfbe857e2c9e0648d026c6bb367d467d6922c2c1133aaa3d7b8` (r:1 w:1) - /// Proof Skipped: unknown `0x16d33ce142442dfbe857e2c9e0648d026c6bb367d467d6922c2c1133aaa3d7b8` (r:1 w:1) - /// Storage: unknown `0x16e133fb9e42d5a2a9a2e21b2e0efd735fccb527162a21cf520c3aecd84c89ed` (r:1 w:1) - /// Proof Skipped: unknown `0x16e133fb9e42d5a2a9a2e21b2e0efd735fccb527162a21cf520c3aecd84c89ed` (r:1 w:1) - /// Storage: unknown `0x16fcb5e799a48fa04deaaaa71c85bc8e9126bd4b5dbcb3a1f8068ab14bc1c26f` (r:1 w:1) - /// Proof Skipped: unknown `0x16fcb5e799a48fa04deaaaa71c85bc8e9126bd4b5dbcb3a1f8068ab14bc1c26f` (r:1 w:1) - /// Storage: unknown `0x1b3289127bc95ed117e77d479ccd3ac4477ef8d32df7265bbd42c75bf1945464` (r:1 w:1) - /// Proof Skipped: unknown `0x1b3289127bc95ed117e77d479ccd3ac4477ef8d32df7265bbd42c75bf1945464` (r:1 w:1) - /// Storage: unknown `0x1ecb14235f21b57f49e32ac4f35a1af6a71f96867f0bc61bc5905b8d437b6bde` (r:1 w:1) - /// Proof Skipped: unknown `0x1ecb14235f21b57f49e32ac4f35a1af6a71f96867f0bc61bc5905b8d437b6bde` (r:1 w:1) - /// Storage: unknown `0x1f8b0dafc67f9d378cf0596c5d49f220e5880b9c74ccaadac2206a35ec92715a` (r:1 w:1) - /// Proof Skipped: unknown `0x1f8b0dafc67f9d378cf0596c5d49f220e5880b9c74ccaadac2206a35ec92715a` (r:1 w:1) - /// Storage: unknown `0x24a8d9c362d9365f46f899adb37f6b61134dceaa80f96a9cda6b059a1301f380` (r:1 w:1) - /// Proof Skipped: unknown `0x24a8d9c362d9365f46f899adb37f6b61134dceaa80f96a9cda6b059a1301f380` (r:1 w:1) - /// Storage: unknown `0x2a00fca93dceceb635a80a95e8f785b189a4ce35f90a17acba5d1bcacf895a84` (r:1 w:1) - /// Proof Skipped: unknown `0x2a00fca93dceceb635a80a95e8f785b189a4ce35f90a17acba5d1bcacf895a84` (r:1 w:1) - /// Storage: unknown `0x2b318def38ef5f2f8db787e365834ece79fbde70c22cf7bd6c9326995fd4c07f` (r:1 w:1) - /// Proof Skipped: unknown `0x2b318def38ef5f2f8db787e365834ece79fbde70c22cf7bd6c9326995fd4c07f` (r:1 w:1) - /// Storage: unknown `0x2fbeff7b90831a847716e729a30f028899726193b4406a1c91fce4e97beb61b5` (r:1 w:1) - /// Proof Skipped: unknown `0x2fbeff7b90831a847716e729a30f028899726193b4406a1c91fce4e97beb61b5` (r:1 w:1) - /// Storage: unknown `0x30dc983a9ad263028d0e91a8a0cf703a2a7fd3834b1102f1ff3f8c8876a207bf` (r:1 w:1) - /// Proof Skipped: unknown `0x30dc983a9ad263028d0e91a8a0cf703a2a7fd3834b1102f1ff3f8c8876a207bf` (r:1 w:1) - /// Storage: unknown `0x3187d0cdac28db7ec343a07f0b2e44fc56986f0a9c2062d5fa60f99419707bea` (r:1 w:1) - /// Proof Skipped: unknown `0x3187d0cdac28db7ec343a07f0b2e44fc56986f0a9c2062d5fa60f99419707bea` (r:1 w:1) - /// Storage: unknown `0x3596cd6b45e209629c71765c804f324ed440f7a1cb2ff6cb542156fd5d213de2` (r:1 w:1) - /// Proof Skipped: unknown `0x3596cd6b45e209629c71765c804f324ed440f7a1cb2ff6cb542156fd5d213de2` (r:1 w:1) - /// Storage: unknown `0x3645890bd8ab0cc13921468d56eee7da40fbe28dc05bc30a64f05a2c03a1912e` (r:1 w:1) - /// Proof Skipped: unknown `0x3645890bd8ab0cc13921468d56eee7da40fbe28dc05bc30a64f05a2c03a1912e` (r:1 w:1) - /// Storage: unknown `0x384b604969634cf37d988e886b5267a51baeb797e09a1d1a0893e5be8fc553df` (r:1 w:1) - /// Proof Skipped: unknown `0x384b604969634cf37d988e886b5267a51baeb797e09a1d1a0893e5be8fc553df` (r:1 w:1) - /// Storage: unknown `0x3c056a888ea28c9294c91723916f5891141a824048335e32532e6605ce0457e0` (r:1 w:1) - /// Proof Skipped: unknown `0x3c056a888ea28c9294c91723916f5891141a824048335e32532e6605ce0457e0` (r:1 w:1) - /// Storage: unknown `0x3c5fd1d5c95885c6b44e0f3995886046d906821de1ed5ee95b51b17c42d3295b` (r:1 w:1) - /// Proof Skipped: unknown `0x3c5fd1d5c95885c6b44e0f3995886046d906821de1ed5ee95b51b17c42d3295b` (r:1 w:1) - /// Storage: unknown `0x3e74dfe3befcf6fa20eb902c2007ba7fd831619013aa99e016284597b896115b` (r:1 w:1) - /// Proof Skipped: unknown `0x3e74dfe3befcf6fa20eb902c2007ba7fd831619013aa99e016284597b896115b` (r:1 w:1) - /// Storage: unknown `0x42f1cff854d41b18ae379b012a1e712f036bcd839244d5c6324f12c28f6fd6e9` (r:1 w:1) - /// Proof Skipped: unknown `0x42f1cff854d41b18ae379b012a1e712f036bcd839244d5c6324f12c28f6fd6e9` (r:1 w:1) - /// Storage: unknown `0x457803d743c32f50866dbf7aabb339a1d8b6b759783b0627128f0cfd3d6c8775` (r:1 w:1) - /// Proof Skipped: unknown `0x457803d743c32f50866dbf7aabb339a1d8b6b759783b0627128f0cfd3d6c8775` (r:1 w:1) - /// Storage: unknown `0x4cb17fd2f1d1b2eff69f0ffa1a97ff13e7bf4f05a7a99dd06e503e7546b23906` (r:1 w:1) - /// Proof Skipped: unknown `0x4cb17fd2f1d1b2eff69f0ffa1a97ff13e7bf4f05a7a99dd06e503e7546b23906` (r:1 w:1) - /// Storage: unknown `0x58357c4f5a9881658ffc42faa5f48e2810169bf85c8c78011696a17b59728ef5` (r:1 w:1) - /// Proof Skipped: unknown `0x58357c4f5a9881658ffc42faa5f48e2810169bf85c8c78011696a17b59728ef5` (r:1 w:1) - /// Storage: unknown `0x5baa983aa91ad92c66e17d16e0757ec4a67ec2ce5b95f4d02ec22fba0e485da0` (r:1 w:1) - /// Proof Skipped: unknown `0x5baa983aa91ad92c66e17d16e0757ec4a67ec2ce5b95f4d02ec22fba0e485da0` (r:1 w:1) - /// Storage: unknown `0x5da83d0712f41714545470b781e0a43c65a0ac977327475baa98b5cd94938f17` (r:1 w:1) - /// Proof Skipped: unknown `0x5da83d0712f41714545470b781e0a43c65a0ac977327475baa98b5cd94938f17` (r:1 w:1) - /// Storage: unknown `0x6365aeecd6b54d3166f3df46d8c7b404711ca54b4284e8faf67eb014fa3685f8` (r:1 w:1) - /// Proof Skipped: unknown `0x6365aeecd6b54d3166f3df46d8c7b404711ca54b4284e8faf67eb014fa3685f8` (r:1 w:1) - /// Storage: unknown `0x683b74d821a8019cbfc9dbe47b50b0f377e0eef16dbc52f7f931ae713fd3f644` (r:1 w:1) - /// Proof Skipped: unknown `0x683b74d821a8019cbfc9dbe47b50b0f377e0eef16dbc52f7f931ae713fd3f644` (r:1 w:1) - /// Storage: unknown `0x6b02568ad8557dc3d66463abfd1d7f298a0b314fe4bf7d5be79b66768096ed90` (r:1 w:1) - /// Proof Skipped: unknown `0x6b02568ad8557dc3d66463abfd1d7f298a0b314fe4bf7d5be79b66768096ed90` (r:1 w:1) - /// Storage: unknown `0x6b05c068aecc171915a61cf59146e7f9a69b9bba39f4df50cecfeb454850b4c9` (r:1 w:1) - /// Proof Skipped: unknown `0x6b05c068aecc171915a61cf59146e7f9a69b9bba39f4df50cecfeb454850b4c9` (r:1 w:1) - /// Storage: unknown `0x6b5529ac614dcbd6113176256a4f5809eb667bddab2e22579306de0a1f83f287` (r:1 w:1) - /// Proof Skipped: unknown `0x6b5529ac614dcbd6113176256a4f5809eb667bddab2e22579306de0a1f83f287` (r:1 w:1) - /// Storage: unknown `0x6cd1381490331969f37f1e6575081f42f1bd8ae0cc79d70fc52ed178b5d75bd0` (r:1 w:1) - /// Proof Skipped: unknown `0x6cd1381490331969f37f1e6575081f42f1bd8ae0cc79d70fc52ed178b5d75bd0` (r:1 w:1) - /// Storage: unknown `0x6f5b021a9f57d7669ed7269e7d8785acf255f15785bf452a03a4decc184fd403` (r:1 w:1) - /// Proof Skipped: unknown `0x6f5b021a9f57d7669ed7269e7d8785acf255f15785bf452a03a4decc184fd403` (r:1 w:1) - /// Storage: unknown `0x764bac7888f79c071087d351a356a09cb2490cb6ea6d71f0cd391de89a885cd2` (r:1 w:1) - /// Proof Skipped: unknown `0x764bac7888f79c071087d351a356a09cb2490cb6ea6d71f0cd391de89a885cd2` (r:1 w:1) - /// Storage: unknown `0x7aedb653a5de5739b9d3594196693fd51653fcd59b442e0eb9f64265db188044` (r:1 w:1) - /// Proof Skipped: unknown `0x7aedb653a5de5739b9d3594196693fd51653fcd59b442e0eb9f64265db188044` (r:1 w:1) - /// Storage: unknown `0x7ca04bdeb932896fd908eb86d4136e9e2462575ebdf981001c1cd3ca6a2faaec` (r:1 w:1) - /// Proof Skipped: unknown `0x7ca04bdeb932896fd908eb86d4136e9e2462575ebdf981001c1cd3ca6a2faaec` (r:1 w:1) - /// Storage: unknown `0x7ceee738f5af899bd2f967a928019e4a0ecb8715509668dcc039badfe148b45e` (r:1 w:1) - /// Proof Skipped: unknown `0x7ceee738f5af899bd2f967a928019e4a0ecb8715509668dcc039badfe148b45e` (r:1 w:1) - /// Storage: unknown `0x7e700ce9c411e35485babec60c2b68f40c512bc8399c5cee0c1e4264e63f36d1` (r:1 w:1) - /// Proof Skipped: unknown `0x7e700ce9c411e35485babec60c2b68f40c512bc8399c5cee0c1e4264e63f36d1` (r:1 w:1) - /// Storage: unknown `0x80c020f2e70a170ee2f34af3daeda4c2097d14a35f5b1f2d23c2287e5e930f55` (r:1 w:1) - /// Proof Skipped: unknown `0x80c020f2e70a170ee2f34af3daeda4c2097d14a35f5b1f2d23c2287e5e930f55` (r:1 w:1) - /// Storage: unknown `0x8101d04cf92ee55f6c2a798c7b16da4cc8c511fd822b13093d0f53f5523718d0` (r:1 w:1) - /// Proof Skipped: unknown `0x8101d04cf92ee55f6c2a798c7b16da4cc8c511fd822b13093d0f53f5523718d0` (r:1 w:1) - /// Storage: unknown `0x85172de32d6b5871235d50648541b1bd007807512231f9b81f25cb5e20141820` (r:1 w:1) - /// Proof Skipped: unknown `0x85172de32d6b5871235d50648541b1bd007807512231f9b81f25cb5e20141820` (r:1 w:1) - /// Storage: unknown `0x85e9ccd05d28607dcce0dc5be4f34a7d56d3b83b6c63162b2787fc0e6decf2a7` (r:1 w:1) - /// Proof Skipped: unknown `0x85e9ccd05d28607dcce0dc5be4f34a7d56d3b83b6c63162b2787fc0e6decf2a7` (r:1 w:1) - /// Storage: unknown `0x87b3d065618080e576b534cf68b60d09c4cca0b71a8b6321337cc23be47e7329` (r:1 w:1) - /// Proof Skipped: unknown `0x87b3d065618080e576b534cf68b60d09c4cca0b71a8b6321337cc23be47e7329` (r:1 w:1) - /// Storage: unknown `0x892ec564231143cc6294a8750b924df2207d91ea3508501d2bd84bee7947b9d0` (r:1 w:1) - /// Proof Skipped: unknown `0x892ec564231143cc6294a8750b924df2207d91ea3508501d2bd84bee7947b9d0` (r:1 w:1) - /// Storage: unknown `0x8980988eacf42b40c4fc8aa995ae2e059a66c6935626c3e30f1d6842335368d0` (r:1 w:1) - /// Proof Skipped: unknown `0x8980988eacf42b40c4fc8aa995ae2e059a66c6935626c3e30f1d6842335368d0` (r:1 w:1) - /// Storage: unknown `0x8db2380506697daa88c7a72906d747535ffb12c0ca2a4a6443074bb0fdd8f256` (r:1 w:1) - /// Proof Skipped: unknown `0x8db2380506697daa88c7a72906d747535ffb12c0ca2a4a6443074bb0fdd8f256` (r:1 w:1) - /// Storage: unknown `0x8e098b9b896a97df275aba887f591c3076220e02adf682c98808e4ba53e6a773` (r:1 w:1) - /// Proof Skipped: unknown `0x8e098b9b896a97df275aba887f591c3076220e02adf682c98808e4ba53e6a773` (r:1 w:1) - /// Storage: unknown `0x8e590007efc113bc10a61c478d26803cdae5572d4c70547b3c9813b3ce396826` (r:1 w:1) - /// Proof Skipped: unknown `0x8e590007efc113bc10a61c478d26803cdae5572d4c70547b3c9813b3ce396826` (r:1 w:1) - /// Storage: unknown `0x96e31df89b1f00b96c993bd9de31e32e7e59c0a185cd0b31adc4e969746c8ea6` (r:1 w:1) - /// Proof Skipped: unknown `0x96e31df89b1f00b96c993bd9de31e32e7e59c0a185cd0b31adc4e969746c8ea6` (r:1 w:1) - /// Storage: unknown `0x9ae7305289647b636a8702b2316e5482f1a807fa398687068fb653527368f9bc` (r:1 w:1) - /// Proof Skipped: unknown `0x9ae7305289647b636a8702b2316e5482f1a807fa398687068fb653527368f9bc` (r:1 w:1) - /// Storage: unknown `0x9b9660b6fc1992a09573eaa9110c4a08d40c1f439304a47b9776645bc278fc75` (r:1 w:1) - /// Proof Skipped: unknown `0x9b9660b6fc1992a09573eaa9110c4a08d40c1f439304a47b9776645bc278fc75` (r:1 w:1) - /// Storage: unknown `0xa04f2ef3bb509dfec9d7a97c4778ab2e477af9c5cbda3a1c6e57514314a3f9a5` (r:1 w:1) - /// Proof Skipped: unknown `0xa04f2ef3bb509dfec9d7a97c4778ab2e477af9c5cbda3a1c6e57514314a3f9a5` (r:1 w:1) - /// Storage: unknown `0xa16d64c1e08b47144c2c8e37872486cf440dda823e2ea05f480fedfe83060f17` (r:1 w:1) - /// Proof Skipped: unknown `0xa16d64c1e08b47144c2c8e37872486cf440dda823e2ea05f480fedfe83060f17` (r:1 w:1) - /// Storage: unknown `0xa4ad0a32c2781a59ea8a6d58e26fa7dc0b2a08f8c4c938661f5f3ccd8f8eb8ce` (r:1 w:1) - /// Proof Skipped: unknown `0xa4ad0a32c2781a59ea8a6d58e26fa7dc0b2a08f8c4c938661f5f3ccd8f8eb8ce` (r:1 w:1) - /// Storage: unknown `0xab9797fb6926376ee3b6be73e5501e0a3af18d0bc6dfca0d3b5f498602016956` (r:1 w:1) - /// Proof Skipped: unknown `0xab9797fb6926376ee3b6be73e5501e0a3af18d0bc6dfca0d3b5f498602016956` (r:1 w:1) - /// Storage: unknown `0xac4d9f6628449fe129d24b384441fdb445962d2d6bca7603fea0c20f3d04351c` (r:1 w:1) - /// Proof Skipped: unknown `0xac4d9f6628449fe129d24b384441fdb445962d2d6bca7603fea0c20f3d04351c` (r:1 w:1) - /// Storage: unknown `0xafecb421bedaa0f8bd89ef18897b77ce61738af42f8a66e3257a079a3d04bef1` (r:1 w:1) - /// Proof Skipped: unknown `0xafecb421bedaa0f8bd89ef18897b77ce61738af42f8a66e3257a079a3d04bef1` (r:1 w:1) - /// Storage: unknown `0xb292dc48cc1057cce335f1d84f295271a2b16aee7018f1bd444febd77f7e5cbb` (r:1 w:1) - /// Proof Skipped: unknown `0xb292dc48cc1057cce335f1d84f295271a2b16aee7018f1bd444febd77f7e5cbb` (r:1 w:1) - /// Storage: unknown `0xb48b9d9955158dbd87abb433511a5968c21cf78f8085088407e24d6ee26f7f56` (r:1 w:1) - /// Proof Skipped: unknown `0xb48b9d9955158dbd87abb433511a5968c21cf78f8085088407e24d6ee26f7f56` (r:1 w:1) - /// Storage: unknown `0xb5a7df612d6fb3bc16c1716414897ba5928835d883003371f02106d5a92abd78` (r:1 w:1) - /// Proof Skipped: unknown `0xb5a7df612d6fb3bc16c1716414897ba5928835d883003371f02106d5a92abd78` (r:1 w:1) - /// Storage: unknown `0xb684abf2ee5018a16a8dbef6633bcb94a07a2cdf4a173e4fec130da86e8ab987` (r:1 w:1) - /// Proof Skipped: unknown `0xb684abf2ee5018a16a8dbef6633bcb94a07a2cdf4a173e4fec130da86e8ab987` (r:1 w:1) - /// Storage: unknown `0xb86c8391d2a3eb28b9e3b603cf6929849d50e439e0bbc79781b2555f9cbaa013` (r:1 w:1) - /// Proof Skipped: unknown `0xb86c8391d2a3eb28b9e3b603cf6929849d50e439e0bbc79781b2555f9cbaa013` (r:1 w:1) - /// Storage: unknown `0xba070ba6cf5f2489f98b6841d238eee4fc403d3065b57f9e3e38ca540971024d` (r:1 w:1) - /// Proof Skipped: unknown `0xba070ba6cf5f2489f98b6841d238eee4fc403d3065b57f9e3e38ca540971024d` (r:1 w:1) - /// Storage: unknown `0xbcb96e5fc092d3ac258a81b5390671817730859598470874ef02f998518bbf58` (r:1 w:1) - /// Proof Skipped: unknown `0xbcb96e5fc092d3ac258a81b5390671817730859598470874ef02f998518bbf58` (r:1 w:1) - /// Storage: unknown `0xc008db6f6d721d80fab2eab8b6dda4f19bd5def30aa7db86dadd6eb799c2f5ad` (r:1 w:1) - /// Proof Skipped: unknown `0xc008db6f6d721d80fab2eab8b6dda4f19bd5def30aa7db86dadd6eb799c2f5ad` (r:1 w:1) - /// Storage: unknown `0xc054c4045e44e28cef1884c0aa86d0049b76eaff493a6d694394df7b0cee8136` (r:1 w:1) - /// Proof Skipped: unknown `0xc054c4045e44e28cef1884c0aa86d0049b76eaff493a6d694394df7b0cee8136` (r:1 w:1) - /// Storage: unknown `0xc315216d50f4dd95914d6d102976dc09ec4474da5c314a15f09972ded6e71ddb` (r:1 w:1) - /// Proof Skipped: unknown `0xc315216d50f4dd95914d6d102976dc09ec4474da5c314a15f09972ded6e71ddb` (r:1 w:1) - /// Storage: unknown `0xc4a2c3fa3cc7ed1611651510eb6e225abab30676f0fad28c115482c7dd61f8e0` (r:1 w:1) - /// Proof Skipped: unknown `0xc4a2c3fa3cc7ed1611651510eb6e225abab30676f0fad28c115482c7dd61f8e0` (r:1 w:1) - /// Storage: unknown `0xc6cc01d59d3c86a1c12a167e149d784295fcd13862e4afb0a39a8459e6e25561` (r:1 w:1) - /// Proof Skipped: unknown `0xc6cc01d59d3c86a1c12a167e149d784295fcd13862e4afb0a39a8459e6e25561` (r:1 w:1) - /// Storage: unknown `0xc712d8fa08dd521e5f901ca6d36134807c5ec0510e3b52e8ae5a15f7c13d2ebd` (r:1 w:1) - /// Proof Skipped: unknown `0xc712d8fa08dd521e5f901ca6d36134807c5ec0510e3b52e8ae5a15f7c13d2ebd` (r:1 w:1) - /// Storage: unknown `0xc7e2bc91ff1b307f6995683b76f1904ccdada3cf8f00528c08d4f65911c4888a` (r:1 w:1) - /// Proof Skipped: unknown `0xc7e2bc91ff1b307f6995683b76f1904ccdada3cf8f00528c08d4f65911c4888a` (r:1 w:1) - /// Storage: unknown `0xccbca45304d59a1167eaf9b459e09cffce3d90c087ee9edf8e7e2dc40349373b` (r:1 w:1) - /// Proof Skipped: unknown `0xccbca45304d59a1167eaf9b459e09cffce3d90c087ee9edf8e7e2dc40349373b` (r:1 w:1) - /// Storage: unknown `0xccc17a821dda11e5239ea8dbedee5bd6622fc8dd63ee229fc3bd2dead22e8ae2` (r:1 w:1) - /// Proof Skipped: unknown `0xccc17a821dda11e5239ea8dbedee5bd6622fc8dd63ee229fc3bd2dead22e8ae2` (r:1 w:1) - /// Storage: unknown `0xccee04c4c0534d4245892ed24d7814cd14a41aeed7e94591354315f5b74d89f5` (r:1 w:1) - /// Proof Skipped: unknown `0xccee04c4c0534d4245892ed24d7814cd14a41aeed7e94591354315f5b74d89f5` (r:1 w:1) - /// Storage: unknown `0xcf67e9890d936f6bd205710c9a5cedc653d88fba3c74b7a2b9fe8ce7fce0bd0c` (r:1 w:1) - /// Proof Skipped: unknown `0xcf67e9890d936f6bd205710c9a5cedc653d88fba3c74b7a2b9fe8ce7fce0bd0c` (r:1 w:1) - /// Storage: unknown `0xcfdb7c67ada01beee8308b04c3f32e4c078603d0c84c0e28e605a8ea56dcc362` (r:1 w:1) - /// Proof Skipped: unknown `0xcfdb7c67ada01beee8308b04c3f32e4c078603d0c84c0e28e605a8ea56dcc362` (r:1 w:1) - /// Storage: unknown `0xd0d54b0c405fea6ff90809070bfd270c88e9a26ad83138eeb077d8f9602670bc` (r:1 w:1) - /// Proof Skipped: unknown `0xd0d54b0c405fea6ff90809070bfd270c88e9a26ad83138eeb077d8f9602670bc` (r:1 w:1) - /// Storage: unknown `0xd1d4eefa482f2ece90773426cd76c1da272ef0e72c1172a4a71b84c1f5f6c7c7` (r:1 w:1) - /// Proof Skipped: unknown `0xd1d4eefa482f2ece90773426cd76c1da272ef0e72c1172a4a71b84c1f5f6c7c7` (r:1 w:1) - /// Storage: unknown `0xd282fcd4ae056e61acbc8950a306910569f227182c41e5b88159aed160ba2a58` (r:1 w:1) - /// Proof Skipped: unknown `0xd282fcd4ae056e61acbc8950a306910569f227182c41e5b88159aed160ba2a58` (r:1 w:1) - /// Storage: unknown `0xd37f5ea81d5d617ed7490c928e4f3a1eba6f234787ba84f31e204e8733cd039f` (r:1 w:1) - /// Proof Skipped: unknown `0xd37f5ea81d5d617ed7490c928e4f3a1eba6f234787ba84f31e204e8733cd039f` (r:1 w:1) - /// Storage: unknown `0xd6780cc86f71e3b9d0f0f6977d180e26166b517ee3ee227701f9f36cccae3171` (r:1 w:1) - /// Proof Skipped: unknown `0xd6780cc86f71e3b9d0f0f6977d180e26166b517ee3ee227701f9f36cccae3171` (r:1 w:1) - /// Storage: unknown `0xd79237f18c61e22111652b0e9b809fbe8ca41552b3a927877a294a732b338f63` (r:1 w:1) - /// Proof Skipped: unknown `0xd79237f18c61e22111652b0e9b809fbe8ca41552b3a927877a294a732b338f63` (r:1 w:1) - /// Storage: unknown `0xd8825b3a03921d36a1543c344d9b3cacce95765f29c735cf3ed72dc9c37ff81b` (r:1 w:1) - /// Proof Skipped: unknown `0xd8825b3a03921d36a1543c344d9b3cacce95765f29c735cf3ed72dc9c37ff81b` (r:1 w:1) - /// Storage: unknown `0xdd012b8629cc16d3ad36b73df7dd7d38e8c11ac479b99dedffb10b5007c8049a` (r:1 w:1) - /// Proof Skipped: unknown `0xdd012b8629cc16d3ad36b73df7dd7d38e8c11ac479b99dedffb10b5007c8049a` (r:1 w:1) - /// Storage: unknown `0xdec56d85d6fffd793180a2ce033397f67fb3b9b7ac3e2b0ef6be2f15e7de435f` (r:1 w:1) - /// Proof Skipped: unknown `0xdec56d85d6fffd793180a2ce033397f67fb3b9b7ac3e2b0ef6be2f15e7de435f` (r:1 w:1) - /// Storage: unknown `0xe1f270fea944a3a9db5550d742e3acb3dd449cafb73dce65c1705d0752c1343b` (r:1 w:1) - /// Proof Skipped: unknown `0xe1f270fea944a3a9db5550d742e3acb3dd449cafb73dce65c1705d0752c1343b` (r:1 w:1) - /// Storage: unknown `0xe4002351550f1b106219729b86aa4776fb907737c9cd7e957c5ce80062a8ff8a` (r:1 w:1) - /// Proof Skipped: unknown `0xe4002351550f1b106219729b86aa4776fb907737c9cd7e957c5ce80062a8ff8a` (r:1 w:1) - /// Storage: unknown `0xe45f26671be0fb4144ed09c40b9493c4584affb2c1d1fe6cb067aa2df802027e` (r:1 w:1) - /// Proof Skipped: unknown `0xe45f26671be0fb4144ed09c40b9493c4584affb2c1d1fe6cb067aa2df802027e` (r:1 w:1) - /// Storage: unknown `0xe6b4a4991b976360dacf2c942d16326dd53584aca6ed1ae4e78f668d7b1163c1` (r:1 w:1) - /// Proof Skipped: unknown `0xe6b4a4991b976360dacf2c942d16326dd53584aca6ed1ae4e78f668d7b1163c1` (r:1 w:1) - /// Storage: unknown `0xe8150db238f56576dcf5e1b98f3915361092aa174b16e6cda3e78c28b6444dc8` (r:1 w:1) - /// Proof Skipped: unknown `0xe8150db238f56576dcf5e1b98f3915361092aa174b16e6cda3e78c28b6444dc8` (r:1 w:1) - /// Storage: unknown `0xebc5f1d9670cdeb0655d79e95c9602ec1d85ad989ce78194dfd1a31e9fb4994c` (r:1 w:1) - /// Proof Skipped: unknown `0xebc5f1d9670cdeb0655d79e95c9602ec1d85ad989ce78194dfd1a31e9fb4994c` (r:1 w:1) - /// Storage: unknown `0xed0df01311d268fc75f0da4859b6508e1c445e713847efbc18528d731316cf48` (r:1 w:1) - /// Proof Skipped: unknown `0xed0df01311d268fc75f0da4859b6508e1c445e713847efbc18528d731316cf48` (r:1 w:1) - /// Storage: unknown `0xee60c64e1e32117f948ee71d391f978e8ac98c2bd869322fc25164502e3f7a9b` (r:1 w:1) - /// Proof Skipped: unknown `0xee60c64e1e32117f948ee71d391f978e8ac98c2bd869322fc25164502e3f7a9b` (r:1 w:1) - /// Storage: unknown `0xf7e4b8a5415405a940e730546df85583c8c23956d99a3be18e09eebf3639d312` (r:1 w:1) - /// Proof Skipped: unknown `0xf7e4b8a5415405a940e730546df85583c8c23956d99a3be18e09eebf3639d312` (r:1 w:1) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Anchor::LatestEvictedDate` (r:1 w:1) + /// Proof: `Anchor::LatestEvictedDate` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Anchor::EvictedAnchorRoots` (r:100 w:100) + /// Proof: `Anchor::EvictedAnchorRoots` (`max_values`: None, `max_size`: Some(65), added: 2540, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72010000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72010000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72020000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72020000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72030000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72030000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72040000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72040000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72050000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72050000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72060000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72060000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72070000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72070000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72080000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72080000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72090000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72090000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720a0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720a0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720b0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720b0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720c0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720c0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720d0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720d0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720e0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720e0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720f0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720f0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72100000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72100000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72110000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72110000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72120000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72120000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72130000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72130000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72140000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72140000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72150000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72150000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72160000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72160000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72170000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72170000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72180000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72180000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72190000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72190000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721a0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721a0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721b0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721b0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721c0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721c0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721d0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721d0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721e0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721e0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721f0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721f0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72200000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72200000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72210000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72210000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72220000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72220000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72230000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72230000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72240000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72240000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72250000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72250000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72260000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72260000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72270000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72270000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72280000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72280000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72290000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72290000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722a0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722a0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722b0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722b0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722c0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722c0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722d0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722d0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722e0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722e0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722f0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722f0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72300000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72300000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72310000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72310000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72320000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72320000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72330000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72330000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72340000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72340000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72350000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72350000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72360000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72360000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72370000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72370000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72380000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72380000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72390000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72390000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723a0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723a0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723b0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723b0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723c0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723c0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723d0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723d0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723e0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723e0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723f0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723f0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72400000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72400000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72410000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72410000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72420000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72420000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72430000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72430000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72440000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72440000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72450000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72450000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72460000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72460000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72470000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72470000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72480000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72480000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72490000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72490000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724a0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724a0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724b0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724b0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724c0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724c0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724d0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724d0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724e0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724e0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724f0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724f0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72500000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72500000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72510000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72510000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72520000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72520000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72530000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72530000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72540000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72540000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72550000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72550000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72560000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72560000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72570000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72570000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72580000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72580000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72590000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72590000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725a0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725a0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725b0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725b0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725c0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725c0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725d0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725d0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725e0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725e0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725f0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725f0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72600000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72600000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72610000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72610000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72620000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72620000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72630000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72630000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72640000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72640000` (r:1 w:0) + /// Storage: `Anchor::LatestEvictedAnchorIndex` (r:1 w:1) + /// Proof: `Anchor::LatestEvictedAnchorIndex` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Anchor::LatestAnchorIndex` (r:1 w:0) + /// Proof: `Anchor::LatestAnchorIndex` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Anchor::AnchorIndexes` (r:100 w:100) + /// Proof: `Anchor::AnchorIndexes` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + /// Storage: `Anchor::AnchorEvictDates` (r:100 w:100) + /// Proof: `Anchor::AnchorEvictDates` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0x01d5998dcaa249dfa2a455ae4c045d761623f268227068931dbabca3732aa41f` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x01d5998dcaa249dfa2a455ae4c045d761623f268227068931dbabca3732aa41f` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x04575ee0699f1fa86cccfdcf4285aa81b9bfa0f8837cf533346d722970f1a704` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x04575ee0699f1fa86cccfdcf4285aa81b9bfa0f8837cf533346d722970f1a704` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x0959721f200e92d5090cee3c2c4546c11f9bfd16ded1e70e6781d2402880f1f3` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x0959721f200e92d5090cee3c2c4546c11f9bfd16ded1e70e6781d2402880f1f3` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x0a958b15afac1ffb0c6e73c553bd8b4ba94ad2d0cc118dcd2a7bc8802e2e772a` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x0a958b15afac1ffb0c6e73c553bd8b4ba94ad2d0cc118dcd2a7bc8802e2e772a` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x0c4c531cd9dcf8573a6350d0ac9fb060d273156bdee4fdae0043b6fee5bda27c` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x0c4c531cd9dcf8573a6350d0ac9fb060d273156bdee4fdae0043b6fee5bda27c` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x0cd3f3ee9420f9c3b2e70862996e8d02e87d1f148632a36b8f72c9548b10b856` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x0cd3f3ee9420f9c3b2e70862996e8d02e87d1f148632a36b8f72c9548b10b856` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x10876da12e1227a2c04872ce311f768aaf3e21458e6ad1c04f044c97fe8e214e` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x10876da12e1227a2c04872ce311f768aaf3e21458e6ad1c04f044c97fe8e214e` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x10b360a66313de6ab2d43019c5fd7ea0db088efb3e1d4a24d89775e66e089cff` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x10b360a66313de6ab2d43019c5fd7ea0db088efb3e1d4a24d89775e66e089cff` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x16d33ce142442dfbe857e2c9e0648d026c6bb367d467d6922c2c1133aaa3d7b8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x16d33ce142442dfbe857e2c9e0648d026c6bb367d467d6922c2c1133aaa3d7b8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x16e133fb9e42d5a2a9a2e21b2e0efd735fccb527162a21cf520c3aecd84c89ed` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x16e133fb9e42d5a2a9a2e21b2e0efd735fccb527162a21cf520c3aecd84c89ed` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x16fcb5e799a48fa04deaaaa71c85bc8e9126bd4b5dbcb3a1f8068ab14bc1c26f` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x16fcb5e799a48fa04deaaaa71c85bc8e9126bd4b5dbcb3a1f8068ab14bc1c26f` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x1b3289127bc95ed117e77d479ccd3ac4477ef8d32df7265bbd42c75bf1945464` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x1b3289127bc95ed117e77d479ccd3ac4477ef8d32df7265bbd42c75bf1945464` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x1ecb14235f21b57f49e32ac4f35a1af6a71f96867f0bc61bc5905b8d437b6bde` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x1ecb14235f21b57f49e32ac4f35a1af6a71f96867f0bc61bc5905b8d437b6bde` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x1f8b0dafc67f9d378cf0596c5d49f220e5880b9c74ccaadac2206a35ec92715a` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x1f8b0dafc67f9d378cf0596c5d49f220e5880b9c74ccaadac2206a35ec92715a` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x24a8d9c362d9365f46f899adb37f6b61134dceaa80f96a9cda6b059a1301f380` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x24a8d9c362d9365f46f899adb37f6b61134dceaa80f96a9cda6b059a1301f380` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x2a00fca93dceceb635a80a95e8f785b189a4ce35f90a17acba5d1bcacf895a84` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x2a00fca93dceceb635a80a95e8f785b189a4ce35f90a17acba5d1bcacf895a84` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x2b318def38ef5f2f8db787e365834ece79fbde70c22cf7bd6c9326995fd4c07f` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x2b318def38ef5f2f8db787e365834ece79fbde70c22cf7bd6c9326995fd4c07f` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x2fbeff7b90831a847716e729a30f028899726193b4406a1c91fce4e97beb61b5` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x2fbeff7b90831a847716e729a30f028899726193b4406a1c91fce4e97beb61b5` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x30dc983a9ad263028d0e91a8a0cf703a2a7fd3834b1102f1ff3f8c8876a207bf` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x30dc983a9ad263028d0e91a8a0cf703a2a7fd3834b1102f1ff3f8c8876a207bf` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x3187d0cdac28db7ec343a07f0b2e44fc56986f0a9c2062d5fa60f99419707bea` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x3187d0cdac28db7ec343a07f0b2e44fc56986f0a9c2062d5fa60f99419707bea` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x3596cd6b45e209629c71765c804f324ed440f7a1cb2ff6cb542156fd5d213de2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x3596cd6b45e209629c71765c804f324ed440f7a1cb2ff6cb542156fd5d213de2` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x3645890bd8ab0cc13921468d56eee7da40fbe28dc05bc30a64f05a2c03a1912e` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x3645890bd8ab0cc13921468d56eee7da40fbe28dc05bc30a64f05a2c03a1912e` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x384b604969634cf37d988e886b5267a51baeb797e09a1d1a0893e5be8fc553df` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x384b604969634cf37d988e886b5267a51baeb797e09a1d1a0893e5be8fc553df` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x3c056a888ea28c9294c91723916f5891141a824048335e32532e6605ce0457e0` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x3c056a888ea28c9294c91723916f5891141a824048335e32532e6605ce0457e0` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x3c5fd1d5c95885c6b44e0f3995886046d906821de1ed5ee95b51b17c42d3295b` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x3c5fd1d5c95885c6b44e0f3995886046d906821de1ed5ee95b51b17c42d3295b` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x3e74dfe3befcf6fa20eb902c2007ba7fd831619013aa99e016284597b896115b` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x3e74dfe3befcf6fa20eb902c2007ba7fd831619013aa99e016284597b896115b` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x42f1cff854d41b18ae379b012a1e712f036bcd839244d5c6324f12c28f6fd6e9` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x42f1cff854d41b18ae379b012a1e712f036bcd839244d5c6324f12c28f6fd6e9` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x457803d743c32f50866dbf7aabb339a1d8b6b759783b0627128f0cfd3d6c8775` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x457803d743c32f50866dbf7aabb339a1d8b6b759783b0627128f0cfd3d6c8775` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x4cb17fd2f1d1b2eff69f0ffa1a97ff13e7bf4f05a7a99dd06e503e7546b23906` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x4cb17fd2f1d1b2eff69f0ffa1a97ff13e7bf4f05a7a99dd06e503e7546b23906` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x58357c4f5a9881658ffc42faa5f48e2810169bf85c8c78011696a17b59728ef5` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x58357c4f5a9881658ffc42faa5f48e2810169bf85c8c78011696a17b59728ef5` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x5baa983aa91ad92c66e17d16e0757ec4a67ec2ce5b95f4d02ec22fba0e485da0` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x5baa983aa91ad92c66e17d16e0757ec4a67ec2ce5b95f4d02ec22fba0e485da0` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x5da83d0712f41714545470b781e0a43c65a0ac977327475baa98b5cd94938f17` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x5da83d0712f41714545470b781e0a43c65a0ac977327475baa98b5cd94938f17` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x6365aeecd6b54d3166f3df46d8c7b404711ca54b4284e8faf67eb014fa3685f8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x6365aeecd6b54d3166f3df46d8c7b404711ca54b4284e8faf67eb014fa3685f8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x683b74d821a8019cbfc9dbe47b50b0f377e0eef16dbc52f7f931ae713fd3f644` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x683b74d821a8019cbfc9dbe47b50b0f377e0eef16dbc52f7f931ae713fd3f644` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x6b02568ad8557dc3d66463abfd1d7f298a0b314fe4bf7d5be79b66768096ed90` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x6b02568ad8557dc3d66463abfd1d7f298a0b314fe4bf7d5be79b66768096ed90` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x6b05c068aecc171915a61cf59146e7f9a69b9bba39f4df50cecfeb454850b4c9` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x6b05c068aecc171915a61cf59146e7f9a69b9bba39f4df50cecfeb454850b4c9` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x6b5529ac614dcbd6113176256a4f5809eb667bddab2e22579306de0a1f83f287` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x6b5529ac614dcbd6113176256a4f5809eb667bddab2e22579306de0a1f83f287` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x6cd1381490331969f37f1e6575081f42f1bd8ae0cc79d70fc52ed178b5d75bd0` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x6cd1381490331969f37f1e6575081f42f1bd8ae0cc79d70fc52ed178b5d75bd0` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x6f5b021a9f57d7669ed7269e7d8785acf255f15785bf452a03a4decc184fd403` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x6f5b021a9f57d7669ed7269e7d8785acf255f15785bf452a03a4decc184fd403` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x764bac7888f79c071087d351a356a09cb2490cb6ea6d71f0cd391de89a885cd2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x764bac7888f79c071087d351a356a09cb2490cb6ea6d71f0cd391de89a885cd2` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7aedb653a5de5739b9d3594196693fd51653fcd59b442e0eb9f64265db188044` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7aedb653a5de5739b9d3594196693fd51653fcd59b442e0eb9f64265db188044` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7ca04bdeb932896fd908eb86d4136e9e2462575ebdf981001c1cd3ca6a2faaec` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7ca04bdeb932896fd908eb86d4136e9e2462575ebdf981001c1cd3ca6a2faaec` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7ceee738f5af899bd2f967a928019e4a0ecb8715509668dcc039badfe148b45e` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7ceee738f5af899bd2f967a928019e4a0ecb8715509668dcc039badfe148b45e` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7e700ce9c411e35485babec60c2b68f40c512bc8399c5cee0c1e4264e63f36d1` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7e700ce9c411e35485babec60c2b68f40c512bc8399c5cee0c1e4264e63f36d1` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x80c020f2e70a170ee2f34af3daeda4c2097d14a35f5b1f2d23c2287e5e930f55` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x80c020f2e70a170ee2f34af3daeda4c2097d14a35f5b1f2d23c2287e5e930f55` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x8101d04cf92ee55f6c2a798c7b16da4cc8c511fd822b13093d0f53f5523718d0` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x8101d04cf92ee55f6c2a798c7b16da4cc8c511fd822b13093d0f53f5523718d0` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x85172de32d6b5871235d50648541b1bd007807512231f9b81f25cb5e20141820` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x85172de32d6b5871235d50648541b1bd007807512231f9b81f25cb5e20141820` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x85e9ccd05d28607dcce0dc5be4f34a7d56d3b83b6c63162b2787fc0e6decf2a7` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x85e9ccd05d28607dcce0dc5be4f34a7d56d3b83b6c63162b2787fc0e6decf2a7` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x87b3d065618080e576b534cf68b60d09c4cca0b71a8b6321337cc23be47e7329` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x87b3d065618080e576b534cf68b60d09c4cca0b71a8b6321337cc23be47e7329` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x892ec564231143cc6294a8750b924df2207d91ea3508501d2bd84bee7947b9d0` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x892ec564231143cc6294a8750b924df2207d91ea3508501d2bd84bee7947b9d0` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x8980988eacf42b40c4fc8aa995ae2e059a66c6935626c3e30f1d6842335368d0` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x8980988eacf42b40c4fc8aa995ae2e059a66c6935626c3e30f1d6842335368d0` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x8db2380506697daa88c7a72906d747535ffb12c0ca2a4a6443074bb0fdd8f256` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x8db2380506697daa88c7a72906d747535ffb12c0ca2a4a6443074bb0fdd8f256` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x8e098b9b896a97df275aba887f591c3076220e02adf682c98808e4ba53e6a773` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x8e098b9b896a97df275aba887f591c3076220e02adf682c98808e4ba53e6a773` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x8e590007efc113bc10a61c478d26803cdae5572d4c70547b3c9813b3ce396826` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x8e590007efc113bc10a61c478d26803cdae5572d4c70547b3c9813b3ce396826` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x96e31df89b1f00b96c993bd9de31e32e7e59c0a185cd0b31adc4e969746c8ea6` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x96e31df89b1f00b96c993bd9de31e32e7e59c0a185cd0b31adc4e969746c8ea6` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x9ae7305289647b636a8702b2316e5482f1a807fa398687068fb653527368f9bc` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x9ae7305289647b636a8702b2316e5482f1a807fa398687068fb653527368f9bc` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x9b9660b6fc1992a09573eaa9110c4a08d40c1f439304a47b9776645bc278fc75` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x9b9660b6fc1992a09573eaa9110c4a08d40c1f439304a47b9776645bc278fc75` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xa04f2ef3bb509dfec9d7a97c4778ab2e477af9c5cbda3a1c6e57514314a3f9a5` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xa04f2ef3bb509dfec9d7a97c4778ab2e477af9c5cbda3a1c6e57514314a3f9a5` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xa16d64c1e08b47144c2c8e37872486cf440dda823e2ea05f480fedfe83060f17` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xa16d64c1e08b47144c2c8e37872486cf440dda823e2ea05f480fedfe83060f17` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xa4ad0a32c2781a59ea8a6d58e26fa7dc0b2a08f8c4c938661f5f3ccd8f8eb8ce` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xa4ad0a32c2781a59ea8a6d58e26fa7dc0b2a08f8c4c938661f5f3ccd8f8eb8ce` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xab9797fb6926376ee3b6be73e5501e0a3af18d0bc6dfca0d3b5f498602016956` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xab9797fb6926376ee3b6be73e5501e0a3af18d0bc6dfca0d3b5f498602016956` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xac4d9f6628449fe129d24b384441fdb445962d2d6bca7603fea0c20f3d04351c` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xac4d9f6628449fe129d24b384441fdb445962d2d6bca7603fea0c20f3d04351c` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xafecb421bedaa0f8bd89ef18897b77ce61738af42f8a66e3257a079a3d04bef1` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xafecb421bedaa0f8bd89ef18897b77ce61738af42f8a66e3257a079a3d04bef1` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xb292dc48cc1057cce335f1d84f295271a2b16aee7018f1bd444febd77f7e5cbb` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xb292dc48cc1057cce335f1d84f295271a2b16aee7018f1bd444febd77f7e5cbb` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xb48b9d9955158dbd87abb433511a5968c21cf78f8085088407e24d6ee26f7f56` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xb48b9d9955158dbd87abb433511a5968c21cf78f8085088407e24d6ee26f7f56` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xb5a7df612d6fb3bc16c1716414897ba5928835d883003371f02106d5a92abd78` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xb5a7df612d6fb3bc16c1716414897ba5928835d883003371f02106d5a92abd78` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xb684abf2ee5018a16a8dbef6633bcb94a07a2cdf4a173e4fec130da86e8ab987` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xb684abf2ee5018a16a8dbef6633bcb94a07a2cdf4a173e4fec130da86e8ab987` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xb86c8391d2a3eb28b9e3b603cf6929849d50e439e0bbc79781b2555f9cbaa013` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xb86c8391d2a3eb28b9e3b603cf6929849d50e439e0bbc79781b2555f9cbaa013` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xba070ba6cf5f2489f98b6841d238eee4fc403d3065b57f9e3e38ca540971024d` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xba070ba6cf5f2489f98b6841d238eee4fc403d3065b57f9e3e38ca540971024d` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xbcb96e5fc092d3ac258a81b5390671817730859598470874ef02f998518bbf58` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xbcb96e5fc092d3ac258a81b5390671817730859598470874ef02f998518bbf58` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xc008db6f6d721d80fab2eab8b6dda4f19bd5def30aa7db86dadd6eb799c2f5ad` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xc008db6f6d721d80fab2eab8b6dda4f19bd5def30aa7db86dadd6eb799c2f5ad` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xc054c4045e44e28cef1884c0aa86d0049b76eaff493a6d694394df7b0cee8136` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xc054c4045e44e28cef1884c0aa86d0049b76eaff493a6d694394df7b0cee8136` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xc315216d50f4dd95914d6d102976dc09ec4474da5c314a15f09972ded6e71ddb` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xc315216d50f4dd95914d6d102976dc09ec4474da5c314a15f09972ded6e71ddb` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xc4a2c3fa3cc7ed1611651510eb6e225abab30676f0fad28c115482c7dd61f8e0` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xc4a2c3fa3cc7ed1611651510eb6e225abab30676f0fad28c115482c7dd61f8e0` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xc6cc01d59d3c86a1c12a167e149d784295fcd13862e4afb0a39a8459e6e25561` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xc6cc01d59d3c86a1c12a167e149d784295fcd13862e4afb0a39a8459e6e25561` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xc712d8fa08dd521e5f901ca6d36134807c5ec0510e3b52e8ae5a15f7c13d2ebd` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xc712d8fa08dd521e5f901ca6d36134807c5ec0510e3b52e8ae5a15f7c13d2ebd` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xc7e2bc91ff1b307f6995683b76f1904ccdada3cf8f00528c08d4f65911c4888a` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xc7e2bc91ff1b307f6995683b76f1904ccdada3cf8f00528c08d4f65911c4888a` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xccbca45304d59a1167eaf9b459e09cffce3d90c087ee9edf8e7e2dc40349373b` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xccbca45304d59a1167eaf9b459e09cffce3d90c087ee9edf8e7e2dc40349373b` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xccc17a821dda11e5239ea8dbedee5bd6622fc8dd63ee229fc3bd2dead22e8ae2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xccc17a821dda11e5239ea8dbedee5bd6622fc8dd63ee229fc3bd2dead22e8ae2` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xccee04c4c0534d4245892ed24d7814cd14a41aeed7e94591354315f5b74d89f5` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xccee04c4c0534d4245892ed24d7814cd14a41aeed7e94591354315f5b74d89f5` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcf67e9890d936f6bd205710c9a5cedc653d88fba3c74b7a2b9fe8ce7fce0bd0c` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcf67e9890d936f6bd205710c9a5cedc653d88fba3c74b7a2b9fe8ce7fce0bd0c` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcfdb7c67ada01beee8308b04c3f32e4c078603d0c84c0e28e605a8ea56dcc362` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcfdb7c67ada01beee8308b04c3f32e4c078603d0c84c0e28e605a8ea56dcc362` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xd0d54b0c405fea6ff90809070bfd270c88e9a26ad83138eeb077d8f9602670bc` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xd0d54b0c405fea6ff90809070bfd270c88e9a26ad83138eeb077d8f9602670bc` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xd1d4eefa482f2ece90773426cd76c1da272ef0e72c1172a4a71b84c1f5f6c7c7` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xd1d4eefa482f2ece90773426cd76c1da272ef0e72c1172a4a71b84c1f5f6c7c7` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xd282fcd4ae056e61acbc8950a306910569f227182c41e5b88159aed160ba2a58` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xd282fcd4ae056e61acbc8950a306910569f227182c41e5b88159aed160ba2a58` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xd37f5ea81d5d617ed7490c928e4f3a1eba6f234787ba84f31e204e8733cd039f` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xd37f5ea81d5d617ed7490c928e4f3a1eba6f234787ba84f31e204e8733cd039f` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xd6780cc86f71e3b9d0f0f6977d180e26166b517ee3ee227701f9f36cccae3171` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xd6780cc86f71e3b9d0f0f6977d180e26166b517ee3ee227701f9f36cccae3171` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xd79237f18c61e22111652b0e9b809fbe8ca41552b3a927877a294a732b338f63` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xd79237f18c61e22111652b0e9b809fbe8ca41552b3a927877a294a732b338f63` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xd8825b3a03921d36a1543c344d9b3cacce95765f29c735cf3ed72dc9c37ff81b` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xd8825b3a03921d36a1543c344d9b3cacce95765f29c735cf3ed72dc9c37ff81b` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xdd012b8629cc16d3ad36b73df7dd7d38e8c11ac479b99dedffb10b5007c8049a` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xdd012b8629cc16d3ad36b73df7dd7d38e8c11ac479b99dedffb10b5007c8049a` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xdec56d85d6fffd793180a2ce033397f67fb3b9b7ac3e2b0ef6be2f15e7de435f` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xdec56d85d6fffd793180a2ce033397f67fb3b9b7ac3e2b0ef6be2f15e7de435f` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xe1f270fea944a3a9db5550d742e3acb3dd449cafb73dce65c1705d0752c1343b` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xe1f270fea944a3a9db5550d742e3acb3dd449cafb73dce65c1705d0752c1343b` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xe4002351550f1b106219729b86aa4776fb907737c9cd7e957c5ce80062a8ff8a` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xe4002351550f1b106219729b86aa4776fb907737c9cd7e957c5ce80062a8ff8a` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xe45f26671be0fb4144ed09c40b9493c4584affb2c1d1fe6cb067aa2df802027e` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xe45f26671be0fb4144ed09c40b9493c4584affb2c1d1fe6cb067aa2df802027e` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xe6b4a4991b976360dacf2c942d16326dd53584aca6ed1ae4e78f668d7b1163c1` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xe6b4a4991b976360dacf2c942d16326dd53584aca6ed1ae4e78f668d7b1163c1` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xe8150db238f56576dcf5e1b98f3915361092aa174b16e6cda3e78c28b6444dc8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xe8150db238f56576dcf5e1b98f3915361092aa174b16e6cda3e78c28b6444dc8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xebc5f1d9670cdeb0655d79e95c9602ec1d85ad989ce78194dfd1a31e9fb4994c` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xebc5f1d9670cdeb0655d79e95c9602ec1d85ad989ce78194dfd1a31e9fb4994c` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xed0df01311d268fc75f0da4859b6508e1c445e713847efbc18528d731316cf48` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xed0df01311d268fc75f0da4859b6508e1c445e713847efbc18528d731316cf48` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xee60c64e1e32117f948ee71d391f978e8ac98c2bd869322fc25164502e3f7a9b` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xee60c64e1e32117f948ee71d391f978e8ac98c2bd869322fc25164502e3f7a9b` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xf7e4b8a5415405a940e730546df85583c8c23956d99a3be18e09eebf3639d312` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xf7e4b8a5415405a940e730546df85583c8c23956d99a3be18e09eebf3639d312` (r:1 w:1) fn evict_anchors() -> Weight { // Proof Size summary in bytes: - // Measured: `18324` + // Measured: `18325` // Estimated: `254990` - // Minimum execution time: 1_962_944_000 picoseconds. - Weight::from_parts(1_983_843_000, 0) + // Minimum execution time: 2_020_935_000 picoseconds. + Weight::from_parts(2_047_634_000, 0) .saturating_add(Weight::from_parts(0, 254990)) .saturating_add(T::DbWeight::get().reads(504)) .saturating_add(T::DbWeight::get().writes(402)) diff --git a/runtime/centrifuge/src/weights/pallet_balances.rs b/runtime/centrifuge/src/weights/pallet_balances.rs index ca65ff4d9b..bf342fa632 100644 --- a/runtime/centrifuge/src/weights/pallet_balances.rs +++ b/runtime/centrifuge/src/weights/pallet_balances.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_balances` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_balances // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_balances.rs @@ -32,108 +31,112 @@ use core::marker::PhantomData; /// Weight functions for `pallet_balances`. pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_allow_death() -> Weight { // Proof Size summary in bytes: // Measured: `52` // Estimated: `3593` - // Minimum execution time: 86_902_000 picoseconds. - Weight::from_parts(87_693_000, 0) + // Minimum execution time: 72_405_000 picoseconds. + Weight::from_parts(73_437_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_keep_alive() -> Weight { // Proof Size summary in bytes: // Measured: `52` // Estimated: `3593` - // Minimum execution time: 65_372_000 picoseconds. - Weight::from_parts(66_354_000, 0) + // Minimum execution time: 56_827_000 picoseconds. + Weight::from_parts(58_238_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_set_balance_creating() -> Weight { // Proof Size summary in bytes: // Measured: `245` // Estimated: `3593` - // Minimum execution time: 24_876_000 picoseconds. - Weight::from_parts(25_698_000, 0) + // Minimum execution time: 20_999_000 picoseconds. + Weight::from_parts(21_651_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_set_balance_killing() -> Weight { // Proof Size summary in bytes: // Measured: `245` // Estimated: `3593` - // Minimum execution time: 37_049_000 picoseconds. - Weight::from_parts(37_640_000, 0) + // Minimum execution time: 28_343_000 picoseconds. + Weight::from_parts(29_054_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_transfer() -> Weight { // Proof Size summary in bytes: // Measured: `192` // Estimated: `6196` - // Minimum execution time: 90_669_000 picoseconds. - Weight::from_parts(91_962_000, 0) + // Minimum execution time: 75_261_000 picoseconds. + Weight::from_parts(76_302_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_all() -> Weight { // Proof Size summary in bytes: // Measured: `52` // Estimated: `3593` - // Minimum execution time: 82_043_000 picoseconds. - Weight::from_parts(82_975_000, 0) + // Minimum execution time: 71_503_000 picoseconds. + Weight::from_parts(73_437_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_unreserve() -> Weight { // Proof Size summary in bytes: // Measured: `245` // Estimated: `3593` - // Minimum execution time: 29_435_000 picoseconds. - Weight::from_parts(29_926_000, 0) + // Minimum execution time: 25_337_000 picoseconds. + Weight::from_parts(26_099_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: System Account (r:999 w:999) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:999 w:999) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `u` is `[1, 1000]`. fn upgrade_accounts(u: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `176 + u * (136 ±0)` + // Measured: `143 + u * (136 ±0)` // Estimated: `990 + u * (2603 ±0)` - // Minimum execution time: 26_910_000 picoseconds. - Weight::from_parts(27_420_000, 0) + // Minimum execution time: 23_484_000 picoseconds. + Weight::from_parts(23_684_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 13_954 - .saturating_add(Weight::from_parts(21_783_728, 0).saturating_mul(u.into())) + // Standard Error: 12_704 + .saturating_add(Weight::from_parts(19_776_076, 0).saturating_mul(u.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into())) } - - fn force_adjust_total_issuance() -> Weight { - Weight::zero() - } + fn force_adjust_total_issuance() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_776_000 picoseconds. + Weight::from_parts(9_267_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } } diff --git a/runtime/centrifuge/src/weights/pallet_block_rewards.rs b/runtime/centrifuge/src/weights/pallet_block_rewards.rs index 20531c4e25..58029e5e99 100644 --- a/runtime/centrifuge/src/weights/pallet_block_rewards.rs +++ b/runtime/centrifuge/src/weights/pallet_block_rewards.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_block_rewards` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_block_rewards // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_block_rewards.rs @@ -32,44 +31,44 @@ use core::marker::PhantomData; /// Weight functions for `pallet_block_rewards`. pub struct WeightInfo(PhantomData); impl pallet_block_rewards::WeightInfo for WeightInfo { - /// Storage: BlockRewardsBase Currency (r:1 w:0) - /// Proof: BlockRewardsBase Currency (max_values: None, max_size: Some(79), added: 2554, mode: MaxEncodedLen) - /// Storage: BlockRewardsBase Group (r:1 w:0) - /// Proof: BlockRewardsBase Group (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: BlockRewardsBase StakeAccount (r:1 w:1) - /// Proof: BlockRewardsBase StakeAccount (max_values: None, max_size: Some(123), added: 2598, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `BlockRewardsBase::Currency` (r:1 w:0) + /// Proof: `BlockRewardsBase::Currency` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`) + /// Storage: `BlockRewardsBase::Group` (r:1 w:0) + /// Proof: `BlockRewardsBase::Group` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `BlockRewardsBase::StakeAccount` (r:1 w:1) + /// Proof: `BlockRewardsBase::StakeAccount` (`max_values`: None, `max_size`: Some(123), added: 2598, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn claim_reward() -> Weight { // Proof Size summary in bytes: - // Measured: `583` + // Measured: `516` // Estimated: `6196` - // Minimum execution time: 87_612_000 picoseconds. - Weight::from_parts(89_607_000, 0) + // Minimum execution time: 84_087_000 picoseconds. + Weight::from_parts(85_410_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: BlockRewards NextSessionChanges (r:1 w:1) - /// Proof: BlockRewards NextSessionChanges (max_values: Some(1), max_size: Some(2097), added: 2592, mode: MaxEncodedLen) + /// Storage: `BlockRewards::NextSessionChanges` (r:1 w:1) + /// Proof: `BlockRewards::NextSessionChanges` (`max_values`: Some(1), `max_size`: Some(2097), added: 2592, mode: `MaxEncodedLen`) fn set_collator_reward_per_session() -> Weight { // Proof Size summary in bytes: // Measured: `41` // Estimated: `3582` - // Minimum execution time: 8_486_000 picoseconds. - Weight::from_parts(8_876_000, 0) + // Minimum execution time: 6_502_000 picoseconds. + Weight::from_parts(6_702_000, 0) .saturating_add(Weight::from_parts(0, 3582)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: BlockRewards NextSessionChanges (r:1 w:1) - /// Proof: BlockRewards NextSessionChanges (max_values: Some(1), max_size: Some(2097), added: 2592, mode: MaxEncodedLen) + /// Storage: `BlockRewards::NextSessionChanges` (r:1 w:1) + /// Proof: `BlockRewards::NextSessionChanges` (`max_values`: Some(1), `max_size`: Some(2097), added: 2592, mode: `MaxEncodedLen`) fn set_annual_treasury_inflation_rate() -> Weight { // Proof Size summary in bytes: // Measured: `41` // Estimated: `3582` - // Minimum execution time: 8_455_000 picoseconds. - Weight::from_parts(8_797_000, 0) + // Minimum execution time: 6_442_000 picoseconds. + Weight::from_parts(6_662_000, 0) .saturating_add(Weight::from_parts(0, 3582)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/centrifuge/src/weights/pallet_collator_allowlist.rs b/runtime/centrifuge/src/weights/pallet_collator_allowlist.rs index aff5eb5ae8..9d2f9f754f 100644 --- a/runtime/centrifuge/src/weights/pallet_collator_allowlist.rs +++ b/runtime/centrifuge/src/weights/pallet_collator_allowlist.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_collator_allowlist` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_collator_allowlist // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_collator_allowlist.rs @@ -32,28 +31,28 @@ use core::marker::PhantomData; /// Weight functions for `pallet_collator_allowlist`. pub struct WeightInfo(PhantomData); impl pallet_collator_allowlist::WeightInfo for WeightInfo { - /// Storage: Session NextKeys (r:1 w:0) - /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - /// Storage: CollatorAllowlist Allowlist (r:1 w:1) - /// Proof: CollatorAllowlist Allowlist (max_values: None, max_size: Some(32), added: 2507, mode: MaxEncodedLen) + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorAllowlist::Allowlist` (r:1 w:1) + /// Proof: `CollatorAllowlist::Allowlist` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) fn add() -> Weight { // Proof Size summary in bytes: - // Measured: `557` - // Estimated: `4022` - // Minimum execution time: 25_628_000 picoseconds. - Weight::from_parts(26_609_000, 0) - .saturating_add(Weight::from_parts(0, 4022)) + // Measured: `485` + // Estimated: `3950` + // Minimum execution time: 20_959_000 picoseconds. + Weight::from_parts(21_520_000, 0) + .saturating_add(Weight::from_parts(0, 3950)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: CollatorAllowlist Allowlist (r:1 w:1) - /// Proof: CollatorAllowlist Allowlist (max_values: None, max_size: Some(32), added: 2507, mode: MaxEncodedLen) + /// Storage: `CollatorAllowlist::Allowlist` (r:1 w:1) + /// Proof: `CollatorAllowlist::Allowlist` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) fn remove() -> Weight { // Proof Size summary in bytes: // Measured: `265` // Estimated: `3497` - // Minimum execution time: 19_285_000 picoseconds. - Weight::from_parts(19_817_000, 0) + // Minimum execution time: 15_138_000 picoseconds. + Weight::from_parts(15_690_000, 0) .saturating_add(Weight::from_parts(0, 3497)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/centrifuge/src/weights/pallet_collator_selection.rs b/runtime/centrifuge/src/weights/pallet_collator_selection.rs index f807c0fea8..80aad763c5 100644 --- a/runtime/centrifuge/src/weights/pallet_collator_selection.rs +++ b/runtime/centrifuge/src/weights/pallet_collator_selection.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_collator_selection` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_collator_selection // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_collator_selection.rs @@ -32,160 +31,251 @@ use core::marker::PhantomData; /// Weight functions for `pallet_collator_selection`. pub struct WeightInfo(PhantomData); impl pallet_collator_selection::WeightInfo for WeightInfo { - /// Storage: CollatorAllowlist Allowlist (r:100 w:0) - /// Proof: CollatorAllowlist Allowlist (max_values: None, max_size: Some(32), added: 2507, mode: MaxEncodedLen) - /// Storage: Session NextKeys (r:100 w:0) - /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - /// Storage: CollatorSelection Invulnerables (r:0 w:1) - /// Proof: CollatorSelection Invulnerables (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: `CollatorAllowlist::Allowlist` (r:100 w:0) + /// Proof: `CollatorAllowlist::Allowlist` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + /// Storage: `Session::NextKeys` (r:100 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::Invulnerables` (r:0 w:1) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 100]`. /// The range of component `b` is `[1, 100]`. fn set_invulnerables(b: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `499 + b * (112 ±0)` - // Estimated: `1486 + b * (2588 ±0)` - // Minimum execution time: 24_676_000 picoseconds. - Weight::from_parts(22_033_390, 0) - .saturating_add(Weight::from_parts(0, 1486)) - // Standard Error: 2_725 - .saturating_add(Weight::from_parts(5_923_329, 0).saturating_mul(b.into())) + // Measured: `426 + b * (112 ±0)` + // Estimated: `1415 + b * (2588 ±0)` + // Minimum execution time: 21_761_000 picoseconds. + Weight::from_parts(18_325_667, 0) + .saturating_add(Weight::from_parts(0, 1415)) + // Standard Error: 2_818 + .saturating_add(Weight::from_parts(6_395_759, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(b.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 2588).saturating_mul(b.into())) } - /// Storage: CollatorSelection DesiredCandidates (r:0 w:1) - /// Proof: CollatorSelection DesiredCandidates (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: `CollatorAllowlist::Allowlist` (r:1 w:0) + /// Proof: `CollatorAllowlist::Allowlist` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:1) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(961), added: 1456, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 99]`. + /// The range of component `c` is `[1, 19]`. + /// The range of component `b` is `[1, 99]`. + /// The range of component `c` is `[1, 19]`. + fn add_invulnerable(b: u32, c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `1306 + b * (37 ±0) + c * (48 ±0)` + // Estimated: `4726 + b * (37 ±0) + c * (53 ±0)` + // Minimum execution time: 59_742_000 picoseconds. + Weight::from_parts(60_284_422, 0) + .saturating_add(Weight::from_parts(0, 4726)) + // Standard Error: 460 + .saturating_add(Weight::from_parts(96_883, 0).saturating_mul(b.into())) + // Standard Error: 2_428 + .saturating_add(Weight::from_parts(90_127, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 53).saturating_mul(c.into())) + } + /// Storage: `CollatorSelection::CandidateList` (r:1 w:0) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(961), added: 1456, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:1) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// The range of component `b` is `[6, 100]`. + /// The range of component `b` is `[6, 100]`. + fn remove_invulnerable(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `285 + b * (32 ±0)` + // Estimated: `4687` + // Minimum execution time: 15_498_000 picoseconds. + Weight::from_parts(16_316_216, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 286 + .saturating_add(Weight::from_parts(61_407, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `CollatorSelection::DesiredCandidates` (r:0 w:1) + /// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn set_desired_candidates() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 13_977_000 picoseconds. - Weight::from_parts(14_647_000, 0) + // Minimum execution time: 6_773_000 picoseconds. + Weight::from_parts(7_183_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: CollatorSelection CandidacyBond (r:0 w:1) - /// Proof: CollatorSelection CandidacyBond (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) - fn set_candidacy_bond(_: u32, _: u32) -> Weight { + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:1) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(961), added: 1456, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:20 w:20) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:20) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// The range of component `c` is `[0, 20]`. + /// The range of component `k` is `[0, 20]`. + /// The range of component `c` is `[0, 20]`. + /// The range of component `k` is `[0, 20]`. + fn set_candidacy_bond(c: u32, k: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 10_489_000 picoseconds. - Weight::from_parts(10_960_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Measured: `0 + c * (201 ±0) + k * (152 ±0)` + // Estimated: `3593 + c * (848 ±15) + k * (848 ±15)` + // Minimum execution time: 13_064_000 picoseconds. + Weight::from_parts(13_555_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + // Standard Error: 112_406 + .saturating_add(Weight::from_parts(7_553_928, 0).saturating_mul(c.into())) + // Standard Error: 112_406 + .saturating_add(Weight::from_parts(7_323_334, 0).saturating_mul(k.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) + .saturating_add(Weight::from_parts(0, 848).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 848).saturating_mul(k.into())) + } + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(961), added: 1456, mode: `MaxEncodedLen`) + /// The range of component `c` is `[5, 20]`. + /// The range of component `c` is `[5, 20]`. + fn update_bond(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `529 + c * (48 ±0)` + // Estimated: `2446` + // Minimum execution time: 33_843_000 picoseconds. + Weight::from_parts(35_210_680, 0) + .saturating_add(Weight::from_parts(0, 2446)) + // Standard Error: 2_477 + .saturating_add(Weight::from_parts(89_870, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: CollatorSelection Candidates (r:1 w:1) - /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(961), added: 1456, mode: MaxEncodedLen) - /// Storage: CollatorSelection DesiredCandidates (r:1 w:0) - /// Proof: CollatorSelection DesiredCandidates (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: CollatorSelection Invulnerables (r:1 w:0) - /// Proof: CollatorSelection Invulnerables (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: CollatorAllowlist Allowlist (r:1 w:0) - /// Proof: CollatorAllowlist Allowlist (max_values: None, max_size: Some(32), added: 2507, mode: MaxEncodedLen) - /// Storage: Session NextKeys (r:1 w:0) - /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - /// Storage: CollatorSelection CandidacyBond (r:1 w:0) - /// Proof: CollatorSelection CandidacyBond (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) - /// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) - /// Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(961), added: 1456, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `CollatorAllowlist::Allowlist` (r:1 w:0) + /// Proof: `CollatorAllowlist::Allowlist` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) /// The range of component `c` is `[1, 19]`. /// The range of component `c` is `[1, 19]`. fn register_as_candidate(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1068 + c * (59 ±0)` - // Estimated: `4687 + c * (60 ±0)` - // Minimum execution time: 65_722_000 picoseconds. - Weight::from_parts(67_761_452, 0) + // Measured: `925 + c * (61 ±0)` + // Estimated: `4687 + c * (62 ±0)` + // Minimum execution time: 53_069_000 picoseconds. + Weight::from_parts(54_800_265, 0) .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 1_753 - .saturating_add(Weight::from_parts(236_704, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(6)) + // Standard Error: 1_793 + .saturating_add(Weight::from_parts(300_153, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 60).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 62).saturating_mul(c.into())) + } + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `CollatorAllowlist::Allowlist` (r:1 w:0) + /// Proof: `CollatorAllowlist::Allowlist` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(961), added: 1456, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:2) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// The range of component `c` is `[5, 20]`. + /// The range of component `c` is `[5, 20]`. + fn take_candidate_slot(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `1017 + c * (62 ±0)` + // Estimated: `4687 + c * (62 ±0)` + // Minimum execution time: 75_732_000 picoseconds. + Weight::from_parts(76_168_356, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 2_715 + .saturating_add(Weight::from_parts(286_388, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(Weight::from_parts(0, 62).saturating_mul(c.into())) } - /// Storage: CollatorSelection Candidates (r:1 w:1) - /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(961), added: 1456, mode: MaxEncodedLen) - /// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) - /// Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) - /// The range of component `c` is `[6, 20]`. - /// The range of component `c` is `[6, 20]`. + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(961), added: 1456, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// The range of component `c` is `[5, 20]`. + /// The range of component `c` is `[5, 20]`. fn leave_intent(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `549 + c * (44 ±0)` - // Estimated: `2446` - // Minimum execution time: 45_785_000 picoseconds. - Weight::from_parts(47_151_459, 0) - .saturating_add(Weight::from_parts(0, 2446)) - // Standard Error: 2_758 - .saturating_add(Weight::from_parts(89_087, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(1)) + // Measured: `476 + c * (48 ±0)` + // Estimated: `4687` + // Minimum execution time: 39_313_000 picoseconds. + Weight::from_parts(40_269_388, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 1_755 + .saturating_add(Weight::from_parts(149_791, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: System BlockWeight (r:1 w:1) - /// Proof: System BlockWeight (max_values: Some(1), max_size: Some(48), added: 543, mode: MaxEncodedLen) - /// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) - /// Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) fn note_author() -> Weight { // Proof Size summary in bytes: - // Measured: `195` + // Measured: `192` // Estimated: `6196` - // Minimum execution time: 72_164_000 picoseconds. - Weight::from_parts(73_597_000, 0) + // Minimum execution time: 60_223_000 picoseconds. + Weight::from_parts(61_394_000, 0) .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: CollatorSelection Candidates (r:1 w:0) - /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(961), added: 1456, mode: MaxEncodedLen) - /// Storage: CollatorSelection LastAuthoredBlock (r:20 w:0) - /// Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) - /// Storage: CollatorSelection Invulnerables (r:1 w:0) - /// Proof: CollatorSelection Invulnerables (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: System BlockWeight (r:1 w:1) - /// Proof: System BlockWeight (max_values: Some(1), max_size: Some(48), added: 543, mode: MaxEncodedLen) - /// Storage: System Account (r:15 w:15) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:0) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(961), added: 1456, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:20 w:0) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::DesiredCandidates` (r:1 w:0) + /// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:16 w:16) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. /// The range of component `c` is `[1, 20]`. /// The range of component `r` is `[1, 20]`. /// The range of component `c` is `[1, 20]`. fn new_session(r: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `581 + c * (98 ±0) + r * (142 ±0)` - // Estimated: `7019778708211172 + c * (2519 ±0) + r * (2259 ±9)` - // Minimum execution time: 25_227_000 picoseconds. - Weight::from_parts(25_828_000, 0) - .saturating_add(Weight::from_parts(0, 7019778708211172)) - // Standard Error: 224_935 - .saturating_add(Weight::from_parts(17_932_306, 0).saturating_mul(c.into())) + // Measured: `416 + c * (98 ±0) + r * (154 ±0)` + // Estimated: `3962574101370078 + c * (2519 ±0) + r * (2393 ±6)` + // Minimum execution time: 25_678_000 picoseconds. + Weight::from_parts(26_419_000, 0) + .saturating_add(Weight::from_parts(0, 3962574101370078)) + // Standard Error: 178_336 + .saturating_add(Weight::from_parts(16_618_722, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) - .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) .saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into())) - .saturating_add(Weight::from_parts(0, 2259).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(0, 2393).saturating_mul(r.into())) } - - fn add_invulnerable(_: u32, _: u32) -> Weight { - // Pending to generate - Weight::default() - } - - fn remove_invulnerable(_: u32) -> Weight { - // Pending to generate - Weight::default() - } - - fn update_bond(_: u32) -> Weight { - // Pending to generate - Weight::default() - } - - fn take_candidate_slot(_: u32) -> Weight { - // Pending to generate - Weight::default() - } } diff --git a/runtime/centrifuge/src/weights/pallet_collective.rs b/runtime/centrifuge/src/weights/pallet_collective.rs index 1c60d88097..c6ec0abec9 100644 --- a/runtime/centrifuge/src/weights/pallet_collective.rs +++ b/runtime/centrifuge/src/weights/pallet_collective.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_collective` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_collective // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_collective.rs @@ -32,28 +31,28 @@ use core::marker::PhantomData; /// Weight functions for `pallet_collective`. pub struct WeightInfo(PhantomData); impl pallet_collective::WeightInfo for WeightInfo { - /// Storage: Council Members (r:1 w:1) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:0) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Voting (r:100 w:100) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Prime (r:0 w:1) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Council::Members` (r:1 w:1) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:0) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Voting` (r:100 w:100) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:0 w:1) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `m` is `[0, 100]`. /// The range of component `n` is `[0, 100]`. /// The range of component `p` is `[0, 100]`. fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + m * (3232 ±0) + p * (3190 ±0)` - // Estimated: `15762 + m * (1967 ±23) + p * (4332 ±23)` - // Minimum execution time: 23_504_000 picoseconds. - Weight::from_parts(24_045_000, 0) - .saturating_add(Weight::from_parts(0, 15762)) - // Standard Error: 62_373 - .saturating_add(Weight::from_parts(4_726_718, 0).saturating_mul(m.into())) - // Standard Error: 62_373 - .saturating_add(Weight::from_parts(8_779_554, 0).saturating_mul(p.into())) + // Estimated: `15728 + m * (1967 ±24) + p * (4332 ±24)` + // Minimum execution time: 19_977_000 picoseconds. + Weight::from_parts(20_078_000, 0) + .saturating_add(Weight::from_parts(0, 15728)) + // Standard Error: 63_443 + .saturating_add(Weight::from_parts(4_761_841, 0).saturating_mul(m.into())) + // Standard Error: 63_443 + .saturating_add(Weight::from_parts(8_972_956, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(2)) @@ -61,225 +60,225 @@ impl pallet_collective::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 1967).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 4332).saturating_mul(p.into())) } - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[1, 100]`. fn execute(b: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `103 + m * (32 ±0)` - // Estimated: `1589 + m * (32 ±0)` - // Minimum execution time: 24_235_000 picoseconds. - Weight::from_parts(23_250_984, 0) - .saturating_add(Weight::from_parts(0, 1589)) - // Standard Error: 36 - .saturating_add(Weight::from_parts(1_948, 0).saturating_mul(b.into())) - // Standard Error: 371 - .saturating_add(Weight::from_parts(18_660, 0).saturating_mul(m.into())) + // Measured: `69 + m * (32 ±0)` + // Estimated: `1555 + m * (32 ±0)` + // Minimum execution time: 18_164_000 picoseconds. + Weight::from_parts(16_886_988, 0) + .saturating_add(Weight::from_parts(0, 1555)) + // Standard Error: 32 + .saturating_add(Weight::from_parts(1_693, 0).saturating_mul(b.into())) + // Standard Error: 330 + .saturating_add(Weight::from_parts(17_805, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:1 w:0) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:1 w:0) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[1, 100]`. fn propose_execute(b: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `103 + m * (32 ±0)` - // Estimated: `3569 + m * (32 ±0)` - // Minimum execution time: 28_623_000 picoseconds. - Weight::from_parts(27_427_537, 0) - .saturating_add(Weight::from_parts(0, 3569)) - // Standard Error: 44 - .saturating_add(Weight::from_parts(1_964, 0).saturating_mul(b.into())) - // Standard Error: 459 - .saturating_add(Weight::from_parts(27_792, 0).saturating_mul(m.into())) + // Measured: `69 + m * (32 ±0)` + // Estimated: `3535 + m * (32 ±0)` + // Minimum execution time: 21_801_000 picoseconds. + Weight::from_parts(20_823_477, 0) + .saturating_add(Weight::from_parts(0, 3535)) + // Standard Error: 42 + .saturating_add(Weight::from_parts(1_959, 0).saturating_mul(b.into())) + // Standard Error: 433 + .saturating_add(Weight::from_parts(29_753, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:1 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalCount (r:1 w:1) - /// Proof Skipped: Council ProposalCount (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Voting (r:0 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:1 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalCount` (r:1 w:1) + /// Proof: `Council::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Voting` (r:0 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[2, 100]`. /// The range of component `p` is `[1, 100]`. fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `393 + m * (32 ±0) + p * (36 ±0)` - // Estimated: `3785 + m * (33 ±0) + p * (36 ±0)` - // Minimum execution time: 37_019_000 picoseconds. - Weight::from_parts(36_618_582, 0) - .saturating_add(Weight::from_parts(0, 3785)) - // Standard Error: 94 - .saturating_add(Weight::from_parts(2_958, 0).saturating_mul(b.into())) - // Standard Error: 986 - .saturating_add(Weight::from_parts(25_992, 0).saturating_mul(m.into())) - // Standard Error: 973 - .saturating_add(Weight::from_parts(241_104, 0).saturating_mul(p.into())) + // Measured: `359 + m * (32 ±0) + p * (36 ±0)` + // Estimated: `3751 + m * (33 ±0) + p * (36 ±0)` + // Minimum execution time: 28_694_000 picoseconds. + Weight::from_parts(28_496_435, 0) + .saturating_add(Weight::from_parts(0, 3751)) + // Standard Error: 102 + .saturating_add(Weight::from_parts(2_863, 0).saturating_mul(b.into())) + // Standard Error: 1_066 + .saturating_add(Weight::from_parts(22_188, 0).saturating_mul(m.into())) + // Standard Error: 1_053 + .saturating_add(Weight::from_parts(250_359, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 33).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) } - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Voting` (r:1 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `m` is `[5, 100]`. fn vote(m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `842 + m * (64 ±0)` - // Estimated: `4306 + m * (64 ±0)` - // Minimum execution time: 31_509_000 picoseconds. - Weight::from_parts(32_380_933, 0) - .saturating_add(Weight::from_parts(0, 4306)) - // Standard Error: 670 - .saturating_add(Weight::from_parts(42_211, 0).saturating_mul(m.into())) + // Measured: `808 + m * (64 ±0)` + // Estimated: `4272 + m * (64 ±0)` + // Minimum execution time: 26_139_000 picoseconds. + Weight::from_parts(26_536_014, 0) + .saturating_add(Weight::from_parts(0, 4272)) + // Standard Error: 834 + .saturating_add(Weight::from_parts(47_228, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) } - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:0 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: `Council::Voting` (r:1 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:0 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_early_disapproved(m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `431 + m * (64 ±0) + p * (36 ±0)` - // Estimated: `3876 + m * (65 ±0) + p * (36 ±0)` - // Minimum execution time: 40_866_000 picoseconds. - Weight::from_parts(40_128_300, 0) - .saturating_add(Weight::from_parts(0, 3876)) - // Standard Error: 900 - .saturating_add(Weight::from_parts(35_686, 0).saturating_mul(m.into())) - // Standard Error: 878 - .saturating_add(Weight::from_parts(232_805, 0).saturating_mul(p.into())) + // Measured: `397 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `3842 + m * (65 ±0) + p * (36 ±0)` + // Minimum execution time: 30_848_000 picoseconds. + Weight::from_parts(29_242_652, 0) + .saturating_add(Weight::from_parts(0, 3842)) + // Standard Error: 964 + .saturating_add(Weight::from_parts(41_978, 0).saturating_mul(m.into())) + // Standard Error: 940 + .saturating_add(Weight::from_parts(248_368, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) } - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:1 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Council::Voting` (r:1 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:1 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `733 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` - // Estimated: `4050 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` - // Minimum execution time: 58_508_000 picoseconds. - Weight::from_parts(58_282_994, 0) - .saturating_add(Weight::from_parts(0, 4050)) - // Standard Error: 190 - .saturating_add(Weight::from_parts(2_776, 0).saturating_mul(b.into())) - // Standard Error: 2_014 - .saturating_add(Weight::from_parts(14_102, 0).saturating_mul(m.into())) - // Standard Error: 1_963 - .saturating_add(Weight::from_parts(284_218, 0).saturating_mul(p.into())) + // Measured: `699 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `4016 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` + // Minimum execution time: 44_413_000 picoseconds. + Weight::from_parts(46_317_210, 0) + .saturating_add(Weight::from_parts(0, 4016)) + // Standard Error: 118 + .saturating_add(Weight::from_parts(2_296, 0).saturating_mul(b.into())) + // Standard Error: 1_256 + .saturating_add(Weight::from_parts(27_951, 0).saturating_mul(m.into())) + // Standard Error: 1_224 + .saturating_add(Weight::from_parts(270_846, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) .saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) } - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:1 w:0) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:0 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: `Council::Voting` (r:1 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:1 w:0) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:0 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_disapproved(m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `451 + m * (64 ±0) + p * (36 ±0)` - // Estimated: `3896 + m * (65 ±0) + p * (36 ±0)` - // Minimum execution time: 44_563_000 picoseconds. - Weight::from_parts(44_023_999, 0) - .saturating_add(Weight::from_parts(0, 3896)) - // Standard Error: 807 - .saturating_add(Weight::from_parts(39_142, 0).saturating_mul(m.into())) - // Standard Error: 787 - .saturating_add(Weight::from_parts(229_511, 0).saturating_mul(p.into())) + // Measured: `417 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `3862 + m * (65 ±0) + p * (36 ±0)` + // Minimum execution time: 33_292_000 picoseconds. + Weight::from_parts(33_067_918, 0) + .saturating_add(Weight::from_parts(0, 3862)) + // Standard Error: 2_341 + .saturating_add(Weight::from_parts(24_866, 0).saturating_mul(m.into())) + // Standard Error: 2_283 + .saturating_add(Weight::from_parts(273_796, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) } - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:1 w:0) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:1 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Council::Voting` (r:1 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:1 w:0) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:1 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `753 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` - // Estimated: `4070 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` - // Minimum execution time: 62_106_000 picoseconds. - Weight::from_parts(62_287_266, 0) - .saturating_add(Weight::from_parts(0, 4070)) - // Standard Error: 141 - .saturating_add(Weight::from_parts(2_748, 0).saturating_mul(b.into())) - // Standard Error: 1_497 - .saturating_add(Weight::from_parts(32_032, 0).saturating_mul(m.into())) - // Standard Error: 1_459 - .saturating_add(Weight::from_parts(275_044, 0).saturating_mul(p.into())) + // Measured: `719 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `4036 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` + // Minimum execution time: 47_228_000 picoseconds. + Weight::from_parts(48_777_291, 0) + .saturating_add(Weight::from_parts(0, 4036)) + // Standard Error: 111 + .saturating_add(Weight::from_parts(2_409, 0).saturating_mul(b.into())) + // Standard Error: 1_174 + .saturating_add(Weight::from_parts(27_376, 0).saturating_mul(m.into())) + // Standard Error: 1_145 + .saturating_add(Weight::from_parts(271_442, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) .saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) } - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Voting (r:0 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:0 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Voting` (r:0 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:0 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `p` is `[1, 100]`. fn disapprove_proposal(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `260 + p * (32 ±0)` - // Estimated: `1745 + p * (32 ±0)` - // Minimum execution time: 23_244_000 picoseconds. - Weight::from_parts(24_758_733, 0) - .saturating_add(Weight::from_parts(0, 1745)) - // Standard Error: 752 - .saturating_add(Weight::from_parts(216_365, 0).saturating_mul(p.into())) + // Measured: `226 + p * (32 ±0)` + // Estimated: `1711 + p * (32 ±0)` + // Minimum execution time: 17_232_000 picoseconds. + Weight::from_parts(18_580_566, 0) + .saturating_add(Weight::from_parts(0, 1711)) + // Standard Error: 576 + .saturating_add(Weight::from_parts(232_682, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into())) diff --git a/runtime/centrifuge/src/weights/pallet_democracy.rs b/runtime/centrifuge/src/weights/pallet_democracy.rs index 26e89c76b4..6c6b5b09a1 100644 --- a/runtime/centrifuge/src/weights/pallet_democracy.rs +++ b/runtime/centrifuge/src/weights/pallet_democracy.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_democracy` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_democracy // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_democracy.rs @@ -32,477 +31,483 @@ use core::marker::PhantomData; /// Weight functions for `pallet_democracy`. pub struct WeightInfo(PhantomData); impl pallet_democracy::WeightInfo for WeightInfo { - /// Storage: Democracy PublicPropCount (r:1 w:1) - /// Proof: Democracy PublicPropCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy PublicProps (r:1 w:1) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Democracy Blacklist (r:1 w:0) - /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) - /// Storage: Democracy DepositOf (r:0 w:1) - /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) + /// Storage: `Democracy::PublicPropCount` (r:1 w:1) + /// Proof: `Democracy::PublicPropCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Democracy::PublicProps` (r:1 w:1) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) + /// Storage: `Democracy::Blacklist` (r:1 w:0) + /// Proof: `Democracy::Blacklist` (`max_values`: None, `max_size`: Some(3238), added: 5713, mode: `MaxEncodedLen`) + /// Storage: `Democracy::DepositOf` (r:0 w:1) + /// Proof: `Democracy::DepositOf` (`max_values`: None, `max_size`: Some(3230), added: 5705, mode: `MaxEncodedLen`) fn propose() -> Weight { // Proof Size summary in bytes: // Measured: `4768` // Estimated: `18187` - // Minimum execution time: 58_288_000 picoseconds. - Weight::from_parts(60_052_000, 0) + // Minimum execution time: 47_850_000 picoseconds. + Weight::from_parts(49_673_000, 0) .saturating_add(Weight::from_parts(0, 18187)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Democracy DepositOf (r:1 w:1) - /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) + /// Storage: `Democracy::DepositOf` (r:1 w:1) + /// Proof: `Democracy::DepositOf` (`max_values`: None, `max_size`: Some(3230), added: 5705, mode: `MaxEncodedLen`) fn second() -> Weight { // Proof Size summary in bytes: // Measured: `3523` // Estimated: `6695` - // Minimum execution time: 52_397_000 picoseconds. - Weight::from_parts(53_460_000, 0) + // Minimum execution time: 46_377_000 picoseconds. + Weight::from_parts(47_519_000, 0) .saturating_add(Weight::from_parts(0, 6695)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::VotingOf` (r:1 w:1) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) fn vote_new() -> Weight { // Proof Size summary in bytes: // Measured: `3400` // Estimated: `7260` - // Minimum execution time: 66_274_000 picoseconds. - Weight::from_parts(67_706_000, 0) + // Minimum execution time: 64_059_000 picoseconds. + Weight::from_parts(65_272_000, 0) .saturating_add(Weight::from_parts(0, 7260)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::VotingOf` (r:1 w:1) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) fn vote_existing() -> Weight { // Proof Size summary in bytes: // Measured: `3422` // Estimated: `7260` - // Minimum execution time: 72_986_000 picoseconds. - Weight::from_parts(74_649_000, 0) + // Minimum execution time: 67_406_000 picoseconds. + Weight::from_parts(69_409_000, 0) .saturating_add(Weight::from_parts(0, 7260)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy Cancellations (r:1 w:1) - /// Proof: Democracy Cancellations (max_values: None, max_size: Some(33), added: 2508, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::Cancellations` (r:1 w:1) + /// Proof: `Democracy::Cancellations` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn emergency_cancel() -> Weight { // Proof Size summary in bytes: // Measured: `333` // Estimated: `3666` - // Minimum execution time: 38_291_000 picoseconds. - Weight::from_parts(39_113_000, 0) + // Minimum execution time: 31_869_000 picoseconds. + Weight::from_parts(32_581_000, 0) .saturating_add(Weight::from_parts(0, 3666)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Democracy PublicProps (r:1 w:1) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Democracy DepositOf (r:1 w:1) - /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:3 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - /// Storage: Democracy NextExternal (r:1 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy Blacklist (r:0 w:1) - /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) + /// Storage: `Democracy::PublicProps` (r:1 w:1) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) + /// Storage: `Democracy::DepositOf` (r:1 w:1) + /// Proof: `Democracy::DepositOf` (`max_values`: None, `max_size`: Some(3230), added: 5705, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:3 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) + /// Storage: `Democracy::NextExternal` (r:1 w:1) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::Blacklist` (r:0 w:1) + /// Proof: `Democracy::Blacklist` (`max_values`: None, `max_size`: Some(3238), added: 5713, mode: `MaxEncodedLen`) fn blacklist() -> Weight { // Proof Size summary in bytes: // Measured: `6249` // Estimated: `18187` - // Minimum execution time: 146_572_000 picoseconds. - Weight::from_parts(148_636_000, 0) + // Minimum execution time: 126_165_000 picoseconds. + Weight::from_parts(128_319_000, 0) .saturating_add(Weight::from_parts(0, 18187)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(8)) } - /// Storage: Democracy NextExternal (r:1 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy Blacklist (r:1 w:0) - /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) + /// Storage: `Democracy::NextExternal` (r:1 w:1) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Democracy::Blacklist` (r:1 w:0) + /// Proof: `Democracy::Blacklist` (`max_values`: None, `max_size`: Some(3238), added: 5713, mode: `MaxEncodedLen`) fn external_propose() -> Weight { // Proof Size summary in bytes: // Measured: `3383` // Estimated: `6703` - // Minimum execution time: 17_803_000 picoseconds. - Weight::from_parts(18_475_000, 0) + // Minimum execution time: 15_780_000 picoseconds. + Weight::from_parts(16_421_000, 0) .saturating_add(Weight::from_parts(0, 6703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy NextExternal (r:0 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) + /// Storage: `Democracy::NextExternal` (r:0 w:1) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) fn external_propose_majority() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_839_000 picoseconds. - Weight::from_parts(5_140_000, 0) + // Minimum execution time: 3_878_000 picoseconds. + Weight::from_parts(4_268_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy NextExternal (r:0 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) + /// Storage: `Democracy::NextExternal` (r:0 w:1) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) fn external_propose_default() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_859_000 picoseconds. - Weight::from_parts(5_200_000, 0) + // Minimum execution time: 4_018_000 picoseconds. + Weight::from_parts(4_268_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy NextExternal (r:1 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumCount (r:1 w:1) - /// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:2) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:0 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: `Democracy::NextExternal` (r:1 w:1) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumCount` (r:1 w:1) + /// Proof: `Democracy::ReferendumCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:2) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:0 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) fn fast_track() -> Weight { // Proof Size summary in bytes: // Measured: `253` // Estimated: `3518` - // Minimum execution time: 39_533_000 picoseconds. - Weight::from_parts(40_616_000, 0) + // Minimum execution time: 30_637_000 picoseconds. + Weight::from_parts(31_138_000, 0) .saturating_add(Weight::from_parts(0, 3518)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: Democracy NextExternal (r:1 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy Blacklist (r:1 w:1) - /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Democracy::NextExternal` (r:1 w:1) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Democracy::Blacklist` (r:1 w:1) + /// Proof: `Democracy::Blacklist` (`max_values`: None, `max_size`: Some(3238), added: 5713, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn veto_external() -> Weight { // Proof Size summary in bytes: // Measured: `3486` // Estimated: `6703` - // Minimum execution time: 41_798_000 picoseconds. - Weight::from_parts(42_849_000, 0) + // Minimum execution time: 33_743_000 picoseconds. + Weight::from_parts(34_825_000, 0) .saturating_add(Weight::from_parts(0, 6703)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Democracy PublicProps (r:1 w:1) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Democracy DepositOf (r:1 w:1) - /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Democracy::PublicProps` (r:1 w:1) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) + /// Storage: `Democracy::DepositOf` (r:1 w:1) + /// Proof: `Democracy::DepositOf` (`max_values`: None, `max_size`: Some(3230), added: 5705, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn cancel_proposal() -> Weight { // Proof Size summary in bytes: // Measured: `6160` // Estimated: `18187` - // Minimum execution time: 121_095_000 picoseconds. - Weight::from_parts(122_417_000, 0) + // Minimum execution time: 104_916_000 picoseconds. + Weight::from_parts(106_740_000, 0) .saturating_add(Weight::from_parts(0, 18187)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:0 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:0 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) fn cancel_referendum() -> Weight { // Proof Size summary in bytes: // Measured: `238` // Estimated: `3518` - // Minimum execution time: 29_164_000 picoseconds. - Weight::from_parts(29_716_000, 0) + // Minimum execution time: 21_650_000 picoseconds. + Weight::from_parts(22_493_000, 0) .saturating_add(Weight::from_parts(0, 3518)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Democracy LowestUnbaked (r:1 w:1) - /// Proof: Democracy LowestUnbaked (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumCount (r:1 w:0) - /// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:99 w:0) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: `Democracy::LowestUnbaked` (r:1 w:1) + /// Proof: `Democracy::LowestUnbaked` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumCount` (r:1 w:0) + /// Proof: `Democracy::ReferendumCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:99 w:0) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) /// The range of component `r` is `[0, 99]`. fn on_initialize_base(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `211 + r * (86 ±0)` // Estimated: `1489 + r * (2676 ±0)` - // Minimum execution time: 9_948_000 picoseconds. - Weight::from_parts(12_659_875, 0) + // Minimum execution time: 7_304_000 picoseconds. + Weight::from_parts(10_862_570, 0) .saturating_add(Weight::from_parts(0, 1489)) - // Standard Error: 5_774 - .saturating_add(Weight::from_parts(4_020_914, 0).saturating_mul(r.into())) + // Standard Error: 6_674 + .saturating_add(Weight::from_parts(4_146_711, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) } - /// Storage: Democracy LowestUnbaked (r:1 w:1) - /// Proof: Democracy LowestUnbaked (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumCount (r:1 w:0) - /// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy LastTabledWasExternal (r:1 w:0) - /// Proof: Democracy LastTabledWasExternal (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: Democracy NextExternal (r:1 w:0) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy PublicProps (r:1 w:0) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:99 w:0) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: `Democracy::LowestUnbaked` (r:1 w:1) + /// Proof: `Democracy::LowestUnbaked` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumCount` (r:1 w:0) + /// Proof: `Democracy::ReferendumCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Democracy::LastTabledWasExternal` (r:1 w:0) + /// Proof: `Democracy::LastTabledWasExternal` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `Democracy::NextExternal` (r:1 w:0) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Democracy::PublicProps` (r:1 w:0) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:99 w:0) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) /// The range of component `r` is `[0, 99]`. fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `211 + r * (86 ±0)` // Estimated: `18187 + r * (2676 ±0)` - // Minimum execution time: 14_788_000 picoseconds. - Weight::from_parts(18_612_348, 0) + // Minimum execution time: 10_389_000 picoseconds. + Weight::from_parts(13_699_184, 0) .saturating_add(Weight::from_parts(0, 18187)) - // Standard Error: 6_592 - .saturating_add(Weight::from_parts(4_010_093, 0).saturating_mul(r.into())) + // Standard Error: 5_780 + .saturating_add(Weight::from_parts(4_164_228, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) } - /// Storage: Democracy VotingOf (r:3 w:3) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:99 w:99) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Democracy::VotingOf` (r:3 w:3) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:99 w:99) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) /// The range of component `r` is `[0, 99]`. fn delegate(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `764 + r * (108 ±0)` // Estimated: `19800 + r * (2676 ±0)` - // Minimum execution time: 57_287_000 picoseconds. - Weight::from_parts(62_674_495, 0) + // Minimum execution time: 50_284_000 picoseconds. + Weight::from_parts(55_797_297, 0) .saturating_add(Weight::from_parts(0, 19800)) - // Standard Error: 6_400 - .saturating_add(Weight::from_parts(5_083_063, 0).saturating_mul(r.into())) + // Standard Error: 7_012 + .saturating_add(Weight::from_parts(5_251_046, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) } - /// Storage: Democracy VotingOf (r:2 w:2) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:99 w:99) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: `Democracy::VotingOf` (r:2 w:2) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:99 w:99) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) /// The range of component `r` is `[0, 99]`. fn undelegate(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `460 + r * (108 ±0)` // Estimated: `13530 + r * (2676 ±0)` - // Minimum execution time: 28_764_000 picoseconds. - Weight::from_parts(30_005_574, 0) + // Minimum execution time: 24_035_000 picoseconds. + Weight::from_parts(24_880_328, 0) .saturating_add(Weight::from_parts(0, 13530)) - // Standard Error: 5_794 - .saturating_add(Weight::from_parts(5_046_505, 0).saturating_mul(r.into())) + // Standard Error: 6_179 + .saturating_add(Weight::from_parts(5_186_435, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) } - /// Storage: Democracy PublicProps (r:0 w:1) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) + /// Storage: `Democracy::PublicProps` (r:0 w:1) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) fn clear_public_proposals() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_009_000 picoseconds. - Weight::from_parts(5_259_000, 0) + // Minimum execution time: 4_258_000 picoseconds. + Weight::from_parts(4_428_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Democracy::VotingOf` (r:1 w:1) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `r` is `[0, 99]`. fn unlock_remove(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `492` // Estimated: `7260` - // Minimum execution time: 34_154_000 picoseconds. - Weight::from_parts(51_607_498, 0) + // Minimum execution time: 31_679_000 picoseconds. + Weight::from_parts(43_939_429, 0) .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 3_959 - .saturating_add(Weight::from_parts(70_857, 0).saturating_mul(r.into())) + // Standard Error: 2_749 + .saturating_add(Weight::from_parts(59_143, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Democracy::VotingOf` (r:1 w:1) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `r` is `[0, 99]`. fn unlock_set(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `493 + r * (22 ±0)` // Estimated: `7260` - // Minimum execution time: 47_499_000 picoseconds. - Weight::from_parts(49_792_301, 0) + // Minimum execution time: 41_618_000 picoseconds. + Weight::from_parts(43_212_793, 0) .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 1_250 - .saturating_add(Weight::from_parts(87_068, 0).saturating_mul(r.into())) + // Standard Error: 934 + .saturating_add(Weight::from_parts(88_400, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::VotingOf` (r:1 w:1) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 100]`. fn remove_vote(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `695 + r * (26 ±0)` // Estimated: `7260` - // Minimum execution time: 21_400_000 picoseconds. - Weight::from_parts(24_108_794, 0) + // Minimum execution time: 21_250_000 picoseconds. + Weight::from_parts(24_298_976, 0) .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 1_161 - .saturating_add(Weight::from_parts(92_162, 0).saturating_mul(r.into())) + // Standard Error: 1_316 + .saturating_add(Weight::from_parts(91_321, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::VotingOf` (r:1 w:1) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 100]`. fn remove_other_vote(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `695 + r * (26 ±0)` // Estimated: `7260` - // Minimum execution time: 21_480_000 picoseconds. - Weight::from_parts(24_570_310, 0) + // Minimum execution time: 21_500_000 picoseconds. + Weight::from_parts(24_479_652, 0) .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 1_237 - .saturating_add(Weight::from_parts(91_317, 0).saturating_mul(r.into())) + // Standard Error: 1_417 + .saturating_add(Weight::from_parts(92_182, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Democracy NextExternal (r:1 w:0) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Preimage StatusFor (r:1 w:0) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:0 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Democracy::NextExternal` (r:1 w:0) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:0) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:0 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn set_external_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `357` // Estimated: `3556` - // Minimum execution time: 27_020_000 picoseconds. - Weight::from_parts(27_521_000, 0) + // Minimum execution time: 24_195_000 picoseconds. + Weight::from_parts(24_666_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy NextExternal (r:1 w:0) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Democracy::NextExternal` (r:1 w:0) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn clear_external_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `253` // Estimated: `3518` - // Minimum execution time: 24_195_000 picoseconds. - Weight::from_parts(25_007_000, 0) + // Minimum execution time: 19_797_000 picoseconds. + Weight::from_parts(20_188_000, 0) .saturating_add(Weight::from_parts(0, 3518)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy PublicProps (r:1 w:0) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Preimage StatusFor (r:1 w:0) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:0 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Democracy::PublicProps` (r:1 w:0) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:0) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:0 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn set_proposal_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `4889` // Estimated: `18187` - // Minimum execution time: 53_961_000 picoseconds. - Weight::from_parts(55_092_000, 0) + // Minimum execution time: 50_986_000 picoseconds. + Weight::from_parts(53_871_000, 0) .saturating_add(Weight::from_parts(0, 18187)) - .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy PublicProps (r:1 w:0) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Democracy::PublicProps` (r:1 w:0) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn clear_proposal_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `4789` // Estimated: `18187` - // Minimum execution time: 50_304_000 picoseconds. - Weight::from_parts(51_696_000, 0) + // Minimum execution time: 47_639_000 picoseconds. + Weight::from_parts(48_401_000, 0) .saturating_add(Weight::from_parts(0, 18187)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Preimage StatusFor (r:1 w:0) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:0 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:0) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:0 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn set_referendum_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `178` // Estimated: `3556` - // Minimum execution time: 21_741_000 picoseconds. - Weight::from_parts(22_181_000, 0) + // Minimum execution time: 20_007_000 picoseconds. + Weight::from_parts(20_649_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy ReferendumInfoOf (r:1 w:0) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:0) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn clear_referendum_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `269` // Estimated: `3666` - // Minimum execution time: 26_920_000 picoseconds. - Weight::from_parts(27_501_000, 0) + // Minimum execution time: 23_243_000 picoseconds. + Weight::from_parts(23_924_000, 0) .saturating_add(Weight::from_parts(0, 3666)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/centrifuge/src/weights/pallet_elections_phragmen.rs b/runtime/centrifuge/src/weights/pallet_elections_phragmen.rs index 7878de415b..73cbcffd18 100644 --- a/runtime/centrifuge/src/weights/pallet_elections_phragmen.rs +++ b/runtime/centrifuge/src/weights/pallet_elections_phragmen.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_elections_phragmen` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_elections_phragmen // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_elections_phragmen.rs @@ -32,170 +31,170 @@ use core::marker::PhantomData; /// Weight functions for `pallet_elections_phragmen`. pub struct WeightInfo(PhantomData); impl pallet_elections_phragmen::WeightInfo for WeightInfo { - /// Storage: Elections Candidates (r:1 w:0) - /// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Members (r:1 w:0) - /// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections RunnersUp (r:1 w:0) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Voting (r:1 w:1) - /// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Elections::Candidates` (r:1 w:0) + /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Members` (r:1 w:0) + /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::RunnersUp` (r:1 w:0) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Voting` (r:1 w:1) + /// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) /// The range of component `v` is `[1, 5]`. fn vote_equal(v: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `397 + v * (80 ±0)` // Estimated: `4764 + v * (80 ±0)` - // Minimum execution time: 43_742_000 picoseconds. - Weight::from_parts(44_880_862, 0) + // Minimum execution time: 39_854_000 picoseconds. + Weight::from_parts(41_059_638, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 8_920 - .saturating_add(Weight::from_parts(116_775, 0).saturating_mul(v.into())) + // Standard Error: 9_339 + .saturating_add(Weight::from_parts(122_202, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 80).saturating_mul(v.into())) } - /// Storage: Elections Candidates (r:1 w:0) - /// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Members (r:1 w:0) - /// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections RunnersUp (r:1 w:0) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Voting (r:1 w:1) - /// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Elections::Candidates` (r:1 w:0) + /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Members` (r:1 w:0) + /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::RunnersUp` (r:1 w:0) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Voting` (r:1 w:1) + /// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) /// The range of component `v` is `[2, 5]`. fn vote_more(v: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `366 + v * (80 ±0)` // Estimated: `4764 + v * (80 ±0)` - // Minimum execution time: 61_504_000 picoseconds. - Weight::from_parts(62_534_140, 0) + // Minimum execution time: 55_103_000 picoseconds. + Weight::from_parts(56_171_173, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 15_833 - .saturating_add(Weight::from_parts(330_451, 0).saturating_mul(v.into())) + // Standard Error: 14_770 + .saturating_add(Weight::from_parts(204_563, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 80).saturating_mul(v.into())) } - /// Storage: Elections Candidates (r:1 w:0) - /// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Members (r:1 w:0) - /// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections RunnersUp (r:1 w:0) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Voting (r:1 w:1) - /// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Elections::Candidates` (r:1 w:0) + /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Members` (r:1 w:0) + /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::RunnersUp` (r:1 w:0) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Voting` (r:1 w:1) + /// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) /// The range of component `v` is `[2, 5]`. fn vote_less(v: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `398 + v * (80 ±0)` // Estimated: `4764 + v * (80 ±0)` - // Minimum execution time: 61_565_000 picoseconds. - Weight::from_parts(62_569_997, 0) + // Minimum execution time: 55_143_000 picoseconds. + Weight::from_parts(55_848_022, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 21_420 - .saturating_add(Weight::from_parts(418_807, 0).saturating_mul(v.into())) + // Standard Error: 12_961 + .saturating_add(Weight::from_parts(304_036, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 80).saturating_mul(v.into())) } - /// Storage: Elections Voting (r:1 w:1) - /// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Elections::Voting` (r:1 w:1) + /// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) fn remove_voter() -> Weight { // Proof Size summary in bytes: // Measured: `568` // Estimated: `4764` - // Minimum execution time: 64_851_000 picoseconds. - Weight::from_parts(66_063_000, 0) + // Minimum execution time: 56_095_000 picoseconds. + Weight::from_parts(57_527_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Elections Candidates (r:1 w:1) - /// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Members (r:1 w:0) - /// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections RunnersUp (r:1 w:0) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Elections::Candidates` (r:1 w:1) + /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Members` (r:1 w:0) + /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::RunnersUp` (r:1 w:0) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `c` is `[1, 20]`. fn submit_candidacy(c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1475 + c * (48 ±0)` // Estimated: `2960 + c * (48 ±0)` - // Minimum execution time: 46_947_000 picoseconds. - Weight::from_parts(48_177_216, 0) + // Minimum execution time: 40_225_000 picoseconds. + Weight::from_parts(41_460_863, 0) .saturating_add(Weight::from_parts(0, 2960)) - // Standard Error: 2_528 - .saturating_add(Weight::from_parts(73_617, 0).saturating_mul(c.into())) + // Standard Error: 2_567 + .saturating_add(Weight::from_parts(92_423, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 48).saturating_mul(c.into())) } - /// Storage: Elections Candidates (r:1 w:1) - /// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Elections::Candidates` (r:1 w:1) + /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `c` is `[1, 20]`. fn renounce_candidacy_candidate(c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `318 + c * (48 ±0)` // Estimated: `1803 + c * (48 ±0)` - // Minimum execution time: 42_820_000 picoseconds. - Weight::from_parts(43_815_110, 0) + // Minimum execution time: 35_306_000 picoseconds. + Weight::from_parts(36_290_646, 0) .saturating_add(Weight::from_parts(0, 1803)) - // Standard Error: 2_225 - .saturating_add(Weight::from_parts(67_886, 0).saturating_mul(c.into())) + // Standard Error: 2_574 + .saturating_add(Weight::from_parts(70_605, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 48).saturating_mul(c.into())) } - /// Storage: Elections Members (r:1 w:1) - /// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections RunnersUp (r:1 w:1) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:1 w:1) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:0) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Members (r:0 w:1) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Elections::Members` (r:1 w:1) + /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::RunnersUp` (r:1 w:1) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:1 w:1) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:0) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:0 w:1) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn renounce_candidacy_members() -> Weight { // Proof Size summary in bytes: - // Measured: `1655` - // Estimated: `3140` - // Minimum execution time: 59_922_000 picoseconds. - Weight::from_parts(61_054_000, 0) - .saturating_add(Weight::from_parts(0, 3140)) + // Measured: `1621` + // Estimated: `3106` + // Minimum execution time: 50_805_000 picoseconds. + Weight::from_parts(51_927_000, 0) + .saturating_add(Weight::from_parts(0, 3106)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: Elections RunnersUp (r:1 w:1) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Elections::RunnersUp` (r:1 w:1) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn renounce_candidacy_runners_up() -> Weight { // Proof Size summary in bytes: // Measured: `1023` // Estimated: `2508` - // Minimum execution time: 43_862_000 picoseconds. - Weight::from_parts(44_453_000, 0) + // Minimum execution time: 36_037_000 picoseconds. + Weight::from_parts(36_938_000, 0) .saturating_add(Weight::from_parts(0, 2508)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Benchmark Override (r:0 w:0) - /// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn remove_member_without_replacement() -> Weight { // Proof Size summary in bytes: // Measured: `0` @@ -204,95 +203,95 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn Weight::from_parts(500_000_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: Elections Members (r:1 w:1) - /// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Elections RunnersUp (r:1 w:1) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:1 w:1) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:0) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Members (r:0 w:1) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Elections::Members` (r:1 w:1) + /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Elections::RunnersUp` (r:1 w:1) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:1 w:1) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:0) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:0 w:1) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn remove_member_with_replacement() -> Weight { // Proof Size summary in bytes: - // Measured: `1758` + // Measured: `1724` // Estimated: `6196` - // Minimum execution time: 91_711_000 picoseconds. - Weight::from_parts(92_923_000, 0) + // Minimum execution time: 71_003_000 picoseconds. + Weight::from_parts(72_324_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(6)) } - /// Storage: Elections Voting (r:101 w:100) - /// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Elections Members (r:1 w:0) - /// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections RunnersUp (r:1 w:0) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Candidates (r:1 w:0) - /// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Balances Locks (r:100 w:100) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:100 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: System Account (r:100 w:100) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Elections::Voting` (r:51 w:50) + /// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Members` (r:1 w:0) + /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::RunnersUp` (r:1 w:0) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Candidates` (r:1 w:0) + /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:50 w:50) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:50 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:50 w:50) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `v` is `[50, 100]`. /// The range of component `d` is `[0, 50]`. fn clean_defunct_voters(v: u32, d: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1226 + v * (457 ±0)` - // Estimated: `4528 + d * (1 ±0) + v * (3774 ±0)` - // Minimum execution time: 3_621_267_000 picoseconds. - Weight::from_parts(23_452_856, 0) - .saturating_add(Weight::from_parts(0, 4528)) - // Standard Error: 37_618 - .saturating_add(Weight::from_parts(72_346_699, 0).saturating_mul(v.into())) - // Standard Error: 37_618 - .saturating_add(Weight::from_parts(59_701, 0).saturating_mul(d.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(v.into()))) - .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(v.into()))) - .saturating_add(Weight::from_parts(0, 1).saturating_mul(d.into())) - .saturating_add(Weight::from_parts(0, 3774).saturating_mul(v.into())) + // Measured: `0 + d * (494 ±0) + v * (62 ±0)` + // Estimated: `8032 + d * (3774 ±0) + v * (27 ±0)` + // Minimum execution time: 5_440_000 picoseconds. + Weight::from_parts(5_851_000, 0) + .saturating_add(Weight::from_parts(0, 8032)) + // Standard Error: 7_490 + .saturating_add(Weight::from_parts(452_735, 0).saturating_mul(v.into())) + // Standard Error: 16_345 + .saturating_add(Weight::from_parts(54_859_868, 0).saturating_mul(d.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(d.into()))) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(d.into()))) + .saturating_add(Weight::from_parts(0, 3774).saturating_mul(d.into())) + .saturating_add(Weight::from_parts(0, 27).saturating_mul(v.into())) } - /// Storage: Elections Candidates (r:1 w:1) - /// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Members (r:1 w:1) - /// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections RunnersUp (r:1 w:1) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Voting (r:101 w:0) - /// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:0) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: System Account (r:3 w:3) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Elections ElectionRounds (r:1 w:1) - /// Proof Skipped: Elections ElectionRounds (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Members (r:0 w:1) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:0 w:1) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Elections::Candidates` (r:1 w:1) + /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Members` (r:1 w:1) + /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::RunnersUp` (r:1 w:1) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Voting` (r:101 w:0) + /// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:0) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:3 w:3) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Elections::ElectionRounds` (r:1 w:1) + /// Proof: `Elections::ElectionRounds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:0 w:1) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:0 w:1) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `c` is `[1, 20]`. /// The range of component `v` is `[1, 100]`. /// The range of component `e` is `[100, 500]`. fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + e * (23 ±0) + v * (241 ±0)` - // Estimated: `9351 + c * (154 ±35) + e * (19 ±0) + v * (2526 ±2)` - // Minimum execution time: 315_237_000 picoseconds. - Weight::from_parts(317_170_000, 0) - .saturating_add(Weight::from_parts(0, 9351)) - // Standard Error: 644_016 - .saturating_add(Weight::from_parts(2_254_848, 0).saturating_mul(c.into())) - // Standard Error: 128_112 - .saturating_add(Weight::from_parts(7_562_842, 0).saturating_mul(v.into())) - // Standard Error: 27_821 - .saturating_add(Weight::from_parts(166_058, 0).saturating_mul(e.into())) + // Estimated: `9323 + c * (154 ±35) + e * (19 ±1) + v * (2526 ±7)` + // Minimum execution time: 288_329_000 picoseconds. + Weight::from_parts(291_985_000, 0) + .saturating_add(Weight::from_parts(0, 9323)) + // Standard Error: 776_472 + .saturating_add(Weight::from_parts(1_654_140, 0).saturating_mul(c.into())) + // Standard Error: 154_461 + .saturating_add(Weight::from_parts(8_253_388, 0).saturating_mul(v.into())) + // Standard Error: 33_543 + .saturating_add(Weight::from_parts(253_004, 0).saturating_mul(e.into())) .saturating_add(T::DbWeight::get().reads(17)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into()))) .saturating_add(T::DbWeight::get().writes(7)) diff --git a/runtime/centrifuge/src/weights/pallet_fees.rs b/runtime/centrifuge/src/weights/pallet_fees.rs index f84498d6fb..9f1aa979eb 100644 --- a/runtime/centrifuge/src/weights/pallet_fees.rs +++ b/runtime/centrifuge/src/weights/pallet_fees.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_fees` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_fees // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_fees.rs @@ -32,14 +31,14 @@ use core::marker::PhantomData; /// Weight functions for `pallet_fees`. pub struct WeightInfo(PhantomData); impl pallet_fees::WeightInfo for WeightInfo { - /// Storage: Fees FeeBalances (r:0 w:1) - /// Proof: Fees FeeBalances (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) + /// Storage: `Fees::FeeBalances` (r:0 w:1) + /// Proof: `Fees::FeeBalances` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) fn set_fee() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 12_433_000 picoseconds. - Weight::from_parts(12_853_000, 0) + // Minimum execution time: 8_786_000 picoseconds. + Weight::from_parts(9_347_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/centrifuge/src/weights/pallet_identity.rs b/runtime/centrifuge/src/weights/pallet_identity.rs index 6e896c8d09..6b04d4e622 100644 --- a/runtime/centrifuge/src/weights/pallet_identity.rs +++ b/runtime/centrifuge/src/weights/pallet_identity.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_identity` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_identity // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_identity.rs @@ -32,266 +31,389 @@ use core::marker::PhantomData; /// Weight functions for `pallet_identity`. pub struct WeightInfo(PhantomData); impl pallet_identity::WeightInfo for WeightInfo { - /// Storage: Identity Registrars (r:1 w:1) - /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) + /// Storage: `Identity::Registrars` (r:1 w:1) + /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 19]`. fn add_registrar(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `31 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 17_663_000 picoseconds. - Weight::from_parts(18_911_170, 0) + // Minimum execution time: 11_461_000 picoseconds. + Weight::from_parts(12_329_958, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 2_246 - .saturating_add(Weight::from_parts(100_619, 0).saturating_mul(r.into())) + // Standard Error: 1_709 + .saturating_add(Weight::from_parts(85_260, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity IdentityOf (r:1 w:1) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[0, 100]`. - fn set_identity(_: u32) -> Weight { - Weight::default() + fn set_identity(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `6977 + r * (5 ±0)` + // Estimated: `11037` + // Minimum execution time: 177_182_000 picoseconds. + Weight::from_parts(184_291_666, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 10_202 + .saturating_add(Weight::from_parts(118_377, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity IdentityOf (r:1 w:0) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) - /// Storage: Identity SubsOf (r:1 w:1) - /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) - /// Storage: Identity SuperOf (r:100 w:100) - /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:100 w:100) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 100]`. fn set_subs_new(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `100` - // Estimated: `11003 + s * (2589 ±0)` - // Minimum execution time: 13_345_000 picoseconds. - Weight::from_parts(34_731_499, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 11_024 - .saturating_add(Weight::from_parts(4_877_205, 0).saturating_mul(s.into())) + // Estimated: `11037 + s * (2589 ±0)` + // Minimum execution time: 13_866_000 picoseconds. + Weight::from_parts(32_107_917, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 5_302 + .saturating_add(Weight::from_parts(5_097_828, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(s.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) .saturating_add(Weight::from_parts(0, 2589).saturating_mul(s.into())) } - /// Storage: Identity IdentityOf (r:1 w:0) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) - /// Storage: Identity SubsOf (r:1 w:1) - /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) - /// Storage: Identity SuperOf (r:0 w:100) - /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:0 w:100) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) /// The range of component `p` is `[0, 100]`. fn set_subs_old(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `193 + p * (32 ±0)` - // Estimated: `11003` - // Minimum execution time: 13_194_000 picoseconds. - Weight::from_parts(33_549_505, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 4_655 - .saturating_add(Weight::from_parts(1_987_029, 0).saturating_mul(p.into())) + // Estimated: `11037` + // Minimum execution time: 13_595_000 picoseconds. + Weight::from_parts(31_078_104, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 4_131 + .saturating_add(Weight::from_parts(2_071_635, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) } - /// Storage: Identity SubsOf (r:1 w:1) - /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) - /// Storage: Identity IdentityOf (r:1 w:1) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) - /// Storage: Identity SuperOf (r:0 w:100) - /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:0 w:100) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. /// The range of component `s` is `[0, 100]`. - /// The range of component `x` is `[0, 100]`. - fn clear_identity(_: u32, _: u32) -> Weight { - Weight::default() + fn clear_identity(r: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `7069 + r * (5 ±0) + s * (32 ±0)` + // Estimated: `11037` + // Minimum execution time: 82_014_000 picoseconds. + Weight::from_parts(82_257_399, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 8_823 + .saturating_add(Weight::from_parts(137_193, 0).saturating_mul(r.into())) + // Standard Error: 1_721 + .saturating_add(Weight::from_parts(2_055_434, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) } - /// Storage: Identity Registrars (r:1 w:0) - /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) - /// Storage: Identity IdentityOf (r:1 w:1) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: `Identity::Registrars` (r:1 w:0) + /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[0, 100]`. - fn request_judgement(_: u32) -> Weight { - Weight::default() + fn request_judgement(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `6967 + r * (57 ±0)` + // Estimated: `11037` + // Minimum execution time: 118_782_000 picoseconds. + Weight::from_parts(122_396_298, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 8_997 + .saturating_add(Weight::from_parts(131_018, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity IdentityOf (r:1 w:1) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[0, 100]`. - fn cancel_request(_: u32) -> Weight { - Weight::default() + fn cancel_request(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `6998` + // Estimated: `11037` + // Minimum execution time: 114_965_000 picoseconds. + Weight::from_parts(119_931_535, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 8_210 + .saturating_add(Weight::from_parts(90_229, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity Registrars (r:1 w:1) - /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) + /// Storage: `Identity::Registrars` (r:1 w:1) + /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 19]`. fn set_fee(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `88 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 10_850_000 picoseconds. - Weight::from_parts(11_366_293, 0) + // Minimum execution time: 8_085_000 picoseconds. + Weight::from_parts(8_745_689, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 1_331 - .saturating_add(Weight::from_parts(85_609, 0).saturating_mul(r.into())) + // Standard Error: 1_017 + .saturating_add(Weight::from_parts(77_434, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity Registrars (r:1 w:1) - /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) + /// Storage: `Identity::Registrars` (r:1 w:1) + /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 19]`. fn set_account_id(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `88 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 10_229_000 picoseconds. - Weight::from_parts(10_656_339, 0) + // Minimum execution time: 8_666_000 picoseconds. + Weight::from_parts(9_025_881, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 1_019 - .saturating_add(Weight::from_parts(66_335, 0).saturating_mul(r.into())) + // Standard Error: 866 + .saturating_add(Weight::from_parts(69_178, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity Registrars (r:1 w:1) - /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) + /// Storage: `Identity::Registrars` (r:1 w:1) + /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 19]`. fn set_fields(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `88 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 9_718_000 picoseconds. - Weight::from_parts(10_311_018, 0) + // Minimum execution time: 8_466_000 picoseconds. + Weight::from_parts(8_930_474, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 997 - .saturating_add(Weight::from_parts(67_502, 0).saturating_mul(r.into())) + // Standard Error: 909 + .saturating_add(Weight::from_parts(61_820, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity Registrars (r:1 w:0) - /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) - /// Storage: Identity IdentityOf (r:1 w:1) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: `Identity::Registrars` (r:1 w:0) + /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 19]`. - /// The range of component `x` is `[0, 100]`. - fn provide_judgement(_: u32) -> Weight { - Weight::default() + fn provide_judgement(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `7045 + r * (57 ±0)` + // Estimated: `11037` + // Minimum execution time: 153_066_000 picoseconds. + Weight::from_parts(158_933_479, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 11_349 + .saturating_add(Weight::from_parts(55_251, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity SubsOf (r:1 w:1) - /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) - /// Storage: Identity IdentityOf (r:1 w:1) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Identity SuperOf (r:0 w:100) - /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:0 w:100) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. /// The range of component `s` is `[0, 100]`. - /// The range of component `x` is `[0, 100]`. - fn kill_identity(_: u32, _: u32) -> Weight { - Weight::default() + fn kill_identity(r: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `7396 + r * (15 ±0) + s * (32 ±0)` + // Estimated: `11037` + // Minimum execution time: 102_231_000 picoseconds. + Weight::from_parts(102_236_164, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 8_449 + .saturating_add(Weight::from_parts(197_958, 0).saturating_mul(r.into())) + // Standard Error: 1_648 + .saturating_add(Weight::from_parts(2_070_834, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) } - /// Storage: Identity IdentityOf (r:1 w:0) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) - /// Storage: Identity SuperOf (r:1 w:1) - /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) - /// Storage: Identity SubsOf (r:1 w:1) - /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:1 w:1) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 99]`. fn add_sub(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `474 + s * (36 ±0)` - // Estimated: `11003` - // Minimum execution time: 43_691_000 picoseconds. - Weight::from_parts(48_595_541, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 1_082 - .saturating_add(Weight::from_parts(63_570, 0).saturating_mul(s.into())) + // Estimated: `11037` + // Minimum execution time: 37_360_000 picoseconds. + Weight::from_parts(42_407_134, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 1_241 + .saturating_add(Weight::from_parts(71_942, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Identity IdentityOf (r:1 w:0) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) - /// Storage: Identity SuperOf (r:1 w:1) - /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:1 w:1) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) /// The range of component `s` is `[1, 100]`. fn rename_sub(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `590 + s * (3 ±0)` - // Estimated: `11003` - // Minimum execution time: 17_713_000 picoseconds. - Weight::from_parts(20_016_934, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 599 - .saturating_add(Weight::from_parts(20_412, 0).saturating_mul(s.into())) + // Estimated: `11037` + // Minimum execution time: 18_885_000 picoseconds. + Weight::from_parts(20_897_159, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 581 + .saturating_add(Weight::from_parts(22_219, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity IdentityOf (r:1 w:0) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) - /// Storage: Identity SuperOf (r:1 w:1) - /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) - /// Storage: Identity SubsOf (r:1 w:1) - /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:1 w:1) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) /// The range of component `s` is `[1, 100]`. fn remove_sub(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `637 + s * (35 ±0)` - // Estimated: `11003` - // Minimum execution time: 47_178_000 picoseconds. - Weight::from_parts(50_189_943, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 860 - .saturating_add(Weight::from_parts(55_429, 0).saturating_mul(s.into())) + // Estimated: `11037` + // Minimum execution time: 41_738_000 picoseconds. + Weight::from_parts(44_337_160, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 846 + .saturating_add(Weight::from_parts(56_189, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Identity SuperOf (r:1 w:1) - /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) - /// Storage: Identity SubsOf (r:1 w:1) - /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Identity::SuperOf` (r:1 w:1) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 99]`. fn quit_sub(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `770 + s * (37 ±0)` // Estimated: `6723` - // Minimum execution time: 34_454_000 picoseconds. - Weight::from_parts(37_088_382, 0) + // Minimum execution time: 31_408_000 picoseconds. + Weight::from_parts(33_717_882, 0) .saturating_add(Weight::from_parts(0, 6723)) - // Standard Error: 775 - .saturating_add(Weight::from_parts(58_414, 0).saturating_mul(s.into())) + // Standard Error: 786 + .saturating_add(Weight::from_parts(58_377, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - - fn add_username_authority() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn remove_username_authority() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn set_username_for() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn accept_username() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn remove_expired_approval() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn set_primary_username() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn remove_dangling_username() -> cumulus_primitives_core::Weight { - Weight::default() - } + /// Storage: `Identity::UsernameAuthorities` (r:0 w:1) + /// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + fn add_username_authority() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 9_908_000 picoseconds. + Weight::from_parts(10_289_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::UsernameAuthorities` (r:1 w:1) + /// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + fn remove_username_authority() -> Weight { + // Proof Size summary in bytes: + // Measured: `79` + // Estimated: `3517` + // Minimum execution time: 12_994_000 picoseconds. + Weight::from_parts(13_535_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::UsernameAuthorities` (r:1 w:1) + /// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Identity::AccountOfUsername` (r:1 w:1) + /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) + /// Storage: `Identity::PendingUsernames` (r:1 w:0) + /// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + fn set_username_for() -> Weight { + // Proof Size summary in bytes: + // Measured: `79` + // Estimated: `11037` + // Minimum execution time: 80_831_000 picoseconds. + Weight::from_parts(83_435_000, 0) + .saturating_add(Weight::from_parts(0, 11037)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Identity::PendingUsernames` (r:1 w:1) + /// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `Identity::AccountOfUsername` (r:0 w:1) + /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) + fn accept_username() -> Weight { + // Proof Size summary in bytes: + // Measured: `114` + // Estimated: `11037` + // Minimum execution time: 29_946_000 picoseconds. + Weight::from_parts(30_658_000, 0) + .saturating_add(Weight::from_parts(0, 11037)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Identity::PendingUsernames` (r:1 w:1) + /// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) + fn remove_expired_approval() -> Weight { + // Proof Size summary in bytes: + // Measured: `114` + // Estimated: `3550` + // Minimum execution time: 18_815_000 picoseconds. + Weight::from_parts(19_336_000, 0) + .saturating_add(Weight::from_parts(0, 3550)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::AccountOfUsername` (r:1 w:0) + /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + fn set_primary_username() -> Weight { + // Proof Size summary in bytes: + // Measured: `256` + // Estimated: `11037` + // Minimum execution time: 24_736_000 picoseconds. + Weight::from_parts(25_086_000, 0) + .saturating_add(Weight::from_parts(0, 11037)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::AccountOfUsername` (r:1 w:1) + /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + fn remove_dangling_username() -> Weight { + // Proof Size summary in bytes: + // Measured: `97` + // Estimated: `11037` + // Minimum execution time: 17_082_000 picoseconds. + Weight::from_parts(17_633_000, 0) + .saturating_add(Weight::from_parts(0, 11037)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/runtime/centrifuge/src/weights/pallet_interest_accrual.rs b/runtime/centrifuge/src/weights/pallet_interest_accrual.rs index bad7a31ba5..769034448e 100644 --- a/runtime/centrifuge/src/weights/pallet_interest_accrual.rs +++ b/runtime/centrifuge/src/weights/pallet_interest_accrual.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_interest_accrual` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_interest_accrual // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_interest_accrual.rs @@ -37,10 +36,10 @@ impl pallet_interest_accrual::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 732_000 picoseconds. - Weight::from_parts(247_332, 0) + // Minimum execution time: 791_000 picoseconds. + Weight::from_parts(164_950, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 669 - .saturating_add(Weight::from_parts(634_648, 0).saturating_mul(n.into())) + // Standard Error: 465 + .saturating_add(Weight::from_parts(729_925, 0).saturating_mul(n.into())) } } diff --git a/runtime/centrifuge/src/weights/pallet_investments.rs b/runtime/centrifuge/src/weights/pallet_investments.rs index e23a8cc107..2a6edaa5e8 100644 --- a/runtime/centrifuge/src/weights/pallet_investments.rs +++ b/runtime/centrifuge/src/weights/pallet_investments.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_investments` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_investments // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_investments.rs @@ -32,115 +31,115 @@ use core::marker::PhantomData; /// Weight functions for `pallet_investments`. pub struct WeightInfo(PhantomData); impl pallet_investments::WeightInfo for WeightInfo { - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: Investments ActiveInvestOrders (r:1 w:1) - /// Proof: Investments ActiveInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InvestOrders (r:1 w:1) - /// Proof: Investments InvestOrders (max_values: None, max_size: Some(112), added: 2587, mode: MaxEncodedLen) - /// Storage: Investments InvestOrderId (r:1 w:0) - /// Proof: Investments InvestOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveInvestOrders` (r:1 w:1) + /// Proof: `Investments::ActiveInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InvestOrders` (r:1 w:1) + /// Proof: `Investments::InvestOrders` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`) + /// Storage: `Investments::InvestOrderId` (r:1 w:0) + /// Proof: `Investments::InvestOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) fn update_invest_order() -> Weight { // Proof Size summary in bytes: - // Measured: `2155` + // Measured: `2057` // Estimated: `6198` - // Minimum execution time: 99_696_000 picoseconds. - Weight::from_parts(101_550_000, 0) + // Minimum execution time: 93_985_000 picoseconds. + Weight::from_parts(95_147_000, 0) .saturating_add(Weight::from_parts(0, 6198)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: Investments ActiveRedeemOrders (r:1 w:1) - /// Proof: Investments ActiveRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments RedeemOrders (r:1 w:1) - /// Proof: Investments RedeemOrders (max_values: None, max_size: Some(112), added: 2587, mode: MaxEncodedLen) - /// Storage: Investments RedeemOrderId (r:1 w:0) - /// Proof: Investments RedeemOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveRedeemOrders` (r:1 w:1) + /// Proof: `Investments::ActiveRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::RedeemOrders` (r:1 w:1) + /// Proof: `Investments::RedeemOrders` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`) + /// Storage: `Investments::RedeemOrderId` (r:1 w:0) + /// Proof: `Investments::RedeemOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) fn update_redeem_order() -> Weight { // Proof Size summary in bytes: - // Measured: `2051` + // Measured: `1981` // Estimated: `6198` - // Minimum execution time: 99_916_000 picoseconds. - Weight::from_parts(101_609_000, 0) + // Minimum execution time: 93_976_000 picoseconds. + Weight::from_parts(94_897_000, 0) .saturating_add(Weight::from_parts(0, 6198)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: Investments InvestOrders (r:1 w:1) - /// Proof: Investments InvestOrders (max_values: None, max_size: Some(112), added: 2587, mode: MaxEncodedLen) - /// Storage: Investments InvestOrderId (r:1 w:0) - /// Proof: Investments InvestOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Investments ClearedInvestOrders (r:10 w:0) - /// Proof: Investments ClearedInvestOrders (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: ForeignInvestments ForeignInvestmentInfo (r:1 w:1) - /// Proof: ForeignInvestments ForeignInvestmentInfo (max_values: None, max_size: Some(161), added: 2636, mode: MaxEncodedLen) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `Investments::InvestOrders` (r:1 w:1) + /// Proof: `Investments::InvestOrders` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`) + /// Storage: `Investments::InvestOrderId` (r:1 w:0) + /// Proof: `Investments::InvestOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Investments::ClearedInvestOrders` (r:10 w:0) + /// Proof: `Investments::ClearedInvestOrders` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ForeignInvestments::ForeignInvestmentInfo` (r:1 w:1) + /// Proof: `ForeignInvestments::ForeignInvestmentInfo` (`max_values`: None, `max_size`: Some(161), added: 2636, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 10]`. fn collect_investments(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2458 + n * (44 ±0)` + // Measured: `2388 + n * (44 ±0)` // Estimated: `6198 + n * (2555 ±0)` - // Minimum execution time: 112_299_000 picoseconds. - Weight::from_parts(108_143_715, 0) + // Minimum execution time: 103_373_000 picoseconds. + Weight::from_parts(99_437_572, 0) .saturating_add(Weight::from_parts(0, 6198)) - // Standard Error: 30_952 - .saturating_add(Weight::from_parts(5_272_673, 0).saturating_mul(n.into())) + // Standard Error: 19_681 + .saturating_add(Weight::from_parts(5_637_768, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 2555).saturating_mul(n.into())) } - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: Investments RedeemOrders (r:1 w:1) - /// Proof: Investments RedeemOrders (max_values: None, max_size: Some(112), added: 2587, mode: MaxEncodedLen) - /// Storage: Investments RedeemOrderId (r:1 w:0) - /// Proof: Investments RedeemOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Investments ClearedRedeemOrders (r:10 w:0) - /// Proof: Investments ClearedRedeemOrders (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: ForeignInvestments ForeignRedemptionInfo (r:1 w:1) - /// Proof: ForeignInvestments ForeignRedemptionInfo (max_values: None, max_size: Some(161), added: 2636, mode: MaxEncodedLen) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `Investments::RedeemOrders` (r:1 w:1) + /// Proof: `Investments::RedeemOrders` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`) + /// Storage: `Investments::RedeemOrderId` (r:1 w:0) + /// Proof: `Investments::RedeemOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Investments::ClearedRedeemOrders` (r:10 w:0) + /// Proof: `Investments::ClearedRedeemOrders` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ForeignInvestments::ForeignRedemptionInfo` (r:1 w:1) + /// Proof: `ForeignInvestments::ForeignRedemptionInfo` (`max_values`: None, `max_size`: Some(161), added: 2636, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 10]`. fn collect_redemptions(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2495 + n * (44 ±0)` + // Measured: `2397 + n * (44 ±0)` // Estimated: `6198 + n * (2555 ±0)` - // Minimum execution time: 111_098_000 picoseconds. - Weight::from_parts(107_238_198, 0) + // Minimum execution time: 100_808_000 picoseconds. + Weight::from_parts(95_697_939, 0) .saturating_add(Weight::from_parts(0, 6198)) - // Standard Error: 22_296 - .saturating_add(Weight::from_parts(5_129_577, 0).saturating_mul(n.into())) + // Standard Error: 19_798 + .saturating_add(Weight::from_parts(5_639_662, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(4)) diff --git a/runtime/centrifuge/src/weights/pallet_keystore.rs b/runtime/centrifuge/src/weights/pallet_keystore.rs index 59abe86f0f..074c2e85de 100644 --- a/runtime/centrifuge/src/weights/pallet_keystore.rs +++ b/runtime/centrifuge/src/weights/pallet_keystore.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_keystore` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_keystore // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_keystore.rs @@ -32,54 +31,54 @@ use core::marker::PhantomData; /// Weight functions for `pallet_keystore`. pub struct WeightInfo(PhantomData); impl pallet_keystore::WeightInfo for WeightInfo { - /// Storage: Keystore KeyDeposit (r:1 w:0) - /// Proof: Keystore KeyDeposit (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Keystore Keys (r:10 w:10) - /// Proof: Keystore Keys (max_values: None, max_size: Some(120), added: 2595, mode: MaxEncodedLen) - /// Storage: Keystore LastKeyByPurpose (r:0 w:1) - /// Proof: Keystore LastKeyByPurpose (max_values: None, max_size: Some(97), added: 2572, mode: MaxEncodedLen) + /// Storage: `Keystore::KeyDeposit` (r:1 w:0) + /// Proof: `Keystore::KeyDeposit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Keystore::Keys` (r:10 w:10) + /// Proof: `Keystore::Keys` (`max_values`: None, `max_size`: Some(120), added: 2595, mode: `MaxEncodedLen`) + /// Storage: `Keystore::LastKeyByPurpose` (r:0 w:1) + /// Proof: `Keystore::LastKeyByPurpose` (`max_values`: None, `max_size`: Some(97), added: 2572, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 10]`. fn add_keys(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `250` + // Measured: `216` // Estimated: `3593 + n * (2595 ±0)` - // Minimum execution time: 45_615_000 picoseconds. - Weight::from_parts(18_633_396, 0) + // Minimum execution time: 37_760_000 picoseconds. + Weight::from_parts(16_409_452, 0) .saturating_add(Weight::from_parts(0, 3593)) - // Standard Error: 9_297 - .saturating_add(Weight::from_parts(28_119_544, 0).saturating_mul(n.into())) + // Standard Error: 9_527 + .saturating_add(Weight::from_parts(22_637_672, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) .saturating_add(Weight::from_parts(0, 2595).saturating_mul(n.into())) } - /// Storage: Keystore Keys (r:10 w:10) - /// Proof: Keystore Keys (max_values: None, max_size: Some(120), added: 2595, mode: MaxEncodedLen) + /// Storage: `Keystore::Keys` (r:10 w:10) + /// Proof: `Keystore::Keys` (`max_values`: None, `max_size`: Some(120), added: 2595, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 10]`. fn revoke_keys(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `148 + n * (75 ±0)` + // Measured: `114 + n * (75 ±0)` // Estimated: `990 + n * (2595 ±0)` - // Minimum execution time: 22_512_000 picoseconds. - Weight::from_parts(10_223_210, 0) + // Minimum execution time: 17_162_000 picoseconds. + Weight::from_parts(8_240_640, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 11_426 - .saturating_add(Weight::from_parts(13_493_728, 0).saturating_mul(n.into())) + // Standard Error: 15_142 + .saturating_add(Weight::from_parts(9_969_400, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) .saturating_add(Weight::from_parts(0, 2595).saturating_mul(n.into())) } - /// Storage: Keystore KeyDeposit (r:0 w:1) - /// Proof: Keystore KeyDeposit (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + /// Storage: `Keystore::KeyDeposit` (r:0 w:1) + /// Proof: `Keystore::KeyDeposit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn set_deposit() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 11_932_000 picoseconds. - Weight::from_parts(12_193_000, 0) + // Minimum execution time: 7_244_000 picoseconds. + Weight::from_parts(7_645_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/centrifuge/src/weights/pallet_liquidity_rewards.rs b/runtime/centrifuge/src/weights/pallet_liquidity_rewards.rs index eb11e62d40..88c7aa8513 100644 --- a/runtime/centrifuge/src/weights/pallet_liquidity_rewards.rs +++ b/runtime/centrifuge/src/weights/pallet_liquidity_rewards.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_liquidity_rewards` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_liquidity_rewards // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_liquidity_rewards.rs @@ -32,126 +31,126 @@ use core::marker::PhantomData; /// Weight functions for `pallet_liquidity_rewards`. pub struct WeightInfo(PhantomData); impl pallet_liquidity_rewards::WeightInfo for WeightInfo { - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: LiquidityRewards EndOfEpoch (r:1 w:0) - /// Proof: LiquidityRewards EndOfEpoch (max_values: Some(1), max_size: Some(8), added: 503, 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: `LiquidityRewards::EndOfEpoch` (r:1 w:0) + /// Proof: `LiquidityRewards::EndOfEpoch` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) /// The range of component `x` is `[0, 20]`. /// The range of component `y` is `[0, 50]`. /// The range of component `z` is `[0, 50]`. fn on_initialize(x: u32, y: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `295` + // Measured: `262` // Estimated: `1493` - // Minimum execution time: 9_388_000 picoseconds. - Weight::from_parts(9_766_167, 0) + // Minimum execution time: 6_501_000 picoseconds. + Weight::from_parts(6_914_210, 0) .saturating_add(Weight::from_parts(0, 1493)) - // Standard Error: 620 - .saturating_add(Weight::from_parts(4_012, 0).saturating_mul(x.into())) - // Standard Error: 254 - .saturating_add(Weight::from_parts(500, 0).saturating_mul(y.into())) - // Standard Error: 254 - .saturating_add(Weight::from_parts(10_715, 0).saturating_mul(z.into())) + // Standard Error: 473 + .saturating_add(Weight::from_parts(1_250, 0).saturating_mul(x.into())) + // Standard Error: 194 + .saturating_add(Weight::from_parts(626, 0).saturating_mul(y.into())) + // Standard Error: 194 + .saturating_add(Weight::from_parts(7_112, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) } - /// Storage: LiquidityRewardsBase Currency (r:1 w:1) - /// Proof: LiquidityRewardsBase Currency (max_values: None, max_size: Some(863), added: 3338, mode: MaxEncodedLen) - /// Storage: LiquidityRewardsBase Group (r:1 w:1) - /// Proof: LiquidityRewardsBase Group (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) - /// Storage: LiquidityRewardsBase StakeAccount (r:1 w:1) - /// Proof: LiquidityRewardsBase StakeAccount (max_values: None, max_size: Some(143), added: 2618, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:1 w:0) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + /// Storage: `LiquidityRewardsBase::Currency` (r:1 w:1) + /// Proof: `LiquidityRewardsBase::Currency` (`max_values`: None, `max_size`: Some(863), added: 3338, mode: `MaxEncodedLen`) + /// Storage: `LiquidityRewardsBase::Group` (r:1 w:1) + /// Proof: `LiquidityRewardsBase::Group` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `LiquidityRewardsBase::StakeAccount` (r:1 w:1) + /// Proof: `LiquidityRewardsBase::StakeAccount` (`max_values`: None, `max_size`: Some(143), added: 2618, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:1 w:0) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) fn stake() -> Weight { // Proof Size summary in bytes: - // Measured: `539` - // Estimated: `4328` - // Minimum execution time: 40_445_000 picoseconds. - Weight::from_parts(41_457_000, 0) - .saturating_add(Weight::from_parts(0, 4328)) + // Measured: `467` + // Estimated: `4407` + // Minimum execution time: 36_218_000 picoseconds. + Weight::from_parts(37_270_000, 0) + .saturating_add(Weight::from_parts(0, 4407)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: LiquidityRewardsBase Currency (r:1 w:1) - /// Proof: LiquidityRewardsBase Currency (max_values: None, max_size: Some(863), added: 3338, mode: MaxEncodedLen) - /// Storage: LiquidityRewardsBase Group (r:1 w:1) - /// Proof: LiquidityRewardsBase Group (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) - /// Storage: LiquidityRewardsBase StakeAccount (r:1 w:1) - /// Proof: LiquidityRewardsBase StakeAccount (max_values: None, max_size: Some(143), added: 2618, mode: MaxEncodedLen) + /// Storage: `LiquidityRewardsBase::Currency` (r:1 w:1) + /// Proof: `LiquidityRewardsBase::Currency` (`max_values`: None, `max_size`: Some(863), added: 3338, mode: `MaxEncodedLen`) + /// Storage: `LiquidityRewardsBase::Group` (r:1 w:1) + /// Proof: `LiquidityRewardsBase::Group` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `LiquidityRewardsBase::StakeAccount` (r:1 w:1) + /// Proof: `LiquidityRewardsBase::StakeAccount` (`max_values`: None, `max_size`: Some(143), added: 2618, mode: `MaxEncodedLen`) fn unstake() -> Weight { // Proof Size summary in bytes: // Measured: `176` // Estimated: `4328` - // Minimum execution time: 28_393_000 picoseconds. - Weight::from_parts(29_205_000, 0) + // Minimum execution time: 24_386_000 picoseconds. + Weight::from_parts(25_398_000, 0) .saturating_add(Weight::from_parts(0, 4328)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: LiquidityRewardsBase Currency (r:1 w:0) - /// Proof: LiquidityRewardsBase Currency (max_values: None, max_size: Some(863), added: 3338, mode: MaxEncodedLen) - /// Storage: LiquidityRewardsBase Group (r:1 w:0) - /// Proof: LiquidityRewardsBase Group (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) - /// Storage: LiquidityRewardsBase StakeAccount (r:1 w:1) - /// Proof: LiquidityRewardsBase StakeAccount (max_values: None, max_size: Some(143), added: 2618, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `LiquidityRewardsBase::Currency` (r:1 w:0) + /// Proof: `LiquidityRewardsBase::Currency` (`max_values`: None, `max_size`: Some(863), added: 3338, mode: `MaxEncodedLen`) + /// Storage: `LiquidityRewardsBase::Group` (r:1 w:0) + /// Proof: `LiquidityRewardsBase::Group` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `LiquidityRewardsBase::StakeAccount` (r:1 w:1) + /// Proof: `LiquidityRewardsBase::StakeAccount` (`max_values`: None, `max_size`: Some(143), added: 2618, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn claim_reward() -> Weight { // Proof Size summary in bytes: // Measured: `449` // Estimated: `4328` - // Minimum execution time: 58_579_000 picoseconds. - Weight::from_parts(59_621_000, 0) + // Minimum execution time: 51_947_000 picoseconds. + Weight::from_parts(53_051_000, 0) .saturating_add(Weight::from_parts(0, 4328)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: LiquidityRewards NextEpochChanges (r:1 w:1) - /// Proof: LiquidityRewards NextEpochChanges (max_values: Some(1), max_size: Some(2078), added: 2573, mode: MaxEncodedLen) + /// Storage: `LiquidityRewards::NextEpochChanges` (r:1 w:1) + /// Proof: `LiquidityRewards::NextEpochChanges` (`max_values`: Some(1), `max_size`: Some(2078), added: 2573, mode: `MaxEncodedLen`) fn set_distributed_reward() -> Weight { // Proof Size summary in bytes: - // Measured: `142` + // Measured: `109` // Estimated: `3563` - // Minimum execution time: 9_067_000 picoseconds. - Weight::from_parts(9_397_000, 0) + // Minimum execution time: 6_522_000 picoseconds. + Weight::from_parts(6_903_000, 0) .saturating_add(Weight::from_parts(0, 3563)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: LiquidityRewards NextEpochChanges (r:1 w:1) - /// Proof: LiquidityRewards NextEpochChanges (max_values: Some(1), max_size: Some(2078), added: 2573, mode: MaxEncodedLen) + /// Storage: `LiquidityRewards::NextEpochChanges` (r:1 w:1) + /// Proof: `LiquidityRewards::NextEpochChanges` (`max_values`: Some(1), `max_size`: Some(2078), added: 2573, mode: `MaxEncodedLen`) fn set_epoch_duration() -> Weight { // Proof Size summary in bytes: - // Measured: `142` + // Measured: `109` // Estimated: `3563` - // Minimum execution time: 8_927_000 picoseconds. - Weight::from_parts(9_368_000, 0) + // Minimum execution time: 6_492_000 picoseconds. + Weight::from_parts(6_773_000, 0) .saturating_add(Weight::from_parts(0, 3563)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: LiquidityRewards NextEpochChanges (r:1 w:1) - /// Proof: LiquidityRewards NextEpochChanges (max_values: Some(1), max_size: Some(2078), added: 2573, mode: MaxEncodedLen) + /// Storage: `LiquidityRewards::NextEpochChanges` (r:1 w:1) + /// Proof: `LiquidityRewards::NextEpochChanges` (`max_values`: Some(1), `max_size`: Some(2078), added: 2573, mode: `MaxEncodedLen`) fn set_group_weight() -> Weight { // Proof Size summary in bytes: - // Measured: `142` + // Measured: `109` // Estimated: `3563` - // Minimum execution time: 9_437_000 picoseconds. - Weight::from_parts(9_738_000, 0) + // Minimum execution time: 6_823_000 picoseconds. + Weight::from_parts(6_923_000, 0) .saturating_add(Weight::from_parts(0, 3563)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: LiquidityRewards NextEpochChanges (r:1 w:1) - /// Proof: LiquidityRewards NextEpochChanges (max_values: Some(1), max_size: Some(2078), added: 2573, mode: MaxEncodedLen) + /// Storage: `LiquidityRewards::NextEpochChanges` (r:1 w:1) + /// Proof: `LiquidityRewards::NextEpochChanges` (`max_values`: Some(1), `max_size`: Some(2078), added: 2573, mode: `MaxEncodedLen`) fn set_currency_group() -> Weight { // Proof Size summary in bytes: - // Measured: `142` + // Measured: `109` // Estimated: `3563` - // Minimum execution time: 9_458_000 picoseconds. - Weight::from_parts(9_919_000, 0) + // Minimum execution time: 6_773_000 picoseconds. + Weight::from_parts(7_103_000, 0) .saturating_add(Weight::from_parts(0, 3563)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/centrifuge/src/weights/pallet_loans.rs b/runtime/centrifuge/src/weights/pallet_loans.rs index 31cfec0e8f..09cc66a1d7 100644 --- a/runtime/centrifuge/src/weights/pallet_loans.rs +++ b/runtime/centrifuge/src/weights/pallet_loans.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_loans` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_loans // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_loans.rs @@ -32,370 +31,368 @@ use core::marker::PhantomData; /// Weight functions for `pallet_loans`. pub struct WeightInfo(PhantomData); impl pallet_loans::WeightInfo for WeightInfo { - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, 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: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Loans LastLoanId (r:1 w:1) - /// Proof: Loans LastLoanId (max_values: None, max_size: Some(32), added: 2507, mode: MaxEncodedLen) - /// Storage: Loans CreatedLoan (r:0 w:1) - /// Proof: Loans CreatedLoan (max_values: None, max_size: Some(244), added: 2719, mode: MaxEncodedLen) - /// Storage: Uniques Account (r:0 w:2) - /// Proof: Uniques Account (max_values: None, max_size: Some(104), added: 2579, mode: MaxEncodedLen) - /// Storage: Uniques ItemPriceOf (r:0 w:1) - /// Proof: Uniques ItemPriceOf (max_values: None, max_size: Some(105), added: 2580, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, 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: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Loans::LastLoanId` (r:1 w:1) + /// Proof: `Loans::LastLoanId` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + /// Storage: `Loans::CreatedLoan` (r:0 w:1) + /// Proof: `Loans::CreatedLoan` (`max_values`: None, `max_size`: Some(245), added: 2720, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Account` (r:0 w:2) + /// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ItemPriceOf` (r:0 w:1) + /// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(105), added: 2580, mode: `MaxEncodedLen`) fn create() -> Weight { // Proof Size summary in bytes: // Measured: `1228` // Estimated: `4278` - // Minimum execution time: 81_361_000 picoseconds. - Weight::from_parts(82_764_000, 0) + // Minimum execution time: 74_619_000 picoseconds. + Weight::from_parts(76_393_000, 0) .saturating_add(Weight::from_parts(0, 4278)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(6)) } - /// Storage: Loans CreatedLoan (r:1 w:1) - /// Proof: Loans CreatedLoan (max_values: None, max_size: Some(244), added: 2719, 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: InterestAccrual Rates (r:1 w:1) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(36002), added: 36497, mode: MaxEncodedLen) - /// Storage: InterestAccrual LastUpdated (r:1 w:0) - /// Proof: InterestAccrual LastUpdated (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Loans PortfolioValuation (r:1 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:1) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Loans::CreatedLoan` (r:1 w:1) + /// Proof: `Loans::CreatedLoan` (`max_values`: None, `max_size`: Some(245), added: 2720, 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: `InterestAccrual::Rates` (r:1 w:1) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(36002), added: 36497, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::LastUpdated` (r:1 w:0) + /// Proof: `InterestAccrual::LastUpdated` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Loans::PortfolioValuation` (r:1 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:1) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. fn borrow(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `38281 + n * (340 ±0)` - // Estimated: `375491 + n * (340 ±0)` - // Minimum execution time: 256_918_000 picoseconds. - Weight::from_parts(268_479_323, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 51_464 - .saturating_add(Weight::from_parts(1_090_521, 0).saturating_mul(n.into())) + // Measured: `38081 + n * (340 ±0)` + // Estimated: `376491` + // Minimum execution time: 257_271_000 picoseconds. + Weight::from_parts(271_593_289, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 56_742 + .saturating_add(Weight::from_parts(66_655, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(7)) - .saturating_add(Weight::from_parts(0, 340).saturating_mul(n.into())) } - /// Storage: Loans PortfolioValuation (r:1 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:1) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, 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: InterestAccrual Rates (r:1 w:0) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(36002), added: 36497, mode: MaxEncodedLen) - /// Storage: InterestAccrual LastUpdated (r:1 w:0) - /// Proof: InterestAccrual LastUpdated (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Loans::PortfolioValuation` (r:1 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:1) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, 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: `InterestAccrual::Rates` (r:1 w:0) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(36002), added: 36497, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::LastUpdated` (r:1 w:0) + /// Proof: `InterestAccrual::LastUpdated` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. fn repay(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `38434 + n * (340 ±0)` - // Estimated: `375491 + n * (340 ±0)` - // Minimum execution time: 190_325_000 picoseconds. - Weight::from_parts(196_524_248, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 35_556 - .saturating_add(Weight::from_parts(847_252, 0).saturating_mul(n.into())) + // Measured: `38267 + n * (340 ±0)` + // Estimated: `376491` + // Minimum execution time: 191_979_000 picoseconds. + Weight::from_parts(195_609_642, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 24_834 + .saturating_add(Weight::from_parts(914_255, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(5)) - .saturating_add(Weight::from_parts(0, 340).saturating_mul(n.into())) } - /// Storage: Loans PortfolioValuation (r:1 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:1) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, mode: MaxEncodedLen) - /// Storage: Loans WriteOffPolicy (r:1 w:0) - /// Proof: Loans WriteOffPolicy (max_values: None, max_size: Some(5126), added: 7601, 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: InterestAccrual Rates (r:1 w:1) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(36002), added: 36497, mode: MaxEncodedLen) - /// Storage: InterestAccrual LastUpdated (r:1 w:0) - /// Proof: InterestAccrual LastUpdated (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: `Loans::PortfolioValuation` (r:1 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:1) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, mode: `MaxEncodedLen`) + /// Storage: `Loans::WriteOffPolicy` (r:1 w:0) + /// Proof: `Loans::WriteOffPolicy` (`max_values`: None, `max_size`: Some(5126), added: 7601, 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: `InterestAccrual::Rates` (r:1 w:1) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(36002), added: 36497, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::LastUpdated` (r:1 w:0) + /// Proof: `InterestAccrual::LastUpdated` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. fn write_off(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `41141 + n * (340 ±0)` - // Estimated: `375491` - // Minimum execution time: 365_260_000 picoseconds. - Weight::from_parts(384_352_915, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 54_381 - .saturating_add(Weight::from_parts(843_515, 0).saturating_mul(n.into())) + // Measured: `41068 + n * (340 ±0)` + // Estimated: `376491` + // Minimum execution time: 291_074_000 picoseconds. + Weight::from_parts(306_451_616, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 65_729 + .saturating_add(Weight::from_parts(889_240, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: Loans PortfolioValuation (r:1 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:1) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, mode: MaxEncodedLen) - /// Storage: Loans WriteOffPolicy (r:1 w:0) - /// Proof: Loans WriteOffPolicy (max_values: None, max_size: Some(5126), added: 7601, 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: InterestAccrual Rates (r:1 w:1) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(36002), added: 36497, mode: MaxEncodedLen) - /// Storage: InterestAccrual LastUpdated (r:1 w:0) - /// Proof: InterestAccrual LastUpdated (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `Loans::PortfolioValuation` (r:1 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:1) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, mode: `MaxEncodedLen`) + /// Storage: `Loans::WriteOffPolicy` (r:1 w:0) + /// Proof: `Loans::WriteOffPolicy` (`max_values`: None, `max_size`: Some(5126), added: 7601, 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: `InterestAccrual::Rates` (r:1 w:1) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(36002), added: 36497, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::LastUpdated` (r:1 w:0) + /// Proof: `InterestAccrual::LastUpdated` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. fn admin_write_off(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `41392 + n * (340 ±0)` - // Estimated: `375491` - // Minimum execution time: 381_480_000 picoseconds. - Weight::from_parts(401_491_647, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 66_983 - .saturating_add(Weight::from_parts(913_592, 0).saturating_mul(n.into())) + // Measured: `41319 + n * (340 ±0)` + // Estimated: `376491` + // Minimum execution time: 336_618_000 picoseconds. + Weight::from_parts(351_659_527, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 59_611 + .saturating_add(Weight::from_parts(790_271, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:0) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, 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: PoolSystem NotedChange (r:0 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(5184), added: 7659, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:0) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, 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: `PoolSystem::NotedChange` (r:0 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. fn propose_loan_mutation(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `971 + n * (316 ±0)` - // Estimated: `375491` - // Minimum execution time: 47_219_000 picoseconds. - Weight::from_parts(48_107_583, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 8_388 - .saturating_add(Weight::from_parts(606_236, 0).saturating_mul(n.into())) + // Estimated: `376491` + // Minimum execution time: 41_297_000 picoseconds. + Weight::from_parts(42_125_690, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 5_612 + .saturating_add(Weight::from_parts(468_060, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PoolSystem NotedChange (r:1 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(5184), added: 7659, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: Loans PortfolioValuation (r:1 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:1) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, 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: InterestAccrual Rates (r:1 w:0) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(36002), added: 36497, mode: MaxEncodedLen) - /// Storage: InterestAccrual LastUpdated (r:1 w:0) - /// Proof: InterestAccrual LastUpdated (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: `PoolSystem::NotedChange` (r:1 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `Loans::PortfolioValuation` (r:1 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:1) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, 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: `InterestAccrual::Rates` (r:1 w:0) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(36002), added: 36497, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::LastUpdated` (r:1 w:0) + /// Proof: `InterestAccrual::LastUpdated` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. fn apply_loan_mutation(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `37477 + n * (340 ±0)` - // Estimated: `375491` - // Minimum execution time: 101_429_000 picoseconds. - Weight::from_parts(103_774_947, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 19_205 - .saturating_add(Weight::from_parts(742_675, 0).saturating_mul(n.into())) + // Measured: `37404 + n * (340 ±0)` + // Estimated: `376491` + // Minimum execution time: 121_217_000 picoseconds. + Weight::from_parts(123_415_693, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 16_707 + .saturating_add(Weight::from_parts(571_387, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Loans CreatedLoan (r:1 w:0) - /// Proof: Loans CreatedLoan (max_values: None, max_size: Some(244), added: 2719, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:1) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, mode: MaxEncodedLen) - /// Storage: Loans PortfolioValuation (r:1 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: InterestAccrual Rates (r:1 w:1) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(36002), added: 36497, mode: MaxEncodedLen) - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Loans ClosedLoan (r:0 w:1) - /// Proof: Loans ClosedLoan (max_values: None, max_size: Some(280), added: 2755, mode: MaxEncodedLen) - /// Storage: Uniques Account (r:0 w:2) - /// Proof: Uniques Account (max_values: None, max_size: Some(104), added: 2579, mode: MaxEncodedLen) - /// Storage: Uniques ItemPriceOf (r:0 w:1) - /// Proof: Uniques ItemPriceOf (max_values: None, max_size: Some(105), added: 2580, mode: MaxEncodedLen) + /// Storage: `Loans::CreatedLoan` (r:1 w:0) + /// Proof: `Loans::CreatedLoan` (`max_values`: None, `max_size`: Some(245), added: 2720, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:1) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, mode: `MaxEncodedLen`) + /// Storage: `Loans::PortfolioValuation` (r:1 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::Rates` (r:1 w:1) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(36002), added: 36497, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Loans::ClosedLoan` (r:0 w:1) + /// Proof: `Loans::ClosedLoan` (`max_values`: None, `max_size`: Some(281), added: 2756, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Account` (r:0 w:2) + /// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ItemPriceOf` (r:0 w:1) + /// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(105), added: 2580, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. fn close(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `37337 + n * (373 ±0)` - // Estimated: `375491` - // Minimum execution time: 145_201_000 picoseconds. - Weight::from_parts(153_265_392, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 29_077 - .saturating_add(Weight::from_parts(654_059, 0).saturating_mul(n.into())) + // Measured: `37264 + n * (373 ±0)` + // Estimated: `376491` + // Minimum execution time: 134_531_000 picoseconds. + Weight::from_parts(142_641_726, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 26_601 + .saturating_add(Weight::from_parts(601_280, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(8)) } - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, 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: PoolSystem NotedChange (r:0 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(5184), added: 7659, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, 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: `PoolSystem::NotedChange` (r:0 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) fn propose_write_off_policy() -> Weight { // Proof Size summary in bytes: // Measured: `478` // Estimated: `4278` - // Minimum execution time: 105_717_000 picoseconds. - Weight::from_parts(106_769_000, 0) + // Minimum execution time: 99_716_000 picoseconds. + Weight::from_parts(100_969_000, 0) .saturating_add(Weight::from_parts(0, 4278)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PoolSystem NotedChange (r:1 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(5184), added: 7659, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: Loans WriteOffPolicy (r:0 w:1) - /// Proof: Loans WriteOffPolicy (max_values: None, max_size: Some(5126), added: 7601, mode: MaxEncodedLen) + /// Storage: `PoolSystem::NotedChange` (r:1 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `Loans::WriteOffPolicy` (r:0 w:1) + /// Proof: `Loans::WriteOffPolicy` (`max_values`: None, `max_size`: Some(5126), added: 7601, mode: `MaxEncodedLen`) fn apply_write_off_policy() -> Weight { // Proof Size summary in bytes: // Measured: `4854` // Estimated: `8649` - // Minimum execution time: 115_765_000 picoseconds. - Weight::from_parts(116_718_000, 0) + // Minimum execution time: 131_546_000 picoseconds. + Weight::from_parts(132_908_000, 0) .saturating_add(Weight::from_parts(0, 8649)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: InterestAccrual Rates (r:1 w:0) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(36002), added: 36497, mode: MaxEncodedLen) - /// Storage: OraclePriceCollection Collection (r:1 w:0) - /// Proof: OraclePriceCollection Collection (max_values: None, max_size: Some(7542), added: 10017, mode: MaxEncodedLen) - /// Storage: OraclePriceCollection CollectionInfo (r:1 w:0) - /// Proof: OraclePriceCollection CollectionInfo (max_values: None, max_size: Some(3058), added: 5533, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:0) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, 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 PortfolioValuation (r:0 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::Rates` (r:1 w:0) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(36002), added: 36497, mode: `MaxEncodedLen`) + /// Storage: `OraclePriceCollection::Collection` (r:1 w:0) + /// Proof: `OraclePriceCollection::Collection` (`max_values`: None, `max_size`: Some(7542), added: 10017, mode: `MaxEncodedLen`) + /// Storage: `OraclePriceCollection::CollectionInfo` (r:1 w:0) + /// Proof: `OraclePriceCollection::CollectionInfo` (`max_values`: None, `max_size`: Some(3058), added: 5533, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:0) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, 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::PortfolioValuation` (r:0 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 10]`. fn update_portfolio_valuation(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `37026 + n * (353 ±0)` - // Estimated: `375491` - // Minimum execution time: 94_215_000 picoseconds. - Weight::from_parts(86_429_502, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 15_048 - .saturating_add(Weight::from_parts(10_740_788, 0).saturating_mul(n.into())) + // Measured: `36953 + n * (353 ±0)` + // Estimated: `376491` + // Minimum execution time: 110_657_000 picoseconds. + Weight::from_parts(80_744_391, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 40_449 + .saturating_add(Weight::from_parts(34_591_694, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Loans PortfolioValuation (r:1 w:0) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:0) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, 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: InterestAccrual Rates (r:1 w:0) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(36002), added: 36497, mode: MaxEncodedLen) - /// Storage: InterestAccrual LastUpdated (r:1 w:0) - /// Proof: InterestAccrual LastUpdated (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Loans CreatedLoan (r:1 w:0) - /// Proof: Loans CreatedLoan (max_values: None, max_size: Some(244), added: 2719, mode: MaxEncodedLen) - /// Storage: PoolSystem NotedChange (r:0 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(5184), added: 7659, mode: MaxEncodedLen) + /// Storage: `Loans::PortfolioValuation` (r:1 w:0) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:0) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, 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: `InterestAccrual::Rates` (r:1 w:0) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(36002), added: 36497, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::LastUpdated` (r:1 w:0) + /// Proof: `InterestAccrual::LastUpdated` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Loans::CreatedLoan` (r:1 w:0) + /// Proof: `Loans::CreatedLoan` (`max_values`: None, `max_size`: Some(245), added: 2720, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::NotedChange` (r:0 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) /// The range of component `n` is `[2, 8]`. fn propose_transfer_debt(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `37144 + n * (340 ±0)` - // Estimated: `375491` - // Minimum execution time: 289_098_000 picoseconds. - Weight::from_parts(300_966_124, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 63_572 - .saturating_add(Weight::from_parts(867_391, 0).saturating_mul(n.into())) + // Measured: `37071 + n * (340 ±0)` + // Estimated: `376491` + // Minimum execution time: 306_813_000 picoseconds. + Weight::from_parts(320_875_517, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 85_096 + .saturating_add(Weight::from_parts(1_049_642, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PoolSystem NotedChange (r:1 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(5184), added: 7659, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: Loans PortfolioValuation (r:1 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:1) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, 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: InterestAccrual Rates (r:1 w:1) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(36002), added: 36497, mode: MaxEncodedLen) - /// Storage: InterestAccrual LastUpdated (r:1 w:0) - /// Proof: InterestAccrual LastUpdated (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Loans CreatedLoan (r:1 w:1) - /// Proof: Loans CreatedLoan (max_values: None, max_size: Some(244), added: 2719, mode: MaxEncodedLen) + /// Storage: `PoolSystem::NotedChange` (r:1 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `Loans::PortfolioValuation` (r:1 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:1) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, 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: `InterestAccrual::Rates` (r:1 w:1) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(36002), added: 36497, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::LastUpdated` (r:1 w:0) + /// Proof: `InterestAccrual::LastUpdated` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Loans::CreatedLoan` (r:1 w:1) + /// Proof: `Loans::CreatedLoan` (`max_values`: None, `max_size`: Some(245), added: 2720, mode: `MaxEncodedLen`) /// The range of component `n` is `[2, 8]`. fn apply_transfer_debt(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `37805 + n * (340 ±0)` - // Estimated: `375491` - // Minimum execution time: 296_362_000 picoseconds. - Weight::from_parts(305_922_343, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 89_267 - .saturating_add(Weight::from_parts(1_930_308, 0).saturating_mul(n.into())) + // Measured: `37732 + n * (340 ±0)` + // Estimated: `376491` + // Minimum execution time: 317_713_000 picoseconds. + Weight::from_parts(330_762_786, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 82_499 + .saturating_add(Weight::from_parts(726_621, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: Loans CreatedLoan (r:1 w:1) - /// Proof: Loans CreatedLoan (max_values: None, max_size: Some(244), added: 2719, 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: InterestAccrual Rates (r:1 w:1) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(36002), added: 36497, mode: MaxEncodedLen) - /// Storage: InterestAccrual LastUpdated (r:1 w:0) - /// Proof: InterestAccrual LastUpdated (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Loans PortfolioValuation (r:1 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:1) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, mode: MaxEncodedLen) + /// Storage: `Loans::CreatedLoan` (r:1 w:1) + /// Proof: `Loans::CreatedLoan` (`max_values`: None, `max_size`: Some(245), added: 2720, 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: `InterestAccrual::Rates` (r:1 w:1) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(36002), added: 36497, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::LastUpdated` (r:1 w:0) + /// Proof: `InterestAccrual::LastUpdated` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Loans::PortfolioValuation` (r:1 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:1) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. fn increase_debt(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `36804 + n * (340 ±0)` - // Estimated: `375491` - // Minimum execution time: 187_639_000 picoseconds. - Weight::from_parts(198_899_231, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 37_583 - .saturating_add(Weight::from_parts(945_204, 0).saturating_mul(n.into())) + // Measured: `36731 + n * (340 ±0)` + // Estimated: `376491` + // Minimum execution time: 200_694_000 picoseconds. + Weight::from_parts(213_050_296, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 68_417 + .saturating_add(Weight::from_parts(887_808, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/runtime/centrifuge/src/weights/pallet_multisig.rs b/runtime/centrifuge/src/weights/pallet_multisig.rs index 6dad62985f..684c0cb6f3 100644 --- a/runtime/centrifuge/src/weights/pallet_multisig.rs +++ b/runtime/centrifuge/src/weights/pallet_multisig.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_multisig` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_multisig // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_multisig.rs @@ -37,110 +36,110 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 16_320_000 picoseconds. - Weight::from_parts(17_501_984, 0) + // Minimum execution time: 15_338_000 picoseconds. + Weight::from_parts(16_533_180, 0) .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 3 - .saturating_add(Weight::from_parts(564, 0).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(574, 0).saturating_mul(z.into())) } - /// Storage: Multisig Multisigs (r:1 w:1) - /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `334 + s * (1 ±0)` // Estimated: `6811` - // Minimum execution time: 57_918_000 picoseconds. - Weight::from_parts(50_580_568, 0) + // Minimum execution time: 50_915_000 picoseconds. + Weight::from_parts(43_873_293, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 933 - .saturating_add(Weight::from_parts(85_520, 0).saturating_mul(s.into())) - // Standard Error: 9 - .saturating_add(Weight::from_parts(1_594, 0).saturating_mul(z.into())) + // Standard Error: 815 + .saturating_add(Weight::from_parts(91_909, 0).saturating_mul(s.into())) + // Standard Error: 7 + .saturating_add(Weight::from_parts(1_538, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Multisig Multisigs (r:1 w:1) - /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) /// The range of component `s` is `[3, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `315` // Estimated: `6811` - // Minimum execution time: 35_537_000 picoseconds. - Weight::from_parts(29_091_476, 0) + // Minimum execution time: 31_569_000 picoseconds. + Weight::from_parts(24_463_345, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 496 - .saturating_add(Weight::from_parts(74_879, 0).saturating_mul(s.into())) - // Standard Error: 4 - .saturating_add(Weight::from_parts(1_601, 0).saturating_mul(z.into())) + // Standard Error: 531 + .saturating_add(Weight::from_parts(82_688, 0).saturating_mul(s.into())) + // Standard Error: 5 + .saturating_add(Weight::from_parts(1_606, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Multisig Multisigs (r:1 w:1) - /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `456 + s * (33 ±0)` // Estimated: `6811` - // Minimum execution time: 64_781_000 picoseconds. - Weight::from_parts(54_794_596, 0) + // Minimum execution time: 57_838_000 picoseconds. + Weight::from_parts(47_255_589, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 721 - .saturating_add(Weight::from_parts(116_529, 0).saturating_mul(s.into())) + // Standard Error: 768 + .saturating_add(Weight::from_parts(122_970, 0).saturating_mul(s.into())) // Standard Error: 7 - .saturating_add(Weight::from_parts(1_654, 0).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(1_675, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Multisig Multisigs (r:1 w:1) - /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_create(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `334 + s * (1 ±0)` // Estimated: `6811` - // Minimum execution time: 46_507_000 picoseconds. - Weight::from_parts(48_517_453, 0) + // Minimum execution time: 40_035_000 picoseconds. + Weight::from_parts(41_467_020, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 890 - .saturating_add(Weight::from_parts(83_810, 0).saturating_mul(s.into())) + // Standard Error: 716 + .saturating_add(Weight::from_parts(90_922, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Multisig Multisigs (r:1 w:1) - /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_approve(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `315` // Estimated: `6811` - // Minimum execution time: 26_129_000 picoseconds. - Weight::from_parts(26_922_322, 0) + // Minimum execution time: 21_891_000 picoseconds. + Weight::from_parts(22_563_240, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 700 - .saturating_add(Weight::from_parts(72_954, 0).saturating_mul(s.into())) + // Standard Error: 568 + .saturating_add(Weight::from_parts(83_269, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Multisig Multisigs (r:1 w:1) - /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 100]`. fn cancel_as_multi(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `520 + s * (1 ±0)` // Estimated: `6811` - // Minimum execution time: 47_177_000 picoseconds. - Weight::from_parts(48_552_897, 0) + // Minimum execution time: 41_267_000 picoseconds. + Weight::from_parts(42_346_960, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 711 - .saturating_add(Weight::from_parts(82_587, 0).saturating_mul(s.into())) + // Standard Error: 606 + .saturating_add(Weight::from_parts(85_093, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/centrifuge/src/weights/pallet_oracle_collection.rs b/runtime/centrifuge/src/weights/pallet_oracle_collection.rs index 0bb4a765f6..bd0acee940 100644 --- a/runtime/centrifuge/src/weights/pallet_oracle_collection.rs +++ b/runtime/centrifuge/src/weights/pallet_oracle_collection.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_oracle_collection` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_oracle_collection // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_oracle_collection.rs @@ -32,73 +31,73 @@ use core::marker::PhantomData; /// Weight functions for `pallet_oracle_collection`. pub struct WeightInfo(PhantomData); impl pallet_oracle_collection::WeightInfo for WeightInfo { - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, 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: PoolSystem NotedChange (r:0 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(5184), added: 7659, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, 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: `PoolSystem::NotedChange` (r:0 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. fn propose_update_collection_info(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `222` // Estimated: `3693` - // Minimum execution time: 29_174_000 picoseconds. - Weight::from_parts(28_828_737, 0) + // Minimum execution time: 24_276_000 picoseconds. + Weight::from_parts(24_755_058, 0) .saturating_add(Weight::from_parts(0, 3693)) - // Standard Error: 10_990 - .saturating_add(Weight::from_parts(1_490_038, 0).saturating_mul(n.into())) + // Standard Error: 8_436 + .saturating_add(Weight::from_parts(511_561, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PoolSystem NotedChange (r:1 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(5184), added: 7659, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: OraclePriceCollection Collection (r:0 w:1) - /// Proof: OraclePriceCollection Collection (max_values: None, max_size: Some(7542), added: 10017, mode: MaxEncodedLen) - /// Storage: OraclePriceCollection CollectionInfo (r:0 w:1) - /// Proof: OraclePriceCollection CollectionInfo (max_values: None, max_size: Some(3058), added: 5533, mode: MaxEncodedLen) + /// Storage: `PoolSystem::NotedChange` (r:1 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `OraclePriceCollection::Collection` (r:0 w:1) + /// Proof: `OraclePriceCollection::Collection` (`max_values`: None, `max_size`: Some(7542), added: 10017, mode: `MaxEncodedLen`) + /// Storage: `OraclePriceCollection::CollectionInfo` (r:0 w:1) + /// Proof: `OraclePriceCollection::CollectionInfo` (`max_values`: None, `max_size`: Some(3058), added: 5533, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. fn apply_update_collection_info(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `657 + n * (34 ±0)` // Estimated: `8649` - // Minimum execution time: 35_646_000 picoseconds. - Weight::from_parts(35_108_166, 0) + // Minimum execution time: 35_065_000 picoseconds. + Weight::from_parts(35_541_621, 0) .saturating_add(Weight::from_parts(0, 8649)) - // Standard Error: 9_939 - .saturating_add(Weight::from_parts(1_629_487, 0).saturating_mul(n.into())) + // Standard Error: 8_931 + .saturating_add(Weight::from_parts(522_188, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: OraclePriceCollection Keys (r:101 w:0) - /// Proof: OraclePriceCollection Keys (max_values: None, max_size: Some(95), added: 2570, mode: MaxEncodedLen) - /// Storage: OraclePriceCollection CollectionInfo (r:1 w:0) - /// Proof: OraclePriceCollection CollectionInfo (max_values: None, max_size: Some(3058), added: 5533, mode: MaxEncodedLen) - /// Storage: OraclePriceFeed FedValues (r:500 w:0) - /// Proof: OraclePriceFeed FedValues (max_values: None, max_size: Some(711), added: 3186, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OraclePriceCollection Collection (r:0 w:1) - /// Proof: OraclePriceCollection Collection (max_values: None, max_size: Some(7542), added: 10017, 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: `OraclePriceCollection::Keys` (r:101 w:0) + /// Proof: `OraclePriceCollection::Keys` (`max_values`: None, `max_size`: Some(95), added: 2570, mode: `MaxEncodedLen`) + /// Storage: `OraclePriceCollection::CollectionInfo` (r:1 w:0) + /// Proof: `OraclePriceCollection::CollectionInfo` (`max_values`: None, `max_size`: Some(3058), added: 5533, mode: `MaxEncodedLen`) + /// Storage: `OraclePriceFeed::FedValues` (r:500 w:0) + /// Proof: `OraclePriceFeed::FedValues` (`max_values`: None, `max_size`: Some(711), added: 3186, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OraclePriceCollection::Collection` (r:0 w:1) + /// Proof: `OraclePriceCollection::Collection` (`max_values`: None, `max_size`: Some(7542), added: 10017, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[1, 100]`. fn update_collection(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + m * (326 ±0) + n * (5851 ±0)` // Estimated: `16920 + m * (6039 ±164) + n * (100600 ±3_323)` - // Minimum execution time: 160_618_000 picoseconds. - Weight::from_parts(161_691_000, 0) + // Minimum execution time: 129_342_000 picoseconds. + Weight::from_parts(130_825_000, 0) .saturating_add(Weight::from_parts(0, 16920)) - // Standard Error: 21_623_789 - .saturating_add(Weight::from_parts(684_567_025, 0).saturating_mul(n.into())) - // Standard Error: 1_071_049 - .saturating_add(Weight::from_parts(35_753_437, 0).saturating_mul(m.into())) + // Standard Error: 15_277_105 + .saturating_add(Weight::from_parts(473_216_566, 0).saturating_mul(n.into())) + // Standard Error: 756_691 + .saturating_add(Weight::from_parts(30_611_211, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().reads((31_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(m.into()))) diff --git a/runtime/centrifuge/src/weights/pallet_oracle_feed.rs b/runtime/centrifuge/src/weights/pallet_oracle_feed.rs index 17dcf24583..8bd62c36d7 100644 --- a/runtime/centrifuge/src/weights/pallet_oracle_feed.rs +++ b/runtime/centrifuge/src/weights/pallet_oracle_feed.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_oracle_feed` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_oracle_feed // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_oracle_feed.rs @@ -32,32 +31,32 @@ use core::marker::PhantomData; /// Weight functions for `pallet_oracle_feed`. pub struct WeightInfo(PhantomData); impl pallet_oracle_feed::WeightInfo for WeightInfo { - /// Storage: OraclePriceFeed FedValues (r:1 w:1) - /// Proof: OraclePriceFeed FedValues (max_values: None, max_size: Some(711), added: 3186, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, 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: `OraclePriceFeed::FedValues` (r:1 w:1) + /// Proof: `OraclePriceFeed::FedValues` (`max_values`: None, `max_size`: Some(711), added: 3186, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn feed_with_fee() -> Weight { // Proof Size summary in bytes: // Measured: `387` // Estimated: `4176` - // Minimum execution time: 66_544_000 picoseconds. - Weight::from_parts(67_205_000, 0) + // Minimum execution time: 50_644_000 picoseconds. + Weight::from_parts(51_506_000, 0) .saturating_add(Weight::from_parts(0, 4176)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: OraclePriceFeed FedValues (r:1 w:1) - /// Proof: OraclePriceFeed FedValues (max_values: None, max_size: Some(711), added: 3186, 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: `OraclePriceFeed::FedValues` (r:1 w:1) + /// Proof: `OraclePriceFeed::FedValues` (`max_values`: None, `max_size`: Some(711), added: 3186, mode: `MaxEncodedLen`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn feed_without_fee() -> Weight { // Proof Size summary in bytes: // Measured: `413` // Estimated: `4176` - // Minimum execution time: 23_083_000 picoseconds. - Weight::from_parts(23_984_000, 0) + // Minimum execution time: 19_166_000 picoseconds. + Weight::from_parts(19_607_000, 0) .saturating_add(Weight::from_parts(0, 4176)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/centrifuge/src/weights/pallet_order_book.rs b/runtime/centrifuge/src/weights/pallet_order_book.rs index 5247ae670e..fb6f1f781c 100644 --- a/runtime/centrifuge/src/weights/pallet_order_book.rs +++ b/runtime/centrifuge/src/weights/pallet_order_book.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_order_book` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_order_book // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_order_book.rs @@ -32,94 +31,94 @@ use core::marker::PhantomData; /// Weight functions for `pallet_order_book`. pub struct WeightInfo(PhantomData); impl pallet_order_book::WeightInfo for WeightInfo { - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OrderBook OrderIdNonceStore (r:1 w:1) - /// Proof: OrderBook OrderIdNonceStore (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:1 w:1) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrderBook Orders (r:0 w:1) - /// Proof: OrderBook Orders (max_values: None, max_size: Some(171), added: 2646, mode: MaxEncodedLen) - /// Storage: OrderBook UserOrders (r:0 w:1) - /// Proof: OrderBook UserOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OrderBook::OrderIdNonceStore` (r:1 w:1) + /// Proof: `OrderBook::OrderIdNonceStore` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:1 w:1) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrderBook::Orders` (r:0 w:1) + /// Proof: `OrderBook::Orders` (`max_values`: None, `max_size`: Some(171), added: 2646, mode: `MaxEncodedLen`) + /// Storage: `OrderBook::UserOrders` (r:0 w:1) + /// Proof: `OrderBook::UserOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) fn place_order() -> Weight { // Proof Size summary in bytes: - // Measured: `742` - // Estimated: `4207` - // Minimum execution time: 54_561_000 picoseconds. - Weight::from_parts(55_152_000, 0) - .saturating_add(Weight::from_parts(0, 4207)) + // Measured: `692` + // Estimated: `4407` + // Minimum execution time: 45_916_000 picoseconds. + Weight::from_parts(47_449_000, 0) + .saturating_add(Weight::from_parts(0, 4407)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: OrderBook Orders (r:1 w:1) - /// Proof: OrderBook Orders (max_values: None, max_size: Some(171), added: 2646, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OrmlTokens Accounts (r:1 w:1) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) + /// Storage: `OrderBook::Orders` (r:1 w:1) + /// Proof: `OrderBook::Orders` (`max_values`: None, `max_size`: Some(171), added: 2646, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:1 w:1) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) fn update_order() -> Weight { // Proof Size summary in bytes: - // Measured: `946` - // Estimated: `4411` - // Minimum execution time: 49_702_000 picoseconds. - Weight::from_parts(50_905_000, 0) - .saturating_add(Weight::from_parts(0, 4411)) + // Measured: `896` + // Estimated: `4407` + // Minimum execution time: 44_593_000 picoseconds. + Weight::from_parts(45_495_000, 0) + .saturating_add(Weight::from_parts(0, 4407)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: OrderBook Orders (r:1 w:1) - /// Proof: OrderBook Orders (max_values: None, max_size: Some(171), added: 2646, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:1 w:1) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OrderBook UserOrders (r:0 w:1) - /// Proof: OrderBook UserOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + /// Storage: `OrderBook::Orders` (r:1 w:1) + /// Proof: `OrderBook::Orders` (`max_values`: None, `max_size`: Some(171), added: 2646, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:1 w:1) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OrderBook::UserOrders` (r:0 w:1) + /// Proof: `OrderBook::UserOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) fn cancel_order() -> Weight { // Proof Size summary in bytes: - // Measured: `946` - // Estimated: `4411` - // Minimum execution time: 52_497_000 picoseconds. - Weight::from_parts(53_189_000, 0) - .saturating_add(Weight::from_parts(0, 4411)) + // Measured: `896` + // Estimated: `4407` + // Minimum execution time: 47_599_000 picoseconds. + Weight::from_parts(48_360_000, 0) + .saturating_add(Weight::from_parts(0, 4407)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: OrderBook Orders (r:1 w:1) - /// Proof: OrderBook Orders (max_values: None, max_size: Some(171), added: 2646, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:2 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OrderBook MarketFeederId (r:1 w:0) - /// Proof: OrderBook MarketFeederId (max_values: Some(1), max_size: Some(604), added: 1099, mode: MaxEncodedLen) - /// Storage: OraclePriceFeed FedValues (r:1 w:0) - /// Proof: OraclePriceFeed FedValues (max_values: None, max_size: Some(711), added: 3186, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:4 w:4) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Swaps OrderIdToSwapId (r:1 w:0) - /// Proof: Swaps OrderIdToSwapId (max_values: None, max_size: Some(81), added: 2556, mode: MaxEncodedLen) - /// Storage: OrderBook UserOrders (r:0 w:1) - /// Proof: OrderBook UserOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + /// Storage: `OrderBook::Orders` (r:1 w:1) + /// Proof: `OrderBook::Orders` (`max_values`: None, `max_size`: Some(171), added: 2646, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:2 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OrderBook::MarketFeederId` (r:1 w:0) + /// Proof: `OrderBook::MarketFeederId` (`max_values`: Some(1), `max_size`: Some(604), added: 1099, mode: `MaxEncodedLen`) + /// Storage: `OraclePriceFeed::FedValues` (r:1 w:0) + /// Proof: `OraclePriceFeed::FedValues` (`max_values`: None, `max_size`: Some(711), added: 3186, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:4 w:4) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Swaps::OrderIdToSwapId` (r:1 w:0) + /// Proof: `Swaps::OrderIdToSwapId` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) + /// Storage: `OrderBook::UserOrders` (r:0 w:1) + /// Proof: `OrderBook::UserOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) fn fill_order() -> Weight { // Proof Size summary in bytes: - // Measured: `1731` + // Measured: `1628` // Estimated: `11406` - // Minimum execution time: 168_764_000 picoseconds. - Weight::from_parts(171_238_000, 0) + // Minimum execution time: 148_507_000 picoseconds. + Weight::from_parts(150_471_000, 0) .saturating_add(Weight::from_parts(0, 11406)) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(8)) } - /// Storage: OrderBook MarketFeederId (r:0 w:1) - /// Proof: OrderBook MarketFeederId (max_values: Some(1), max_size: Some(604), added: 1099, mode: MaxEncodedLen) + /// Storage: `OrderBook::MarketFeederId` (r:0 w:1) + /// Proof: `OrderBook::MarketFeederId` (`max_values`: Some(1), `max_size`: Some(604), added: 1099, mode: `MaxEncodedLen`) fn set_market_feeder() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 13_365_000 picoseconds. - Weight::from_parts(13_786_000, 0) + // Minimum execution time: 8_285_000 picoseconds. + Weight::from_parts(8_867_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/centrifuge/src/weights/pallet_permissions.rs b/runtime/centrifuge/src/weights/pallet_permissions.rs index a959c83d2e..5f7fd5cc64 100644 --- a/runtime/centrifuge/src/weights/pallet_permissions.rs +++ b/runtime/centrifuge/src/weights/pallet_permissions.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_permissions` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_permissions // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_permissions.rs @@ -32,82 +31,82 @@ use core::marker::PhantomData; /// Weight functions for `pallet_permissions`. pub struct WeightInfo(PhantomData); impl pallet_permissions::WeightInfo for WeightInfo { - /// Storage: Permissions PermissionCount (r:1 w:1) - /// Proof: Permissions PermissionCount (max_values: None, max_size: Some(46), added: 2521, mode: MaxEncodedLen) - /// Storage: Permissions Permission (r:1 w:1) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) + /// Storage: `Permissions::PermissionCount` (r:1 w:1) + /// Proof: `Permissions::PermissionCount` (`max_values`: None, `max_size`: Some(46), added: 2521, mode: `MaxEncodedLen`) + /// Storage: `Permissions::Permission` (r:1 w:1) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) fn add_as_admin() -> Weight { // Proof Size summary in bytes: // Measured: `3` // Estimated: `3693` - // Minimum execution time: 20_979_000 picoseconds. - Weight::from_parts(21_640_000, 0) + // Minimum execution time: 16_992_000 picoseconds. + Weight::from_parts(17_683_000, 0) .saturating_add(Weight::from_parts(0, 3693)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Permissions Permission (r:2 w:1) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: Permissions PermissionCount (r:1 w:1) - /// Proof: Permissions PermissionCount (max_values: None, max_size: Some(46), added: 2521, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:2 w:1) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `Permissions::PermissionCount` (r:1 w:1) + /// Proof: `Permissions::PermissionCount` (`max_values`: None, `max_size`: Some(46), added: 2521, mode: `MaxEncodedLen`) fn add_as_editor() -> Weight { // Proof Size summary in bytes: // Measured: `162` // Estimated: `6396` - // Minimum execution time: 28_283_000 picoseconds. - Weight::from_parts(29_084_000, 0) + // Minimum execution time: 24_876_000 picoseconds. + Weight::from_parts(25_528_000, 0) .saturating_add(Weight::from_parts(0, 6396)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Permissions PermissionCount (r:1 w:1) - /// Proof: Permissions PermissionCount (max_values: None, max_size: Some(46), added: 2521, mode: MaxEncodedLen) - /// Storage: Permissions Permission (r:1 w:1) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) + /// Storage: `Permissions::PermissionCount` (r:1 w:1) + /// Proof: `Permissions::PermissionCount` (`max_values`: None, `max_size`: Some(46), added: 2521, mode: `MaxEncodedLen`) + /// Storage: `Permissions::Permission` (r:1 w:1) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) fn remove_as_admin() -> Weight { // Proof Size summary in bytes: // Measured: `162` // Estimated: `3693` - // Minimum execution time: 24_455_000 picoseconds. - Weight::from_parts(24_846_000, 0) + // Minimum execution time: 20_128_000 picoseconds. + Weight::from_parts(20_548_000, 0) .saturating_add(Weight::from_parts(0, 3693)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Permissions Permission (r:2 w:1) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: Permissions PermissionCount (r:1 w:1) - /// Proof: Permissions PermissionCount (max_values: None, max_size: Some(46), added: 2521, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:2 w:1) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `Permissions::PermissionCount` (r:1 w:1) + /// Proof: `Permissions::PermissionCount` (`max_values`: None, `max_size`: Some(46), added: 2521, mode: `MaxEncodedLen`) fn remove_as_editor() -> Weight { // Proof Size summary in bytes: // Measured: `256` // Estimated: `6396` - // Minimum execution time: 30_567_000 picoseconds. - Weight::from_parts(31_299_000, 0) + // Minimum execution time: 27_151_000 picoseconds. + Weight::from_parts(27_842_000, 0) .saturating_add(Weight::from_parts(0, 6396)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Permissions Permission (r:1 w:1) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:1) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) fn purge() -> Weight { // Proof Size summary in bytes: // Measured: `146` // Estimated: `3693` - // Minimum execution time: 20_899_000 picoseconds. - Weight::from_parts(21_650_000, 0) + // Minimum execution time: 17_081_000 picoseconds. + Weight::from_parts(17_573_000, 0) .saturating_add(Weight::from_parts(0, 3693)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Permissions Permission (r:1 w:1) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:1) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) fn admin_purge() -> Weight { // Proof Size summary in bytes: // Measured: `146` // Estimated: `3693` - // Minimum execution time: 21_730_000 picoseconds. - Weight::from_parts(22_271_000, 0) + // Minimum execution time: 17_492_000 picoseconds. + Weight::from_parts(18_124_000, 0) .saturating_add(Weight::from_parts(0, 3693)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/centrifuge/src/weights/pallet_pool_fees.rs b/runtime/centrifuge/src/weights/pallet_pool_fees.rs index 47def1bdc2..a02e2d1026 100644 --- a/runtime/centrifuge/src/weights/pallet_pool_fees.rs +++ b/runtime/centrifuge/src/weights/pallet_pool_fees.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_pool_fees` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_pool_fees // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_pool_fees.rs @@ -32,122 +31,122 @@ use core::marker::PhantomData; /// Weight functions for `pallet_pool_fees`. pub struct WeightInfo(PhantomData); impl pallet_pool_fees::WeightInfo for WeightInfo { - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: PoolFees LastFeeId (r:1 w:1) - /// Proof: PoolFees LastFeeId (max_values: Some(1), max_size: Some(8), added: 503, 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: PoolSystem NotedChange (r:0 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(5184), added: 7659, mode: MaxEncodedLen) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::LastFeeId` (r:1 w:1) + /// Proof: `PoolFees::LastFeeId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, 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: `PoolSystem::NotedChange` (r:0 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) fn propose_new_fee() -> Weight { // Proof Size summary in bytes: // Measured: `581` // Estimated: `4278` - // Minimum execution time: 43_561_000 picoseconds. - Weight::from_parts(44_193_000, 0) + // Minimum execution time: 35_577_000 picoseconds. + Weight::from_parts(36_578_000, 0) .saturating_add(Weight::from_parts(0, 4278)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: PoolSystem NotedChange (r:1 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(5184), added: 7659, mode: MaxEncodedLen) - /// Storage: PoolFees FeeIdsToPoolBucket (r:1 w:1) - /// Proof: PoolFees FeeIdsToPoolBucket (max_values: None, max_size: Some(33), added: 2508, mode: MaxEncodedLen) - /// Storage: PoolFees FeeIds (r:1 w:1) - /// Proof: PoolFees FeeIds (max_values: None, max_size: Some(843), added: 3318, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::NotedChange` (r:1 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::FeeIdsToPoolBucket` (r:1 w:1) + /// Proof: `PoolFees::FeeIdsToPoolBucket` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::FeeIds` (r:1 w:1) + /// Proof: `PoolFees::FeeIds` (`max_values`: None, `max_size`: Some(843), added: 3318, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 99]`. fn apply_new_fee(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1395 + n * (137 ±0)` // Estimated: `17508` - // Minimum execution time: 54_962_000 picoseconds. - Weight::from_parts(55_423_381, 0) + // Minimum execution time: 56_726_000 picoseconds. + Weight::from_parts(57_282_882, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 2_061 - .saturating_add(Weight::from_parts(285_969, 0).saturating_mul(n.into())) + // Standard Error: 1_865 + .saturating_add(Weight::from_parts(289_067, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: PoolFees FeeIdsToPoolBucket (r:1 w:1) - /// Proof: PoolFees FeeIdsToPoolBucket (max_values: None, max_size: Some(33), added: 2508, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) - /// Storage: PoolFees FeeIds (r:1 w:1) - /// Proof: PoolFees FeeIds (max_values: None, max_size: Some(843), added: 3318, mode: MaxEncodedLen) + /// Storage: `PoolFees::FeeIdsToPoolBucket` (r:1 w:1) + /// Proof: `PoolFees::FeeIdsToPoolBucket` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::FeeIds` (r:1 w:1) + /// Proof: `PoolFees::FeeIds` (`max_values`: None, `max_size`: Some(843), added: 3318, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 100]`. fn remove_fee(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `709 + n * (136 ±0)` // Estimated: `17508` - // Minimum execution time: 37_369_000 picoseconds. - Weight::from_parts(38_425_852, 0) + // Minimum execution time: 34_966_000 picoseconds. + Weight::from_parts(37_186_153, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 3_944 - .saturating_add(Weight::from_parts(404_629, 0).saturating_mul(n.into())) + // Standard Error: 3_901 + .saturating_add(Weight::from_parts(428_616, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: PoolFees FeeIdsToPoolBucket (r:1 w:0) - /// Proof: PoolFees FeeIdsToPoolBucket (max_values: None, max_size: Some(33), added: 2508, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) + /// Storage: `PoolFees::FeeIdsToPoolBucket` (r:1 w:0) + /// Proof: `PoolFees::FeeIdsToPoolBucket` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 99]`. fn charge_fee(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `795 + n * (129 ±0)` // Estimated: `17508` - // Minimum execution time: 27_632_000 picoseconds. - Weight::from_parts(27_469_772, 0) + // Minimum execution time: 24_425_000 picoseconds. + Weight::from_parts(24_164_408, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 2_019 - .saturating_add(Weight::from_parts(259_199, 0).saturating_mul(n.into())) + // Standard Error: 2_222 + .saturating_add(Weight::from_parts(262_898, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PoolFees FeeIdsToPoolBucket (r:1 w:0) - /// Proof: PoolFees FeeIdsToPoolBucket (max_values: None, max_size: Some(33), added: 2508, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) + /// Storage: `PoolFees::FeeIdsToPoolBucket` (r:1 w:0) + /// Proof: `PoolFees::FeeIdsToPoolBucket` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 99]`. fn uncharge_fee(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `795 + n * (129 ±0)` // Estimated: `17508` - // Minimum execution time: 26_991_000 picoseconds. - Weight::from_parts(26_651_227, 0) + // Minimum execution time: 23_915_000 picoseconds. + Weight::from_parts(23_620_971, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 2_159 - .saturating_add(Weight::from_parts(259_300, 0).saturating_mul(n.into())) + // Standard Error: 2_185 + .saturating_add(Weight::from_parts(260_376, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: PoolFees PortfolioValuation (r:1 w:1) - /// Proof: PoolFees PortfolioValuation (max_values: None, max_size: Some(4850), added: 7325, 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: PoolFees AssetsUnderManagement (r:1 w:0) - /// Proof: PoolFees AssetsUnderManagement (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::PortfolioValuation` (r:1 w:1) + /// Proof: `PoolFees::PortfolioValuation` (`max_values`: None, `max_size`: Some(4850), added: 7325, 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: `PoolFees::AssetsUnderManagement` (r:1 w:0) + /// Proof: `PoolFees::AssetsUnderManagement` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 100]`. fn update_portfolio_valuation(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `603 + n * (124 ±0)` // Estimated: `17508` - // Minimum execution time: 48_631_000 picoseconds. - Weight::from_parts(42_835_341, 0) + // Minimum execution time: 42_099_000 picoseconds. + Weight::from_parts(39_371_621, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 3_863 - .saturating_add(Weight::from_parts(6_212_825, 0).saturating_mul(n.into())) + // Standard Error: 3_636 + .saturating_add(Weight::from_parts(2_980_612, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/centrifuge/src/weights/pallet_pool_registry.rs b/runtime/centrifuge/src/weights/pallet_pool_registry.rs index 0941a5eb7d..83b032d6bc 100644 --- a/runtime/centrifuge/src/weights/pallet_pool_registry.rs +++ b/runtime/centrifuge/src/weights/pallet_pool_registry.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_pool_registry` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_pool_registry // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_pool_registry.rs @@ -32,171 +31,171 @@ use core::marker::PhantomData; /// Weight functions for `pallet_pool_registry`. pub struct WeightInfo(PhantomData); impl pallet_pool_registry::WeightInfo for WeightInfo { - /// Storage: PoolRegistry Pools (r:1 w:1) - /// Proof: PoolRegistry Pools (max_values: None, max_size: Some(25), added: 2500, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:6 w:5) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: PoolSystem AccountDeposit (r:1 w:1) - /// Proof: PoolSystem AccountDeposit (max_values: None, max_size: Some(64), added: 2539, 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: PoolFees LastFeeId (r:1 w:1) - /// Proof: PoolFees LastFeeId (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: PoolFees FeeIdsToPoolBucket (r:100 w:100) - /// Proof: PoolFees FeeIdsToPoolBucket (max_values: None, max_size: Some(33), added: 2508, mode: MaxEncodedLen) - /// Storage: PoolFees FeeIds (r:1 w:1) - /// Proof: PoolFees FeeIds (max_values: None, max_size: Some(843), added: 3318, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) - /// Storage: Permissions PermissionCount (r:1 w:1) - /// Proof: Permissions PermissionCount (max_values: None, max_size: Some(46), added: 2521, mode: MaxEncodedLen) - /// Storage: Permissions Permission (r:1 w:1) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: Loans WriteOffPolicy (r:0 w:1) - /// Proof: Loans WriteOffPolicy (max_values: None, max_size: Some(5126), added: 7601, mode: MaxEncodedLen) - /// Storage: PoolSystem PoolDeposit (r:0 w:1) - /// Proof: PoolSystem PoolDeposit (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: `PoolRegistry::Pools` (r:1 w:1) + /// Proof: `PoolRegistry::Pools` (`max_values`: None, `max_size`: Some(25), added: 2500, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:6 w:5) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::AccountDeposit` (r:1 w:1) + /// Proof: `PoolSystem::AccountDeposit` (`max_values`: None, `max_size`: Some(64), added: 2539, 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: `PoolFees::LastFeeId` (r:1 w:1) + /// Proof: `PoolFees::LastFeeId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::FeeIdsToPoolBucket` (r:100 w:100) + /// Proof: `PoolFees::FeeIdsToPoolBucket` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::FeeIds` (r:1 w:1) + /// Proof: `PoolFees::FeeIds` (`max_values`: None, `max_size`: Some(843), added: 3318, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) + /// Storage: `Permissions::PermissionCount` (r:1 w:1) + /// Proof: `Permissions::PermissionCount` (`max_values`: None, `max_size`: Some(46), added: 2521, mode: `MaxEncodedLen`) + /// Storage: `Permissions::Permission` (r:1 w:1) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `Loans::WriteOffPolicy` (r:0 w:1) + /// Proof: `Loans::WriteOffPolicy` (`max_values`: None, `max_size`: Some(5126), added: 7601, mode: `MaxEncodedLen`) + /// Storage: `PoolRegistry::PoolMetadata` (r:0 w:1) + /// Proof: `PoolRegistry::PoolMetadata` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::PoolDeposit` (r:0 w:1) + /// Proof: `PoolSystem::PoolDeposit` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[0, 100]`. fn register(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `614` - // Estimated: `17508 + m * (2508 ±0) + n * (2475 ±0)` - // Minimum execution time: 247_641_000 picoseconds. - Weight::from_parts(118_429_138, 0) + // Measured: `595` + // Estimated: `17508 + m * (2508 ±0) + n * (3417 ±0)` + // Minimum execution time: 207_187_000 picoseconds. + Weight::from_parts(134_932_487, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 87_363 - .saturating_add(Weight::from_parts(27_578_189, 0).saturating_mul(m.into())) + // Standard Error: 83_180 + .saturating_add(Weight::from_parts(24_022_038, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into()))) - .saturating_add(T::DbWeight::get().writes(11)) + .saturating_add(T::DbWeight::get().writes(12)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m.into()))) .saturating_add(Weight::from_parts(0, 2508).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 2475).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 3417).saturating_mul(n.into())) } - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: PoolSystem EpochExecution (r:1 w:0) - /// Proof: PoolSystem EpochExecution (max_values: None, max_size: Some(754), added: 3229, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, 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: Investments ActiveRedeemOrders (r:5 w:0) - /// Proof: Investments ActiveRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:0) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) - /// Storage: PoolSystem ScheduledUpdate (r:0 w:1) - /// Proof: PoolSystem ScheduledUpdate (max_values: None, max_size: Some(1019), added: 3494, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::EpochExecution` (r:1 w:0) + /// Proof: `PoolSystem::EpochExecution` (`max_values`: None, `max_size`: Some(754), added: 3229, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, 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: `Investments::ActiveRedeemOrders` (r:5 w:0) + /// Proof: `Investments::ActiveRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:0) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::ScheduledUpdate` (r:0 w:1) + /// Proof: `PoolSystem::ScheduledUpdate` (`max_values`: None, `max_size`: Some(1504), added: 3979, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[0, 100]`. fn update_no_execution(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `957 + m * (124 ±0) + n * (133 ±0)` // Estimated: `17508 + n * (2531 ±0)` - // Minimum execution time: 65_533_000 picoseconds. - Weight::from_parts(57_347_733, 0) + // Minimum execution time: 60_493_000 picoseconds. + Weight::from_parts(50_920_021, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 38_122 - .saturating_add(Weight::from_parts(3_027_421, 0).saturating_mul(n.into())) - // Standard Error: 1_739 - .saturating_add(Weight::from_parts(219_945, 0).saturating_mul(m.into())) + // Standard Error: 34_654 + .saturating_add(Weight::from_parts(2_983_125, 0).saturating_mul(n.into())) + // Standard Error: 1_581 + .saturating_add(Weight::from_parts(208_639, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 2531).saturating_mul(n.into())) } - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: PoolSystem EpochExecution (r:1 w:0) - /// Proof: PoolSystem EpochExecution (max_values: None, max_size: Some(754), added: 3229, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, 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: Investments ActiveRedeemOrders (r:5 w:0) - /// Proof: Investments ActiveRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:2 w:1) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: PoolFees ActiveFees (r:1 w:0) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) - /// Storage: PoolSystem ScheduledUpdate (r:0 w:1) - /// Proof: PoolSystem ScheduledUpdate (max_values: None, max_size: Some(1019), added: 3494, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::EpochExecution` (r:1 w:0) + /// Proof: `PoolSystem::EpochExecution` (`max_values`: None, `max_size`: Some(754), added: 3229, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, 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: `Investments::ActiveRedeemOrders` (r:5 w:0) + /// Proof: `Investments::ActiveRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:5 w:1) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:0) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::ScheduledUpdate` (r:0 w:1) + /// Proof: `PoolSystem::ScheduledUpdate` (`max_values`: None, `max_size`: Some(1504), added: 3979, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[0, 100]`. fn update_and_execute(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1021 + m * (124 ±0) + n * (167 ±0)` - // Estimated: `17508 + m * (124 ±0) + n * (2531 ±0)` - // Minimum execution time: 117_268_000 picoseconds. - Weight::from_parts(86_174_059, 0) + // Measured: `960 + m * (124 ±0) + n * (200 ±0)` + // Estimated: `17508 + n * (3417 ±0)` + // Minimum execution time: 100_818_000 picoseconds. + Weight::from_parts(70_751_268, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 36_515 - .saturating_add(Weight::from_parts(9_705_978, 0).saturating_mul(n.into())) - // Standard Error: 1_666 - .saturating_add(Weight::from_parts(242_462, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) + // Standard Error: 41_555 + .saturating_add(Weight::from_parts(10_532_795, 0).saturating_mul(n.into())) + // Standard Error: 1_896 + .saturating_add(Weight::from_parts(220_140, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 124).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 2531).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 3417).saturating_mul(n.into())) } - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: PoolSystem EpochExecution (r:1 w:0) - /// Proof: PoolSystem EpochExecution (max_values: None, max_size: Some(754), added: 3229, mode: MaxEncodedLen) - /// Storage: PoolSystem ScheduledUpdate (r:1 w:1) - /// Proof: PoolSystem ScheduledUpdate (max_values: None, max_size: Some(1019), added: 3494, 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: Investments ActiveRedeemOrders (r:5 w:0) - /// Proof: Investments ActiveRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:2 w:1) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: PoolFees ActiveFees (r:1 w:0) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::EpochExecution` (r:1 w:0) + /// Proof: `PoolSystem::EpochExecution` (`max_values`: None, `max_size`: Some(754), added: 3229, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::ScheduledUpdate` (r:1 w:1) + /// Proof: `PoolSystem::ScheduledUpdate` (`max_values`: None, `max_size`: Some(1504), added: 3979, 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: `Investments::ActiveRedeemOrders` (r:5 w:0) + /// Proof: `Investments::ActiveRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:5 w:1) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:0) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[0, 100]`. fn execute_update(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1009 + m * (124 ±0) + n * (194 ±0)` - // Estimated: `17508 + m * (124 ±0) + n * (2531 ±0)` - // Minimum execution time: 103_112_000 picoseconds. - Weight::from_parts(73_195_692, 0) + // Measured: `948 + m * (124 ±0) + n * (227 ±0)` + // Estimated: `17508 + n * (3417 ±0)` + // Minimum execution time: 92_523_000 picoseconds. + Weight::from_parts(62_401_403, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 37_733 - .saturating_add(Weight::from_parts(9_825_350, 0).saturating_mul(n.into())) - // Standard Error: 1_721 - .saturating_add(Weight::from_parts(225_401, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) + // Standard Error: 45_703 + .saturating_add(Weight::from_parts(11_004_977, 0).saturating_mul(n.into())) + // Standard Error: 2_085 + .saturating_add(Weight::from_parts(214_718, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 124).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 2531).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 3417).saturating_mul(n.into())) } - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: PoolRegistry PoolMetadata (r:0 w:1) - /// Proof: PoolRegistry PoolMetadata (max_values: None, max_size: Some(71), added: 2546, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolRegistry::PoolMetadata` (r:0 w:1) + /// Proof: `PoolRegistry::PoolMetadata` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 46]`. /// The range of component `m` is `[0, 100]`. fn set_metadata(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `146` // Estimated: `3693` - // Minimum execution time: 23_103_000 picoseconds. - Weight::from_parts(23_924_253, 0) + // Minimum execution time: 18_926_000 picoseconds. + Weight::from_parts(19_576_499, 0) .saturating_add(Weight::from_parts(0, 3693)) - // Standard Error: 714 - .saturating_add(Weight::from_parts(7_918, 0).saturating_mul(n.into())) - // Standard Error: 332 - .saturating_add(Weight::from_parts(21_889, 0).saturating_mul(m.into())) + // Standard Error: 670 + .saturating_add(Weight::from_parts(8_248, 0).saturating_mul(n.into())) + // Standard Error: 311 + .saturating_add(Weight::from_parts(21_318, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/centrifuge/src/weights/pallet_pool_system.rs b/runtime/centrifuge/src/weights/pallet_pool_system.rs index 086b596d9d..abf51c4efc 100644 --- a/runtime/centrifuge/src/weights/pallet_pool_system.rs +++ b/runtime/centrifuge/src/weights/pallet_pool_system.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_pool_system` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_pool_system // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_pool_system.rs @@ -32,253 +31,259 @@ use core::marker::PhantomData; /// Weight functions for `pallet_pool_system`. pub struct WeightInfo(PhantomData); impl pallet_pool_system::WeightInfo for WeightInfo { - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) /// The range of component `m` is `[0, 100]`. fn set_max_reserve(m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `592` + // Measured: `554` // Estimated: `4278` - // Minimum execution time: 29_034_000 picoseconds. - Weight::from_parts(30_127_895, 0) + // Minimum execution time: 24_495_000 picoseconds. + Weight::from_parts(25_394_511, 0) .saturating_add(Weight::from_parts(0, 4278)) - // Standard Error: 431 - .saturating_add(Weight::from_parts(31_006, 0).saturating_mul(m.into())) + // Standard Error: 442 + .saturating_add(Weight::from_parts(28_512, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: PoolSystem EpochExecution (r:1 w:0) - /// Proof: PoolSystem EpochExecution (max_values: None, max_size: Some(754), added: 3229, 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 PortfolioValuation (r:1 w:0) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: PoolFees PortfolioValuation (r:1 w:1) - /// Proof: PoolFees PortfolioValuation (max_values: None, max_size: Some(4850), added: 7325, mode: MaxEncodedLen) - /// Storage: PoolFees AssetsUnderManagement (r:1 w:1) - /// Proof: PoolFees AssetsUnderManagement (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) - /// Storage: OrmlTokens TotalIssuance (r:5 w:0) - /// Proof: OrmlTokens TotalIssuance (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) - /// Storage: Investments ActiveInvestOrders (r:5 w:5) - /// Proof: Investments ActiveInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InProcessingInvestOrders (r:5 w:5) - /// Proof: Investments InProcessingInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InvestOrderId (r:5 w:5) - /// Proof: Investments InvestOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Investments ActiveRedeemOrders (r:5 w:5) - /// Proof: Investments ActiveRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InProcessingRedeemOrders (r:5 w:5) - /// Proof: Investments InProcessingRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments RedeemOrderId (r:5 w:5) - /// Proof: Investments RedeemOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:5 w:0) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: Investments ClearedInvestOrders (r:0 w:5) - /// Proof: Investments ClearedInvestOrders (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen) - /// Storage: Investments ClearedRedeemOrders (r:0 w:5) - /// Proof: Investments ClearedRedeemOrders (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::EpochExecution` (r:1 w:0) + /// Proof: `PoolSystem::EpochExecution` (`max_values`: None, `max_size`: Some(754), added: 3229, 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::PortfolioValuation` (r:1 w:0) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::PortfolioValuation` (r:1 w:1) + /// Proof: `PoolFees::PortfolioValuation` (`max_values`: None, `max_size`: Some(4850), added: 7325, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::AssetsUnderManagement` (r:1 w:1) + /// Proof: `PoolFees::AssetsUnderManagement` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::TotalIssuance` (r:5 w:0) + /// Proof: `OrmlTokens::TotalIssuance` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveInvestOrders` (r:5 w:5) + /// Proof: `Investments::ActiveInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InProcessingInvestOrders` (r:5 w:5) + /// Proof: `Investments::InProcessingInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InvestOrderId` (r:5 w:5) + /// Proof: `Investments::InvestOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveRedeemOrders` (r:5 w:5) + /// Proof: `Investments::ActiveRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InProcessingRedeemOrders` (r:5 w:5) + /// Proof: `Investments::InProcessingRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::RedeemOrderId` (r:5 w:5) + /// Proof: `Investments::RedeemOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:5 w:0) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `Investments::ClearedInvestOrders` (r:0 w:5) + /// Proof: `Investments::ClearedInvestOrders` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) + /// Storage: `Investments::ClearedRedeemOrders` (r:0 w:5) + /// Proof: `Investments::ClearedRedeemOrders` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[1, 100]`. fn close_epoch_no_orders(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1080 + m * (124 ±0) + n * (133 ±0)` + // Measured: `1216 + m * (124 ±0) + n * (133 ±0)` // Estimated: `27515 + n * (2604 ±0)` - // Minimum execution time: 503_066_000 picoseconds. - Weight::from_parts(83_489_245, 0) + // Minimum execution time: 436_896_000 picoseconds. + Weight::from_parts(81_585_373, 0) .saturating_add(Weight::from_parts(0, 27515)) - // Standard Error: 153_259 - .saturating_add(Weight::from_parts(82_922_815, 0).saturating_mul(n.into())) - // Standard Error: 7_077 - .saturating_add(Weight::from_parts(6_664_319, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(7)) + // Standard Error: 123_362 + .saturating_add(Weight::from_parts(71_083_398, 0).saturating_mul(n.into())) + // Standard Error: 5_697 + .saturating_add(Weight::from_parts(3_386_226, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().reads((8_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((8_u64).saturating_mul(n.into()))) .saturating_add(Weight::from_parts(0, 2604).saturating_mul(n.into())) } - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: PoolSystem EpochExecution (r:1 w:1) - /// Proof: PoolSystem EpochExecution (max_values: None, max_size: Some(754), added: 3229, 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 PortfolioValuation (r:1 w:0) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: PoolFees PortfolioValuation (r:1 w:1) - /// Proof: PoolFees PortfolioValuation (max_values: None, max_size: Some(4850), added: 7325, mode: MaxEncodedLen) - /// Storage: PoolFees AssetsUnderManagement (r:1 w:1) - /// Proof: PoolFees AssetsUnderManagement (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) - /// Storage: OrmlTokens TotalIssuance (r:5 w:0) - /// Proof: OrmlTokens TotalIssuance (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) - /// Storage: Investments ActiveInvestOrders (r:5 w:5) - /// Proof: Investments ActiveInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InProcessingInvestOrders (r:5 w:5) - /// Proof: Investments InProcessingInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InvestOrderId (r:5 w:5) - /// Proof: Investments InvestOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Investments ActiveRedeemOrders (r:5 w:5) - /// Proof: Investments ActiveRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InProcessingRedeemOrders (r:5 w:5) - /// Proof: Investments InProcessingRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments RedeemOrderId (r:5 w:5) - /// Proof: Investments RedeemOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::EpochExecution` (r:1 w:1) + /// Proof: `PoolSystem::EpochExecution` (`max_values`: None, `max_size`: Some(754), added: 3229, 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::PortfolioValuation` (r:1 w:0) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::PortfolioValuation` (r:1 w:1) + /// Proof: `PoolFees::PortfolioValuation` (`max_values`: None, `max_size`: Some(4850), added: 7325, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::AssetsUnderManagement` (r:1 w:1) + /// Proof: `PoolFees::AssetsUnderManagement` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::TotalIssuance` (r:5 w:0) + /// Proof: `OrmlTokens::TotalIssuance` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveInvestOrders` (r:5 w:5) + /// Proof: `Investments::ActiveInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InProcessingInvestOrders` (r:5 w:5) + /// Proof: `Investments::InProcessingInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InvestOrderId` (r:5 w:5) + /// Proof: `Investments::InvestOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveRedeemOrders` (r:5 w:5) + /// Proof: `Investments::ActiveRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InProcessingRedeemOrders` (r:5 w:5) + /// Proof: `Investments::InProcessingRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::RedeemOrderId` (r:5 w:5) + /// Proof: `Investments::RedeemOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[0, 100]`. fn close_epoch_no_execution(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1244 + m * (124 ±0) + n * (133 ±0)` + // Measured: `1428 + m * (124 ±0) + n * (133 ±0)` // Estimated: `27515 + n * (2531 ±0)` - // Minimum execution time: 252_130_000 picoseconds. - Weight::from_parts(88_135_536, 0) + // Minimum execution time: 223_157_000 picoseconds. + Weight::from_parts(91_267_466, 0) .saturating_add(Weight::from_parts(0, 27515)) - // Standard Error: 117_082 - .saturating_add(Weight::from_parts(34_384_169, 0).saturating_mul(n.into())) - // Standard Error: 5_342 - .saturating_add(Weight::from_parts(6_467_113, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(7)) + // Standard Error: 84_017 + .saturating_add(Weight::from_parts(27_905_302, 0).saturating_mul(n.into())) + // Standard Error: 3_834 + .saturating_add(Weight::from_parts(3_184_077, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(5)) .saturating_add(T::DbWeight::get().writes((6_u64).saturating_mul(n.into()))) .saturating_add(Weight::from_parts(0, 2531).saturating_mul(n.into())) } - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: PoolSystem EpochExecution (r:1 w:0) - /// Proof: PoolSystem EpochExecution (max_values: None, max_size: Some(754), added: 3229, 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 PortfolioValuation (r:1 w:0) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: PoolFees PortfolioValuation (r:1 w:1) - /// Proof: PoolFees PortfolioValuation (max_values: None, max_size: Some(4850), added: 7325, mode: MaxEncodedLen) - /// Storage: PoolFees AssetsUnderManagement (r:1 w:1) - /// Proof: PoolFees AssetsUnderManagement (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) - /// Storage: OrmlTokens TotalIssuance (r:5 w:1) - /// Proof: OrmlTokens TotalIssuance (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) - /// Storage: Investments ActiveInvestOrders (r:5 w:5) - /// Proof: Investments ActiveInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InProcessingInvestOrders (r:5 w:5) - /// Proof: Investments InProcessingInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InvestOrderId (r:5 w:5) - /// Proof: Investments InvestOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Investments ActiveRedeemOrders (r:5 w:5) - /// Proof: Investments ActiveRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InProcessingRedeemOrders (r:5 w:5) - /// Proof: Investments InProcessingRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments RedeemOrderId (r:5 w:5) - /// Proof: Investments RedeemOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:7 w:3) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:2 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Investments ClearedInvestOrders (r:0 w:5) - /// Proof: Investments ClearedInvestOrders (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen) - /// Storage: Investments ClearedRedeemOrders (r:0 w:5) - /// Proof: Investments ClearedRedeemOrders (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::EpochExecution` (r:1 w:0) + /// Proof: `PoolSystem::EpochExecution` (`max_values`: None, `max_size`: Some(754), added: 3229, 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::PortfolioValuation` (r:1 w:0) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::PortfolioValuation` (r:1 w:1) + /// Proof: `PoolFees::PortfolioValuation` (`max_values`: None, `max_size`: Some(4850), added: 7325, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::AssetsUnderManagement` (r:1 w:1) + /// Proof: `PoolFees::AssetsUnderManagement` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::TotalIssuance` (r:5 w:1) + /// Proof: `OrmlTokens::TotalIssuance` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveInvestOrders` (r:5 w:5) + /// Proof: `Investments::ActiveInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InProcessingInvestOrders` (r:5 w:5) + /// Proof: `Investments::InProcessingInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InvestOrderId` (r:5 w:5) + /// Proof: `Investments::InvestOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveRedeemOrders` (r:5 w:5) + /// Proof: `Investments::ActiveRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InProcessingRedeemOrders` (r:5 w:5) + /// Proof: `Investments::InProcessingRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::RedeemOrderId` (r:5 w:5) + /// Proof: `Investments::RedeemOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:7 w:3) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:2 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Investments::ClearedInvestOrders` (r:0 w:5) + /// Proof: `Investments::ClearedInvestOrders` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) + /// Storage: `Investments::ClearedRedeemOrders` (r:0 w:5) + /// Proof: `Investments::ClearedRedeemOrders` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[0, 100]`. fn close_epoch_execute(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2055 + m * (124 ±0) + n * (167 ±0)` - // Estimated: `27515 + m * (124 ±0) + n * (2604 ±0)` - // Minimum execution time: 606_499_000 picoseconds. - Weight::from_parts(205_295_180, 0) + // Measured: `2120 + m * (124 ±0) + n * (167 ±0)` + // Estimated: `27515 + n * (2604 ±0)` + // Minimum execution time: 531_753_000 picoseconds. + Weight::from_parts(177_037_674, 0) .saturating_add(Weight::from_parts(0, 27515)) - // Standard Error: 172_942 - .saturating_add(Weight::from_parts(83_784_432, 0).saturating_mul(n.into())) - // Standard Error: 7_892 - .saturating_add(Weight::from_parts(6_626_422, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(13)) + // Standard Error: 151_845 + .saturating_add(Weight::from_parts(73_612_531, 0).saturating_mul(n.into())) + // Standard Error: 6_929 + .saturating_add(Weight::from_parts(3_395_975, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(14)) .saturating_add(T::DbWeight::get().reads((8_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(10)) .saturating_add(T::DbWeight::get().writes((8_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_parts(0, 124).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 2604).saturating_mul(n.into())) } - /// Storage: PoolSystem EpochExecution (r:1 w:1) - /// Proof: PoolSystem EpochExecution (max_values: None, max_size: Some(754), added: 3229, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:0) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) + /// Storage: `PoolSystem::EpochExecution` (r:1 w:1) + /// Proof: `PoolSystem::EpochExecution` (`max_values`: None, `max_size`: Some(754), added: 3229, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:0) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[0, 100]`. fn submit_solution(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `821 + m * (124 ±0) + n * (249 ±0)` // Estimated: `17508` - // Minimum execution time: 43_361_000 picoseconds. - Weight::from_parts(37_221_242, 0) + // Minimum execution time: 39_494_000 picoseconds. + Weight::from_parts(34_485_549, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 35_715 - .saturating_add(Weight::from_parts(1_621_581, 0).saturating_mul(n.into())) - // Standard Error: 1_629 - .saturating_add(Weight::from_parts(203_444, 0).saturating_mul(m.into())) + // Standard Error: 33_558 + .saturating_add(Weight::from_parts(1_408_318, 0).saturating_mul(n.into())) + // Standard Error: 1_531 + .saturating_add(Weight::from_parts(202_749, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PoolSystem EpochExecution (r:1 w:1) - /// Proof: PoolSystem EpochExecution (max_values: None, max_size: Some(754), added: 3229, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) - /// Storage: Investments InProcessingInvestOrders (r:5 w:5) - /// Proof: Investments InProcessingInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:7 w:3) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:2 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: OrmlTokens TotalIssuance (r:1 w:1) - /// Proof: OrmlTokens TotalIssuance (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) - /// Storage: Investments InvestOrderId (r:5 w:0) - /// Proof: Investments InvestOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Investments ActiveInvestOrders (r:5 w:5) - /// Proof: Investments ActiveInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InProcessingRedeemOrders (r:5 w:5) - /// Proof: Investments InProcessingRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments RedeemOrderId (r:5 w:0) - /// Proof: Investments RedeemOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Investments ActiveRedeemOrders (r:5 w:5) - /// Proof: Investments ActiveRedeemOrders (max_values: None, max_size: Some(56), added: 2531, 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: Investments ClearedInvestOrders (r:0 w:5) - /// Proof: Investments ClearedInvestOrders (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen) - /// Storage: Investments ClearedRedeemOrders (r:0 w:5) - /// Proof: Investments ClearedRedeemOrders (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::EpochExecution` (r:1 w:1) + /// Proof: `PoolSystem::EpochExecution` (`max_values`: None, `max_size`: Some(754), added: 3229, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) + /// Storage: `Investments::InProcessingInvestOrders` (r:5 w:5) + /// Proof: `Investments::InProcessingInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:7 w:3) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:2 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::TotalIssuance` (r:1 w:1) + /// Proof: `OrmlTokens::TotalIssuance` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `Investments::InvestOrderId` (r:5 w:0) + /// Proof: `Investments::InvestOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveInvestOrders` (r:5 w:5) + /// Proof: `Investments::ActiveInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InProcessingRedeemOrders` (r:5 w:5) + /// Proof: `Investments::InProcessingRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::RedeemOrderId` (r:5 w:0) + /// Proof: `Investments::RedeemOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveRedeemOrders` (r:5 w:5) + /// Proof: `Investments::ActiveRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, 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: `Investments::ClearedInvestOrders` (r:0 w:5) + /// Proof: `Investments::ClearedInvestOrders` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) + /// Storage: `Investments::ClearedRedeemOrders` (r:0 w:5) + /// Proof: `Investments::ClearedRedeemOrders` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[0, 100]`. fn execute_epoch(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1977 + m * (124 ±0) + n * (633 ±0)` - // Estimated: `17508 + m * (124 ±0) + n * (2604 ±0)` - // Minimum execution time: 256_207_000 picoseconds. - Weight::from_parts(159_991_035, 0) + // Measured: `2042 + m * (124 ±0) + n * (633 ±0)` + // Estimated: `17508 + n * (2604 ±0)` + // Minimum execution time: 241_661_000 picoseconds. + Weight::from_parts(150_024_240, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 101_229 - .saturating_add(Weight::from_parts(61_278_934, 0).saturating_mul(n.into())) - // Standard Error: 4_619 - .saturating_add(Weight::from_parts(401_978, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(11)) + // Standard Error: 92_293 + .saturating_add(Weight::from_parts(55_452_128, 0).saturating_mul(n.into())) + // Standard Error: 4_211 + .saturating_add(Weight::from_parts(392_999, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(9)) .saturating_add(T::DbWeight::get().writes((6_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_parts(0, 124).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 2604).saturating_mul(n.into())) } } diff --git a/runtime/centrifuge/src/weights/pallet_preimage.rs b/runtime/centrifuge/src/weights/pallet_preimage.rs index 06fbdb6efc..f7f83d8228 100644 --- a/runtime/centrifuge/src/weights/pallet_preimage.rs +++ b/runtime/centrifuge/src/weights/pallet_preimage.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_preimage` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_preimage // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_preimage.rs @@ -32,173 +31,219 @@ use core::marker::PhantomData; /// Weight functions for `pallet_preimage`. pub struct WeightInfo(PhantomData); impl pallet_preimage::WeightInfo for WeightInfo { - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Preimage PreimageFor (r:0 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 4194304]`. fn note_preimage(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `178` - // Estimated: `3556` - // Minimum execution time: 43_511_000 picoseconds. - Weight::from_parts(450_203_216, 0) - .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 17 - .saturating_add(Weight::from_parts(2_090, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `76` + // Estimated: `3568` + // Minimum execution time: 67_957_000 picoseconds. + Weight::from_parts(68_688_000, 0) + .saturating_add(Weight::from_parts(0, 3568)) + // Standard Error: 10 + .saturating_add(Weight::from_parts(2_734, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Preimage PreimageFor (r:0 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 4194304]`. fn note_requested_preimage(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3556` - // Minimum execution time: 23_814_000 picoseconds. - Weight::from_parts(13_518, 0) + // Minimum execution time: 22_232_000 picoseconds. + Weight::from_parts(22_442_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 8 - .saturating_add(Weight::from_parts(2_768, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) + // Standard Error: 9 + .saturating_add(Weight::from_parts(2_861, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Preimage PreimageFor (r:0 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 4194304]`. fn note_no_deposit_preimage(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3556` - // Minimum execution time: 23_073_000 picoseconds. - Weight::from_parts(7_859_013, 0) + // Minimum execution time: 21_240_000 picoseconds. + Weight::from_parts(21_380_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 11 - .saturating_add(Weight::from_parts(2_745, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) + // Standard Error: 10 + .saturating_add(Weight::from_parts(2_811, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Preimage PreimageFor (r:0 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) fn unnote_preimage() -> Weight { // Proof Size summary in bytes: - // Measured: `324` - // Estimated: `3556` - // Minimum execution time: 51_365_000 picoseconds. - Weight::from_parts(53_099_000, 0) - .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `277` + // Estimated: `3568` + // Minimum execution time: 67_567_000 picoseconds. + Weight::from_parts(71_203_000, 0) + .saturating_add(Weight::from_parts(0, 3568)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Preimage PreimageFor (r:0 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) fn unnote_no_deposit_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `178` // Estimated: `3556` - // Minimum execution time: 29_625_000 picoseconds. - Weight::from_parts(30_897_000, 0) + // Minimum execution time: 29_836_000 picoseconds. + Weight::from_parts(31_940_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn request_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `222` // Estimated: `3556` - // Minimum execution time: 25_487_000 picoseconds. - Weight::from_parts(26_579_000, 0) + // Minimum execution time: 22_872_000 picoseconds. + Weight::from_parts(24_416_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn request_no_deposit_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `178` // Estimated: `3556` - // Minimum execution time: 14_507_000 picoseconds. - Weight::from_parts(15_078_000, 0) + // Minimum execution time: 17_282_000 picoseconds. + Weight::from_parts(18_875_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn request_unnoted_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3556` - // Minimum execution time: 20_759_000 picoseconds. - Weight::from_parts(21_239_000, 0) + // Minimum execution time: 18_846_000 picoseconds. + Weight::from_parts(19_627_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn request_requested_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3556` - // Minimum execution time: 12_673_000 picoseconds. - Weight::from_parts(12_973_000, 0) + // Minimum execution time: 13_816_000 picoseconds. + Weight::from_parts(14_387_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Preimage PreimageFor (r:0 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) fn unrequest_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `178` // Estimated: `3556` - // Minimum execution time: 25_738_000 picoseconds. - Weight::from_parts(26_580_000, 0) + // Minimum execution time: 25_207_000 picoseconds. + Weight::from_parts(26_880_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn unrequest_unnoted_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3556` - // Minimum execution time: 12_544_000 picoseconds. - Weight::from_parts(13_014_000, 0) + // Minimum execution time: 13_846_000 picoseconds. + Weight::from_parts(14_167_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn unrequest_multi_referenced_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3556` - // Minimum execution time: 12_563_000 picoseconds. - Weight::from_parts(12_874_000, 0) + // Minimum execution time: 13_835_000 picoseconds. + Weight::from_parts(14_246_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - - fn ensure_updated(_: u32) -> cumulus_primitives_core::Weight { - Weight::default() - } + /// Storage: `Preimage::StatusFor` (r:1023 w:1023) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1023 w:1023) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1023 w:1023) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:0 w:1023) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// The range of component `n` is `[1, 1024]`. + fn ensure_updated(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `404 + n * (227 ±0)` + // Estimated: `990 + n * (2603 ±0)` + // Minimum execution time: 77_144_000 picoseconds. + Weight::from_parts(77_675_000, 0) + .saturating_add(Weight::from_parts(0, 990)) + // Standard Error: 35_892 + .saturating_add(Weight::from_parts(75_015_178, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(n.into()))) + .saturating_add(Weight::from_parts(0, 2603).saturating_mul(n.into())) + } } diff --git a/runtime/centrifuge/src/weights/pallet_proxy.rs b/runtime/centrifuge/src/weights/pallet_proxy.rs index 583defa622..416c369eb9 100644 --- a/runtime/centrifuge/src/weights/pallet_proxy.rs +++ b/runtime/centrifuge/src/weights/pallet_proxy.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_proxy` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_proxy // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_proxy.rs @@ -32,172 +31,172 @@ use core::marker::PhantomData; /// Weight functions for `pallet_proxy`. pub struct WeightInfo(PhantomData); impl pallet_proxy::WeightInfo for WeightInfo { - /// Storage: Proxy Proxies (r:1 w:0) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:0) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn proxy(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `293 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 22_482_000 picoseconds. - Weight::from_parts(24_103_669, 0) + // Minimum execution time: 18_384_000 picoseconds. + Weight::from_parts(19_097_838, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_878 - .saturating_add(Weight::from_parts(13_525, 0).saturating_mul(p.into())) + // Standard Error: 1_242 + .saturating_add(Weight::from_parts(47_304, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) } - /// Storage: Proxy Proxies (r:1 w:0) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) - /// Storage: Proxy Announcements (r:1 w:1) - /// Proof: Proxy Announcements (max_values: None, max_size: Some(2233), added: 4708, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:0) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) + /// Storage: `Proxy::Announcements` (r:1 w:1) + /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn proxy_announced(a: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `620 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5698` - // Minimum execution time: 52_799_000 picoseconds. - Weight::from_parts(52_725_041, 0) + // Minimum execution time: 48_761_000 picoseconds. + Weight::from_parts(49_720_241, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 2_220 - .saturating_add(Weight::from_parts(226_366, 0).saturating_mul(a.into())) - // Standard Error: 2_294 - .saturating_add(Weight::from_parts(41_798, 0).saturating_mul(p.into())) + // Standard Error: 4_236 + .saturating_add(Weight::from_parts(198_243, 0).saturating_mul(a.into())) + // Standard Error: 4_377 + .saturating_add(Weight::from_parts(27_827, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Proxy Announcements (r:1 w:1) - /// Proof: Proxy Announcements (max_values: None, max_size: Some(2233), added: 4708, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Proxy::Announcements` (r:1 w:1) + /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn remove_announcement(a: u32, _p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `535 + a * (68 ±0)` // Estimated: `5698` - // Minimum execution time: 33_583_000 picoseconds. - Weight::from_parts(34_820_824, 0) + // Minimum execution time: 31_219_000 picoseconds. + Weight::from_parts(32_252_523, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_852 - .saturating_add(Weight::from_parts(217_039, 0).saturating_mul(a.into())) + // Standard Error: 1_985 + .saturating_add(Weight::from_parts(226_389, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Proxy Announcements (r:1 w:1) - /// Proof: Proxy Announcements (max_values: None, max_size: Some(2233), added: 4708, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Proxy::Announcements` (r:1 w:1) + /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn reject_announcement(a: u32, _p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `535 + a * (68 ±0)` // Estimated: `5698` - // Minimum execution time: 33_583_000 picoseconds. - Weight::from_parts(34_783_767, 0) + // Minimum execution time: 30_968_000 picoseconds. + Weight::from_parts(32_225_799, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_845 - .saturating_add(Weight::from_parts(217_344, 0).saturating_mul(a.into())) + // Standard Error: 1_898 + .saturating_add(Weight::from_parts(222_682, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Proxy Proxies (r:1 w:0) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) - /// Storage: Proxy Announcements (r:1 w:1) - /// Proof: Proxy Announcements (max_values: None, max_size: Some(2233), added: 4708, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:0) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) + /// Storage: `Proxy::Announcements` (r:1 w:1) + /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn announce(a: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `552 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5698` - // Minimum execution time: 47_529_000 picoseconds. - Weight::from_parts(47_136_249, 0) + // Minimum execution time: 41_467_000 picoseconds. + Weight::from_parts(43_094_252, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_726 - .saturating_add(Weight::from_parts(215_266, 0).saturating_mul(a.into())) - // Standard Error: 1_783 - .saturating_add(Weight::from_parts(39_957, 0).saturating_mul(p.into())) + // Standard Error: 4_013 + .saturating_add(Weight::from_parts(218_559, 0).saturating_mul(a.into())) + // Standard Error: 4_146 + .saturating_add(Weight::from_parts(44_158, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Proxy Proxies (r:1 w:1) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn add_proxy(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `293 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 35_816_000 picoseconds. - Weight::from_parts(36_963_866, 0) + // Minimum execution time: 29_695_000 picoseconds. + Weight::from_parts(30_725_974, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_285 - .saturating_add(Weight::from_parts(47_584, 0).saturating_mul(p.into())) + // Standard Error: 1_268 + .saturating_add(Weight::from_parts(41_910, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Proxy Proxies (r:1 w:1) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn remove_proxy(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `293 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 35_787_000 picoseconds. - Weight::from_parts(37_067_950, 0) + // Minimum execution time: 29_635_000 picoseconds. + Weight::from_parts(31_078_426, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 2_254 - .saturating_add(Weight::from_parts(48_736, 0).saturating_mul(p.into())) + // Standard Error: 2_453 + .saturating_add(Weight::from_parts(33_692, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Proxy Proxies (r:1 w:1) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn remove_proxies(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `293 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 31_489_000 picoseconds. - Weight::from_parts(32_356_192, 0) + // Minimum execution time: 28_854_000 picoseconds. + Weight::from_parts(29_891_464, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_503 - .saturating_add(Weight::from_parts(44_238, 0).saturating_mul(p.into())) + // Standard Error: 1_510 + .saturating_add(Weight::from_parts(34_316, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Proxy Proxies (r:1 w:1) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn create_pure(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `305` // Estimated: `4706` - // Minimum execution time: 38_562_000 picoseconds. - Weight::from_parts(39_879_762, 0) + // Minimum execution time: 31_980_000 picoseconds. + Weight::from_parts(33_124_220, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_565 - .saturating_add(Weight::from_parts(21_056, 0).saturating_mul(p.into())) + // Standard Error: 1_545 + .saturating_add(Weight::from_parts(9_586, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Proxy Proxies (r:1 w:1) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[0, 30]`. fn kill_pure(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `330 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 32_831_000 picoseconds. - Weight::from_parts(34_099_383, 0) + // Minimum execution time: 29_976_000 picoseconds. + Weight::from_parts(31_111_792, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_348 - .saturating_add(Weight::from_parts(35_437, 0).saturating_mul(p.into())) + // Standard Error: 1_519 + .saturating_add(Weight::from_parts(40_969, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/centrifuge/src/weights/pallet_remarks.rs b/runtime/centrifuge/src/weights/pallet_remarks.rs index 72cded43bc..8e7c1cf3bd 100644 --- a/runtime/centrifuge/src/weights/pallet_remarks.rs +++ b/runtime/centrifuge/src/weights/pallet_remarks.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_remarks` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_remarks // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_remarks.rs @@ -37,10 +36,10 @@ impl pallet_remarks::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 17_122_000 picoseconds. - Weight::from_parts(17_699_384, 0) + // Minimum execution time: 12_233_000 picoseconds. + Weight::from_parts(12_745_452, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_353 - .saturating_add(Weight::from_parts(106_809, 0).saturating_mul(n.into())) + // Standard Error: 2_323 + .saturating_add(Weight::from_parts(129_352, 0).saturating_mul(n.into())) } } diff --git a/runtime/centrifuge/src/weights/pallet_restricted_tokens.rs b/runtime/centrifuge/src/weights/pallet_restricted_tokens.rs index c96aec93aa..83f01b7679 100644 --- a/runtime/centrifuge/src/weights/pallet_restricted_tokens.rs +++ b/runtime/centrifuge/src/weights/pallet_restricted_tokens.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_restricted_tokens` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_restricted_tokens // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_restricted_tokens.rs @@ -32,157 +31,157 @@ use core::marker::PhantomData; /// Weight functions for `pallet_restricted_tokens`. pub struct WeightInfo(PhantomData); impl pallet_restricted_tokens::WeightInfo for WeightInfo { - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:2 w:0) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:2 w:0) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_native() -> Weight { // Proof Size summary in bytes: // Measured: `505` // Estimated: `6124` - // Minimum execution time: 96_760_000 picoseconds. - Weight::from_parts(98_223_000, 0) + // Minimum execution time: 82_273_000 picoseconds. + Weight::from_parts(83_316_000, 0) .saturating_add(Weight::from_parts(0, 6124)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:2 w:0) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:2 w:0) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_other() -> Weight { // Proof Size summary in bytes: - // Measured: `923` + // Measured: `856` // Estimated: `6198` - // Minimum execution time: 75_721_000 picoseconds. - Weight::from_parts(76_853_000, 0) + // Minimum execution time: 66_654_000 picoseconds. + Weight::from_parts(67_506_000, 0) .saturating_add(Weight::from_parts(0, 6198)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:2 w:0) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:2 w:0) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_keep_alive_native() -> Weight { // Proof Size summary in bytes: // Measured: `505` // Estimated: `6124` - // Minimum execution time: 83_365_000 picoseconds. - Weight::from_parts(85_389_000, 0) + // Minimum execution time: 71_644_000 picoseconds. + Weight::from_parts(73_167_000, 0) .saturating_add(Weight::from_parts(0, 6124)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:2 w:0) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:2 w:0) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_keep_alive_other() -> Weight { // Proof Size summary in bytes: - // Measured: `820` + // Measured: `753` // Estimated: `6198` - // Minimum execution time: 70_691_000 picoseconds. - Weight::from_parts(72_184_000, 0) + // Minimum execution time: 61_605_000 picoseconds. + Weight::from_parts(63_288_000, 0) .saturating_add(Weight::from_parts(0, 6198)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:2 w:0) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:2 w:0) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_all_native() -> Weight { // Proof Size summary in bytes: // Measured: `505` // Estimated: `6124` - // Minimum execution time: 100_137_000 picoseconds. - Weight::from_parts(102_040_000, 0) + // Minimum execution time: 85_871_000 picoseconds. + Weight::from_parts(87_754_000, 0) .saturating_add(Weight::from_parts(0, 6124)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:2 w:0) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:2 w:0) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_all_other() -> Weight { // Proof Size summary in bytes: - // Measured: `923` + // Measured: `856` // Estimated: `6198` - // Minimum execution time: 80_459_000 picoseconds. - Weight::from_parts(81_481_000, 0) + // Minimum execution time: 70_893_000 picoseconds. + Weight::from_parts(71_895_000, 0) .saturating_add(Weight::from_parts(0, 6198)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_transfer_native() -> Weight { // Proof Size summary in bytes: // Measured: `259` // Estimated: `3593` - // Minimum execution time: 88_495_000 picoseconds. - Weight::from_parts(89_526_000, 0) + // Minimum execution time: 72_526_000 picoseconds. + Weight::from_parts(74_039_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_transfer_other() -> Weight { // Proof Size summary in bytes: - // Measured: `677` + // Measured: `610` // Estimated: `6198` - // Minimum execution time: 66_544_000 picoseconds. - Weight::from_parts(67_997_000, 0) + // Minimum execution time: 53_661_000 picoseconds. + Weight::from_parts(55_263_000, 0) .saturating_add(Weight::from_parts(0, 6198)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Balances Holds (r:1 w:1) - /// Proof: Balances Holds (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn set_balance_native() -> Weight { // Proof Size summary in bytes: - // Measured: `298` - // Estimated: `3674` - // Minimum execution time: 173_964_000 picoseconds. - Weight::from_parts(175_507_000, 0) - .saturating_add(Weight::from_parts(0, 3674)) + // Measured: `300` + // Estimated: `3593` + // Minimum execution time: 157_094_000 picoseconds. + Weight::from_parts(159_549_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: OrmlTokens Accounts (r:1 w:1) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OrmlTokens TotalIssuance (r:1 w:1) - /// Proof: OrmlTokens TotalIssuance (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) + /// Storage: `OrmlTokens::Accounts` (r:1 w:1) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::TotalIssuance` (r:1 w:1) + /// Proof: `OrmlTokens::TotalIssuance` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) fn set_balance_other() -> Weight { // Proof Size summary in bytes: - // Measured: `467` - // Estimated: `3932` - // Minimum execution time: 103_062_000 picoseconds. - Weight::from_parts(104_534_000, 0) - .saturating_add(Weight::from_parts(0, 3932)) + // Measured: `400` + // Estimated: `4407` + // Minimum execution time: 91_301_000 picoseconds. + Weight::from_parts(92_442_000, 0) + .saturating_add(Weight::from_parts(0, 4407)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/centrifuge/src/weights/pallet_scheduler.rs b/runtime/centrifuge/src/weights/pallet_scheduler.rs index fecd6dead3..41579f944a 100644 --- a/runtime/centrifuge/src/weights/pallet_scheduler.rs +++ b/runtime/centrifuge/src/weights/pallet_scheduler.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_scheduler` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_scheduler // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_scheduler.rs @@ -32,30 +31,30 @@ use core::marker::PhantomData; /// Weight functions for `pallet_scheduler`. pub struct WeightInfo(PhantomData); impl pallet_scheduler::WeightInfo for WeightInfo { - /// Storage: Scheduler IncompleteSince (r:1 w:1) - /// Proof: Scheduler IncompleteSince (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: `Scheduler::IncompleteSince` (r:1 w:1) + /// Proof: `Scheduler::IncompleteSince` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn service_agendas_base() -> Weight { // Proof Size summary in bytes: // Measured: `31` // Estimated: `1489` - // Minimum execution time: 5_811_000 picoseconds. - Weight::from_parts(6_091_000, 0) + // Minimum execution time: 3_968_000 picoseconds. + Weight::from_parts(4_148_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Scheduler Agenda (r:1 w:1) - /// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 50]`. fn service_agenda_base(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `78 + s * (177 ±0)` // Estimated: `42428` - // Minimum execution time: 5_760_000 picoseconds. - Weight::from_parts(8_225_483, 0) + // Minimum execution time: 5_249_000 picoseconds. + Weight::from_parts(8_455_668, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 3_455 - .saturating_add(Weight::from_parts(1_195_501, 0).saturating_mul(s.into())) + // Standard Error: 3_978 + .saturating_add(Weight::from_parts(613_461, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -63,36 +62,38 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_395_000 picoseconds. - Weight::from_parts(8_756_000, 0) + // Minimum execution time: 4_970_000 picoseconds. + Weight::from_parts(5_120_000, 0) .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: Preimage PreimageFor (r:1 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: Measured) - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: `Preimage::PreimageFor` (r:1 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// The range of component `s` is `[128, 4194304]`. fn service_task_fetched(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `213 + s * (1 ±0)` // Estimated: `3678 + s * (1 ±0)` - // Minimum execution time: 30_176_000 picoseconds. - Weight::from_parts(4_024_841, 0) + // Minimum execution time: 25_228_000 picoseconds. + Weight::from_parts(25_808_000, 0) .saturating_add(Weight::from_parts(0, 3678)) - // Standard Error: 18 - .saturating_add(Weight::from_parts(1_267, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(2)) + // Standard Error: 14 + .saturating_add(Weight::from_parts(1_379, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into())) } - /// Storage: Scheduler Lookup (r:0 w:1) - /// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) + /// Storage: `Scheduler::Lookup` (r:0 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) fn service_task_named() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 10_750_000 picoseconds. - Weight::from_parts(11_210_000, 0) + // Minimum execution time: 7_264_000 picoseconds. + Weight::from_parts(7_554_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -100,89 +101,89 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_526_000 picoseconds. - Weight::from_parts(8_787_000, 0) + // Minimum execution time: 4_899_000 picoseconds. + Weight::from_parts(5_200_000, 0) .saturating_add(Weight::from_parts(0, 0)) } fn execute_dispatch_signed() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_398_000 picoseconds. - Weight::from_parts(4_689_000, 0) + // Minimum execution time: 3_887_000 picoseconds. + Weight::from_parts(4_138_000, 0) .saturating_add(Weight::from_parts(0, 0)) } fn execute_dispatch_unsigned() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_297_000 picoseconds. - Weight::from_parts(4_579_000, 0) + // Minimum execution time: 3_867_000 picoseconds. + Weight::from_parts(4_028_000, 0) .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: Scheduler Agenda (r:1 w:1) - /// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 49]`. fn schedule(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `78 + s * (177 ±0)` // Estimated: `42428` - // Minimum execution time: 20_328_000 picoseconds. - Weight::from_parts(23_022_460, 0) + // Minimum execution time: 14_648_000 picoseconds. + Weight::from_parts(17_990_542, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 3_904 - .saturating_add(Weight::from_parts(1_195_872, 0).saturating_mul(s.into())) + // Standard Error: 4_276 + .saturating_add(Weight::from_parts(629_105, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Scheduler Agenda (r:1 w:1) - /// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen) - /// Storage: Scheduler Lookup (r:0 w:1) - /// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Lookup` (r:0 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// The range of component `s` is `[1, 50]`. fn cancel(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `78 + s * (177 ±0)` // Estimated: `42428` - // Minimum execution time: 26_760_000 picoseconds. - Weight::from_parts(23_352_591, 0) + // Minimum execution time: 20_208_000 picoseconds. + Weight::from_parts(18_944_972, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 5_091 - .saturating_add(Weight::from_parts(2_188_819, 0).saturating_mul(s.into())) + // Standard Error: 5_325 + .saturating_add(Weight::from_parts(974_711, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Scheduler Lookup (r:1 w:1) - /// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Scheduler Agenda (r:1 w:1) - /// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen) + /// Storage: `Scheduler::Lookup` (r:1 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 49]`. fn schedule_named(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `255 + s * (185 ±0)` // Estimated: `42428` - // Minimum execution time: 24_827_000 picoseconds. - Weight::from_parts(28_785_406, 0) + // Minimum execution time: 19_917_000 picoseconds. + Weight::from_parts(24_367_159, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 3_945 - .saturating_add(Weight::from_parts(1_229_112, 0).saturating_mul(s.into())) + // Standard Error: 4_143 + .saturating_add(Weight::from_parts(664_976, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Scheduler Lookup (r:1 w:1) - /// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Scheduler Agenda (r:1 w:1) - /// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen) + /// Storage: `Scheduler::Lookup` (r:1 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) /// The range of component `s` is `[1, 50]`. fn cancel_named(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `281 + s * (185 ±0)` // Estimated: `42428` - // Minimum execution time: 27_541_000 picoseconds. - Weight::from_parts(26_000_970, 0) + // Minimum execution time: 23_364_000 picoseconds. + Weight::from_parts(22_474_466, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 5_203 - .saturating_add(Weight::from_parts(2_218_805, 0).saturating_mul(s.into())) + // Standard Error: 5_379 + .saturating_add(Weight::from_parts(1_009_547, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/centrifuge/src/weights/pallet_session.rs b/runtime/centrifuge/src/weights/pallet_session.rs index cf9e0f5bef..e5e44ff9f0 100644 --- a/runtime/centrifuge/src/weights/pallet_session.rs +++ b/runtime/centrifuge/src/weights/pallet_session.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_session` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_session // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_session.rs @@ -32,31 +31,31 @@ use core::marker::PhantomData; /// Weight functions for `pallet_session`. pub struct WeightInfo(PhantomData); impl pallet_session::WeightInfo for WeightInfo { - /// Storage: Session NextKeys (r:1 w:1) - /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - /// Storage: Session KeyOwner (r:1 w:1) - /// Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) + /// Storage: `Session::NextKeys` (r:1 w:1) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Session::KeyOwner` (r:1 w:1) + /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `369` - // Estimated: `3834` - // Minimum execution time: 26_700_000 picoseconds. - Weight::from_parts(27_431_000, 0) - .saturating_add(Weight::from_parts(0, 3834)) + // Measured: `308` + // Estimated: `3773` + // Minimum execution time: 29_145_000 picoseconds. + Weight::from_parts(29_686_000, 0) + .saturating_add(Weight::from_parts(0, 3773)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Session NextKeys (r:1 w:1) - /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - /// Storage: Session KeyOwner (r:0 w:1) - /// Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) + /// Storage: `Session::NextKeys` (r:1 w:1) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Session::KeyOwner` (r:0 w:1) + /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn purge_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `386` - // Estimated: `3851` - // Minimum execution time: 18_565_000 picoseconds. - Weight::from_parts(19_146_000, 0) - .saturating_add(Weight::from_parts(0, 3851)) + // Measured: `315` + // Estimated: `3780` + // Minimum execution time: 18_775_000 picoseconds. + Weight::from_parts(19_285_000, 0) + .saturating_add(Weight::from_parts(0, 3780)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/centrifuge/src/weights/pallet_timestamp.rs b/runtime/centrifuge/src/weights/pallet_timestamp.rs index fdaed47ce4..245c250d58 100644 --- a/runtime/centrifuge/src/weights/pallet_timestamp.rs +++ b/runtime/centrifuge/src/weights/pallet_timestamp.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_timestamp` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_timestamp // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_timestamp.rs @@ -32,16 +31,16 @@ use core::marker::PhantomData; /// Weight functions for `pallet_timestamp`. pub struct WeightInfo(PhantomData); impl pallet_timestamp::WeightInfo for WeightInfo { - /// Storage: Timestamp Now (r:1 w:1) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Aura CurrentSlot (r:1 w:0) - /// Proof: Aura CurrentSlot (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: `Timestamp::Now` (r:1 w:1) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Aura::CurrentSlot` (r:1 w:0) + /// Proof: `Aura::CurrentSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set() -> Weight { // Proof Size summary in bytes: // Measured: `223` // Estimated: `1493` - // Minimum execution time: 13_395_000 picoseconds. - Weight::from_parts(13_796_000, 0) + // Minimum execution time: 10_469_000 picoseconds. + Weight::from_parts(10_830_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -50,8 +49,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `128` // Estimated: `0` - // Minimum execution time: 6_041_000 picoseconds. - Weight::from_parts(6_372_000, 0) + // Minimum execution time: 4_629_000 picoseconds. + Weight::from_parts(4_799_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/runtime/centrifuge/src/weights/pallet_token_mux.rs b/runtime/centrifuge/src/weights/pallet_token_mux.rs index 86bf2f0486..a949d39389 100644 --- a/runtime/centrifuge/src/weights/pallet_token_mux.rs +++ b/runtime/centrifuge/src/weights/pallet_token_mux.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_token_mux` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_token_mux // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_token_mux.rs @@ -32,62 +31,62 @@ use core::marker::PhantomData; /// Weight functions for `pallet_token_mux`. pub struct WeightInfo(PhantomData); impl pallet_token_mux::WeightInfo for WeightInfo { - /// Storage: OrmlAssetRegistry Metadata (r:2 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OrmlTokens Accounts (r:3 w:3) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: OrmlTokens TotalIssuance (r:1 w:1) - /// Proof: OrmlTokens TotalIssuance (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) + /// Storage: `OrmlAssetRegistry::Metadata` (r:2 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:3 w:3) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::TotalIssuance` (r:1 w:1) + /// Proof: `OrmlTokens::TotalIssuance` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) fn deposit() -> Weight { // Proof Size summary in bytes: - // Measured: `803` + // Measured: `690` // Estimated: `8802` - // Minimum execution time: 119_933_000 picoseconds. - Weight::from_parts(120_885_000, 0) + // Minimum execution time: 99_926_000 picoseconds. + Weight::from_parts(100_939_000, 0) .saturating_add(Weight::from_parts(0, 8802)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(6)) } - /// Storage: OrmlAssetRegistry Metadata (r:2 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OrmlTokens Accounts (r:3 w:3) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlTokens TotalIssuance (r:1 w:1) - /// Proof: OrmlTokens TotalIssuance (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `OrmlAssetRegistry::Metadata` (r:2 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:3 w:3) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::TotalIssuance` (r:1 w:1) + /// Proof: `OrmlTokens::TotalIssuance` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn burn() -> Weight { // Proof Size summary in bytes: - // Measured: `1093` + // Measured: `980` // Estimated: `8802` - // Minimum execution time: 105_166_000 picoseconds. - Weight::from_parts(107_200_000, 0) + // Minimum execution time: 94_646_000 picoseconds. + Weight::from_parts(95_629_000, 0) .saturating_add(Weight::from_parts(0, 8802)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: OrderBook Orders (r:1 w:1) - /// Proof: OrderBook Orders (max_values: None, max_size: Some(171), added: 2646, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:2 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OrmlTokens Accounts (r:4 w:4) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlTokens TotalIssuance (r:1 w:1) - /// Proof: OrmlTokens TotalIssuance (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Swaps OrderIdToSwapId (r:1 w:0) - /// Proof: Swaps OrderIdToSwapId (max_values: None, max_size: Some(81), added: 2556, mode: MaxEncodedLen) - /// Storage: OrderBook UserOrders (r:0 w:1) - /// Proof: OrderBook UserOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + /// Storage: `OrderBook::Orders` (r:1 w:1) + /// Proof: `OrderBook::Orders` (`max_values`: None, `max_size`: Some(171), added: 2646, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:2 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:4 w:4) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::TotalIssuance` (r:1 w:1) + /// Proof: `OrmlTokens::TotalIssuance` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Swaps::OrderIdToSwapId` (r:1 w:0) + /// Proof: `Swaps::OrderIdToSwapId` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) + /// Storage: `OrderBook::UserOrders` (r:0 w:1) + /// Proof: `OrderBook::UserOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) fn match_swap() -> Weight { // Proof Size summary in bytes: - // Measured: `1439` + // Measured: `1326` // Estimated: `11406` - // Minimum execution time: 212_325_000 picoseconds. - Weight::from_parts(214_489_000, 0) + // Minimum execution time: 179_345_000 picoseconds. + Weight::from_parts(181_790_000, 0) .saturating_add(Weight::from_parts(0, 11406)) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(9)) diff --git a/runtime/centrifuge/src/weights/pallet_transfer_allowlist.rs b/runtime/centrifuge/src/weights/pallet_transfer_allowlist.rs index 307ba99a12..36bcc8c220 100644 --- a/runtime/centrifuge/src/weights/pallet_transfer_allowlist.rs +++ b/runtime/centrifuge/src/weights/pallet_transfer_allowlist.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_transfer_allowlist` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_transfer_allowlist // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_transfer_allowlist.rs @@ -32,183 +31,183 @@ use core::marker::PhantomData; /// Weight functions for `pallet_transfer_allowlist`. pub struct WeightInfo(PhantomData); impl pallet_transfer_allowlist::WeightInfo for WeightInfo { - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: TransferAllowList AccountCurrencyTransferAllowance (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferAllowance (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) - /// Storage: Fees FeeBalances (r:1 w:0) - /// Proof: Fees FeeBalances (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Balances Holds (r:1 w:1) - /// Proof: Balances Holds (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `TransferAllowList::AccountCurrencyTransferAllowance` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferAllowance` (`max_values`: None, `max_size`: Some(701), added: 3176, mode: `MaxEncodedLen`) + /// Storage: `Fees::FeeBalances` (r:1 w:0) + /// Proof: `Fees::FeeBalances` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) fn add_transfer_allowance_no_existing_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `603` - // Estimated: `3674` - // Minimum execution time: 89_276_000 picoseconds. - Weight::from_parts(91_160_000, 0) - .saturating_add(Weight::from_parts(0, 3674)) + // Measured: `570` + // Estimated: `4166` + // Minimum execution time: 89_497_000 picoseconds. + Weight::from_parts(91_170_000, 0) + .saturating_add(Weight::from_parts(0, 4166)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: TransferAllowList AccountCurrencyTransferAllowance (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferAllowance (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) - /// Storage: Fees FeeBalances (r:1 w:0) - /// Proof: Fees FeeBalances (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Balances Holds (r:1 w:1) - /// Proof: Balances Holds (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `TransferAllowList::AccountCurrencyTransferAllowance` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferAllowance` (`max_values`: None, `max_size`: Some(701), added: 3176, mode: `MaxEncodedLen`) + /// Storage: `Fees::FeeBalances` (r:1 w:0) + /// Proof: `Fees::FeeBalances` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) fn add_transfer_allowance_existing_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `697` - // Estimated: `3674` - // Minimum execution time: 93_003_000 picoseconds. - Weight::from_parts(93_845_000, 0) - .saturating_add(Weight::from_parts(0, 3674)) + // Measured: `664` + // Estimated: `4166` + // Minimum execution time: 91_241_000 picoseconds. + Weight::from_parts(93_384_000, 0) + .saturating_add(Weight::from_parts(0, 4166)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn add_allowance_delay_no_existing_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `246` // Estimated: `3557` - // Minimum execution time: 20_668_000 picoseconds. - Weight::from_parts(21_200_000, 0) + // Minimum execution time: 16_420_000 picoseconds. + Weight::from_parts(17_363_000, 0) .saturating_add(Weight::from_parts(0, 3557)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn add_allowance_delay_existing_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `370` // Estimated: `3557` - // Minimum execution time: 23_333_000 picoseconds. - Weight::from_parts(23_724_000, 0) + // Minimum execution time: 19_176_000 picoseconds. + Weight::from_parts(19_786_000, 0) .saturating_add(Weight::from_parts(0, 3557)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn toggle_allowance_delay_once_future_modifiable() -> Weight { // Proof Size summary in bytes: // Measured: `340` // Estimated: `3557` - // Minimum execution time: 23_514_000 picoseconds. - Weight::from_parts(24_165_000, 0) + // Minimum execution time: 18_474_000 picoseconds. + Weight::from_parts(19_256_000, 0) .saturating_add(Weight::from_parts(0, 3557)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn update_allowance_delay() -> Weight { // Proof Size summary in bytes: // Measured: `344` // Estimated: `3557` - // Minimum execution time: 23_253_000 picoseconds. - Weight::from_parts(23_794_000, 0) + // Minimum execution time: 18_866_000 picoseconds. + Weight::from_parts(19_306_000, 0) .saturating_add(Weight::from_parts(0, 3557)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn purge_allowance_delay_no_remaining_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `344` // Estimated: `3557` - // Minimum execution time: 23_092_000 picoseconds. - Weight::from_parts(23_714_000, 0) + // Minimum execution time: 18_594_000 picoseconds. + Weight::from_parts(19_056_000, 0) .saturating_add(Weight::from_parts(0, 3557)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn purge_allowance_delay_remaining_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `378` // Estimated: `3557` - // Minimum execution time: 24_385_000 picoseconds. - Weight::from_parts(25_037_000, 0) + // Minimum execution time: 19_146_000 picoseconds. + Weight::from_parts(19_897_000, 0) .saturating_add(Weight::from_parts(0, 3557)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:0) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: TransferAllowList AccountCurrencyTransferAllowance (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferAllowance (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:0) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `TransferAllowList::AccountCurrencyTransferAllowance` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferAllowance` (`max_values`: None, `max_size`: Some(701), added: 3176, mode: `MaxEncodedLen`) fn remove_transfer_allowance_delay_present() -> Weight { // Proof Size summary in bytes: // Measured: `473` - // Estimated: `3597` - // Minimum execution time: 34_695_000 picoseconds. - Weight::from_parts(35_586_000, 0) - .saturating_add(Weight::from_parts(0, 3597)) + // Estimated: `4166` + // Minimum execution time: 30_778_000 picoseconds. + Weight::from_parts(31_509_000, 0) + .saturating_add(Weight::from_parts(0, 4166)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:0) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: TransferAllowList AccountCurrencyTransferAllowance (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferAllowance (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:0) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `TransferAllowList::AccountCurrencyTransferAllowance` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferAllowance` (`max_values`: None, `max_size`: Some(701), added: 3176, mode: `MaxEncodedLen`) fn remove_transfer_allowance_no_delay() -> Weight { // Proof Size summary in bytes: // Measured: `469` - // Estimated: `3597` - // Minimum execution time: 34_324_000 picoseconds. - Weight::from_parts(35_707_000, 0) - .saturating_add(Weight::from_parts(0, 3597)) + // Estimated: `4166` + // Minimum execution time: 30_928_000 picoseconds. + Weight::from_parts(31_579_000, 0) + .saturating_add(Weight::from_parts(0, 4166)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferAllowance (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferAllowance (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) - /// Storage: Fees FeeBalances (r:1 w:0) - /// Proof: Fees FeeBalances (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Balances Holds (r:1 w:1) - /// Proof: Balances Holds (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferAllowance` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferAllowance` (`max_values`: None, `max_size`: Some(701), added: 3176, mode: `MaxEncodedLen`) + /// Storage: `Fees::FeeBalances` (r:1 w:0) + /// Proof: `Fees::FeeBalances` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn purge_transfer_allowance_no_remaining_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `879` - // Estimated: `3674` - // Minimum execution time: 82_904_000 picoseconds. - Weight::from_parts(84_317_000, 0) - .saturating_add(Weight::from_parts(0, 3674)) + // Measured: `848` + // Estimated: `4166` + // Minimum execution time: 84_217_000 picoseconds. + Weight::from_parts(85_830_000, 0) + .saturating_add(Weight::from_parts(0, 4166)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: TransferAllowList AccountCurrencyTransferAllowance (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferAllowance (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) - /// Storage: Fees FeeBalances (r:1 w:0) - /// Proof: Fees FeeBalances (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Balances Holds (r:1 w:1) - /// Proof: Balances Holds (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferAllowance` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferAllowance` (`max_values`: None, `max_size`: Some(701), added: 3176, mode: `MaxEncodedLen`) + /// Storage: `Fees::FeeBalances` (r:1 w:0) + /// Proof: `Fees::FeeBalances` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn purge_transfer_allowance_remaining_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `918` - // Estimated: `3674` - // Minimum execution time: 82_623_000 picoseconds. - Weight::from_parts(83_666_000, 0) - .saturating_add(Weight::from_parts(0, 3674)) + // Measured: `887` + // Estimated: `4166` + // Minimum execution time: 83_276_000 picoseconds. + Weight::from_parts(84_749_000, 0) + .saturating_add(Weight::from_parts(0, 4166)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/runtime/centrifuge/src/weights/pallet_treasury.rs b/runtime/centrifuge/src/weights/pallet_treasury.rs deleted file mode 100644 index a0236f6710..0000000000 --- a/runtime/centrifuge/src/weights/pallet_treasury.rs +++ /dev/null @@ -1,139 +0,0 @@ - -//! Autogenerated weights for `pallet_treasury` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 - -// Executed Command: -// target/release/centrifuge-chain -// benchmark -// pallet -// --chain=centrifuge-dev -// --steps=50 -// --repeat=20 -// --pallet=pallet_treasury -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --heap-pages=4096 -// --output=/tmp/runtime/centrifuge/src/weights/pallet_treasury.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_treasury`. -pub struct WeightInfo(PhantomData); -impl pallet_treasury::WeightInfo for WeightInfo { - fn spend() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 351_000 picoseconds. - Weight::from_parts(411_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - /// Storage: Treasury ProposalCount (r:1 w:1) - /// Proof: Treasury ProposalCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Treasury Proposals (r:0 w:1) - /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - fn propose_spend() -> Weight { - // Proof Size summary in bytes: - // Measured: `144` - // Estimated: `1489` - // Minimum execution time: 40_626_000 picoseconds. - Weight::from_parts(41_898_000, 0) - .saturating_add(Weight::from_parts(0, 1489)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: Treasury Proposals (r:1 w:1) - /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - fn reject_proposal() -> Weight { - // Proof Size summary in bytes: - // Measured: `405` - // Estimated: `6196` - // Minimum execution time: 63_228_000 picoseconds. - Weight::from_parts(64_039_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: Treasury Proposals (r:1 w:0) - /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - /// Storage: Treasury Approvals (r:1 w:1) - /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) - /// The range of component `p` is `[0, 99]`. - fn approve_proposal(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `470 + p * (8 ±0)` - // Estimated: `3573` - // Minimum execution time: 14_697_000 picoseconds. - Weight::from_parts(17_808_249, 0) - .saturating_add(Weight::from_parts(0, 3573)) - // Standard Error: 1_342 - .saturating_add(Weight::from_parts(49_234, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Treasury Approvals (r:1 w:1) - /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) - fn remove_approval() -> Weight { - // Proof Size summary in bytes: - // Measured: `127` - // Estimated: `1887` - // Minimum execution time: 11_291_000 picoseconds. - Weight::from_parts(11_622_000, 0) - .saturating_add(Weight::from_parts(0, 1887)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Treasury Deactivated (r:1 w:1) - /// Proof: Treasury Deactivated (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) - /// Storage: Treasury Approvals (r:1 w:1) - /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) - /// Storage: Treasury Proposals (r:100 w:0) - /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - /// The range of component `p` is `[0, 100]`. - fn on_initialize_proposals(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `230 + p * (120 ±0)` - // Estimated: `3593 + p * (2583 ±0)` - // Minimum execution time: 40_075_000 picoseconds. - Weight::from_parts(36_799_098, 0) - .saturating_add(Weight::from_parts(0, 3593)) - // Standard Error: 6_004 - .saturating_add(Weight::from_parts(3_848_698, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 2583).saturating_mul(p.into())) - } - - fn spend_local() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn payout() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn check_status() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn void_spend() -> cumulus_primitives_core::Weight { - Weight::default() - } -} diff --git a/runtime/centrifuge/src/weights/pallet_uniques.rs b/runtime/centrifuge/src/weights/pallet_uniques.rs index 30672514e9..94833ecc03 100644 --- a/runtime/centrifuge/src/weights/pallet_uniques.rs +++ b/runtime/centrifuge/src/weights/pallet_uniques.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_uniques` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_uniques // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_uniques.rs @@ -32,50 +31,50 @@ use core::marker::PhantomData; /// Weight functions for `pallet_uniques`. pub struct WeightInfo(PhantomData); impl pallet_uniques::WeightInfo for WeightInfo { - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques ClassAccount (r:0 w:1) - /// Proof: Uniques ClassAccount (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ClassAccount` (r:0 w:1) + /// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) fn create() -> Weight { // Proof Size summary in bytes: // Measured: `249` // Estimated: `3647` - // Minimum execution time: 43_851_000 picoseconds. - Weight::from_parts(45_034_000, 0) + // Minimum execution time: 36_659_000 picoseconds. + Weight::from_parts(37_541_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques ClassAccount (r:0 w:1) - /// Proof: Uniques ClassAccount (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ClassAccount` (r:0 w:1) + /// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) fn force_create() -> Weight { // Proof Size summary in bytes: // Measured: `109` // Estimated: `3647` - // Minimum execution time: 21_990_000 picoseconds. - Weight::from_parts(22_702_000, 0) + // Minimum execution time: 16_871_000 picoseconds. + Weight::from_parts(17_242_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques Asset (r:1001 w:1000) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Uniques InstanceMetadataOf (r:1000 w:1000) - /// Proof: Uniques InstanceMetadataOf (max_values: None, max_size: Some(331), added: 2806, mode: MaxEncodedLen) - /// Storage: Uniques Attribute (r:1000 w:1000) - /// Proof: Uniques Attribute (max_values: None, max_size: Some(605), added: 3080, mode: MaxEncodedLen) - /// Storage: Uniques ClassAccount (r:0 w:1) - /// Proof: Uniques ClassAccount (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) - /// Storage: Uniques ClassMetadataOf (r:0 w:1) - /// Proof: Uniques ClassMetadataOf (max_values: None, max_size: Some(299), added: 2774, mode: MaxEncodedLen) - /// Storage: Uniques Account (r:0 w:1000) - /// Proof: Uniques Account (max_values: None, max_size: Some(104), added: 2579, mode: MaxEncodedLen) - /// Storage: Uniques CollectionMaxSupply (r:0 w:1) - /// Proof: Uniques CollectionMaxSupply (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Asset` (r:1001 w:1000) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Uniques::InstanceMetadataOf` (r:1000 w:1000) + /// Proof: `Uniques::InstanceMetadataOf` (`max_values`: None, `max_size`: Some(331), added: 2806, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Attribute` (r:1000 w:1000) + /// Proof: `Uniques::Attribute` (`max_values`: None, `max_size`: Some(605), added: 3080, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ClassAccount` (r:0 w:1) + /// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ClassMetadataOf` (r:0 w:1) + /// Proof: `Uniques::ClassMetadataOf` (`max_values`: None, `max_size`: Some(299), added: 2774, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Account` (r:0 w:1000) + /// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) + /// Storage: `Uniques::CollectionMaxSupply` (r:0 w:1) + /// Proof: `Uniques::CollectionMaxSupply` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 1000]`. /// The range of component `m` is `[0, 1000]`. /// The range of component `a` is `[0, 1000]`. @@ -83,15 +82,15 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `511 + a * (346 ±0) + m * (69 ±0) + n * (88 ±0)` // Estimated: `3647 + a * (3080 ±0) + m * (2806 ±0) + n * (2613 ±0)` - // Minimum execution time: 2_956_563_000 picoseconds. - Weight::from_parts(2_993_202_000, 0) + // Minimum execution time: 3_004_732_000 picoseconds. + Weight::from_parts(3_014_581_000, 0) .saturating_add(Weight::from_parts(0, 3647)) - // Standard Error: 28_423 - .saturating_add(Weight::from_parts(9_954_730, 0).saturating_mul(n.into())) - // Standard Error: 28_423 - .saturating_add(Weight::from_parts(247_949, 0).saturating_mul(m.into())) - // Standard Error: 28_423 - .saturating_add(Weight::from_parts(476_212, 0).saturating_mul(a.into())) + // Standard Error: 29_103 + .saturating_add(Weight::from_parts(10_066_324, 0).saturating_mul(n.into())) + // Standard Error: 29_103 + .saturating_add(Weight::from_parts(276_468, 0).saturating_mul(m.into())) + // Standard Error: 29_103 + .saturating_add(Weight::from_parts(519_952, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into()))) @@ -104,344 +103,346 @@ impl pallet_uniques::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 2806).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 2613).saturating_mul(n.into())) } - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques CollectionMaxSupply (r:1 w:0) - /// Proof: Uniques CollectionMaxSupply (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - /// Storage: Uniques Account (r:0 w:1) - /// Proof: Uniques Account (max_values: None, max_size: Some(104), added: 2579, mode: MaxEncodedLen) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::CollectionMaxSupply` (r:1 w:0) + /// Proof: `Uniques::CollectionMaxSupply` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Account` (r:0 w:1) + /// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) fn mint() -> Weight { // Proof Size summary in bytes: // Measured: `353` // Estimated: `3647` - // Minimum execution time: 53_700_000 picoseconds. - Weight::from_parts(54_552_000, 0) + // Minimum execution time: 46_878_000 picoseconds. + Weight::from_parts(47_749_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Uniques Account (r:0 w:1) - /// Proof: Uniques Account (max_values: None, max_size: Some(104), added: 2579, mode: MaxEncodedLen) - /// Storage: Uniques ItemPriceOf (r:0 w:1) - /// Proof: Uniques ItemPriceOf (max_values: None, max_size: Some(105), added: 2580, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Account` (r:0 w:1) + /// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ItemPriceOf` (r:0 w:1) + /// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(105), added: 2580, mode: `MaxEncodedLen`) fn burn() -> Weight { // Proof Size summary in bytes: // Measured: `516` // Estimated: `3647` - // Minimum execution time: 55_273_000 picoseconds. - Weight::from_parts(56_555_000, 0) + // Minimum execution time: 49_442_000 picoseconds. + Weight::from_parts(50_063_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Uniques Account (r:0 w:2) - /// Proof: Uniques Account (max_values: None, max_size: Some(104), added: 2579, mode: MaxEncodedLen) - /// Storage: Uniques ItemPriceOf (r:0 w:1) - /// Proof: Uniques ItemPriceOf (max_values: None, max_size: Some(105), added: 2580, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Account` (r:0 w:2) + /// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ItemPriceOf` (r:0 w:1) + /// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(105), added: 2580, mode: `MaxEncodedLen`) fn transfer() -> Weight { // Proof Size summary in bytes: // Measured: `516` // Estimated: `3647` - // Minimum execution time: 39_945_000 picoseconds. - Weight::from_parts(40_636_000, 0) + // Minimum execution time: 37_399_000 picoseconds. + Weight::from_parts(37_761_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques Asset (r:5000 w:5000) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Asset` (r:5000 w:5000) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) /// The range of component `i` is `[0, 5000]`. fn redeposit(i: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `821 + i * (88 ±0)` // Estimated: `3647 + i * (2613 ±0)` - // Minimum execution time: 20_990_000 picoseconds. - Weight::from_parts(21_410_000, 0) + // Minimum execution time: 16_952_000 picoseconds. + Weight::from_parts(17_132_000, 0) .saturating_add(Weight::from_parts(0, 3647)) - // Standard Error: 12_619 - .saturating_add(Weight::from_parts(25_652_006, 0).saturating_mul(i.into())) + // Standard Error: 14_760 + .saturating_add(Weight::from_parts(22_704_797, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) .saturating_add(Weight::from_parts(0, 2613).saturating_mul(i.into())) } - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) fn freeze() -> Weight { // Proof Size summary in bytes: // Measured: `516` // Estimated: `3647` - // Minimum execution time: 26_098_000 picoseconds. - Weight::from_parts(26_819_000, 0) + // Minimum execution time: 23_314_000 picoseconds. + Weight::from_parts(23_925_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) fn thaw() -> Weight { // Proof Size summary in bytes: // Measured: `516` // Estimated: `3647` - // Minimum execution time: 26_208_000 picoseconds. - Weight::from_parts(26_769_000, 0) + // Minimum execution time: 23_103_000 picoseconds. + Weight::from_parts(23_533_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) fn freeze_collection() -> Weight { // Proof Size summary in bytes: // Measured: `353` // Estimated: `3647` - // Minimum execution time: 18_905_000 picoseconds. - Weight::from_parts(19_537_000, 0) + // Minimum execution time: 15_069_000 picoseconds. + Weight::from_parts(15_489_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) fn thaw_collection() -> Weight { // Proof Size summary in bytes: // Measured: `353` // Estimated: `3647` - // Minimum execution time: 18_855_000 picoseconds. - Weight::from_parts(19_406_000, 0) + // Minimum execution time: 14_888_000 picoseconds. + Weight::from_parts(15_269_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques OwnershipAcceptance (r:1 w:1) - /// Proof: Uniques OwnershipAcceptance (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques ClassAccount (r:0 w:2) - /// Proof: Uniques ClassAccount (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: `Uniques::OwnershipAcceptance` (r:1 w:1) + /// Proof: `Uniques::OwnershipAcceptance` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ClassAccount` (r:0 w:2) + /// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) fn transfer_ownership() -> Weight { // Proof Size summary in bytes: - // Measured: `431` + // Measured: `638` // Estimated: `3647` - // Minimum execution time: 30_978_000 picoseconds. - Weight::from_parts(31_628_000, 0) + // Minimum execution time: 33_433_000 picoseconds. + Weight::from_parts(34_204_000, 0) .saturating_add(Weight::from_parts(0, 3647)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) fn set_team() -> Weight { // Proof Size summary in bytes: // Measured: `353` // Estimated: `3647` - // Minimum execution time: 19_437_000 picoseconds. - Weight::from_parts(19_807_000, 0) + // Minimum execution time: 15_369_000 picoseconds. + Weight::from_parts(15_860_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques ClassAccount (r:0 w:1) - /// Proof: Uniques ClassAccount (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ClassAccount` (r:0 w:1) + /// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) fn force_item_status() -> Weight { // Proof Size summary in bytes: // Measured: `353` // Estimated: `3647` - // Minimum execution time: 23_444_000 picoseconds. - Weight::from_parts(24_285_000, 0) + // Minimum execution time: 20_008_000 picoseconds. + Weight::from_parts(20_518_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques InstanceMetadataOf (r:1 w:0) - /// Proof: Uniques InstanceMetadataOf (max_values: None, max_size: Some(331), added: 2806, mode: MaxEncodedLen) - /// Storage: Uniques Attribute (r:1 w:1) - /// Proof: Uniques Attribute (max_values: None, max_size: Some(605), added: 3080, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::InstanceMetadataOf` (r:1 w:0) + /// Proof: `Uniques::InstanceMetadataOf` (`max_values`: None, `max_size`: Some(331), added: 2806, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Attribute` (r:1 w:1) + /// Proof: `Uniques::Attribute` (`max_values`: None, `max_size`: Some(605), added: 3080, mode: `MaxEncodedLen`) fn set_attribute() -> Weight { // Proof Size summary in bytes: // Measured: `775` // Estimated: `4070` - // Minimum execution time: 60_993_000 picoseconds. - Weight::from_parts(62_095_000, 0) + // Minimum execution time: 53_901_000 picoseconds. + Weight::from_parts(54_763_000, 0) .saturating_add(Weight::from_parts(0, 4070)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques InstanceMetadataOf (r:1 w:0) - /// Proof: Uniques InstanceMetadataOf (max_values: None, max_size: Some(331), added: 2806, mode: MaxEncodedLen) - /// Storage: Uniques Attribute (r:1 w:1) - /// Proof: Uniques Attribute (max_values: None, max_size: Some(605), added: 3080, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::InstanceMetadataOf` (r:1 w:0) + /// Proof: `Uniques::InstanceMetadataOf` (`max_values`: None, `max_size`: Some(331), added: 2806, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Attribute` (r:1 w:1) + /// Proof: `Uniques::Attribute` (`max_values`: None, `max_size`: Some(605), added: 3080, mode: `MaxEncodedLen`) fn clear_attribute() -> Weight { // Proof Size summary in bytes: // Measured: `1407` // Estimated: `4070` - // Minimum execution time: 59_521_000 picoseconds. - Weight::from_parts(60_653_000, 0) + // Minimum execution time: 51_977_000 picoseconds. + Weight::from_parts(52_808_000, 0) .saturating_add(Weight::from_parts(0, 4070)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques InstanceMetadataOf (r:1 w:1) - /// Proof: Uniques InstanceMetadataOf (max_values: None, max_size: Some(331), added: 2806, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::InstanceMetadataOf` (r:1 w:1) + /// Proof: `Uniques::InstanceMetadataOf` (`max_values`: None, `max_size`: Some(331), added: 2806, mode: `MaxEncodedLen`) fn set_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `419` // Estimated: `3796` - // Minimum execution time: 44_022_000 picoseconds. - Weight::from_parts(44_724_000, 0) + // Minimum execution time: 37_340_000 picoseconds. + Weight::from_parts(38_342_000, 0) .saturating_add(Weight::from_parts(0, 3796)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques InstanceMetadataOf (r:1 w:1) - /// Proof: Uniques InstanceMetadataOf (max_values: None, max_size: Some(331), added: 2806, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::InstanceMetadataOf` (r:1 w:1) + /// Proof: `Uniques::InstanceMetadataOf` (`max_values`: None, `max_size`: Some(331), added: 2806, mode: `MaxEncodedLen`) fn clear_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `775` // Estimated: `3796` - // Minimum execution time: 44_463_000 picoseconds. - Weight::from_parts(45_966_000, 0) + // Minimum execution time: 38_502_000 picoseconds. + Weight::from_parts(39_594_000, 0) .saturating_add(Weight::from_parts(0, 3796)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques ClassMetadataOf (r:1 w:1) - /// Proof: Uniques ClassMetadataOf (max_values: None, max_size: Some(299), added: 2774, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ClassMetadataOf` (r:1 w:1) + /// Proof: `Uniques::ClassMetadataOf` (`max_values`: None, `max_size`: Some(299), added: 2774, mode: `MaxEncodedLen`) fn set_collection_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `353` // Estimated: `3764` - // Minimum execution time: 45_265_000 picoseconds. - Weight::from_parts(45_975_000, 0) + // Minimum execution time: 39_264_000 picoseconds. + Weight::from_parts(40_305_000, 0) .saturating_add(Weight::from_parts(0, 3764)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques ClassMetadataOf (r:1 w:1) - /// Proof: Uniques ClassMetadataOf (max_values: None, max_size: Some(299), added: 2774, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ClassMetadataOf` (r:1 w:1) + /// Proof: `Uniques::ClassMetadataOf` (`max_values`: None, `max_size`: Some(299), added: 2774, mode: `MaxEncodedLen`) fn clear_collection_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `676` // Estimated: `3764` - // Minimum execution time: 43_862_000 picoseconds. - Weight::from_parts(44_643_000, 0) + // Minimum execution time: 37_700_000 picoseconds. + Weight::from_parts(38_221_000, 0) .saturating_add(Weight::from_parts(0, 3764)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) fn approve_transfer() -> Weight { // Proof Size summary in bytes: // Measured: `516` // Estimated: `3647` - // Minimum execution time: 26_530_000 picoseconds. - Weight::from_parts(27_191_000, 0) + // Minimum execution time: 23_664_000 picoseconds. + Weight::from_parts(24_105_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) fn cancel_approval() -> Weight { // Proof Size summary in bytes: // Measured: `549` // Estimated: `3647` - // Minimum execution time: 26_529_000 picoseconds. - Weight::from_parts(27_301_000, 0) + // Minimum execution time: 23_874_000 picoseconds. + Weight::from_parts(24_255_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques OwnershipAcceptance (r:1 w:1) - /// Proof: Uniques OwnershipAcceptance (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + /// Storage: `Uniques::OwnershipAcceptance` (r:1 w:1) + /// Proof: `Uniques::OwnershipAcceptance` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) fn set_accept_ownership() -> Weight { // Proof Size summary in bytes: // Measured: `109` // Estimated: `3521` - // Minimum execution time: 21_500_000 picoseconds. - Weight::from_parts(22_091_000, 0) + // Minimum execution time: 17_633_000 picoseconds. + Weight::from_parts(18_184_000, 0) .saturating_add(Weight::from_parts(0, 3521)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques CollectionMaxSupply (r:1 w:1) - /// Proof: Uniques CollectionMaxSupply (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) + /// Storage: `Uniques::CollectionMaxSupply` (r:1 w:1) + /// Proof: `Uniques::CollectionMaxSupply` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) fn set_collection_max_supply() -> Weight { // Proof Size summary in bytes: // Measured: `353` // Estimated: `3647` - // Minimum execution time: 22_692_000 picoseconds. - Weight::from_parts(23_403_000, 0) + // Minimum execution time: 19_627_000 picoseconds. + Weight::from_parts(20_148_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques Asset (r:1 w:0) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Uniques ItemPriceOf (r:0 w:1) - /// Proof: Uniques ItemPriceOf (max_values: None, max_size: Some(105), added: 2580, mode: MaxEncodedLen) + /// Storage: `Uniques::Asset` (r:1 w:0) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ItemPriceOf` (r:0 w:1) + /// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(105), added: 2580, mode: `MaxEncodedLen`) fn set_price() -> Weight { // Proof Size summary in bytes: // Measured: `343` // Estimated: `3603` - // Minimum execution time: 22_562_000 picoseconds. - Weight::from_parts(23_213_000, 0) + // Minimum execution time: 18_915_000 picoseconds. + Weight::from_parts(19_457_000, 0) .saturating_add(Weight::from_parts(0, 3603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Uniques ItemPriceOf (r:1 w:1) - /// Proof: Uniques ItemPriceOf (max_values: None, max_size: Some(105), added: 2580, mode: MaxEncodedLen) - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques Account (r:0 w:2) - /// Proof: Uniques Account (max_values: None, max_size: Some(104), added: 2579, mode: MaxEncodedLen) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ItemPriceOf` (r:1 w:1) + /// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(105), added: 2580, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Account` (r:0 w:2) + /// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) fn buy_item() -> Weight { // Proof Size summary in bytes: // Measured: `645` // Estimated: `3647` - // Minimum execution time: 56_265_000 picoseconds. - Weight::from_parts(57_116_000, 0) + // Minimum execution time: 47_038_000 picoseconds. + Weight::from_parts(48_631_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) diff --git a/runtime/centrifuge/src/weights/pallet_utility.rs b/runtime/centrifuge/src/weights/pallet_utility.rs index 23a4232d32..dd180f3c76 100644 --- a/runtime/centrifuge/src/weights/pallet_utility.rs +++ b/runtime/centrifuge/src/weights/pallet_utility.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_utility` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_utility // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_utility.rs @@ -37,18 +36,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 10_410_000 picoseconds. - Weight::from_parts(10_649_000, 0) + // Minimum execution time: 6_852_000 picoseconds. + Weight::from_parts(3_779_214, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_678 - .saturating_add(Weight::from_parts(8_552_226, 0).saturating_mul(c.into())) + // Standard Error: 2_185 + .saturating_add(Weight::from_parts(4_705_310, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_464_000 picoseconds. - Weight::from_parts(7_725_000, 0) + // Minimum execution time: 6_613_000 picoseconds. + Weight::from_parts(7_043_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -56,18 +55,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 10_289_000 picoseconds. - Weight::from_parts(10_564_874, 0) + // Minimum execution time: 6_603_000 picoseconds. + Weight::from_parts(6_813_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 3_865 - .saturating_add(Weight::from_parts(9_035_936, 0).saturating_mul(c.into())) + // Standard Error: 1_474 + .saturating_add(Weight::from_parts(5_109_510, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 13_896_000 picoseconds. - Weight::from_parts(14_317_000, 0) + // Minimum execution time: 9_368_000 picoseconds. + Weight::from_parts(9_769_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -75,10 +74,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 10_279_000 picoseconds. - Weight::from_parts(11_117_982, 0) + // Minimum execution time: 6_812_000 picoseconds. + Weight::from_parts(7_053_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 3_775 - .saturating_add(Weight::from_parts(8_623_590, 0).saturating_mul(c.into())) + // Standard Error: 1_310 + .saturating_add(Weight::from_parts(4_734_507, 0).saturating_mul(c.into())) } } diff --git a/runtime/centrifuge/src/weights/pallet_vesting.rs b/runtime/centrifuge/src/weights/pallet_vesting.rs index 7a0accf2c2..4defe13506 100644 --- a/runtime/centrifuge/src/weights/pallet_vesting.rs +++ b/runtime/centrifuge/src/weights/pallet_vesting.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_vesting` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_vesting // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_vesting.rs @@ -32,196 +31,214 @@ use core::marker::PhantomData; /// Weight functions for `pallet_vesting`. pub struct WeightInfo(PhantomData); impl pallet_vesting::WeightInfo for WeightInfo { - /// Storage: Vesting Vesting (r:1 w:1) - /// Proof: Vesting Vesting (max_values: None, max_size: Some(157), added: 2632, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 3]`. fn vest_locked(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `269 + l * (25 ±0) + s * (37 ±0)` // Estimated: `4764` - // Minimum execution time: 43_641_000 picoseconds. - Weight::from_parts(44_114_954, 0) + // Minimum execution time: 39_564_000 picoseconds. + Weight::from_parts(39_981_239, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_129 - .saturating_add(Weight::from_parts(56_043, 0).saturating_mul(l.into())) - // Standard Error: 21_640 - .saturating_add(Weight::from_parts(292_082, 0).saturating_mul(s.into())) + // Standard Error: 1_037 + .saturating_add(Weight::from_parts(43_712, 0).saturating_mul(l.into())) + // Standard Error: 19_876 + .saturating_add(Weight::from_parts(229_682, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Vesting Vesting (r:1 w:1) - /// Proof: Vesting Vesting (max_values: None, max_size: Some(157), added: 2632, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 3]`. fn vest_unlocked(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `269 + l * (25 ±0) + s * (37 ±0)` // Estimated: `4764` - // Minimum execution time: 49_512_000 picoseconds. - Weight::from_parts(50_819_626, 0) + // Minimum execution time: 41_808_000 picoseconds. + Weight::from_parts(43_269_209, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_649 - .saturating_add(Weight::from_parts(39_948, 0).saturating_mul(l.into())) - // Standard Error: 31_602 - .saturating_add(Weight::from_parts(288_484, 0).saturating_mul(s.into())) + // Standard Error: 1_148 + .saturating_add(Weight::from_parts(40_780, 0).saturating_mul(l.into())) + // Standard Error: 22_013 + .saturating_add(Weight::from_parts(93_733, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Vesting Vesting (r:1 w:1) - /// Proof: Vesting Vesting (max_values: None, max_size: Some(157), added: 2632, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 3]`. fn vest_other_locked(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `372 + l * (25 ±0) + s * (37 ±0)` // Estimated: `4764` - // Minimum execution time: 46_457_000 picoseconds. - Weight::from_parts(46_776_316, 0) + // Minimum execution time: 41_467_000 picoseconds. + Weight::from_parts(41_941_236, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_307 - .saturating_add(Weight::from_parts(61_798, 0).saturating_mul(l.into())) - // Standard Error: 25_050 - .saturating_add(Weight::from_parts(398_077, 0).saturating_mul(s.into())) + // Standard Error: 1_114 + .saturating_add(Weight::from_parts(44_127, 0).saturating_mul(l.into())) + // Standard Error: 21_345 + .saturating_add(Weight::from_parts(397_753, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Vesting Vesting (r:1 w:1) - /// Proof: Vesting Vesting (max_values: None, max_size: Some(157), added: 2632, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 3]`. fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `372 + l * (25 ±0) + s * (37 ±0)` // Estimated: `4764` - // Minimum execution time: 52_568_000 picoseconds. - Weight::from_parts(53_808_154, 0) + // Minimum execution time: 44_693_000 picoseconds. + Weight::from_parts(45_550_838, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_705 - .saturating_add(Weight::from_parts(38_885, 0).saturating_mul(l.into())) - // Standard Error: 32_684 - .saturating_add(Weight::from_parts(223_704, 0).saturating_mul(s.into())) + // Standard Error: 1_152 + .saturating_add(Weight::from_parts(42_064, 0).saturating_mul(l.into())) + // Standard Error: 22_075 + .saturating_add(Weight::from_parts(232_605, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Vesting Vesting (r:1 w:1) - /// Proof: Vesting Vesting (max_values: None, max_size: Some(157), added: 2632, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[0, 2]`. fn vested_transfer(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `283 + l * (25 ±0) + s * (134 ±0)` // Estimated: `4764` - // Minimum execution time: 102_281_000 picoseconds. - Weight::from_parts(101_427_102, 0) + // Minimum execution time: 93_545_000 picoseconds. + Weight::from_parts(92_993_209, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 3_530 - .saturating_add(Weight::from_parts(84_354, 0).saturating_mul(l.into())) - // Standard Error: 67_649 - .saturating_add(Weight::from_parts(2_103_621, 0).saturating_mul(s.into())) + // Standard Error: 1_581 + .saturating_add(Weight::from_parts(61_450, 0).saturating_mul(l.into())) + // Standard Error: 30_294 + .saturating_add(Weight::from_parts(1_040_335, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Vesting Vesting (r:1 w:1) - /// Proof: Vesting Vesting (max_values: None, max_size: Some(157), added: 2632, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[0, 2]`. fn force_vested_transfer(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `423 + l * (25 ±0) + s * (134 ±0)` // Estimated: `6196` - // Minimum execution time: 105_235_000 picoseconds. - Weight::from_parts(106_598_065, 0) + // Minimum execution time: 95_989_000 picoseconds. + Weight::from_parts(95_019_286, 0) .saturating_add(Weight::from_parts(0, 6196)) - // Standard Error: 2_176 - .saturating_add(Weight::from_parts(58_728, 0).saturating_mul(l.into())) - // Standard Error: 41_707 - .saturating_add(Weight::from_parts(819_989, 0).saturating_mul(s.into())) + // Standard Error: 2_465 + .saturating_add(Weight::from_parts(86_005, 0).saturating_mul(l.into())) + // Standard Error: 47_232 + .saturating_add(Weight::from_parts(2_593_636, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: Vesting Vesting (r:1 w:1) - /// Proof: Vesting Vesting (max_values: None, max_size: Some(157), added: 2632, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[2, 3]`. fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `374 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 47_729_000 picoseconds. - Weight::from_parts(47_999_344, 0) + // Minimum execution time: 41_888_000 picoseconds. + Weight::from_parts(42_630_812, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_560 - .saturating_add(Weight::from_parts(58_575, 0).saturating_mul(l.into())) - // Standard Error: 49_774 - .saturating_add(Weight::from_parts(405_292, 0).saturating_mul(s.into())) + // Standard Error: 1_054 + .saturating_add(Weight::from_parts(55_222, 0).saturating_mul(l.into())) + // Standard Error: 33_643 + .saturating_add(Weight::from_parts(196_992, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Vesting Vesting (r:1 w:1) - /// Proof: Vesting Vesting (max_values: None, max_size: Some(157), added: 2632, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[2, 3]`. fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `374 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 53_850_000 picoseconds. - Weight::from_parts(54_841_045, 0) + // Minimum execution time: 44_733_000 picoseconds. + Weight::from_parts(45_724_733, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_729 - .saturating_add(Weight::from_parts(50_620, 0).saturating_mul(l.into())) - // Standard Error: 55_171 - .saturating_add(Weight::from_parts(274_849, 0).saturating_mul(s.into())) + // Standard Error: 1_061 + .saturating_add(Weight::from_parts(46_527, 0).saturating_mul(l.into())) + // Standard Error: 33_842 + .saturating_add(Weight::from_parts(193_383, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[2, 3]`. + fn force_remove_vesting_schedule(l: u32, _s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `479 + l * (25 ±0) + s * (36 ±0)` + // Estimated: `4764` + // Minimum execution time: 47_398_000 picoseconds. + Weight::from_parts(49_317_822, 0) + .saturating_add(Weight::from_parts(0, 4764)) + // Standard Error: 1_305 + .saturating_add(Weight::from_parts(43_381, 0).saturating_mul(l.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - - fn force_remove_vesting_schedule(_: u32, _: u32) -> cumulus_primitives_core::Weight { - Weight::default() - } } diff --git a/runtime/centrifuge/src/weights/pallet_xcm.rs b/runtime/centrifuge/src/weights/pallet_xcm.rs index 5f245e8acf..ff8118d8bd 100644 --- a/runtime/centrifuge/src/weights/pallet_xcm.rs +++ b/runtime/centrifuge/src/weights/pallet_xcm.rs @@ -1,22 +1,21 @@ //! Autogenerated weights for `pallet_xcm` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=centrifuge-dev +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_xcm // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=/tmp/runtime/centrifuge/src/weights/pallet_xcm.rs @@ -32,54 +31,48 @@ use core::marker::PhantomData; /// Weight functions for `pallet_xcm`. pub struct WeightInfo(PhantomData); impl pallet_xcm::WeightInfo for WeightInfo { - /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) - /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem HostConfiguration (r:1 w:0) - /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) - /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn send() -> Weight { // Proof Size summary in bytes: - // Measured: `311` - // Estimated: `3776` - // Minimum execution time: 42_008_000 picoseconds. - Weight::from_parts(42_820_000, 0) - .saturating_add(Weight::from_parts(0, 3776)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry LocationToAssetId (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry LocationToAssetId (max_values: None, max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn teleport_assets() -> Weight { // Proof Size summary in bytes: - // Measured: `203` - // Estimated: `3668` - // Minimum execution time: 41_157_000 picoseconds. - Weight::from_parts(41_928_000, 0) - .saturating_add(Weight::from_parts(0, 3668)) - .saturating_add(T::DbWeight::get().reads(2)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry LocationToAssetId (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry LocationToAssetId (max_values: None, max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn reserve_transfer_assets() -> Weight { // Proof Size summary in bytes: - // Measured: `203` - // Estimated: `3668` - // Minimum execution time: 40_746_000 picoseconds. - Weight::from_parts(41_668_000, 0) - .saturating_add(Weight::from_parts(0, 3668)) - .saturating_add(T::DbWeight::get().reads(2)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: Benchmark Override (r:0 w:0) - /// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute() -> Weight { // Proof Size summary in bytes: // Measured: `0` @@ -88,201 +81,156 @@ impl pallet_xcm::WeightInfo for WeightInfo { Weight::from_parts(18_446_744_073_709_551_000, 0) .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: PolkadotXcm SupportedVersion (r:0 w:1) - /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_xcm_version() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 14_577_000 picoseconds. - Weight::from_parts(14_957_000, 0) + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PolkadotXcm SafeXcmVersion (r:0 w:1) - /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) fn force_default_xcm_version() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_418_000 picoseconds. - Weight::from_parts(4_669_000, 0) + // Minimum execution time: 3_717_000 picoseconds. + Weight::from_parts(3_967_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PolkadotXcm VersionNotifiers (r:1 w:1) - /// Proof Skipped: PolkadotXcm VersionNotifiers (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm QueryCounter (r:1 w:1) - /// Proof Skipped: PolkadotXcm QueryCounter (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) - /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem HostConfiguration (r:1 w:0) - /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) - /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PolkadotXcm Queries (r:0 w:1) - /// Proof Skipped: PolkadotXcm Queries (max_values: None, max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_subscribe_version_notify() -> Weight { // Proof Size summary in bytes: - // Measured: `311` - // Estimated: `3776` - // Minimum execution time: 49_061_000 picoseconds. - Weight::from_parts(50_214_000, 0) - .saturating_add(Weight::from_parts(0, 3776)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(5)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: PolkadotXcm VersionNotifiers (r:1 w:1) - /// Proof Skipped: PolkadotXcm VersionNotifiers (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) - /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem HostConfiguration (r:1 w:0) - /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) - /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PolkadotXcm Queries (r:0 w:1) - /// Proof Skipped: PolkadotXcm Queries (max_values: None, max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_unsubscribe_version_notify() -> Weight { // Proof Size summary in bytes: - // Measured: `493` - // Estimated: `3958` - // Minimum execution time: 49_512_000 picoseconds. - Weight::from_parts(50_644_000, 0) - .saturating_add(Weight::from_parts(0, 3958)) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(4)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: PolkadotXcm XcmExecutionSuspended (r:0 w:1) - /// Proof Skipped: PolkadotXcm XcmExecutionSuspended (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `PolkadotXcm::XcmExecutionSuspended` (r:0 w:1) + /// Proof: `PolkadotXcm::XcmExecutionSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn force_suspension() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_539_000 picoseconds. - Weight::from_parts(4_780_000, 0) + // Minimum execution time: 3_877_000 picoseconds. + Weight::from_parts(4_147_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PolkadotXcm SupportedVersion (r:4 w:2) - /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: `PolkadotXcm::SupportedVersion` (r:5 w:2) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) fn migrate_supported_version() -> Weight { // Proof Size summary in bytes: - // Measured: `235` - // Estimated: `11125` - // Minimum execution time: 26_609_000 picoseconds. - Weight::from_parts(27_050_000, 0) - .saturating_add(Weight::from_parts(0, 11125)) - .saturating_add(T::DbWeight::get().reads(4)) + // Measured: `22` + // Estimated: `13387` + // Minimum execution time: 26_810_000 picoseconds. + Weight::from_parts(27_190_000, 0) + .saturating_add(Weight::from_parts(0, 13387)) + .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: PolkadotXcm VersionNotifiers (r:4 w:2) - /// Proof Skipped: PolkadotXcm VersionNotifiers (max_values: None, max_size: None, mode: Measured) + /// Storage: `PolkadotXcm::VersionNotifiers` (r:5 w:2) + /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) fn migrate_version_notifiers() -> Weight { // Proof Size summary in bytes: - // Measured: `239` - // Estimated: `11129` - // Minimum execution time: 26_269_000 picoseconds. - Weight::from_parts(27_120_000, 0) - .saturating_add(Weight::from_parts(0, 11129)) - .saturating_add(T::DbWeight::get().reads(4)) + // Measured: `26` + // Estimated: `13391` + // Minimum execution time: 27_080_000 picoseconds. + Weight::from_parts(27_462_000, 0) + .saturating_add(Weight::from_parts(0, 13391)) + .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: PolkadotXcm VersionNotifyTargets (r:5 w:0) - /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn already_notified_target() -> Weight { // Proof Size summary in bytes: - // Measured: `246` - // Estimated: `13611` - // Minimum execution time: 27_240_000 picoseconds. - Weight::from_parts(28_162_000, 0) - .saturating_add(Weight::from_parts(0, 13611)) - .saturating_add(T::DbWeight::get().reads(5)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 25_000_000 picoseconds. + Weight::from_parts(25_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: PolkadotXcm VersionNotifyTargets (r:2 w:1) - /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) - /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem HostConfiguration (r:1 w:0) - /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) - /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn notify_current_targets() -> Weight { // Proof Size summary in bytes: - // Measured: `378` - // Estimated: `6318` - // Minimum execution time: 46_085_000 picoseconds. - Weight::from_parts(46_707_000, 0) - .saturating_add(Weight::from_parts(0, 6318)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 325_000_000 picoseconds. + Weight::from_parts(325_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: PolkadotXcm VersionNotifyTargets (r:3 w:0) - /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:4 w:0) + /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) fn notify_target_migration_fail() -> Weight { // Proof Size summary in bytes: - // Measured: `206` - // Estimated: `8621` - // Minimum execution time: 13_966_000 picoseconds. - Weight::from_parts(14_597_000, 0) - .saturating_add(Weight::from_parts(0, 8621)) - .saturating_add(T::DbWeight::get().reads(3)) + // Measured: `69` + // Estimated: `10959` + // Minimum execution time: 19_667_000 picoseconds. + Weight::from_parts(20_097_000, 0) + .saturating_add(Weight::from_parts(0, 10959)) + .saturating_add(T::DbWeight::get().reads(4)) } - /// Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2) - /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:5 w:2) + /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) fn migrate_version_notify_targets() -> Weight { // Proof Size summary in bytes: - // Measured: `246` - // Estimated: `11136` - // Minimum execution time: 25_427_000 picoseconds. - Weight::from_parts(26_108_000, 0) - .saturating_add(Weight::from_parts(0, 11136)) - .saturating_add(T::DbWeight::get().reads(4)) + // Measured: `33` + // Estimated: `13398` + // Minimum execution time: 26_430_000 picoseconds. + Weight::from_parts(26_980_000, 0) + .saturating_add(Weight::from_parts(0, 13398)) + .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2) - /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) - /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem HostConfiguration (r:1 w:0) - /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) - /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn migrate_and_notify_old_targets() -> Weight { // Proof Size summary in bytes: - // Measured: `454` - // Estimated: `11344` - // Minimum execution time: 55_574_000 picoseconds. - Weight::from_parts(56_786_000, 0) - .saturating_add(Weight::from_parts(0, 11344)) - .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(4)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 325_000_000 picoseconds. + Weight::from_parts(325_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1) + /// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::Queries` (r:0 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn new_query() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 3_717_000 picoseconds. + Weight::from_parts(3_967_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `PolkadotXcm::Queries` (r:1 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn take_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `7576` + // Estimated: `11041` + // Minimum execution time: 43_632_000 picoseconds. + Weight::from_parts(44_152_000, 0) + .saturating_add(Weight::from_parts(0, 11041)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - - fn transfer_assets() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn new_query() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn take_response() -> cumulus_primitives_core::Weight { - Weight::default() - } } diff --git a/runtime/development/Cargo.toml b/runtime/development/Cargo.toml index e6cdd54606..440ee5309c 100644 --- a/runtime/development/Cargo.toml +++ b/runtime/development/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "development-runtime" -version = "0.10.46" build = "build.rs" +version.workspace = true authors.workspace = true edition.workspace = true license.workspace = true diff --git a/runtime/development/src/lib.rs b/runtime/development/src/lib.rs index 5f73e98780..804c44209b 100644 --- a/runtime/development/src/lib.rs +++ b/runtime/development/src/lib.rs @@ -166,7 +166,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("centrifuge-devel"), impl_name: create_runtime_str!("centrifuge-devel"), authoring_version: 1, - spec_version: 1047, + spec_version: 1100, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 2, @@ -2056,7 +2056,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - crate::migrations::UpgradeDevelopment1047, + crate::migrations::UpgradeDevelopment1100, >; // Frame Order in this block dictates the index of each one in the metadata diff --git a/runtime/development/src/migrations.rs b/runtime/development/src/migrations.rs index fdc2cb322a..76b5483753 100644 --- a/runtime/development/src/migrations.rs +++ b/runtime/development/src/migrations.rs @@ -26,7 +26,7 @@ const IDENTITY_MIGRATION_KEY_LIMIT: u64 = 1000; /// The migration set for Development & Demo. /// It includes all the migrations that have to be applied on that chain. -pub type UpgradeDevelopment1047 = ( +pub type UpgradeDevelopment1100 = ( pallet_collator_selection::migration::v1::MigrateToV1, pallet_collator_selection::migration::v2::MigrationToV2, cleanup_foreign_investments::Migration, diff --git a/runtime/development/src/weights/cumulus_pallet_xcmp_queue.rs b/runtime/development/src/weights/cumulus_pallet_xcmp_queue.rs index 1be99aa0d7..1b2f3baa35 100644 --- a/runtime/development/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/runtime/development/src/weights/cumulus_pallet_xcmp_queue.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `cumulus_pallet_xcmp_queue` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=cumulus_pallet_xcmp_queue // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/cumulus_pallet_xcmp_queue.rs +// --output=/tmp/runtime/centrifuge/src/weights/cumulus_pallet_xcmp_queue.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,40 +31,106 @@ use core::marker::PhantomData; /// Weight functions for `cumulus_pallet_xcmp_queue`. pub struct WeightInfo(PhantomData); impl cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo { - /// Storage: XcmpQueue QueueConfig (r:1 w:1) - /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:1) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_config_with_u32() -> Weight { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1594` - // Minimum execution time: 7_724_000 picoseconds. - Weight::from_parts(7_975_000, 0) + // Minimum execution time: 6_322_000 picoseconds. + Weight::from_parts(6_612_000, 0) .saturating_add(Weight::from_parts(0, 1594)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0) + /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn enqueue_xcmp_message() -> Weight { - Weight::zero() + // Proof Size summary in bytes: + // Measured: `115` + // Estimated: `3517` + // Minimum execution time: 17_583_000 picoseconds. + Weight::from_parts(18_214_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) } - + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn suspend_channel() -> Weight { - Weight::zero() + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 3_627_000 picoseconds. + Weight::from_parts(3_857_000, 0) + .saturating_add(Weight::from_parts(0, 1594)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn resume_channel() -> Weight { - Weight::zero() + // Proof Size summary in bytes: + // Measured: `144` + // Estimated: `1629` + // Minimum execution time: 4_809_000 picoseconds. + Weight::from_parts(5_019_000, 0) + .saturating_add(Weight::from_parts(0, 1629)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - fn take_first_concatenated_xcm() -> Weight { - Weight::zero() + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 11_432_000 picoseconds. + Weight::from_parts(11_742_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0) + /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn on_idle_good_msg() -> Weight { - Weight::from_parts(1, 1) + // Proof Size summary in bytes: + // Measured: `65744` + // Estimated: `69209` + // Minimum execution time: 132_207_000 picoseconds. + Weight::from_parts(136_435_000, 0) + .saturating_add(Weight::from_parts(0, 69209)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(5)) } - - fn on_idle_large_msg() -> Weight { - Weight::from_parts(1, 1) + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65743` + // Estimated: `69208` + // Minimum execution time: 63_539_000 picoseconds. + Weight::from_parts(64_109_000, 0) + .saturating_add(Weight::from_parts(0, 69208)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } } diff --git a/runtime/development/src/weights/frame_system.rs b/runtime/development/src/weights/frame_system.rs index d06ea6295d..05427a8a9c 100644 --- a/runtime/development/src/weights/frame_system.rs +++ b/runtime/development/src/weights/frame_system.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-09-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 @@ -36,20 +36,20 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_065 nanoseconds. - Weight::from_parts(100_146_976, 0) + // Minimum execution time: 3_186 nanoseconds. + Weight::from_parts(21_884_278, 0) // Standard Error: 4 - .saturating_add(Weight::from_parts(285, 0).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(314, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 11_241 nanoseconds. - Weight::from_parts(167_579_235, 0) + // Minimum execution time: 11_772 nanoseconds. + Weight::from_parts(124_610_758, 0) // Standard Error: 5 - .saturating_add(Weight::from_parts(1_684, 0).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(1_747, 0).saturating_mul(b.into())) } /// Storage: System Digest (r:1 w:1) /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) @@ -59,8 +59,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `495` - // Minimum execution time: 5_751 nanoseconds. - Weight::from_parts(6_092_000, 495) + // Minimum execution time: 6_392 nanoseconds. + Weight::from_parts(6_713_000, 495) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -77,10 +77,10 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_965 nanoseconds. - Weight::from_parts(3_075_000, 0) - // Standard Error: 1_718 - .saturating_add(Weight::from_parts(885_573, 0).saturating_mul(i.into())) + // Minimum execution time: 3_347 nanoseconds. + Weight::from_parts(3_486_000, 0) + // Standard Error: 1_679 + .saturating_add(Weight::from_parts(920_803, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: Skipped Metadata (r:0 w:0) @@ -90,10 +90,10 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_936 nanoseconds. - Weight::from_parts(3_055_000, 0) - // Standard Error: 859 - .saturating_add(Weight::from_parts(638_231, 0).saturating_mul(i.into())) + // Minimum execution time: 3_306 nanoseconds. + Weight::from_parts(3_357_000, 0) + // Standard Error: 868 + .saturating_add(Weight::from_parts(650_497, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: Skipped Metadata (r:0 w:0) @@ -101,12 +101,12 @@ impl frame_system::WeightInfo for WeightInfo { /// The range of component `p` is `[0, 1000]`. fn kill_prefix(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `171 + p * (69 ±0)` - // Estimated: `148 + p * (70 ±0)` - // Minimum execution time: 5_992 nanoseconds. - Weight::from_parts(6_142_000, 148) - // Standard Error: 1_161 - .saturating_add(Weight::from_parts(1_283_958, 0).saturating_mul(p.into())) + // Measured: `178 + p * (69 ±0)` + // Estimated: `155 + p * (70 ±0)` + // Minimum execution time: 6_271 nanoseconds. + Weight::from_parts(6_522_000, 155) + // Standard Error: 1_372 + .saturating_add(Weight::from_parts(1_296_943, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } @@ -118,5 +118,4 @@ impl frame_system::WeightInfo for WeightInfo { fn apply_authorized_upgrade() -> Weight { Weight::zero() } - } diff --git a/runtime/development/src/weights/mod.rs b/runtime/development/src/weights/mod.rs index a9c0e46ff8..659c89486d 100644 --- a/runtime/development/src/weights/mod.rs +++ b/runtime/development/src/weights/mod.rs @@ -24,6 +24,7 @@ pub mod pallet_identity; pub mod pallet_interest_accrual; pub mod pallet_investments; pub mod pallet_keystore; +pub mod pallet_liquidity_rewards; pub mod pallet_loans; pub mod pallet_multisig; pub mod pallet_oracle_collection; @@ -42,7 +43,6 @@ pub mod pallet_session; pub mod pallet_timestamp; pub mod pallet_token_mux; pub mod pallet_transfer_allowlist; -pub mod pallet_treasury; pub mod pallet_uniques; pub mod pallet_utility; pub mod pallet_vesting; diff --git a/runtime/development/src/weights/pallet_anchors.rs b/runtime/development/src/weights/pallet_anchors.rs index 111a73a62c..1ff8ae7cc7 100644 --- a/runtime/development/src/weights/pallet_anchors.rs +++ b/runtime/development/src/weights/pallet_anchors.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_anchors` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_anchors // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_anchors.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_anchors.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,482 +31,482 @@ use core::marker::PhantomData; /// Weight functions for `pallet_anchors`. pub struct WeightInfo(PhantomData); impl pallet_anchors::WeightInfo for WeightInfo { - /// Storage: Anchor AnchorEvictDates (r:1 w:0) - /// Proof: Anchor AnchorEvictDates (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) - /// Storage: Anchor PreCommits (r:1 w:1) - /// Proof: Anchor PreCommits (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen) - /// Storage: Fees FeeBalances (r:1 w:0) - /// Proof: Fees FeeBalances (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) + /// Storage: `Anchor::AnchorEvictDates` (r:1 w:0) + /// Proof: `Anchor::AnchorEvictDates` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `Anchor::PreCommits` (r:1 w:1) + /// Proof: `Anchor::PreCommits` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `Fees::FeeBalances` (r:1 w:0) + /// Proof: `Fees::FeeBalances` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) fn pre_commit() -> Weight { // Proof Size summary in bytes: - // Measured: `334` + // Measured: `301` // Estimated: `3581` - // Minimum execution time: 39_925_000 picoseconds. - Weight::from_parts(40_886_000, 0) + // Minimum execution time: 38_893_000 picoseconds. + Weight::from_parts(39_884_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Anchor AnchorEvictDates (r:1 w:1) - /// Proof: Anchor AnchorEvictDates (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) - /// Storage: Anchor PreCommits (r:1 w:1) - /// Proof: Anchor PreCommits (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen) - /// Storage: Fees FeeBalances (r:1 w:0) - /// Proof: Fees FeeBalances (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Authorship Author (r:1 w:0) - /// Proof: Authorship Author (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: System Digest (r:1 w:0) - /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Anchor LatestAnchorIndex (r:1 w:1) - /// Proof: Anchor LatestAnchorIndex (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Anchor AnchorIndexes (r:0 w:1) - /// Proof: Anchor AnchorIndexes (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - /// Storage: unknown `0xdb4faa73ca6d2016e53c7156087c176b79b169c409b8a0063a07964f3187f9e9` (r:0 w:1) - /// Proof Skipped: unknown `0xdb4faa73ca6d2016e53c7156087c176b79b169c409b8a0063a07964f3187f9e9` (r:0 w:1) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Anchor::AnchorEvictDates` (r:1 w:1) + /// Proof: `Anchor::AnchorEvictDates` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `Anchor::PreCommits` (r:1 w:1) + /// Proof: `Anchor::PreCommits` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `Fees::FeeBalances` (r:1 w:0) + /// Proof: `Fees::FeeBalances` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Authorship::Author` (r:1 w:0) + /// Proof: `Authorship::Author` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + /// Storage: `System::Digest` (r:1 w:0) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Anchor::LatestAnchorIndex` (r:1 w:1) + /// Proof: `Anchor::LatestAnchorIndex` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Anchor::AnchorIndexes` (r:0 w:1) + /// Proof: `Anchor::AnchorIndexes` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xdb4faa73ca6d2016e53c7156087c176b79b169c409b8a0063a07964f3187f9e9` (r:0 w:1) + /// Proof: UNKNOWN KEY `0xdb4faa73ca6d2016e53c7156087c176b79b169c409b8a0063a07964f3187f9e9` (r:0 w:1) fn commit() -> Weight { // Proof Size summary in bytes: - // Measured: `668` + // Measured: `635` // Estimated: `3581` - // Minimum execution time: 69_240_000 picoseconds. - Weight::from_parts(71_283_000, 0) + // Minimum execution time: 65_643_000 picoseconds. + Weight::from_parts(66_685_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: Anchor PreCommits (r:100 w:100) - /// Proof: Anchor PreCommits (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen) + /// Storage: `Anchor::PreCommits` (r:100 w:100) + /// Proof: `Anchor::PreCommits` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn evict_pre_commits() -> Weight { // Proof Size summary in bytes: // Measured: `12450` // Estimated: `260090` - // Minimum execution time: 2_149_515_000 picoseconds. - Weight::from_parts(2_165_375_000, 0) + // Minimum execution time: 1_948_840_000 picoseconds. + Weight::from_parts(1_974_327_000, 0) .saturating_add(Weight::from_parts(0, 260090)) .saturating_add(T::DbWeight::get().reads(100)) .saturating_add(T::DbWeight::get().writes(100)) } - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Anchor LatestEvictedDate (r:1 w:1) - /// Proof: Anchor LatestEvictedDate (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Anchor EvictedAnchorRoots (r:100 w:100) - /// Proof: Anchor EvictedAnchorRoots (max_values: None, max_size: Some(65), added: 2540, mode: MaxEncodedLen) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72010000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72010000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72020000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72020000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72030000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72030000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72040000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72040000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72050000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72050000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72060000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72060000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72070000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72070000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72080000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72080000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72090000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72090000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720a0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720a0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720b0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720b0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720c0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720c0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720d0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720d0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720e0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720e0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720f0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720f0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72100000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72100000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72110000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72110000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72120000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72120000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72130000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72130000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72140000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72140000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72150000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72150000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72160000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72160000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72170000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72170000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72180000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72180000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72190000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72190000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721a0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721a0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721b0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721b0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721c0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721c0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721d0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721d0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721e0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721e0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721f0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721f0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72200000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72200000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72210000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72210000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72220000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72220000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72230000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72230000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72240000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72240000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72250000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72250000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72260000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72260000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72270000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72270000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72280000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72280000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72290000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72290000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722a0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722a0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722b0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722b0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722c0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722c0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722d0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722d0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722e0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722e0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722f0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722f0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72300000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72300000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72310000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72310000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72320000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72320000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72330000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72330000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72340000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72340000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72350000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72350000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72360000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72360000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72370000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72370000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72380000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72380000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72390000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72390000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723a0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723a0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723b0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723b0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723c0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723c0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723d0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723d0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723e0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723e0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723f0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723f0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72400000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72400000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72410000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72410000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72420000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72420000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72430000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72430000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72440000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72440000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72450000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72450000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72460000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72460000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72470000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72470000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72480000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72480000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72490000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72490000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724a0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724a0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724b0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724b0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724c0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724c0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724d0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724d0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724e0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724e0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724f0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724f0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72500000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72500000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72510000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72510000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72520000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72520000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72530000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72530000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72540000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72540000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72550000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72550000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72560000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72560000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72570000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72570000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72580000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72580000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72590000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72590000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725a0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725a0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725b0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725b0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725c0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725c0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725d0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725d0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725e0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725e0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725f0000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725f0000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72600000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72600000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72610000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72610000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72620000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72620000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72630000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72630000` (r:1 w:0) - /// Storage: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72640000` (r:1 w:0) - /// Proof Skipped: unknown `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72640000` (r:1 w:0) - /// Storage: Anchor LatestEvictedAnchorIndex (r:1 w:1) - /// Proof: Anchor LatestEvictedAnchorIndex (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Anchor LatestAnchorIndex (r:1 w:0) - /// Proof: Anchor LatestAnchorIndex (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Anchor AnchorIndexes (r:100 w:100) - /// Proof: Anchor AnchorIndexes (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - /// Storage: Anchor AnchorEvictDates (r:100 w:100) - /// Proof: Anchor AnchorEvictDates (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) - /// Storage: unknown `0x01d5998dcaa249dfa2a455ae4c045d761623f268227068931dbabca3732aa41f` (r:1 w:1) - /// Proof Skipped: unknown `0x01d5998dcaa249dfa2a455ae4c045d761623f268227068931dbabca3732aa41f` (r:1 w:1) - /// Storage: unknown `0x04575ee0699f1fa86cccfdcf4285aa81b9bfa0f8837cf533346d722970f1a704` (r:1 w:1) - /// Proof Skipped: unknown `0x04575ee0699f1fa86cccfdcf4285aa81b9bfa0f8837cf533346d722970f1a704` (r:1 w:1) - /// Storage: unknown `0x0959721f200e92d5090cee3c2c4546c11f9bfd16ded1e70e6781d2402880f1f3` (r:1 w:1) - /// Proof Skipped: unknown `0x0959721f200e92d5090cee3c2c4546c11f9bfd16ded1e70e6781d2402880f1f3` (r:1 w:1) - /// Storage: unknown `0x0a958b15afac1ffb0c6e73c553bd8b4ba94ad2d0cc118dcd2a7bc8802e2e772a` (r:1 w:1) - /// Proof Skipped: unknown `0x0a958b15afac1ffb0c6e73c553bd8b4ba94ad2d0cc118dcd2a7bc8802e2e772a` (r:1 w:1) - /// Storage: unknown `0x0c4c531cd9dcf8573a6350d0ac9fb060d273156bdee4fdae0043b6fee5bda27c` (r:1 w:1) - /// Proof Skipped: unknown `0x0c4c531cd9dcf8573a6350d0ac9fb060d273156bdee4fdae0043b6fee5bda27c` (r:1 w:1) - /// Storage: unknown `0x0cd3f3ee9420f9c3b2e70862996e8d02e87d1f148632a36b8f72c9548b10b856` (r:1 w:1) - /// Proof Skipped: unknown `0x0cd3f3ee9420f9c3b2e70862996e8d02e87d1f148632a36b8f72c9548b10b856` (r:1 w:1) - /// Storage: unknown `0x10876da12e1227a2c04872ce311f768aaf3e21458e6ad1c04f044c97fe8e214e` (r:1 w:1) - /// Proof Skipped: unknown `0x10876da12e1227a2c04872ce311f768aaf3e21458e6ad1c04f044c97fe8e214e` (r:1 w:1) - /// Storage: unknown `0x10b360a66313de6ab2d43019c5fd7ea0db088efb3e1d4a24d89775e66e089cff` (r:1 w:1) - /// Proof Skipped: unknown `0x10b360a66313de6ab2d43019c5fd7ea0db088efb3e1d4a24d89775e66e089cff` (r:1 w:1) - /// Storage: unknown `0x16d33ce142442dfbe857e2c9e0648d026c6bb367d467d6922c2c1133aaa3d7b8` (r:1 w:1) - /// Proof Skipped: unknown `0x16d33ce142442dfbe857e2c9e0648d026c6bb367d467d6922c2c1133aaa3d7b8` (r:1 w:1) - /// Storage: unknown `0x16e133fb9e42d5a2a9a2e21b2e0efd735fccb527162a21cf520c3aecd84c89ed` (r:1 w:1) - /// Proof Skipped: unknown `0x16e133fb9e42d5a2a9a2e21b2e0efd735fccb527162a21cf520c3aecd84c89ed` (r:1 w:1) - /// Storage: unknown `0x16fcb5e799a48fa04deaaaa71c85bc8e9126bd4b5dbcb3a1f8068ab14bc1c26f` (r:1 w:1) - /// Proof Skipped: unknown `0x16fcb5e799a48fa04deaaaa71c85bc8e9126bd4b5dbcb3a1f8068ab14bc1c26f` (r:1 w:1) - /// Storage: unknown `0x1b3289127bc95ed117e77d479ccd3ac4477ef8d32df7265bbd42c75bf1945464` (r:1 w:1) - /// Proof Skipped: unknown `0x1b3289127bc95ed117e77d479ccd3ac4477ef8d32df7265bbd42c75bf1945464` (r:1 w:1) - /// Storage: unknown `0x1ecb14235f21b57f49e32ac4f35a1af6a71f96867f0bc61bc5905b8d437b6bde` (r:1 w:1) - /// Proof Skipped: unknown `0x1ecb14235f21b57f49e32ac4f35a1af6a71f96867f0bc61bc5905b8d437b6bde` (r:1 w:1) - /// Storage: unknown `0x1f8b0dafc67f9d378cf0596c5d49f220e5880b9c74ccaadac2206a35ec92715a` (r:1 w:1) - /// Proof Skipped: unknown `0x1f8b0dafc67f9d378cf0596c5d49f220e5880b9c74ccaadac2206a35ec92715a` (r:1 w:1) - /// Storage: unknown `0x24a8d9c362d9365f46f899adb37f6b61134dceaa80f96a9cda6b059a1301f380` (r:1 w:1) - /// Proof Skipped: unknown `0x24a8d9c362d9365f46f899adb37f6b61134dceaa80f96a9cda6b059a1301f380` (r:1 w:1) - /// Storage: unknown `0x2a00fca93dceceb635a80a95e8f785b189a4ce35f90a17acba5d1bcacf895a84` (r:1 w:1) - /// Proof Skipped: unknown `0x2a00fca93dceceb635a80a95e8f785b189a4ce35f90a17acba5d1bcacf895a84` (r:1 w:1) - /// Storage: unknown `0x2b318def38ef5f2f8db787e365834ece79fbde70c22cf7bd6c9326995fd4c07f` (r:1 w:1) - /// Proof Skipped: unknown `0x2b318def38ef5f2f8db787e365834ece79fbde70c22cf7bd6c9326995fd4c07f` (r:1 w:1) - /// Storage: unknown `0x2fbeff7b90831a847716e729a30f028899726193b4406a1c91fce4e97beb61b5` (r:1 w:1) - /// Proof Skipped: unknown `0x2fbeff7b90831a847716e729a30f028899726193b4406a1c91fce4e97beb61b5` (r:1 w:1) - /// Storage: unknown `0x30dc983a9ad263028d0e91a8a0cf703a2a7fd3834b1102f1ff3f8c8876a207bf` (r:1 w:1) - /// Proof Skipped: unknown `0x30dc983a9ad263028d0e91a8a0cf703a2a7fd3834b1102f1ff3f8c8876a207bf` (r:1 w:1) - /// Storage: unknown `0x3187d0cdac28db7ec343a07f0b2e44fc56986f0a9c2062d5fa60f99419707bea` (r:1 w:1) - /// Proof Skipped: unknown `0x3187d0cdac28db7ec343a07f0b2e44fc56986f0a9c2062d5fa60f99419707bea` (r:1 w:1) - /// Storage: unknown `0x3596cd6b45e209629c71765c804f324ed440f7a1cb2ff6cb542156fd5d213de2` (r:1 w:1) - /// Proof Skipped: unknown `0x3596cd6b45e209629c71765c804f324ed440f7a1cb2ff6cb542156fd5d213de2` (r:1 w:1) - /// Storage: unknown `0x3645890bd8ab0cc13921468d56eee7da40fbe28dc05bc30a64f05a2c03a1912e` (r:1 w:1) - /// Proof Skipped: unknown `0x3645890bd8ab0cc13921468d56eee7da40fbe28dc05bc30a64f05a2c03a1912e` (r:1 w:1) - /// Storage: unknown `0x384b604969634cf37d988e886b5267a51baeb797e09a1d1a0893e5be8fc553df` (r:1 w:1) - /// Proof Skipped: unknown `0x384b604969634cf37d988e886b5267a51baeb797e09a1d1a0893e5be8fc553df` (r:1 w:1) - /// Storage: unknown `0x3c056a888ea28c9294c91723916f5891141a824048335e32532e6605ce0457e0` (r:1 w:1) - /// Proof Skipped: unknown `0x3c056a888ea28c9294c91723916f5891141a824048335e32532e6605ce0457e0` (r:1 w:1) - /// Storage: unknown `0x3c5fd1d5c95885c6b44e0f3995886046d906821de1ed5ee95b51b17c42d3295b` (r:1 w:1) - /// Proof Skipped: unknown `0x3c5fd1d5c95885c6b44e0f3995886046d906821de1ed5ee95b51b17c42d3295b` (r:1 w:1) - /// Storage: unknown `0x3e74dfe3befcf6fa20eb902c2007ba7fd831619013aa99e016284597b896115b` (r:1 w:1) - /// Proof Skipped: unknown `0x3e74dfe3befcf6fa20eb902c2007ba7fd831619013aa99e016284597b896115b` (r:1 w:1) - /// Storage: unknown `0x42f1cff854d41b18ae379b012a1e712f036bcd839244d5c6324f12c28f6fd6e9` (r:1 w:1) - /// Proof Skipped: unknown `0x42f1cff854d41b18ae379b012a1e712f036bcd839244d5c6324f12c28f6fd6e9` (r:1 w:1) - /// Storage: unknown `0x457803d743c32f50866dbf7aabb339a1d8b6b759783b0627128f0cfd3d6c8775` (r:1 w:1) - /// Proof Skipped: unknown `0x457803d743c32f50866dbf7aabb339a1d8b6b759783b0627128f0cfd3d6c8775` (r:1 w:1) - /// Storage: unknown `0x4cb17fd2f1d1b2eff69f0ffa1a97ff13e7bf4f05a7a99dd06e503e7546b23906` (r:1 w:1) - /// Proof Skipped: unknown `0x4cb17fd2f1d1b2eff69f0ffa1a97ff13e7bf4f05a7a99dd06e503e7546b23906` (r:1 w:1) - /// Storage: unknown `0x58357c4f5a9881658ffc42faa5f48e2810169bf85c8c78011696a17b59728ef5` (r:1 w:1) - /// Proof Skipped: unknown `0x58357c4f5a9881658ffc42faa5f48e2810169bf85c8c78011696a17b59728ef5` (r:1 w:1) - /// Storage: unknown `0x5baa983aa91ad92c66e17d16e0757ec4a67ec2ce5b95f4d02ec22fba0e485da0` (r:1 w:1) - /// Proof Skipped: unknown `0x5baa983aa91ad92c66e17d16e0757ec4a67ec2ce5b95f4d02ec22fba0e485da0` (r:1 w:1) - /// Storage: unknown `0x5da83d0712f41714545470b781e0a43c65a0ac977327475baa98b5cd94938f17` (r:1 w:1) - /// Proof Skipped: unknown `0x5da83d0712f41714545470b781e0a43c65a0ac977327475baa98b5cd94938f17` (r:1 w:1) - /// Storage: unknown `0x6365aeecd6b54d3166f3df46d8c7b404711ca54b4284e8faf67eb014fa3685f8` (r:1 w:1) - /// Proof Skipped: unknown `0x6365aeecd6b54d3166f3df46d8c7b404711ca54b4284e8faf67eb014fa3685f8` (r:1 w:1) - /// Storage: unknown `0x683b74d821a8019cbfc9dbe47b50b0f377e0eef16dbc52f7f931ae713fd3f644` (r:1 w:1) - /// Proof Skipped: unknown `0x683b74d821a8019cbfc9dbe47b50b0f377e0eef16dbc52f7f931ae713fd3f644` (r:1 w:1) - /// Storage: unknown `0x6b02568ad8557dc3d66463abfd1d7f298a0b314fe4bf7d5be79b66768096ed90` (r:1 w:1) - /// Proof Skipped: unknown `0x6b02568ad8557dc3d66463abfd1d7f298a0b314fe4bf7d5be79b66768096ed90` (r:1 w:1) - /// Storage: unknown `0x6b05c068aecc171915a61cf59146e7f9a69b9bba39f4df50cecfeb454850b4c9` (r:1 w:1) - /// Proof Skipped: unknown `0x6b05c068aecc171915a61cf59146e7f9a69b9bba39f4df50cecfeb454850b4c9` (r:1 w:1) - /// Storage: unknown `0x6b5529ac614dcbd6113176256a4f5809eb667bddab2e22579306de0a1f83f287` (r:1 w:1) - /// Proof Skipped: unknown `0x6b5529ac614dcbd6113176256a4f5809eb667bddab2e22579306de0a1f83f287` (r:1 w:1) - /// Storage: unknown `0x6cd1381490331969f37f1e6575081f42f1bd8ae0cc79d70fc52ed178b5d75bd0` (r:1 w:1) - /// Proof Skipped: unknown `0x6cd1381490331969f37f1e6575081f42f1bd8ae0cc79d70fc52ed178b5d75bd0` (r:1 w:1) - /// Storage: unknown `0x6f5b021a9f57d7669ed7269e7d8785acf255f15785bf452a03a4decc184fd403` (r:1 w:1) - /// Proof Skipped: unknown `0x6f5b021a9f57d7669ed7269e7d8785acf255f15785bf452a03a4decc184fd403` (r:1 w:1) - /// Storage: unknown `0x764bac7888f79c071087d351a356a09cb2490cb6ea6d71f0cd391de89a885cd2` (r:1 w:1) - /// Proof Skipped: unknown `0x764bac7888f79c071087d351a356a09cb2490cb6ea6d71f0cd391de89a885cd2` (r:1 w:1) - /// Storage: unknown `0x7aedb653a5de5739b9d3594196693fd51653fcd59b442e0eb9f64265db188044` (r:1 w:1) - /// Proof Skipped: unknown `0x7aedb653a5de5739b9d3594196693fd51653fcd59b442e0eb9f64265db188044` (r:1 w:1) - /// Storage: unknown `0x7ca04bdeb932896fd908eb86d4136e9e2462575ebdf981001c1cd3ca6a2faaec` (r:1 w:1) - /// Proof Skipped: unknown `0x7ca04bdeb932896fd908eb86d4136e9e2462575ebdf981001c1cd3ca6a2faaec` (r:1 w:1) - /// Storage: unknown `0x7ceee738f5af899bd2f967a928019e4a0ecb8715509668dcc039badfe148b45e` (r:1 w:1) - /// Proof Skipped: unknown `0x7ceee738f5af899bd2f967a928019e4a0ecb8715509668dcc039badfe148b45e` (r:1 w:1) - /// Storage: unknown `0x7e700ce9c411e35485babec60c2b68f40c512bc8399c5cee0c1e4264e63f36d1` (r:1 w:1) - /// Proof Skipped: unknown `0x7e700ce9c411e35485babec60c2b68f40c512bc8399c5cee0c1e4264e63f36d1` (r:1 w:1) - /// Storage: unknown `0x80c020f2e70a170ee2f34af3daeda4c2097d14a35f5b1f2d23c2287e5e930f55` (r:1 w:1) - /// Proof Skipped: unknown `0x80c020f2e70a170ee2f34af3daeda4c2097d14a35f5b1f2d23c2287e5e930f55` (r:1 w:1) - /// Storage: unknown `0x8101d04cf92ee55f6c2a798c7b16da4cc8c511fd822b13093d0f53f5523718d0` (r:1 w:1) - /// Proof Skipped: unknown `0x8101d04cf92ee55f6c2a798c7b16da4cc8c511fd822b13093d0f53f5523718d0` (r:1 w:1) - /// Storage: unknown `0x85172de32d6b5871235d50648541b1bd007807512231f9b81f25cb5e20141820` (r:1 w:1) - /// Proof Skipped: unknown `0x85172de32d6b5871235d50648541b1bd007807512231f9b81f25cb5e20141820` (r:1 w:1) - /// Storage: unknown `0x85e9ccd05d28607dcce0dc5be4f34a7d56d3b83b6c63162b2787fc0e6decf2a7` (r:1 w:1) - /// Proof Skipped: unknown `0x85e9ccd05d28607dcce0dc5be4f34a7d56d3b83b6c63162b2787fc0e6decf2a7` (r:1 w:1) - /// Storage: unknown `0x87b3d065618080e576b534cf68b60d09c4cca0b71a8b6321337cc23be47e7329` (r:1 w:1) - /// Proof Skipped: unknown `0x87b3d065618080e576b534cf68b60d09c4cca0b71a8b6321337cc23be47e7329` (r:1 w:1) - /// Storage: unknown `0x892ec564231143cc6294a8750b924df2207d91ea3508501d2bd84bee7947b9d0` (r:1 w:1) - /// Proof Skipped: unknown `0x892ec564231143cc6294a8750b924df2207d91ea3508501d2bd84bee7947b9d0` (r:1 w:1) - /// Storage: unknown `0x8980988eacf42b40c4fc8aa995ae2e059a66c6935626c3e30f1d6842335368d0` (r:1 w:1) - /// Proof Skipped: unknown `0x8980988eacf42b40c4fc8aa995ae2e059a66c6935626c3e30f1d6842335368d0` (r:1 w:1) - /// Storage: unknown `0x8db2380506697daa88c7a72906d747535ffb12c0ca2a4a6443074bb0fdd8f256` (r:1 w:1) - /// Proof Skipped: unknown `0x8db2380506697daa88c7a72906d747535ffb12c0ca2a4a6443074bb0fdd8f256` (r:1 w:1) - /// Storage: unknown `0x8e098b9b896a97df275aba887f591c3076220e02adf682c98808e4ba53e6a773` (r:1 w:1) - /// Proof Skipped: unknown `0x8e098b9b896a97df275aba887f591c3076220e02adf682c98808e4ba53e6a773` (r:1 w:1) - /// Storage: unknown `0x8e590007efc113bc10a61c478d26803cdae5572d4c70547b3c9813b3ce396826` (r:1 w:1) - /// Proof Skipped: unknown `0x8e590007efc113bc10a61c478d26803cdae5572d4c70547b3c9813b3ce396826` (r:1 w:1) - /// Storage: unknown `0x96e31df89b1f00b96c993bd9de31e32e7e59c0a185cd0b31adc4e969746c8ea6` (r:1 w:1) - /// Proof Skipped: unknown `0x96e31df89b1f00b96c993bd9de31e32e7e59c0a185cd0b31adc4e969746c8ea6` (r:1 w:1) - /// Storage: unknown `0x9ae7305289647b636a8702b2316e5482f1a807fa398687068fb653527368f9bc` (r:1 w:1) - /// Proof Skipped: unknown `0x9ae7305289647b636a8702b2316e5482f1a807fa398687068fb653527368f9bc` (r:1 w:1) - /// Storage: unknown `0x9b9660b6fc1992a09573eaa9110c4a08d40c1f439304a47b9776645bc278fc75` (r:1 w:1) - /// Proof Skipped: unknown `0x9b9660b6fc1992a09573eaa9110c4a08d40c1f439304a47b9776645bc278fc75` (r:1 w:1) - /// Storage: unknown `0xa04f2ef3bb509dfec9d7a97c4778ab2e477af9c5cbda3a1c6e57514314a3f9a5` (r:1 w:1) - /// Proof Skipped: unknown `0xa04f2ef3bb509dfec9d7a97c4778ab2e477af9c5cbda3a1c6e57514314a3f9a5` (r:1 w:1) - /// Storage: unknown `0xa16d64c1e08b47144c2c8e37872486cf440dda823e2ea05f480fedfe83060f17` (r:1 w:1) - /// Proof Skipped: unknown `0xa16d64c1e08b47144c2c8e37872486cf440dda823e2ea05f480fedfe83060f17` (r:1 w:1) - /// Storage: unknown `0xa4ad0a32c2781a59ea8a6d58e26fa7dc0b2a08f8c4c938661f5f3ccd8f8eb8ce` (r:1 w:1) - /// Proof Skipped: unknown `0xa4ad0a32c2781a59ea8a6d58e26fa7dc0b2a08f8c4c938661f5f3ccd8f8eb8ce` (r:1 w:1) - /// Storage: unknown `0xab9797fb6926376ee3b6be73e5501e0a3af18d0bc6dfca0d3b5f498602016956` (r:1 w:1) - /// Proof Skipped: unknown `0xab9797fb6926376ee3b6be73e5501e0a3af18d0bc6dfca0d3b5f498602016956` (r:1 w:1) - /// Storage: unknown `0xac4d9f6628449fe129d24b384441fdb445962d2d6bca7603fea0c20f3d04351c` (r:1 w:1) - /// Proof Skipped: unknown `0xac4d9f6628449fe129d24b384441fdb445962d2d6bca7603fea0c20f3d04351c` (r:1 w:1) - /// Storage: unknown `0xafecb421bedaa0f8bd89ef18897b77ce61738af42f8a66e3257a079a3d04bef1` (r:1 w:1) - /// Proof Skipped: unknown `0xafecb421bedaa0f8bd89ef18897b77ce61738af42f8a66e3257a079a3d04bef1` (r:1 w:1) - /// Storage: unknown `0xb292dc48cc1057cce335f1d84f295271a2b16aee7018f1bd444febd77f7e5cbb` (r:1 w:1) - /// Proof Skipped: unknown `0xb292dc48cc1057cce335f1d84f295271a2b16aee7018f1bd444febd77f7e5cbb` (r:1 w:1) - /// Storage: unknown `0xb48b9d9955158dbd87abb433511a5968c21cf78f8085088407e24d6ee26f7f56` (r:1 w:1) - /// Proof Skipped: unknown `0xb48b9d9955158dbd87abb433511a5968c21cf78f8085088407e24d6ee26f7f56` (r:1 w:1) - /// Storage: unknown `0xb5a7df612d6fb3bc16c1716414897ba5928835d883003371f02106d5a92abd78` (r:1 w:1) - /// Proof Skipped: unknown `0xb5a7df612d6fb3bc16c1716414897ba5928835d883003371f02106d5a92abd78` (r:1 w:1) - /// Storage: unknown `0xb684abf2ee5018a16a8dbef6633bcb94a07a2cdf4a173e4fec130da86e8ab987` (r:1 w:1) - /// Proof Skipped: unknown `0xb684abf2ee5018a16a8dbef6633bcb94a07a2cdf4a173e4fec130da86e8ab987` (r:1 w:1) - /// Storage: unknown `0xb86c8391d2a3eb28b9e3b603cf6929849d50e439e0bbc79781b2555f9cbaa013` (r:1 w:1) - /// Proof Skipped: unknown `0xb86c8391d2a3eb28b9e3b603cf6929849d50e439e0bbc79781b2555f9cbaa013` (r:1 w:1) - /// Storage: unknown `0xba070ba6cf5f2489f98b6841d238eee4fc403d3065b57f9e3e38ca540971024d` (r:1 w:1) - /// Proof Skipped: unknown `0xba070ba6cf5f2489f98b6841d238eee4fc403d3065b57f9e3e38ca540971024d` (r:1 w:1) - /// Storage: unknown `0xbcb96e5fc092d3ac258a81b5390671817730859598470874ef02f998518bbf58` (r:1 w:1) - /// Proof Skipped: unknown `0xbcb96e5fc092d3ac258a81b5390671817730859598470874ef02f998518bbf58` (r:1 w:1) - /// Storage: unknown `0xc008db6f6d721d80fab2eab8b6dda4f19bd5def30aa7db86dadd6eb799c2f5ad` (r:1 w:1) - /// Proof Skipped: unknown `0xc008db6f6d721d80fab2eab8b6dda4f19bd5def30aa7db86dadd6eb799c2f5ad` (r:1 w:1) - /// Storage: unknown `0xc054c4045e44e28cef1884c0aa86d0049b76eaff493a6d694394df7b0cee8136` (r:1 w:1) - /// Proof Skipped: unknown `0xc054c4045e44e28cef1884c0aa86d0049b76eaff493a6d694394df7b0cee8136` (r:1 w:1) - /// Storage: unknown `0xc315216d50f4dd95914d6d102976dc09ec4474da5c314a15f09972ded6e71ddb` (r:1 w:1) - /// Proof Skipped: unknown `0xc315216d50f4dd95914d6d102976dc09ec4474da5c314a15f09972ded6e71ddb` (r:1 w:1) - /// Storage: unknown `0xc4a2c3fa3cc7ed1611651510eb6e225abab30676f0fad28c115482c7dd61f8e0` (r:1 w:1) - /// Proof Skipped: unknown `0xc4a2c3fa3cc7ed1611651510eb6e225abab30676f0fad28c115482c7dd61f8e0` (r:1 w:1) - /// Storage: unknown `0xc6cc01d59d3c86a1c12a167e149d784295fcd13862e4afb0a39a8459e6e25561` (r:1 w:1) - /// Proof Skipped: unknown `0xc6cc01d59d3c86a1c12a167e149d784295fcd13862e4afb0a39a8459e6e25561` (r:1 w:1) - /// Storage: unknown `0xc712d8fa08dd521e5f901ca6d36134807c5ec0510e3b52e8ae5a15f7c13d2ebd` (r:1 w:1) - /// Proof Skipped: unknown `0xc712d8fa08dd521e5f901ca6d36134807c5ec0510e3b52e8ae5a15f7c13d2ebd` (r:1 w:1) - /// Storage: unknown `0xc7e2bc91ff1b307f6995683b76f1904ccdada3cf8f00528c08d4f65911c4888a` (r:1 w:1) - /// Proof Skipped: unknown `0xc7e2bc91ff1b307f6995683b76f1904ccdada3cf8f00528c08d4f65911c4888a` (r:1 w:1) - /// Storage: unknown `0xccbca45304d59a1167eaf9b459e09cffce3d90c087ee9edf8e7e2dc40349373b` (r:1 w:1) - /// Proof Skipped: unknown `0xccbca45304d59a1167eaf9b459e09cffce3d90c087ee9edf8e7e2dc40349373b` (r:1 w:1) - /// Storage: unknown `0xccc17a821dda11e5239ea8dbedee5bd6622fc8dd63ee229fc3bd2dead22e8ae2` (r:1 w:1) - /// Proof Skipped: unknown `0xccc17a821dda11e5239ea8dbedee5bd6622fc8dd63ee229fc3bd2dead22e8ae2` (r:1 w:1) - /// Storage: unknown `0xccee04c4c0534d4245892ed24d7814cd14a41aeed7e94591354315f5b74d89f5` (r:1 w:1) - /// Proof Skipped: unknown `0xccee04c4c0534d4245892ed24d7814cd14a41aeed7e94591354315f5b74d89f5` (r:1 w:1) - /// Storage: unknown `0xcf67e9890d936f6bd205710c9a5cedc653d88fba3c74b7a2b9fe8ce7fce0bd0c` (r:1 w:1) - /// Proof Skipped: unknown `0xcf67e9890d936f6bd205710c9a5cedc653d88fba3c74b7a2b9fe8ce7fce0bd0c` (r:1 w:1) - /// Storage: unknown `0xcfdb7c67ada01beee8308b04c3f32e4c078603d0c84c0e28e605a8ea56dcc362` (r:1 w:1) - /// Proof Skipped: unknown `0xcfdb7c67ada01beee8308b04c3f32e4c078603d0c84c0e28e605a8ea56dcc362` (r:1 w:1) - /// Storage: unknown `0xd0d54b0c405fea6ff90809070bfd270c88e9a26ad83138eeb077d8f9602670bc` (r:1 w:1) - /// Proof Skipped: unknown `0xd0d54b0c405fea6ff90809070bfd270c88e9a26ad83138eeb077d8f9602670bc` (r:1 w:1) - /// Storage: unknown `0xd1d4eefa482f2ece90773426cd76c1da272ef0e72c1172a4a71b84c1f5f6c7c7` (r:1 w:1) - /// Proof Skipped: unknown `0xd1d4eefa482f2ece90773426cd76c1da272ef0e72c1172a4a71b84c1f5f6c7c7` (r:1 w:1) - /// Storage: unknown `0xd282fcd4ae056e61acbc8950a306910569f227182c41e5b88159aed160ba2a58` (r:1 w:1) - /// Proof Skipped: unknown `0xd282fcd4ae056e61acbc8950a306910569f227182c41e5b88159aed160ba2a58` (r:1 w:1) - /// Storage: unknown `0xd37f5ea81d5d617ed7490c928e4f3a1eba6f234787ba84f31e204e8733cd039f` (r:1 w:1) - /// Proof Skipped: unknown `0xd37f5ea81d5d617ed7490c928e4f3a1eba6f234787ba84f31e204e8733cd039f` (r:1 w:1) - /// Storage: unknown `0xd6780cc86f71e3b9d0f0f6977d180e26166b517ee3ee227701f9f36cccae3171` (r:1 w:1) - /// Proof Skipped: unknown `0xd6780cc86f71e3b9d0f0f6977d180e26166b517ee3ee227701f9f36cccae3171` (r:1 w:1) - /// Storage: unknown `0xd79237f18c61e22111652b0e9b809fbe8ca41552b3a927877a294a732b338f63` (r:1 w:1) - /// Proof Skipped: unknown `0xd79237f18c61e22111652b0e9b809fbe8ca41552b3a927877a294a732b338f63` (r:1 w:1) - /// Storage: unknown `0xd8825b3a03921d36a1543c344d9b3cacce95765f29c735cf3ed72dc9c37ff81b` (r:1 w:1) - /// Proof Skipped: unknown `0xd8825b3a03921d36a1543c344d9b3cacce95765f29c735cf3ed72dc9c37ff81b` (r:1 w:1) - /// Storage: unknown `0xdd012b8629cc16d3ad36b73df7dd7d38e8c11ac479b99dedffb10b5007c8049a` (r:1 w:1) - /// Proof Skipped: unknown `0xdd012b8629cc16d3ad36b73df7dd7d38e8c11ac479b99dedffb10b5007c8049a` (r:1 w:1) - /// Storage: unknown `0xdec56d85d6fffd793180a2ce033397f67fb3b9b7ac3e2b0ef6be2f15e7de435f` (r:1 w:1) - /// Proof Skipped: unknown `0xdec56d85d6fffd793180a2ce033397f67fb3b9b7ac3e2b0ef6be2f15e7de435f` (r:1 w:1) - /// Storage: unknown `0xe1f270fea944a3a9db5550d742e3acb3dd449cafb73dce65c1705d0752c1343b` (r:1 w:1) - /// Proof Skipped: unknown `0xe1f270fea944a3a9db5550d742e3acb3dd449cafb73dce65c1705d0752c1343b` (r:1 w:1) - /// Storage: unknown `0xe4002351550f1b106219729b86aa4776fb907737c9cd7e957c5ce80062a8ff8a` (r:1 w:1) - /// Proof Skipped: unknown `0xe4002351550f1b106219729b86aa4776fb907737c9cd7e957c5ce80062a8ff8a` (r:1 w:1) - /// Storage: unknown `0xe45f26671be0fb4144ed09c40b9493c4584affb2c1d1fe6cb067aa2df802027e` (r:1 w:1) - /// Proof Skipped: unknown `0xe45f26671be0fb4144ed09c40b9493c4584affb2c1d1fe6cb067aa2df802027e` (r:1 w:1) - /// Storage: unknown `0xe6b4a4991b976360dacf2c942d16326dd53584aca6ed1ae4e78f668d7b1163c1` (r:1 w:1) - /// Proof Skipped: unknown `0xe6b4a4991b976360dacf2c942d16326dd53584aca6ed1ae4e78f668d7b1163c1` (r:1 w:1) - /// Storage: unknown `0xe8150db238f56576dcf5e1b98f3915361092aa174b16e6cda3e78c28b6444dc8` (r:1 w:1) - /// Proof Skipped: unknown `0xe8150db238f56576dcf5e1b98f3915361092aa174b16e6cda3e78c28b6444dc8` (r:1 w:1) - /// Storage: unknown `0xebc5f1d9670cdeb0655d79e95c9602ec1d85ad989ce78194dfd1a31e9fb4994c` (r:1 w:1) - /// Proof Skipped: unknown `0xebc5f1d9670cdeb0655d79e95c9602ec1d85ad989ce78194dfd1a31e9fb4994c` (r:1 w:1) - /// Storage: unknown `0xed0df01311d268fc75f0da4859b6508e1c445e713847efbc18528d731316cf48` (r:1 w:1) - /// Proof Skipped: unknown `0xed0df01311d268fc75f0da4859b6508e1c445e713847efbc18528d731316cf48` (r:1 w:1) - /// Storage: unknown `0xee60c64e1e32117f948ee71d391f978e8ac98c2bd869322fc25164502e3f7a9b` (r:1 w:1) - /// Proof Skipped: unknown `0xee60c64e1e32117f948ee71d391f978e8ac98c2bd869322fc25164502e3f7a9b` (r:1 w:1) - /// Storage: unknown `0xf7e4b8a5415405a940e730546df85583c8c23956d99a3be18e09eebf3639d312` (r:1 w:1) - /// Proof Skipped: unknown `0xf7e4b8a5415405a940e730546df85583c8c23956d99a3be18e09eebf3639d312` (r:1 w:1) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Anchor::LatestEvictedDate` (r:1 w:1) + /// Proof: `Anchor::LatestEvictedDate` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Anchor::EvictedAnchorRoots` (r:100 w:100) + /// Proof: `Anchor::EvictedAnchorRoots` (`max_values`: None, `max_size`: Some(65), added: 2540, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72010000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72010000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72020000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72020000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72030000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72030000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72040000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72040000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72050000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72050000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72060000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72060000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72070000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72070000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72080000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72080000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72090000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72090000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720a0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720a0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720b0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720b0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720c0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720c0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720d0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720d0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720e0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720e0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720f0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f720f0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72100000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72100000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72110000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72110000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72120000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72120000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72130000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72130000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72140000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72140000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72150000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72150000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72160000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72160000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72170000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72170000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72180000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72180000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72190000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72190000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721a0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721a0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721b0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721b0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721c0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721c0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721d0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721d0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721e0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721e0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721f0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f721f0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72200000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72200000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72210000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72210000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72220000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72220000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72230000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72230000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72240000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72240000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72250000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72250000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72260000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72260000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72270000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72270000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72280000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72280000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72290000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72290000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722a0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722a0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722b0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722b0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722c0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722c0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722d0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722d0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722e0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722e0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722f0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f722f0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72300000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72300000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72310000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72310000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72320000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72320000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72330000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72330000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72340000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72340000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72350000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72350000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72360000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72360000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72370000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72370000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72380000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72380000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72390000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72390000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723a0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723a0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723b0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723b0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723c0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723c0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723d0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723d0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723e0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723e0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723f0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f723f0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72400000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72400000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72410000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72410000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72420000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72420000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72430000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72430000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72440000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72440000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72450000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72450000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72460000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72460000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72470000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72470000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72480000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72480000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72490000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72490000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724a0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724a0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724b0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724b0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724c0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724c0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724d0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724d0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724e0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724e0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724f0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f724f0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72500000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72500000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72510000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72510000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72520000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72520000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72530000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72530000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72540000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72540000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72550000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72550000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72560000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72560000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72570000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72570000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72580000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72580000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72590000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72590000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725a0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725a0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725b0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725b0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725c0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725c0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725d0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725d0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725e0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725e0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725f0000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f725f0000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72600000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72600000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72610000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72610000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72620000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72620000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72630000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72630000` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72640000` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a616e63686f72640000` (r:1 w:0) + /// Storage: `Anchor::LatestEvictedAnchorIndex` (r:1 w:1) + /// Proof: `Anchor::LatestEvictedAnchorIndex` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Anchor::LatestAnchorIndex` (r:1 w:0) + /// Proof: `Anchor::LatestAnchorIndex` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Anchor::AnchorIndexes` (r:100 w:100) + /// Proof: `Anchor::AnchorIndexes` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + /// Storage: `Anchor::AnchorEvictDates` (r:100 w:100) + /// Proof: `Anchor::AnchorEvictDates` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0x01d5998dcaa249dfa2a455ae4c045d761623f268227068931dbabca3732aa41f` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x01d5998dcaa249dfa2a455ae4c045d761623f268227068931dbabca3732aa41f` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x04575ee0699f1fa86cccfdcf4285aa81b9bfa0f8837cf533346d722970f1a704` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x04575ee0699f1fa86cccfdcf4285aa81b9bfa0f8837cf533346d722970f1a704` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x0959721f200e92d5090cee3c2c4546c11f9bfd16ded1e70e6781d2402880f1f3` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x0959721f200e92d5090cee3c2c4546c11f9bfd16ded1e70e6781d2402880f1f3` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x0a958b15afac1ffb0c6e73c553bd8b4ba94ad2d0cc118dcd2a7bc8802e2e772a` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x0a958b15afac1ffb0c6e73c553bd8b4ba94ad2d0cc118dcd2a7bc8802e2e772a` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x0c4c531cd9dcf8573a6350d0ac9fb060d273156bdee4fdae0043b6fee5bda27c` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x0c4c531cd9dcf8573a6350d0ac9fb060d273156bdee4fdae0043b6fee5bda27c` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x0cd3f3ee9420f9c3b2e70862996e8d02e87d1f148632a36b8f72c9548b10b856` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x0cd3f3ee9420f9c3b2e70862996e8d02e87d1f148632a36b8f72c9548b10b856` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x10876da12e1227a2c04872ce311f768aaf3e21458e6ad1c04f044c97fe8e214e` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x10876da12e1227a2c04872ce311f768aaf3e21458e6ad1c04f044c97fe8e214e` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x10b360a66313de6ab2d43019c5fd7ea0db088efb3e1d4a24d89775e66e089cff` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x10b360a66313de6ab2d43019c5fd7ea0db088efb3e1d4a24d89775e66e089cff` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x16d33ce142442dfbe857e2c9e0648d026c6bb367d467d6922c2c1133aaa3d7b8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x16d33ce142442dfbe857e2c9e0648d026c6bb367d467d6922c2c1133aaa3d7b8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x16e133fb9e42d5a2a9a2e21b2e0efd735fccb527162a21cf520c3aecd84c89ed` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x16e133fb9e42d5a2a9a2e21b2e0efd735fccb527162a21cf520c3aecd84c89ed` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x16fcb5e799a48fa04deaaaa71c85bc8e9126bd4b5dbcb3a1f8068ab14bc1c26f` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x16fcb5e799a48fa04deaaaa71c85bc8e9126bd4b5dbcb3a1f8068ab14bc1c26f` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x1b3289127bc95ed117e77d479ccd3ac4477ef8d32df7265bbd42c75bf1945464` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x1b3289127bc95ed117e77d479ccd3ac4477ef8d32df7265bbd42c75bf1945464` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x1ecb14235f21b57f49e32ac4f35a1af6a71f96867f0bc61bc5905b8d437b6bde` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x1ecb14235f21b57f49e32ac4f35a1af6a71f96867f0bc61bc5905b8d437b6bde` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x1f8b0dafc67f9d378cf0596c5d49f220e5880b9c74ccaadac2206a35ec92715a` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x1f8b0dafc67f9d378cf0596c5d49f220e5880b9c74ccaadac2206a35ec92715a` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x24a8d9c362d9365f46f899adb37f6b61134dceaa80f96a9cda6b059a1301f380` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x24a8d9c362d9365f46f899adb37f6b61134dceaa80f96a9cda6b059a1301f380` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x2a00fca93dceceb635a80a95e8f785b189a4ce35f90a17acba5d1bcacf895a84` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x2a00fca93dceceb635a80a95e8f785b189a4ce35f90a17acba5d1bcacf895a84` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x2b318def38ef5f2f8db787e365834ece79fbde70c22cf7bd6c9326995fd4c07f` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x2b318def38ef5f2f8db787e365834ece79fbde70c22cf7bd6c9326995fd4c07f` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x2fbeff7b90831a847716e729a30f028899726193b4406a1c91fce4e97beb61b5` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x2fbeff7b90831a847716e729a30f028899726193b4406a1c91fce4e97beb61b5` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x30dc983a9ad263028d0e91a8a0cf703a2a7fd3834b1102f1ff3f8c8876a207bf` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x30dc983a9ad263028d0e91a8a0cf703a2a7fd3834b1102f1ff3f8c8876a207bf` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x3187d0cdac28db7ec343a07f0b2e44fc56986f0a9c2062d5fa60f99419707bea` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x3187d0cdac28db7ec343a07f0b2e44fc56986f0a9c2062d5fa60f99419707bea` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x3596cd6b45e209629c71765c804f324ed440f7a1cb2ff6cb542156fd5d213de2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x3596cd6b45e209629c71765c804f324ed440f7a1cb2ff6cb542156fd5d213de2` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x3645890bd8ab0cc13921468d56eee7da40fbe28dc05bc30a64f05a2c03a1912e` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x3645890bd8ab0cc13921468d56eee7da40fbe28dc05bc30a64f05a2c03a1912e` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x384b604969634cf37d988e886b5267a51baeb797e09a1d1a0893e5be8fc553df` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x384b604969634cf37d988e886b5267a51baeb797e09a1d1a0893e5be8fc553df` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x3c056a888ea28c9294c91723916f5891141a824048335e32532e6605ce0457e0` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x3c056a888ea28c9294c91723916f5891141a824048335e32532e6605ce0457e0` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x3c5fd1d5c95885c6b44e0f3995886046d906821de1ed5ee95b51b17c42d3295b` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x3c5fd1d5c95885c6b44e0f3995886046d906821de1ed5ee95b51b17c42d3295b` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x3e74dfe3befcf6fa20eb902c2007ba7fd831619013aa99e016284597b896115b` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x3e74dfe3befcf6fa20eb902c2007ba7fd831619013aa99e016284597b896115b` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x42f1cff854d41b18ae379b012a1e712f036bcd839244d5c6324f12c28f6fd6e9` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x42f1cff854d41b18ae379b012a1e712f036bcd839244d5c6324f12c28f6fd6e9` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x457803d743c32f50866dbf7aabb339a1d8b6b759783b0627128f0cfd3d6c8775` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x457803d743c32f50866dbf7aabb339a1d8b6b759783b0627128f0cfd3d6c8775` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x4cb17fd2f1d1b2eff69f0ffa1a97ff13e7bf4f05a7a99dd06e503e7546b23906` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x4cb17fd2f1d1b2eff69f0ffa1a97ff13e7bf4f05a7a99dd06e503e7546b23906` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x58357c4f5a9881658ffc42faa5f48e2810169bf85c8c78011696a17b59728ef5` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x58357c4f5a9881658ffc42faa5f48e2810169bf85c8c78011696a17b59728ef5` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x5baa983aa91ad92c66e17d16e0757ec4a67ec2ce5b95f4d02ec22fba0e485da0` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x5baa983aa91ad92c66e17d16e0757ec4a67ec2ce5b95f4d02ec22fba0e485da0` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x5da83d0712f41714545470b781e0a43c65a0ac977327475baa98b5cd94938f17` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x5da83d0712f41714545470b781e0a43c65a0ac977327475baa98b5cd94938f17` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x6365aeecd6b54d3166f3df46d8c7b404711ca54b4284e8faf67eb014fa3685f8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x6365aeecd6b54d3166f3df46d8c7b404711ca54b4284e8faf67eb014fa3685f8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x683b74d821a8019cbfc9dbe47b50b0f377e0eef16dbc52f7f931ae713fd3f644` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x683b74d821a8019cbfc9dbe47b50b0f377e0eef16dbc52f7f931ae713fd3f644` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x6b02568ad8557dc3d66463abfd1d7f298a0b314fe4bf7d5be79b66768096ed90` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x6b02568ad8557dc3d66463abfd1d7f298a0b314fe4bf7d5be79b66768096ed90` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x6b05c068aecc171915a61cf59146e7f9a69b9bba39f4df50cecfeb454850b4c9` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x6b05c068aecc171915a61cf59146e7f9a69b9bba39f4df50cecfeb454850b4c9` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x6b5529ac614dcbd6113176256a4f5809eb667bddab2e22579306de0a1f83f287` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x6b5529ac614dcbd6113176256a4f5809eb667bddab2e22579306de0a1f83f287` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x6cd1381490331969f37f1e6575081f42f1bd8ae0cc79d70fc52ed178b5d75bd0` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x6cd1381490331969f37f1e6575081f42f1bd8ae0cc79d70fc52ed178b5d75bd0` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x6f5b021a9f57d7669ed7269e7d8785acf255f15785bf452a03a4decc184fd403` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x6f5b021a9f57d7669ed7269e7d8785acf255f15785bf452a03a4decc184fd403` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x764bac7888f79c071087d351a356a09cb2490cb6ea6d71f0cd391de89a885cd2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x764bac7888f79c071087d351a356a09cb2490cb6ea6d71f0cd391de89a885cd2` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7aedb653a5de5739b9d3594196693fd51653fcd59b442e0eb9f64265db188044` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7aedb653a5de5739b9d3594196693fd51653fcd59b442e0eb9f64265db188044` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7ca04bdeb932896fd908eb86d4136e9e2462575ebdf981001c1cd3ca6a2faaec` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7ca04bdeb932896fd908eb86d4136e9e2462575ebdf981001c1cd3ca6a2faaec` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7ceee738f5af899bd2f967a928019e4a0ecb8715509668dcc039badfe148b45e` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7ceee738f5af899bd2f967a928019e4a0ecb8715509668dcc039badfe148b45e` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7e700ce9c411e35485babec60c2b68f40c512bc8399c5cee0c1e4264e63f36d1` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7e700ce9c411e35485babec60c2b68f40c512bc8399c5cee0c1e4264e63f36d1` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x80c020f2e70a170ee2f34af3daeda4c2097d14a35f5b1f2d23c2287e5e930f55` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x80c020f2e70a170ee2f34af3daeda4c2097d14a35f5b1f2d23c2287e5e930f55` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x8101d04cf92ee55f6c2a798c7b16da4cc8c511fd822b13093d0f53f5523718d0` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x8101d04cf92ee55f6c2a798c7b16da4cc8c511fd822b13093d0f53f5523718d0` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x85172de32d6b5871235d50648541b1bd007807512231f9b81f25cb5e20141820` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x85172de32d6b5871235d50648541b1bd007807512231f9b81f25cb5e20141820` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x85e9ccd05d28607dcce0dc5be4f34a7d56d3b83b6c63162b2787fc0e6decf2a7` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x85e9ccd05d28607dcce0dc5be4f34a7d56d3b83b6c63162b2787fc0e6decf2a7` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x87b3d065618080e576b534cf68b60d09c4cca0b71a8b6321337cc23be47e7329` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x87b3d065618080e576b534cf68b60d09c4cca0b71a8b6321337cc23be47e7329` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x892ec564231143cc6294a8750b924df2207d91ea3508501d2bd84bee7947b9d0` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x892ec564231143cc6294a8750b924df2207d91ea3508501d2bd84bee7947b9d0` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x8980988eacf42b40c4fc8aa995ae2e059a66c6935626c3e30f1d6842335368d0` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x8980988eacf42b40c4fc8aa995ae2e059a66c6935626c3e30f1d6842335368d0` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x8db2380506697daa88c7a72906d747535ffb12c0ca2a4a6443074bb0fdd8f256` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x8db2380506697daa88c7a72906d747535ffb12c0ca2a4a6443074bb0fdd8f256` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x8e098b9b896a97df275aba887f591c3076220e02adf682c98808e4ba53e6a773` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x8e098b9b896a97df275aba887f591c3076220e02adf682c98808e4ba53e6a773` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x8e590007efc113bc10a61c478d26803cdae5572d4c70547b3c9813b3ce396826` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x8e590007efc113bc10a61c478d26803cdae5572d4c70547b3c9813b3ce396826` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x96e31df89b1f00b96c993bd9de31e32e7e59c0a185cd0b31adc4e969746c8ea6` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x96e31df89b1f00b96c993bd9de31e32e7e59c0a185cd0b31adc4e969746c8ea6` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x9ae7305289647b636a8702b2316e5482f1a807fa398687068fb653527368f9bc` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x9ae7305289647b636a8702b2316e5482f1a807fa398687068fb653527368f9bc` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x9b9660b6fc1992a09573eaa9110c4a08d40c1f439304a47b9776645bc278fc75` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x9b9660b6fc1992a09573eaa9110c4a08d40c1f439304a47b9776645bc278fc75` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xa04f2ef3bb509dfec9d7a97c4778ab2e477af9c5cbda3a1c6e57514314a3f9a5` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xa04f2ef3bb509dfec9d7a97c4778ab2e477af9c5cbda3a1c6e57514314a3f9a5` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xa16d64c1e08b47144c2c8e37872486cf440dda823e2ea05f480fedfe83060f17` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xa16d64c1e08b47144c2c8e37872486cf440dda823e2ea05f480fedfe83060f17` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xa4ad0a32c2781a59ea8a6d58e26fa7dc0b2a08f8c4c938661f5f3ccd8f8eb8ce` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xa4ad0a32c2781a59ea8a6d58e26fa7dc0b2a08f8c4c938661f5f3ccd8f8eb8ce` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xab9797fb6926376ee3b6be73e5501e0a3af18d0bc6dfca0d3b5f498602016956` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xab9797fb6926376ee3b6be73e5501e0a3af18d0bc6dfca0d3b5f498602016956` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xac4d9f6628449fe129d24b384441fdb445962d2d6bca7603fea0c20f3d04351c` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xac4d9f6628449fe129d24b384441fdb445962d2d6bca7603fea0c20f3d04351c` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xafecb421bedaa0f8bd89ef18897b77ce61738af42f8a66e3257a079a3d04bef1` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xafecb421bedaa0f8bd89ef18897b77ce61738af42f8a66e3257a079a3d04bef1` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xb292dc48cc1057cce335f1d84f295271a2b16aee7018f1bd444febd77f7e5cbb` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xb292dc48cc1057cce335f1d84f295271a2b16aee7018f1bd444febd77f7e5cbb` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xb48b9d9955158dbd87abb433511a5968c21cf78f8085088407e24d6ee26f7f56` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xb48b9d9955158dbd87abb433511a5968c21cf78f8085088407e24d6ee26f7f56` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xb5a7df612d6fb3bc16c1716414897ba5928835d883003371f02106d5a92abd78` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xb5a7df612d6fb3bc16c1716414897ba5928835d883003371f02106d5a92abd78` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xb684abf2ee5018a16a8dbef6633bcb94a07a2cdf4a173e4fec130da86e8ab987` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xb684abf2ee5018a16a8dbef6633bcb94a07a2cdf4a173e4fec130da86e8ab987` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xb86c8391d2a3eb28b9e3b603cf6929849d50e439e0bbc79781b2555f9cbaa013` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xb86c8391d2a3eb28b9e3b603cf6929849d50e439e0bbc79781b2555f9cbaa013` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xba070ba6cf5f2489f98b6841d238eee4fc403d3065b57f9e3e38ca540971024d` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xba070ba6cf5f2489f98b6841d238eee4fc403d3065b57f9e3e38ca540971024d` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xbcb96e5fc092d3ac258a81b5390671817730859598470874ef02f998518bbf58` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xbcb96e5fc092d3ac258a81b5390671817730859598470874ef02f998518bbf58` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xc008db6f6d721d80fab2eab8b6dda4f19bd5def30aa7db86dadd6eb799c2f5ad` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xc008db6f6d721d80fab2eab8b6dda4f19bd5def30aa7db86dadd6eb799c2f5ad` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xc054c4045e44e28cef1884c0aa86d0049b76eaff493a6d694394df7b0cee8136` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xc054c4045e44e28cef1884c0aa86d0049b76eaff493a6d694394df7b0cee8136` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xc315216d50f4dd95914d6d102976dc09ec4474da5c314a15f09972ded6e71ddb` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xc315216d50f4dd95914d6d102976dc09ec4474da5c314a15f09972ded6e71ddb` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xc4a2c3fa3cc7ed1611651510eb6e225abab30676f0fad28c115482c7dd61f8e0` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xc4a2c3fa3cc7ed1611651510eb6e225abab30676f0fad28c115482c7dd61f8e0` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xc6cc01d59d3c86a1c12a167e149d784295fcd13862e4afb0a39a8459e6e25561` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xc6cc01d59d3c86a1c12a167e149d784295fcd13862e4afb0a39a8459e6e25561` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xc712d8fa08dd521e5f901ca6d36134807c5ec0510e3b52e8ae5a15f7c13d2ebd` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xc712d8fa08dd521e5f901ca6d36134807c5ec0510e3b52e8ae5a15f7c13d2ebd` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xc7e2bc91ff1b307f6995683b76f1904ccdada3cf8f00528c08d4f65911c4888a` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xc7e2bc91ff1b307f6995683b76f1904ccdada3cf8f00528c08d4f65911c4888a` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xccbca45304d59a1167eaf9b459e09cffce3d90c087ee9edf8e7e2dc40349373b` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xccbca45304d59a1167eaf9b459e09cffce3d90c087ee9edf8e7e2dc40349373b` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xccc17a821dda11e5239ea8dbedee5bd6622fc8dd63ee229fc3bd2dead22e8ae2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xccc17a821dda11e5239ea8dbedee5bd6622fc8dd63ee229fc3bd2dead22e8ae2` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xccee04c4c0534d4245892ed24d7814cd14a41aeed7e94591354315f5b74d89f5` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xccee04c4c0534d4245892ed24d7814cd14a41aeed7e94591354315f5b74d89f5` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcf67e9890d936f6bd205710c9a5cedc653d88fba3c74b7a2b9fe8ce7fce0bd0c` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcf67e9890d936f6bd205710c9a5cedc653d88fba3c74b7a2b9fe8ce7fce0bd0c` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcfdb7c67ada01beee8308b04c3f32e4c078603d0c84c0e28e605a8ea56dcc362` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcfdb7c67ada01beee8308b04c3f32e4c078603d0c84c0e28e605a8ea56dcc362` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xd0d54b0c405fea6ff90809070bfd270c88e9a26ad83138eeb077d8f9602670bc` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xd0d54b0c405fea6ff90809070bfd270c88e9a26ad83138eeb077d8f9602670bc` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xd1d4eefa482f2ece90773426cd76c1da272ef0e72c1172a4a71b84c1f5f6c7c7` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xd1d4eefa482f2ece90773426cd76c1da272ef0e72c1172a4a71b84c1f5f6c7c7` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xd282fcd4ae056e61acbc8950a306910569f227182c41e5b88159aed160ba2a58` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xd282fcd4ae056e61acbc8950a306910569f227182c41e5b88159aed160ba2a58` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xd37f5ea81d5d617ed7490c928e4f3a1eba6f234787ba84f31e204e8733cd039f` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xd37f5ea81d5d617ed7490c928e4f3a1eba6f234787ba84f31e204e8733cd039f` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xd6780cc86f71e3b9d0f0f6977d180e26166b517ee3ee227701f9f36cccae3171` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xd6780cc86f71e3b9d0f0f6977d180e26166b517ee3ee227701f9f36cccae3171` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xd79237f18c61e22111652b0e9b809fbe8ca41552b3a927877a294a732b338f63` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xd79237f18c61e22111652b0e9b809fbe8ca41552b3a927877a294a732b338f63` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xd8825b3a03921d36a1543c344d9b3cacce95765f29c735cf3ed72dc9c37ff81b` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xd8825b3a03921d36a1543c344d9b3cacce95765f29c735cf3ed72dc9c37ff81b` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xdd012b8629cc16d3ad36b73df7dd7d38e8c11ac479b99dedffb10b5007c8049a` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xdd012b8629cc16d3ad36b73df7dd7d38e8c11ac479b99dedffb10b5007c8049a` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xdec56d85d6fffd793180a2ce033397f67fb3b9b7ac3e2b0ef6be2f15e7de435f` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xdec56d85d6fffd793180a2ce033397f67fb3b9b7ac3e2b0ef6be2f15e7de435f` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xe1f270fea944a3a9db5550d742e3acb3dd449cafb73dce65c1705d0752c1343b` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xe1f270fea944a3a9db5550d742e3acb3dd449cafb73dce65c1705d0752c1343b` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xe4002351550f1b106219729b86aa4776fb907737c9cd7e957c5ce80062a8ff8a` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xe4002351550f1b106219729b86aa4776fb907737c9cd7e957c5ce80062a8ff8a` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xe45f26671be0fb4144ed09c40b9493c4584affb2c1d1fe6cb067aa2df802027e` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xe45f26671be0fb4144ed09c40b9493c4584affb2c1d1fe6cb067aa2df802027e` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xe6b4a4991b976360dacf2c942d16326dd53584aca6ed1ae4e78f668d7b1163c1` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xe6b4a4991b976360dacf2c942d16326dd53584aca6ed1ae4e78f668d7b1163c1` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xe8150db238f56576dcf5e1b98f3915361092aa174b16e6cda3e78c28b6444dc8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xe8150db238f56576dcf5e1b98f3915361092aa174b16e6cda3e78c28b6444dc8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xebc5f1d9670cdeb0655d79e95c9602ec1d85ad989ce78194dfd1a31e9fb4994c` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xebc5f1d9670cdeb0655d79e95c9602ec1d85ad989ce78194dfd1a31e9fb4994c` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xed0df01311d268fc75f0da4859b6508e1c445e713847efbc18528d731316cf48` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xed0df01311d268fc75f0da4859b6508e1c445e713847efbc18528d731316cf48` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xee60c64e1e32117f948ee71d391f978e8ac98c2bd869322fc25164502e3f7a9b` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xee60c64e1e32117f948ee71d391f978e8ac98c2bd869322fc25164502e3f7a9b` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xf7e4b8a5415405a940e730546df85583c8c23956d99a3be18e09eebf3639d312` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xf7e4b8a5415405a940e730546df85583c8c23956d99a3be18e09eebf3639d312` (r:1 w:1) fn evict_anchors() -> Weight { // Proof Size summary in bytes: - // Measured: `18324` + // Measured: `18325` // Estimated: `254990` - // Minimum execution time: 1_937_319_000 picoseconds. - Weight::from_parts(1_957_657_000, 0) + // Minimum execution time: 2_020_935_000 picoseconds. + Weight::from_parts(2_047_634_000, 0) .saturating_add(Weight::from_parts(0, 254990)) .saturating_add(T::DbWeight::get().reads(504)) .saturating_add(T::DbWeight::get().writes(402)) diff --git a/runtime/development/src/weights/pallet_balances.rs b/runtime/development/src/weights/pallet_balances.rs index 1253f43884..bf342fa632 100644 --- a/runtime/development/src/weights/pallet_balances.rs +++ b/runtime/development/src/weights/pallet_balances.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_balances` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_balances // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_balances.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_balances.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,108 +31,112 @@ use core::marker::PhantomData; /// Weight functions for `pallet_balances`. pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_allow_death() -> Weight { // Proof Size summary in bytes: // Measured: `52` // Estimated: `3593` - // Minimum execution time: 84_408_000 picoseconds. - Weight::from_parts(85_691_000, 0) + // Minimum execution time: 72_405_000 picoseconds. + Weight::from_parts(73_437_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_keep_alive() -> Weight { // Proof Size summary in bytes: // Measured: `52` // Estimated: `3593` - // Minimum execution time: 63_229_000 picoseconds. - Weight::from_parts(64_261_000, 0) + // Minimum execution time: 56_827_000 picoseconds. + Weight::from_parts(58_238_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_set_balance_creating() -> Weight { // Proof Size summary in bytes: // Measured: `245` // Estimated: `3593` - // Minimum execution time: 24_025_000 picoseconds. - Weight::from_parts(24_777_000, 0) + // Minimum execution time: 20_999_000 picoseconds. + Weight::from_parts(21_651_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_set_balance_killing() -> Weight { // Proof Size summary in bytes: // Measured: `245` // Estimated: `3593` - // Minimum execution time: 34_244_000 picoseconds. - Weight::from_parts(35_036_000, 0) + // Minimum execution time: 28_343_000 picoseconds. + Weight::from_parts(29_054_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_transfer() -> Weight { // Proof Size summary in bytes: // Measured: `192` // Estimated: `6196` - // Minimum execution time: 89_017_000 picoseconds. - Weight::from_parts(91_191_000, 0) + // Minimum execution time: 75_261_000 picoseconds. + Weight::from_parts(76_302_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_all() -> Weight { // Proof Size summary in bytes: // Measured: `52` // Estimated: `3593` - // Minimum execution time: 79_449_000 picoseconds. - Weight::from_parts(80_210_000, 0) + // Minimum execution time: 71_503_000 picoseconds. + Weight::from_parts(73_437_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_unreserve() -> Weight { // Proof Size summary in bytes: // Measured: `245` // Estimated: `3593` - // Minimum execution time: 28_824_000 picoseconds. - Weight::from_parts(29_375_000, 0) + // Minimum execution time: 25_337_000 picoseconds. + Weight::from_parts(26_099_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: System Account (r:999 w:999) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:999 w:999) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `u` is `[1, 1000]`. fn upgrade_accounts(u: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `148 + u * (136 ±0)` + // Measured: `143 + u * (136 ±0)` // Estimated: `990 + u * (2603 ±0)` - // Minimum execution time: 25_578_000 picoseconds. - Weight::from_parts(26_129_000, 0) + // Minimum execution time: 23_484_000 picoseconds. + Weight::from_parts(23_684_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 13_061 - .saturating_add(Weight::from_parts(21_391_423, 0).saturating_mul(u.into())) + // Standard Error: 12_704 + .saturating_add(Weight::from_parts(19_776_076, 0).saturating_mul(u.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into())) } - - fn force_adjust_total_issuance() -> Weight { - Weight::zero() - } + fn force_adjust_total_issuance() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_776_000 picoseconds. + Weight::from_parts(9_267_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } } diff --git a/runtime/development/src/weights/pallet_block_rewards.rs b/runtime/development/src/weights/pallet_block_rewards.rs index 2e3fee480c..58029e5e99 100644 --- a/runtime/development/src/weights/pallet_block_rewards.rs +++ b/runtime/development/src/weights/pallet_block_rewards.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_block_rewards` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_block_rewards // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_block_rewards.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_block_rewards.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,44 +31,44 @@ use core::marker::PhantomData; /// Weight functions for `pallet_block_rewards`. pub struct WeightInfo(PhantomData); impl pallet_block_rewards::WeightInfo for WeightInfo { - /// Storage: BlockRewardsBase Currency (r:1 w:0) - /// Proof: BlockRewardsBase Currency (max_values: None, max_size: Some(79), added: 2554, mode: MaxEncodedLen) - /// Storage: BlockRewardsBase Group (r:1 w:0) - /// Proof: BlockRewardsBase Group (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: BlockRewardsBase StakeAccount (r:1 w:1) - /// Proof: BlockRewardsBase StakeAccount (max_values: None, max_size: Some(123), added: 2598, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `BlockRewardsBase::Currency` (r:1 w:0) + /// Proof: `BlockRewardsBase::Currency` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`) + /// Storage: `BlockRewardsBase::Group` (r:1 w:0) + /// Proof: `BlockRewardsBase::Group` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `BlockRewardsBase::StakeAccount` (r:1 w:1) + /// Proof: `BlockRewardsBase::StakeAccount` (`max_values`: None, `max_size`: Some(123), added: 2598, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn claim_reward() -> Weight { // Proof Size summary in bytes: // Measured: `516` // Estimated: `6196` - // Minimum execution time: 87_023_000 picoseconds. - Weight::from_parts(87_555_000, 0) + // Minimum execution time: 84_087_000 picoseconds. + Weight::from_parts(85_410_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: BlockRewards NextSessionChanges (r:1 w:1) - /// Proof: BlockRewards NextSessionChanges (max_values: Some(1), max_size: Some(2097), added: 2592, mode: MaxEncodedLen) + /// Storage: `BlockRewards::NextSessionChanges` (r:1 w:1) + /// Proof: `BlockRewards::NextSessionChanges` (`max_values`: Some(1), `max_size`: Some(2097), added: 2592, mode: `MaxEncodedLen`) fn set_collator_reward_per_session() -> Weight { // Proof Size summary in bytes: // Measured: `41` // Estimated: `3582` - // Minimum execution time: 7_855_000 picoseconds. - Weight::from_parts(8_245_000, 0) + // Minimum execution time: 6_502_000 picoseconds. + Weight::from_parts(6_702_000, 0) .saturating_add(Weight::from_parts(0, 3582)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: BlockRewards NextSessionChanges (r:1 w:1) - /// Proof: BlockRewards NextSessionChanges (max_values: Some(1), max_size: Some(2097), added: 2592, mode: MaxEncodedLen) + /// Storage: `BlockRewards::NextSessionChanges` (r:1 w:1) + /// Proof: `BlockRewards::NextSessionChanges` (`max_values`: Some(1), `max_size`: Some(2097), added: 2592, mode: `MaxEncodedLen`) fn set_annual_treasury_inflation_rate() -> Weight { // Proof Size summary in bytes: // Measured: `41` // Estimated: `3582` - // Minimum execution time: 7_844_000 picoseconds. - Weight::from_parts(8_165_000, 0) + // Minimum execution time: 6_442_000 picoseconds. + Weight::from_parts(6_662_000, 0) .saturating_add(Weight::from_parts(0, 3582)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/development/src/weights/pallet_collator_allowlist.rs b/runtime/development/src/weights/pallet_collator_allowlist.rs index 4b3b23d98d..9d2f9f754f 100644 --- a/runtime/development/src/weights/pallet_collator_allowlist.rs +++ b/runtime/development/src/weights/pallet_collator_allowlist.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_collator_allowlist` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_collator_allowlist // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_collator_allowlist.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_collator_allowlist.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,28 +31,28 @@ use core::marker::PhantomData; /// Weight functions for `pallet_collator_allowlist`. pub struct WeightInfo(PhantomData); impl pallet_collator_allowlist::WeightInfo for WeightInfo { - /// Storage: Session NextKeys (r:1 w:0) - /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - /// Storage: CollatorAllowlist Allowlist (r:1 w:1) - /// Proof: CollatorAllowlist Allowlist (max_values: None, max_size: Some(32), added: 2507, mode: MaxEncodedLen) + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorAllowlist::Allowlist` (r:1 w:1) + /// Proof: `CollatorAllowlist::Allowlist` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) fn add() -> Weight { // Proof Size summary in bytes: // Measured: `485` // Estimated: `3950` - // Minimum execution time: 23_344_000 picoseconds. - Weight::from_parts(24_015_000, 0) + // Minimum execution time: 20_959_000 picoseconds. + Weight::from_parts(21_520_000, 0) .saturating_add(Weight::from_parts(0, 3950)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: CollatorAllowlist Allowlist (r:1 w:1) - /// Proof: CollatorAllowlist Allowlist (max_values: None, max_size: Some(32), added: 2507, mode: MaxEncodedLen) + /// Storage: `CollatorAllowlist::Allowlist` (r:1 w:1) + /// Proof: `CollatorAllowlist::Allowlist` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) fn remove() -> Weight { // Proof Size summary in bytes: // Measured: `265` // Estimated: `3497` - // Minimum execution time: 17_503_000 picoseconds. - Weight::from_parts(18_134_000, 0) + // Minimum execution time: 15_138_000 picoseconds. + Weight::from_parts(15_690_000, 0) .saturating_add(Weight::from_parts(0, 3497)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/development/src/weights/pallet_collator_selection.rs b/runtime/development/src/weights/pallet_collator_selection.rs index 3f00b39ce3..80aad763c5 100644 --- a/runtime/development/src/weights/pallet_collator_selection.rs +++ b/runtime/development/src/weights/pallet_collator_selection.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_collator_selection` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_collator_selection // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_collator_selection.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_collator_selection.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,156 +31,251 @@ use core::marker::PhantomData; /// Weight functions for `pallet_collator_selection`. pub struct WeightInfo(PhantomData); impl pallet_collator_selection::WeightInfo for WeightInfo { - /// Storage: Session NextKeys (r:100 w:0) - /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - /// Storage: CollatorSelection Invulnerables (r:0 w:1) - /// Proof: CollatorSelection Invulnerables (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: `CollatorAllowlist::Allowlist` (r:100 w:0) + /// Proof: `CollatorAllowlist::Allowlist` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + /// Storage: `Session::NextKeys` (r:100 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::Invulnerables` (r:0 w:1) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 100]`. /// The range of component `b` is `[1, 100]`. fn set_invulnerables(b: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `218 + b * (112 ±0)` - // Estimated: `1207 + b * (2588 ±0)` - // Minimum execution time: 19_737_000 picoseconds. - Weight::from_parts(17_600_253, 0) - .saturating_add(Weight::from_parts(0, 1207)) - // Standard Error: 3_140 - .saturating_add(Weight::from_parts(4_139_155, 0).saturating_mul(b.into())) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into()))) + // Measured: `426 + b * (112 ±0)` + // Estimated: `1415 + b * (2588 ±0)` + // Minimum execution time: 21_761_000 picoseconds. + Weight::from_parts(18_325_667, 0) + .saturating_add(Weight::from_parts(0, 1415)) + // Standard Error: 2_818 + .saturating_add(Weight::from_parts(6_395_759, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(b.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 2588).saturating_mul(b.into())) } - /// Storage: CollatorSelection DesiredCandidates (r:0 w:1) - /// Proof: CollatorSelection DesiredCandidates (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: `CollatorAllowlist::Allowlist` (r:1 w:0) + /// Proof: `CollatorAllowlist::Allowlist` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:1) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(961), added: 1456, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 99]`. + /// The range of component `c` is `[1, 19]`. + /// The range of component `b` is `[1, 99]`. + /// The range of component `c` is `[1, 19]`. + fn add_invulnerable(b: u32, c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `1306 + b * (37 ±0) + c * (48 ±0)` + // Estimated: `4726 + b * (37 ±0) + c * (53 ±0)` + // Minimum execution time: 59_742_000 picoseconds. + Weight::from_parts(60_284_422, 0) + .saturating_add(Weight::from_parts(0, 4726)) + // Standard Error: 460 + .saturating_add(Weight::from_parts(96_883, 0).saturating_mul(b.into())) + // Standard Error: 2_428 + .saturating_add(Weight::from_parts(90_127, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 53).saturating_mul(c.into())) + } + /// Storage: `CollatorSelection::CandidateList` (r:1 w:0) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(961), added: 1456, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:1) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// The range of component `b` is `[6, 100]`. + /// The range of component `b` is `[6, 100]`. + fn remove_invulnerable(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `285 + b * (32 ±0)` + // Estimated: `4687` + // Minimum execution time: 15_498_000 picoseconds. + Weight::from_parts(16_316_216, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 286 + .saturating_add(Weight::from_parts(61_407, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `CollatorSelection::DesiredCandidates` (r:0 w:1) + /// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn set_desired_candidates() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 13_866_000 picoseconds. - Weight::from_parts(14_387_000, 0) + // Minimum execution time: 6_773_000 picoseconds. + Weight::from_parts(7_183_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: CollatorSelection CandidacyBond (r:0 w:1) - /// Proof: CollatorSelection CandidacyBond (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) - fn set_candidacy_bond(_: u32, _: u32) -> Weight { + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:1) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(961), added: 1456, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:20 w:20) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:20) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// The range of component `c` is `[0, 20]`. + /// The range of component `k` is `[0, 20]`. + /// The range of component `c` is `[0, 20]`. + /// The range of component `k` is `[0, 20]`. + fn set_candidacy_bond(c: u32, k: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 10_139_000 picoseconds. - Weight::from_parts(10_520_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Measured: `0 + c * (201 ±0) + k * (152 ±0)` + // Estimated: `3593 + c * (848 ±15) + k * (848 ±15)` + // Minimum execution time: 13_064_000 picoseconds. + Weight::from_parts(13_555_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + // Standard Error: 112_406 + .saturating_add(Weight::from_parts(7_553_928, 0).saturating_mul(c.into())) + // Standard Error: 112_406 + .saturating_add(Weight::from_parts(7_323_334, 0).saturating_mul(k.into())) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) + .saturating_add(Weight::from_parts(0, 848).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 848).saturating_mul(k.into())) } - /// Storage: CollatorSelection Candidates (r:1 w:1) - /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(961), added: 1456, mode: MaxEncodedLen) - /// Storage: CollatorSelection DesiredCandidates (r:1 w:0) - /// Proof: CollatorSelection DesiredCandidates (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: CollatorSelection Invulnerables (r:1 w:0) - /// Proof: CollatorSelection Invulnerables (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: Session NextKeys (r:1 w:0) - /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - /// Storage: CollatorSelection CandidacyBond (r:1 w:0) - /// Proof: CollatorSelection CandidacyBond (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) - /// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) - /// Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(961), added: 1456, mode: `MaxEncodedLen`) + /// The range of component `c` is `[5, 20]`. + /// The range of component `c` is `[5, 20]`. + fn update_bond(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `529 + c * (48 ±0)` + // Estimated: `2446` + // Minimum execution time: 33_843_000 picoseconds. + Weight::from_parts(35_210_680, 0) + .saturating_add(Weight::from_parts(0, 2446)) + // Standard Error: 2_477 + .saturating_add(Weight::from_parts(89_870, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(961), added: 1456, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `CollatorAllowlist::Allowlist` (r:1 w:0) + /// Proof: `CollatorAllowlist::Allowlist` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) /// The range of component `c` is `[1, 19]`. /// The range of component `c` is `[1, 19]`. fn register_as_candidate(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `730 + c * (61 ±0)` + // Measured: `925 + c * (61 ±0)` // Estimated: `4687 + c * (62 ±0)` - // Minimum execution time: 59_923_000 picoseconds. - Weight::from_parts(61_646_540, 0) + // Minimum execution time: 53_069_000 picoseconds. + Weight::from_parts(54_800_265, 0) .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 1_613 - .saturating_add(Weight::from_parts(243_372, 0).saturating_mul(c.into())) + // Standard Error: 1_793 + .saturating_add(Weight::from_parts(300_153, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 62).saturating_mul(c.into())) } - /// Storage: CollatorSelection Candidates (r:1 w:1) - /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(961), added: 1456, mode: MaxEncodedLen) - /// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) - /// Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) - /// The range of component `c` is `[6, 20]`. - /// The range of component `c` is `[6, 20]`. + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `CollatorAllowlist::Allowlist` (r:1 w:0) + /// Proof: `CollatorAllowlist::Allowlist` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(961), added: 1456, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:2) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// The range of component `c` is `[5, 20]`. + /// The range of component `c` is `[5, 20]`. + fn take_candidate_slot(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `1017 + c * (62 ±0)` + // Estimated: `4687 + c * (62 ±0)` + // Minimum execution time: 75_732_000 picoseconds. + Weight::from_parts(76_168_356, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 2_715 + .saturating_add(Weight::from_parts(286_388, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(Weight::from_parts(0, 62).saturating_mul(c.into())) + } + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(961), added: 1456, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// The range of component `c` is `[5, 20]`. + /// The range of component `c` is `[5, 20]`. fn leave_intent(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `549 + c * (44 ±0)` - // Estimated: `2446` - // Minimum execution time: 43_952_000 picoseconds. - Weight::from_parts(45_425_559, 0) - .saturating_add(Weight::from_parts(0, 2446)) - // Standard Error: 2_674 - .saturating_add(Weight::from_parts(62_414, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(1)) + // Measured: `476 + c * (48 ±0)` + // Estimated: `4687` + // Minimum execution time: 39_313_000 picoseconds. + Weight::from_parts(40_269_388, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 1_755 + .saturating_add(Weight::from_parts(149_791, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: System BlockWeight (r:1 w:1) - /// Proof: System BlockWeight (max_values: Some(1), max_size: Some(48), added: 543, mode: MaxEncodedLen) - /// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) - /// Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) fn note_author() -> Weight { // Proof Size summary in bytes: - // Measured: `195` + // Measured: `192` // Estimated: `6196` - // Minimum execution time: 68_859_000 picoseconds. - Weight::from_parts(70_452_000, 0) + // Minimum execution time: 60_223_000 picoseconds. + Weight::from_parts(61_394_000, 0) .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: CollatorSelection Candidates (r:1 w:0) - /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(961), added: 1456, mode: MaxEncodedLen) - /// Storage: CollatorSelection LastAuthoredBlock (r:20 w:0) - /// Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) - /// Storage: CollatorSelection Invulnerables (r:1 w:0) - /// Proof: CollatorSelection Invulnerables (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) - /// Storage: System BlockWeight (r:1 w:1) - /// Proof: System BlockWeight (max_values: Some(1), max_size: Some(48), added: 543, mode: MaxEncodedLen) - /// Storage: System Account (r:15 w:15) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:0) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(961), added: 1456, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:20 w:0) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::DesiredCandidates` (r:1 w:0) + /// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:16 w:16) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. /// The range of component `c` is `[1, 20]`. /// The range of component `r` is `[1, 20]`. /// The range of component `c` is `[1, 20]`. fn new_session(r: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `525 + c * (98 ±0) + r * (140 ±0)` - // Estimated: `7019778708211172 + c * (2519 ±0) + r * (2259 ±9)` - // Minimum execution time: 23_484_000 picoseconds. - Weight::from_parts(24_135_000, 0) - .saturating_add(Weight::from_parts(0, 7019778708211172)) - // Standard Error: 221_958 - .saturating_add(Weight::from_parts(17_711_762, 0).saturating_mul(c.into())) + // Measured: `416 + c * (98 ±0) + r * (154 ±0)` + // Estimated: `3962574101370078 + c * (2519 ±0) + r * (2393 ±6)` + // Minimum execution time: 25_678_000 picoseconds. + Weight::from_parts(26_419_000, 0) + .saturating_add(Weight::from_parts(0, 3962574101370078)) + // Standard Error: 178_336 + .saturating_add(Weight::from_parts(16_618_722, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) - .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) .saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into())) - .saturating_add(Weight::from_parts(0, 2259).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(0, 2393).saturating_mul(r.into())) } - - fn add_invulnerable(_: u32, _: u32) -> Weight { - // Pending to generate - Weight::default() - } - - fn remove_invulnerable(_: u32) -> Weight { - // Pending to generate - Weight::default() - } - - fn update_bond(_: u32) -> Weight { - // Pending to generate - Weight::default() - } - - fn take_candidate_slot(_: u32) -> Weight { - // Pending to generate - Weight::default() - } } diff --git a/runtime/development/src/weights/pallet_collective.rs b/runtime/development/src/weights/pallet_collective.rs index 8913302557..c6ec0abec9 100644 --- a/runtime/development/src/weights/pallet_collective.rs +++ b/runtime/development/src/weights/pallet_collective.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_collective` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_collective // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_collective.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_collective.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,28 +31,28 @@ use core::marker::PhantomData; /// Weight functions for `pallet_collective`. pub struct WeightInfo(PhantomData); impl pallet_collective::WeightInfo for WeightInfo { - /// Storage: Council Members (r:1 w:1) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:0) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Voting (r:100 w:100) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Prime (r:0 w:1) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Council::Members` (r:1 w:1) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:0) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Voting` (r:100 w:100) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:0 w:1) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `m` is `[0, 100]`. /// The range of component `n` is `[0, 100]`. /// The range of component `p` is `[0, 100]`. fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + m * (3232 ±0) + p * (3190 ±0)` - // Estimated: `15762 + m * (1967 ±23) + p * (4332 ±23)` - // Minimum execution time: 22_031_000 picoseconds. - Weight::from_parts(22_131_000, 0) - .saturating_add(Weight::from_parts(0, 15762)) - // Standard Error: 64_638 - .saturating_add(Weight::from_parts(4_864_099, 0).saturating_mul(m.into())) - // Standard Error: 64_638 - .saturating_add(Weight::from_parts(8_822_364, 0).saturating_mul(p.into())) + // Estimated: `15728 + m * (1967 ±24) + p * (4332 ±24)` + // Minimum execution time: 19_977_000 picoseconds. + Weight::from_parts(20_078_000, 0) + .saturating_add(Weight::from_parts(0, 15728)) + // Standard Error: 63_443 + .saturating_add(Weight::from_parts(4_761_841, 0).saturating_mul(m.into())) + // Standard Error: 63_443 + .saturating_add(Weight::from_parts(8_972_956, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(2)) @@ -61,225 +60,225 @@ impl pallet_collective::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 1967).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 4332).saturating_mul(p.into())) } - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[1, 100]`. fn execute(b: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `103 + m * (32 ±0)` - // Estimated: `1589 + m * (32 ±0)` - // Minimum execution time: 22_873_000 picoseconds. - Weight::from_parts(21_677_760, 0) - .saturating_add(Weight::from_parts(0, 1589)) - // Standard Error: 31 - .saturating_add(Weight::from_parts(1_867, 0).saturating_mul(b.into())) - // Standard Error: 329 - .saturating_add(Weight::from_parts(18_854, 0).saturating_mul(m.into())) + // Measured: `69 + m * (32 ±0)` + // Estimated: `1555 + m * (32 ±0)` + // Minimum execution time: 18_164_000 picoseconds. + Weight::from_parts(16_886_988, 0) + .saturating_add(Weight::from_parts(0, 1555)) + // Standard Error: 32 + .saturating_add(Weight::from_parts(1_693, 0).saturating_mul(b.into())) + // Standard Error: 330 + .saturating_add(Weight::from_parts(17_805, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:1 w:0) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:1 w:0) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[1, 100]`. fn propose_execute(b: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `103 + m * (32 ±0)` - // Estimated: `3569 + m * (32 ±0)` - // Minimum execution time: 26_480_000 picoseconds. - Weight::from_parts(25_197_273, 0) - .saturating_add(Weight::from_parts(0, 3569)) - // Standard Error: 47 - .saturating_add(Weight::from_parts(2_314, 0).saturating_mul(b.into())) - // Standard Error: 491 - .saturating_add(Weight::from_parts(33_905, 0).saturating_mul(m.into())) + // Measured: `69 + m * (32 ±0)` + // Estimated: `3535 + m * (32 ±0)` + // Minimum execution time: 21_801_000 picoseconds. + Weight::from_parts(20_823_477, 0) + .saturating_add(Weight::from_parts(0, 3535)) + // Standard Error: 42 + .saturating_add(Weight::from_parts(1_959, 0).saturating_mul(b.into())) + // Standard Error: 433 + .saturating_add(Weight::from_parts(29_753, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:1 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalCount (r:1 w:1) - /// Proof Skipped: Council ProposalCount (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Voting (r:0 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:1 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalCount` (r:1 w:1) + /// Proof: `Council::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Voting` (r:0 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[2, 100]`. /// The range of component `p` is `[1, 100]`. fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `393 + m * (32 ±0) + p * (36 ±0)` - // Estimated: `3785 + m * (33 ±0) + p * (36 ±0)` - // Minimum execution time: 35_547_000 picoseconds. - Weight::from_parts(34_701_219, 0) - .saturating_add(Weight::from_parts(0, 3785)) - // Standard Error: 90 - .saturating_add(Weight::from_parts(2_948, 0).saturating_mul(b.into())) - // Standard Error: 947 - .saturating_add(Weight::from_parts(28_930, 0).saturating_mul(m.into())) - // Standard Error: 935 - .saturating_add(Weight::from_parts(227_441, 0).saturating_mul(p.into())) + // Measured: `359 + m * (32 ±0) + p * (36 ±0)` + // Estimated: `3751 + m * (33 ±0) + p * (36 ±0)` + // Minimum execution time: 28_694_000 picoseconds. + Weight::from_parts(28_496_435, 0) + .saturating_add(Weight::from_parts(0, 3751)) + // Standard Error: 102 + .saturating_add(Weight::from_parts(2_863, 0).saturating_mul(b.into())) + // Standard Error: 1_066 + .saturating_add(Weight::from_parts(22_188, 0).saturating_mul(m.into())) + // Standard Error: 1_053 + .saturating_add(Weight::from_parts(250_359, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 33).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) } - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Voting` (r:1 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `m` is `[5, 100]`. fn vote(m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `842 + m * (64 ±0)` - // Estimated: `4306 + m * (64 ±0)` - // Minimum execution time: 29_907_000 picoseconds. - Weight::from_parts(30_410_229, 0) - .saturating_add(Weight::from_parts(0, 4306)) - // Standard Error: 831 - .saturating_add(Weight::from_parts(52_000, 0).saturating_mul(m.into())) + // Measured: `808 + m * (64 ±0)` + // Estimated: `4272 + m * (64 ±0)` + // Minimum execution time: 26_139_000 picoseconds. + Weight::from_parts(26_536_014, 0) + .saturating_add(Weight::from_parts(0, 4272)) + // Standard Error: 834 + .saturating_add(Weight::from_parts(47_228, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) } - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:0 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: `Council::Voting` (r:1 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:0 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_early_disapproved(m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `431 + m * (64 ±0) + p * (36 ±0)` - // Estimated: `3876 + m * (65 ±0) + p * (36 ±0)` - // Minimum execution time: 39_034_000 picoseconds. - Weight::from_parts(37_269_171, 0) - .saturating_add(Weight::from_parts(0, 3876)) - // Standard Error: 847 - .saturating_add(Weight::from_parts(42_588, 0).saturating_mul(m.into())) - // Standard Error: 826 - .saturating_add(Weight::from_parts(227_157, 0).saturating_mul(p.into())) + // Measured: `397 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `3842 + m * (65 ±0) + p * (36 ±0)` + // Minimum execution time: 30_848_000 picoseconds. + Weight::from_parts(29_242_652, 0) + .saturating_add(Weight::from_parts(0, 3842)) + // Standard Error: 964 + .saturating_add(Weight::from_parts(41_978, 0).saturating_mul(m.into())) + // Standard Error: 940 + .saturating_add(Weight::from_parts(248_368, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) } - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:1 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Council::Voting` (r:1 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:1 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `733 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` - // Estimated: `4050 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` - // Minimum execution time: 56_867_000 picoseconds. - Weight::from_parts(55_852_759, 0) - .saturating_add(Weight::from_parts(0, 4050)) - // Standard Error: 137 - .saturating_add(Weight::from_parts(2_434, 0).saturating_mul(b.into())) - // Standard Error: 1_454 - .saturating_add(Weight::from_parts(39_438, 0).saturating_mul(m.into())) - // Standard Error: 1_418 - .saturating_add(Weight::from_parts(264_589, 0).saturating_mul(p.into())) + // Measured: `699 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `4016 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` + // Minimum execution time: 44_413_000 picoseconds. + Weight::from_parts(46_317_210, 0) + .saturating_add(Weight::from_parts(0, 4016)) + // Standard Error: 118 + .saturating_add(Weight::from_parts(2_296, 0).saturating_mul(b.into())) + // Standard Error: 1_256 + .saturating_add(Weight::from_parts(27_951, 0).saturating_mul(m.into())) + // Standard Error: 1_224 + .saturating_add(Weight::from_parts(270_846, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) .saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) } - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:1 w:0) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:0 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: `Council::Voting` (r:1 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:1 w:0) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:0 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_disapproved(m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `451 + m * (64 ±0) + p * (36 ±0)` - // Estimated: `3896 + m * (65 ±0) + p * (36 ±0)` - // Minimum execution time: 43_472_000 picoseconds. - Weight::from_parts(41_983_641, 0) - .saturating_add(Weight::from_parts(0, 3896)) - // Standard Error: 1_422 - .saturating_add(Weight::from_parts(36_655, 0).saturating_mul(m.into())) - // Standard Error: 1_387 - .saturating_add(Weight::from_parts(221_237, 0).saturating_mul(p.into())) + // Measured: `417 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `3862 + m * (65 ±0) + p * (36 ±0)` + // Minimum execution time: 33_292_000 picoseconds. + Weight::from_parts(33_067_918, 0) + .saturating_add(Weight::from_parts(0, 3862)) + // Standard Error: 2_341 + .saturating_add(Weight::from_parts(24_866, 0).saturating_mul(m.into())) + // Standard Error: 2_283 + .saturating_add(Weight::from_parts(273_796, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) } - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:1 w:0) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:1 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Council::Voting` (r:1 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:1 w:0) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:1 w:0) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:1 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 100]`. fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `753 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` - // Estimated: `4070 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` - // Minimum execution time: 60_073_000 picoseconds. - Weight::from_parts(60_114_436, 0) - .saturating_add(Weight::from_parts(0, 4070)) - // Standard Error: 132 - .saturating_add(Weight::from_parts(2_308, 0).saturating_mul(b.into())) - // Standard Error: 1_403 - .saturating_add(Weight::from_parts(34_965, 0).saturating_mul(m.into())) - // Standard Error: 1_368 - .saturating_add(Weight::from_parts(263_100, 0).saturating_mul(p.into())) + // Measured: `719 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `4036 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` + // Minimum execution time: 47_228_000 picoseconds. + Weight::from_parts(48_777_291, 0) + .saturating_add(Weight::from_parts(0, 4036)) + // Standard Error: 111 + .saturating_add(Weight::from_parts(2_409, 0).saturating_mul(b.into())) + // Standard Error: 1_174 + .saturating_add(Weight::from_parts(27_376, 0).saturating_mul(m.into())) + // Standard Error: 1_145 + .saturating_add(Weight::from_parts(271_442, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) .saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) } - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Voting (r:0 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:0 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: `Council::Proposals` (r:1 w:1) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Voting` (r:0 w:1) + /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::ProposalOf` (r:0 w:1) + /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `p` is `[1, 100]`. fn disapprove_proposal(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `260 + p * (32 ±0)` - // Estimated: `1745 + p * (32 ±0)` - // Minimum execution time: 21_952_000 picoseconds. - Weight::from_parts(23_205_951, 0) - .saturating_add(Weight::from_parts(0, 1745)) - // Standard Error: 647 - .saturating_add(Weight::from_parts(209_830, 0).saturating_mul(p.into())) + // Measured: `226 + p * (32 ±0)` + // Estimated: `1711 + p * (32 ±0)` + // Minimum execution time: 17_232_000 picoseconds. + Weight::from_parts(18_580_566, 0) + .saturating_add(Weight::from_parts(0, 1711)) + // Standard Error: 576 + .saturating_add(Weight::from_parts(232_682, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into())) diff --git a/runtime/development/src/weights/pallet_democracy.rs b/runtime/development/src/weights/pallet_democracy.rs index 38de258daf..6c6b5b09a1 100644 --- a/runtime/development/src/weights/pallet_democracy.rs +++ b/runtime/development/src/weights/pallet_democracy.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_democracy` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_democracy // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_democracy.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_democracy.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,477 +31,483 @@ use core::marker::PhantomData; /// Weight functions for `pallet_democracy`. pub struct WeightInfo(PhantomData); impl pallet_democracy::WeightInfo for WeightInfo { - /// Storage: Democracy PublicPropCount (r:1 w:1) - /// Proof: Democracy PublicPropCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy PublicProps (r:1 w:1) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Democracy Blacklist (r:1 w:0) - /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) - /// Storage: Democracy DepositOf (r:0 w:1) - /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) + /// Storage: `Democracy::PublicPropCount` (r:1 w:1) + /// Proof: `Democracy::PublicPropCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Democracy::PublicProps` (r:1 w:1) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) + /// Storage: `Democracy::Blacklist` (r:1 w:0) + /// Proof: `Democracy::Blacklist` (`max_values`: None, `max_size`: Some(3238), added: 5713, mode: `MaxEncodedLen`) + /// Storage: `Democracy::DepositOf` (r:0 w:1) + /// Proof: `Democracy::DepositOf` (`max_values`: None, `max_size`: Some(3230), added: 5705, mode: `MaxEncodedLen`) fn propose() -> Weight { // Proof Size summary in bytes: // Measured: `4768` // Estimated: `18187` - // Minimum execution time: 55_724_000 picoseconds. - Weight::from_parts(56_716_000, 0) + // Minimum execution time: 47_850_000 picoseconds. + Weight::from_parts(49_673_000, 0) .saturating_add(Weight::from_parts(0, 18187)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Democracy DepositOf (r:1 w:1) - /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) + /// Storage: `Democracy::DepositOf` (r:1 w:1) + /// Proof: `Democracy::DepositOf` (`max_values`: None, `max_size`: Some(3230), added: 5705, mode: `MaxEncodedLen`) fn second() -> Weight { // Proof Size summary in bytes: // Measured: `3523` // Estimated: `6695` - // Minimum execution time: 50_675_000 picoseconds. - Weight::from_parts(51_376_000, 0) + // Minimum execution time: 46_377_000 picoseconds. + Weight::from_parts(47_519_000, 0) .saturating_add(Weight::from_parts(0, 6695)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::VotingOf` (r:1 w:1) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) fn vote_new() -> Weight { // Proof Size summary in bytes: // Measured: `3400` // Estimated: `7260` - // Minimum execution time: 64_612_000 picoseconds. - Weight::from_parts(65_763_000, 0) + // Minimum execution time: 64_059_000 picoseconds. + Weight::from_parts(65_272_000, 0) .saturating_add(Weight::from_parts(0, 7260)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::VotingOf` (r:1 w:1) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) fn vote_existing() -> Weight { // Proof Size summary in bytes: // Measured: `3422` // Estimated: `7260` - // Minimum execution time: 70_973_000 picoseconds. - Weight::from_parts(72_446_000, 0) + // Minimum execution time: 67_406_000 picoseconds. + Weight::from_parts(69_409_000, 0) .saturating_add(Weight::from_parts(0, 7260)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy Cancellations (r:1 w:1) - /// Proof: Democracy Cancellations (max_values: None, max_size: Some(33), added: 2508, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::Cancellations` (r:1 w:1) + /// Proof: `Democracy::Cancellations` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn emergency_cancel() -> Weight { // Proof Size summary in bytes: // Measured: `333` // Estimated: `3666` - // Minimum execution time: 37_090_000 picoseconds. - Weight::from_parts(37_801_000, 0) + // Minimum execution time: 31_869_000 picoseconds. + Weight::from_parts(32_581_000, 0) .saturating_add(Weight::from_parts(0, 3666)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Democracy PublicProps (r:1 w:1) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Democracy DepositOf (r:1 w:1) - /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:3 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - /// Storage: Democracy NextExternal (r:1 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy Blacklist (r:0 w:1) - /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) + /// Storage: `Democracy::PublicProps` (r:1 w:1) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) + /// Storage: `Democracy::DepositOf` (r:1 w:1) + /// Proof: `Democracy::DepositOf` (`max_values`: None, `max_size`: Some(3230), added: 5705, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:3 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) + /// Storage: `Democracy::NextExternal` (r:1 w:1) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::Blacklist` (r:0 w:1) + /// Proof: `Democracy::Blacklist` (`max_values`: None, `max_size`: Some(3238), added: 5713, mode: `MaxEncodedLen`) fn blacklist() -> Weight { // Proof Size summary in bytes: - // Measured: `5877` + // Measured: `6249` // Estimated: `18187` - // Minimum execution time: 123_462_000 picoseconds. - Weight::from_parts(124_784_000, 0) + // Minimum execution time: 126_165_000 picoseconds. + Weight::from_parts(128_319_000, 0) .saturating_add(Weight::from_parts(0, 18187)) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(7)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(8)) } - /// Storage: Democracy NextExternal (r:1 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy Blacklist (r:1 w:0) - /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) + /// Storage: `Democracy::NextExternal` (r:1 w:1) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Democracy::Blacklist` (r:1 w:0) + /// Proof: `Democracy::Blacklist` (`max_values`: None, `max_size`: Some(3238), added: 5713, mode: `MaxEncodedLen`) fn external_propose() -> Weight { // Proof Size summary in bytes: // Measured: `3383` // Estimated: `6703` - // Minimum execution time: 17_193_000 picoseconds. - Weight::from_parts(17_744_000, 0) + // Minimum execution time: 15_780_000 picoseconds. + Weight::from_parts(16_421_000, 0) .saturating_add(Weight::from_parts(0, 6703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy NextExternal (r:0 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) + /// Storage: `Democracy::NextExternal` (r:0 w:1) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) fn external_propose_majority() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_160_000 picoseconds. - Weight::from_parts(5_320_000, 0) + // Minimum execution time: 3_878_000 picoseconds. + Weight::from_parts(4_268_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy NextExternal (r:0 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) + /// Storage: `Democracy::NextExternal` (r:0 w:1) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) fn external_propose_default() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_079_000 picoseconds. - Weight::from_parts(5_350_000, 0) + // Minimum execution time: 4_018_000 picoseconds. + Weight::from_parts(4_268_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy NextExternal (r:1 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumCount (r:1 w:1) - /// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:2) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:0 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: `Democracy::NextExternal` (r:1 w:1) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumCount` (r:1 w:1) + /// Proof: `Democracy::ReferendumCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:2) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:0 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) fn fast_track() -> Weight { // Proof Size summary in bytes: // Measured: `253` // Estimated: `3518` - // Minimum execution time: 37_951_000 picoseconds. - Weight::from_parts(38_783_000, 0) + // Minimum execution time: 30_637_000 picoseconds. + Weight::from_parts(31_138_000, 0) .saturating_add(Weight::from_parts(0, 3518)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: Democracy NextExternal (r:1 w:1) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy Blacklist (r:1 w:1) - /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Democracy::NextExternal` (r:1 w:1) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Democracy::Blacklist` (r:1 w:1) + /// Proof: `Democracy::Blacklist` (`max_values`: None, `max_size`: Some(3238), added: 5713, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn veto_external() -> Weight { // Proof Size summary in bytes: // Measured: `3486` // Estimated: `6703` - // Minimum execution time: 41_177_000 picoseconds. - Weight::from_parts(41_868_000, 0) + // Minimum execution time: 33_743_000 picoseconds. + Weight::from_parts(34_825_000, 0) .saturating_add(Weight::from_parts(0, 6703)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Democracy PublicProps (r:1 w:1) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Democracy DepositOf (r:1 w:1) - /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Democracy::PublicProps` (r:1 w:1) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) + /// Storage: `Democracy::DepositOf` (r:1 w:1) + /// Proof: `Democracy::DepositOf` (`max_values`: None, `max_size`: Some(3230), added: 5705, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn cancel_proposal() -> Weight { // Proof Size summary in bytes: - // Measured: `5788` + // Measured: `6160` // Estimated: `18187` - // Minimum execution time: 97_863_000 picoseconds. - Weight::from_parts(100_960_000, 0) + // Minimum execution time: 104_916_000 picoseconds. + Weight::from_parts(106_740_000, 0) .saturating_add(Weight::from_parts(0, 18187)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:0 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:0 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) fn cancel_referendum() -> Weight { // Proof Size summary in bytes: // Measured: `238` // Estimated: `3518` - // Minimum execution time: 27_672_000 picoseconds. - Weight::from_parts(28_283_000, 0) + // Minimum execution time: 21_650_000 picoseconds. + Weight::from_parts(22_493_000, 0) .saturating_add(Weight::from_parts(0, 3518)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Democracy LowestUnbaked (r:1 w:1) - /// Proof: Democracy LowestUnbaked (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumCount (r:1 w:0) - /// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:99 w:0) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: `Democracy::LowestUnbaked` (r:1 w:1) + /// Proof: `Democracy::LowestUnbaked` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumCount` (r:1 w:0) + /// Proof: `Democracy::ReferendumCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:99 w:0) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) /// The range of component `r` is `[0, 99]`. fn on_initialize_base(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `211 + r * (86 ±0)` // Estimated: `1489 + r * (2676 ±0)` - // Minimum execution time: 8_927_000 picoseconds. - Weight::from_parts(12_794_096, 0) + // Minimum execution time: 7_304_000 picoseconds. + Weight::from_parts(10_862_570, 0) .saturating_add(Weight::from_parts(0, 1489)) - // Standard Error: 5_979 - .saturating_add(Weight::from_parts(4_056_896, 0).saturating_mul(r.into())) + // Standard Error: 6_674 + .saturating_add(Weight::from_parts(4_146_711, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) } - /// Storage: Democracy LowestUnbaked (r:1 w:1) - /// Proof: Democracy LowestUnbaked (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumCount (r:1 w:0) - /// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Democracy LastTabledWasExternal (r:1 w:0) - /// Proof: Democracy LastTabledWasExternal (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: Democracy NextExternal (r:1 w:0) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy PublicProps (r:1 w:0) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:99 w:0) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: `Democracy::LowestUnbaked` (r:1 w:1) + /// Proof: `Democracy::LowestUnbaked` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumCount` (r:1 w:0) + /// Proof: `Democracy::ReferendumCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Democracy::LastTabledWasExternal` (r:1 w:0) + /// Proof: `Democracy::LastTabledWasExternal` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `Democracy::NextExternal` (r:1 w:0) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Democracy::PublicProps` (r:1 w:0) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:99 w:0) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) /// The range of component `r` is `[0, 99]`. fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `211 + r * (86 ±0)` // Estimated: `18187 + r * (2676 ±0)` - // Minimum execution time: 13_966_000 picoseconds. - Weight::from_parts(17_788_557, 0) + // Minimum execution time: 10_389_000 picoseconds. + Weight::from_parts(13_699_184, 0) .saturating_add(Weight::from_parts(0, 18187)) - // Standard Error: 5_907 - .saturating_add(Weight::from_parts(4_058_130, 0).saturating_mul(r.into())) + // Standard Error: 5_780 + .saturating_add(Weight::from_parts(4_164_228, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) } - /// Storage: Democracy VotingOf (r:3 w:3) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:99 w:99) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Democracy::VotingOf` (r:3 w:3) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:99 w:99) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) /// The range of component `r` is `[0, 99]`. fn delegate(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `764 + r * (108 ±0)` // Estimated: `19800 + r * (2676 ±0)` - // Minimum execution time: 55_083_000 picoseconds. - Weight::from_parts(61_597_360, 0) + // Minimum execution time: 50_284_000 picoseconds. + Weight::from_parts(55_797_297, 0) .saturating_add(Weight::from_parts(0, 19800)) - // Standard Error: 6_334 - .saturating_add(Weight::from_parts(5_076_703, 0).saturating_mul(r.into())) + // Standard Error: 7_012 + .saturating_add(Weight::from_parts(5_251_046, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) } - /// Storage: Democracy VotingOf (r:2 w:2) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Democracy ReferendumInfoOf (r:99 w:99) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: `Democracy::VotingOf` (r:2 w:2) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// Storage: `Democracy::ReferendumInfoOf` (r:99 w:99) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) /// The range of component `r` is `[0, 99]`. fn undelegate(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `460 + r * (108 ±0)` // Estimated: `13530 + r * (2676 ±0)` - // Minimum execution time: 27_331_000 picoseconds. - Weight::from_parts(29_089_447, 0) + // Minimum execution time: 24_035_000 picoseconds. + Weight::from_parts(24_880_328, 0) .saturating_add(Weight::from_parts(0, 13530)) - // Standard Error: 6_120 - .saturating_add(Weight::from_parts(5_043_068, 0).saturating_mul(r.into())) + // Standard Error: 6_179 + .saturating_add(Weight::from_parts(5_186_435, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) } - /// Storage: Democracy PublicProps (r:0 w:1) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) + /// Storage: `Democracy::PublicProps` (r:0 w:1) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) fn clear_public_proposals() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_990_000 picoseconds. - Weight::from_parts(5_200_000, 0) + // Minimum execution time: 4_258_000 picoseconds. + Weight::from_parts(4_428_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Democracy::VotingOf` (r:1 w:1) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `r` is `[0, 99]`. fn unlock_remove(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `492` // Estimated: `7260` - // Minimum execution time: 32_030_000 picoseconds. - Weight::from_parts(49_868_598, 0) + // Minimum execution time: 31_679_000 picoseconds. + Weight::from_parts(43_939_429, 0) .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 4_008 - .saturating_add(Weight::from_parts(67_218, 0).saturating_mul(r.into())) + // Standard Error: 2_749 + .saturating_add(Weight::from_parts(59_143, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Democracy::VotingOf` (r:1 w:1) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `r` is `[0, 99]`. fn unlock_set(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `493 + r * (22 ±0)` // Estimated: `7260` - // Minimum execution time: 45_786_000 picoseconds. - Weight::from_parts(47_742_470, 0) + // Minimum execution time: 41_618_000 picoseconds. + Weight::from_parts(43_212_793, 0) .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 987 - .saturating_add(Weight::from_parts(86_969, 0).saturating_mul(r.into())) + // Standard Error: 934 + .saturating_add(Weight::from_parts(88_400, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::VotingOf` (r:1 w:1) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 100]`. fn remove_vote(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `695 + r * (26 ±0)` // Estimated: `7260` - // Minimum execution time: 20_268_000 picoseconds. - Weight::from_parts(22_749_343, 0) + // Minimum execution time: 21_250_000 picoseconds. + Weight::from_parts(24_298_976, 0) .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 1_068 - .saturating_add(Weight::from_parts(89_934, 0).saturating_mul(r.into())) + // Standard Error: 1_316 + .saturating_add(Weight::from_parts(91_321, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::VotingOf` (r:1 w:1) + /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 100]`. fn remove_other_vote(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `695 + r * (26 ±0)` // Estimated: `7260` - // Minimum execution time: 20_419_000 picoseconds. - Weight::from_parts(23_110_049, 0) + // Minimum execution time: 21_500_000 picoseconds. + Weight::from_parts(24_479_652, 0) .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 1_134 - .saturating_add(Weight::from_parts(88_627, 0).saturating_mul(r.into())) + // Standard Error: 1_417 + .saturating_add(Weight::from_parts(92_182, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Democracy NextExternal (r:1 w:0) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Preimage StatusFor (r:1 w:0) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:0 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Democracy::NextExternal` (r:1 w:0) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:0) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:0 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn set_external_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `357` // Estimated: `3556` - // Minimum execution time: 25_678_000 picoseconds. - Weight::from_parts(26_240_000, 0) + // Minimum execution time: 24_195_000 picoseconds. + Weight::from_parts(24_666_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy NextExternal (r:1 w:0) - /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Democracy::NextExternal` (r:1 w:0) + /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn clear_external_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `253` // Estimated: `3518` - // Minimum execution time: 22_843_000 picoseconds. - Weight::from_parts(23_404_000, 0) + // Minimum execution time: 19_797_000 picoseconds. + Weight::from_parts(20_188_000, 0) .saturating_add(Weight::from_parts(0, 3518)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy PublicProps (r:1 w:0) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Preimage StatusFor (r:1 w:0) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:0 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Democracy::PublicProps` (r:1 w:0) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:0) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:0 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn set_proposal_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `4889` // Estimated: `18187` - // Minimum execution time: 52_899_000 picoseconds. - Weight::from_parts(55_174_000, 0) + // Minimum execution time: 50_986_000 picoseconds. + Weight::from_parts(53_871_000, 0) .saturating_add(Weight::from_parts(0, 18187)) - .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy PublicProps (r:1 w:0) - /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Democracy::PublicProps` (r:1 w:0) + /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn clear_proposal_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `4789` // Estimated: `18187` - // Minimum execution time: 49_563_000 picoseconds. - Weight::from_parts(50_655_000, 0) + // Minimum execution time: 47_639_000 picoseconds. + Weight::from_parts(48_401_000, 0) .saturating_add(Weight::from_parts(0, 18187)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Preimage StatusFor (r:1 w:0) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:0 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:0) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:0 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn set_referendum_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `178` // Estimated: `3556` - // Minimum execution time: 20_689_000 picoseconds. - Weight::from_parts(21_251_000, 0) + // Minimum execution time: 20_007_000 picoseconds. + Weight::from_parts(20_649_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Democracy ReferendumInfoOf (r:1 w:0) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) - /// Storage: Democracy MetadataOf (r:1 w:1) - /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:0) + /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) + /// Storage: `Democracy::MetadataOf` (r:1 w:1) + /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) fn clear_referendum_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `269` // Estimated: `3666` - // Minimum execution time: 25_939_000 picoseconds. - Weight::from_parts(26_360_000, 0) + // Minimum execution time: 23_243_000 picoseconds. + Weight::from_parts(23_924_000, 0) .saturating_add(Weight::from_parts(0, 3666)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/development/src/weights/pallet_elections_phragmen.rs b/runtime/development/src/weights/pallet_elections_phragmen.rs index 1ea5139227..73cbcffd18 100644 --- a/runtime/development/src/weights/pallet_elections_phragmen.rs +++ b/runtime/development/src/weights/pallet_elections_phragmen.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_elections_phragmen` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_elections_phragmen // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_elections_phragmen.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_elections_phragmen.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,170 +31,170 @@ use core::marker::PhantomData; /// Weight functions for `pallet_elections_phragmen`. pub struct WeightInfo(PhantomData); impl pallet_elections_phragmen::WeightInfo for WeightInfo { - /// Storage: Elections Candidates (r:1 w:0) - /// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Members (r:1 w:0) - /// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections RunnersUp (r:1 w:0) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Voting (r:1 w:1) - /// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Elections::Candidates` (r:1 w:0) + /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Members` (r:1 w:0) + /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::RunnersUp` (r:1 w:0) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Voting` (r:1 w:1) + /// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) /// The range of component `v` is `[1, 5]`. fn vote_equal(v: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `397 + v * (80 ±0)` // Estimated: `4764 + v * (80 ±0)` - // Minimum execution time: 41_468_000 picoseconds. - Weight::from_parts(42_560_017, 0) + // Minimum execution time: 39_854_000 picoseconds. + Weight::from_parts(41_059_638, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 9_642 - .saturating_add(Weight::from_parts(242_626, 0).saturating_mul(v.into())) + // Standard Error: 9_339 + .saturating_add(Weight::from_parts(122_202, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 80).saturating_mul(v.into())) } - /// Storage: Elections Candidates (r:1 w:0) - /// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Members (r:1 w:0) - /// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections RunnersUp (r:1 w:0) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Voting (r:1 w:1) - /// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Elections::Candidates` (r:1 w:0) + /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Members` (r:1 w:0) + /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::RunnersUp` (r:1 w:0) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Voting` (r:1 w:1) + /// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) /// The range of component `v` is `[2, 5]`. fn vote_more(v: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `366 + v * (80 ±0)` // Estimated: `4764 + v * (80 ±0)` - // Minimum execution time: 59_232_000 picoseconds. - Weight::from_parts(60_716_949, 0) + // Minimum execution time: 55_103_000 picoseconds. + Weight::from_parts(56_171_173, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 18_221 - .saturating_add(Weight::from_parts(152_053, 0).saturating_mul(v.into())) + // Standard Error: 14_770 + .saturating_add(Weight::from_parts(204_563, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 80).saturating_mul(v.into())) } - /// Storage: Elections Candidates (r:1 w:0) - /// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Members (r:1 w:0) - /// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections RunnersUp (r:1 w:0) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Voting (r:1 w:1) - /// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Elections::Candidates` (r:1 w:0) + /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Members` (r:1 w:0) + /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::RunnersUp` (r:1 w:0) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Voting` (r:1 w:1) + /// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) /// The range of component `v` is `[2, 5]`. fn vote_less(v: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `398 + v * (80 ±0)` // Estimated: `4764 + v * (80 ±0)` - // Minimum execution time: 59_071_000 picoseconds. - Weight::from_parts(60_124_534, 0) + // Minimum execution time: 55_143_000 picoseconds. + Weight::from_parts(55_848_022, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 15_245 - .saturating_add(Weight::from_parts(340_864, 0).saturating_mul(v.into())) + // Standard Error: 12_961 + .saturating_add(Weight::from_parts(304_036, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 80).saturating_mul(v.into())) } - /// Storage: Elections Voting (r:1 w:1) - /// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Elections::Voting` (r:1 w:1) + /// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) fn remove_voter() -> Weight { // Proof Size summary in bytes: // Measured: `568` // Estimated: `4764` - // Minimum execution time: 62_237_000 picoseconds. - Weight::from_parts(63_410_000, 0) + // Minimum execution time: 56_095_000 picoseconds. + Weight::from_parts(57_527_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Elections Candidates (r:1 w:1) - /// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Members (r:1 w:0) - /// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections RunnersUp (r:1 w:0) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Elections::Candidates` (r:1 w:1) + /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Members` (r:1 w:0) + /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::RunnersUp` (r:1 w:0) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `c` is `[1, 20]`. fn submit_candidacy(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `963 + c * (48 ±0)` - // Estimated: `2448 + c * (48 ±0)` - // Minimum execution time: 44_684_000 picoseconds. - Weight::from_parts(45_756_572, 0) - .saturating_add(Weight::from_parts(0, 2448)) - // Standard Error: 2_274 - .saturating_add(Weight::from_parts(59_575, 0).saturating_mul(c.into())) + // Measured: `1475 + c * (48 ±0)` + // Estimated: `2960 + c * (48 ±0)` + // Minimum execution time: 40_225_000 picoseconds. + Weight::from_parts(41_460_863, 0) + .saturating_add(Weight::from_parts(0, 2960)) + // Standard Error: 2_567 + .saturating_add(Weight::from_parts(92_423, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 48).saturating_mul(c.into())) } - /// Storage: Elections Candidates (r:1 w:1) - /// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Elections::Candidates` (r:1 w:1) + /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `c` is `[1, 20]`. fn renounce_candidacy_candidate(c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `318 + c * (48 ±0)` // Estimated: `1803 + c * (48 ±0)` - // Minimum execution time: 40_296_000 picoseconds. - Weight::from_parts(41_327_773, 0) + // Minimum execution time: 35_306_000 picoseconds. + Weight::from_parts(36_290_646, 0) .saturating_add(Weight::from_parts(0, 1803)) - // Standard Error: 2_230 - .saturating_add(Weight::from_parts(72_117, 0).saturating_mul(c.into())) + // Standard Error: 2_574 + .saturating_add(Weight::from_parts(70_605, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 48).saturating_mul(c.into())) } - /// Storage: Elections Members (r:1 w:1) - /// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections RunnersUp (r:1 w:1) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:1 w:1) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:0) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Members (r:0 w:1) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Elections::Members` (r:1 w:1) + /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::RunnersUp` (r:1 w:1) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:1 w:1) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:0) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:0 w:1) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn renounce_candidacy_members() -> Weight { // Proof Size summary in bytes: - // Measured: `1177` - // Estimated: `2662` - // Minimum execution time: 56_436_000 picoseconds. - Weight::from_parts(57_518_000, 0) - .saturating_add(Weight::from_parts(0, 2662)) + // Measured: `1621` + // Estimated: `3106` + // Minimum execution time: 50_805_000 picoseconds. + Weight::from_parts(51_927_000, 0) + .saturating_add(Weight::from_parts(0, 3106)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: Elections RunnersUp (r:1 w:1) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Elections::RunnersUp` (r:1 w:1) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn renounce_candidacy_runners_up() -> Weight { // Proof Size summary in bytes: - // Measured: `639` - // Estimated: `2124` - // Minimum execution time: 40_667_000 picoseconds. - Weight::from_parts(41_187_000, 0) - .saturating_add(Weight::from_parts(0, 2124)) + // Measured: `1023` + // Estimated: `2508` + // Minimum execution time: 36_037_000 picoseconds. + Weight::from_parts(36_938_000, 0) + .saturating_add(Weight::from_parts(0, 2508)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Benchmark Override (r:0 w:0) - /// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn remove_member_without_replacement() -> Weight { // Proof Size summary in bytes: // Measured: `0` @@ -204,102 +203,100 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn Weight::from_parts(500_000_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: Elections Members (r:1 w:1) - /// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Elections RunnersUp (r:1 w:1) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:1 w:1) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:0) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Members (r:0 w:1) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Elections::Members` (r:1 w:1) + /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Elections::RunnersUp` (r:1 w:1) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:1 w:1) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:0) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:0 w:1) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn remove_member_with_replacement() -> Weight { // Proof Size summary in bytes: - // Measured: `1177` - // Estimated: `3593` - // Minimum execution time: 64_871_000 picoseconds. - Weight::from_parts(65_784_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(5)) + // Measured: `1724` + // Estimated: `6196` + // Minimum execution time: 71_003_000 picoseconds. + Weight::from_parts(72_324_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(6)) } - /// Storage: Elections Voting (r:101 w:100) - /// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Elections Members (r:1 w:0) - /// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections RunnersUp (r:1 w:0) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Candidates (r:1 w:0) - /// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Balances Locks (r:100 w:100) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:100 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: System Account (r:100 w:100) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Elections::Voting` (r:51 w:50) + /// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Members` (r:1 w:0) + /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::RunnersUp` (r:1 w:0) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Candidates` (r:1 w:0) + /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:50 w:50) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:50 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:50 w:50) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `v` is `[50, 100]`. /// The range of component `d` is `[0, 50]`. fn clean_defunct_voters(v: u32, d: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1193 + v * (457 ±0)` - // Estimated: `4528 + d * (1 ±0) + v * (3774 ±0)` - // Minimum execution time: 3_491_786_000 picoseconds. - Weight::from_parts(62_147_002, 0) - .saturating_add(Weight::from_parts(0, 4528)) - // Standard Error: 78_060 - .saturating_add(Weight::from_parts(69_439_573, 0).saturating_mul(v.into())) - // Standard Error: 78_060 - .saturating_add(Weight::from_parts(3_241, 0).saturating_mul(d.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(v.into()))) - .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(v.into()))) - .saturating_add(Weight::from_parts(0, 1).saturating_mul(d.into())) - .saturating_add(Weight::from_parts(0, 3774).saturating_mul(v.into())) + // Measured: `0 + d * (494 ±0) + v * (62 ±0)` + // Estimated: `8032 + d * (3774 ±0) + v * (27 ±0)` + // Minimum execution time: 5_440_000 picoseconds. + Weight::from_parts(5_851_000, 0) + .saturating_add(Weight::from_parts(0, 8032)) + // Standard Error: 7_490 + .saturating_add(Weight::from_parts(452_735, 0).saturating_mul(v.into())) + // Standard Error: 16_345 + .saturating_add(Weight::from_parts(54_859_868, 0).saturating_mul(d.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(d.into()))) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(d.into()))) + .saturating_add(Weight::from_parts(0, 3774).saturating_mul(d.into())) + .saturating_add(Weight::from_parts(0, 27).saturating_mul(v.into())) } - /// Storage: Elections Candidates (r:1 w:1) - /// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Members (r:1 w:1) - /// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections RunnersUp (r:1 w:1) - /// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Elections Voting (r:101 w:0) - /// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:0) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: System Account (r:10 w:10) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Elections ElectionRounds (r:1 w:1) - /// Proof Skipped: Elections ElectionRounds (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Members (r:0 w:1) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:0 w:1) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Elections::Candidates` (r:1 w:1) + /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Members` (r:1 w:1) + /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::RunnersUp` (r:1 w:1) + /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Elections::Voting` (r:101 w:0) + /// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Council::Proposals` (r:1 w:0) + /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:3 w:3) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Elections::ElectionRounds` (r:1 w:1) + /// Proof: `Elections::ElectionRounds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Members` (r:0 w:1) + /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Council::Prime` (r:0 w:1) + /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `c` is `[1, 20]`. /// The range of component `v` is `[1, 100]`. /// The range of component `e` is `[100, 500]`. fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0 + c * (199 ±0) + e * (24 ±0) + v * (248 ±0)` - // Estimated: `7737 + c * (1665 ±35) + e * (19 ±0) + v * (2536 ±2)` - // Minimum execution time: 448_752_000 picoseconds. - Weight::from_parts(450_275_000, 0) - .saturating_add(Weight::from_parts(0, 7737)) - // Standard Error: 590_822 - .saturating_add(Weight::from_parts(3_268_250, 0).saturating_mul(c.into())) - // Standard Error: 117_530 - .saturating_add(Weight::from_parts(6_433_607, 0).saturating_mul(v.into())) - // Standard Error: 25_523 - .saturating_add(Weight::from_parts(110_406, 0).saturating_mul(e.into())) - .saturating_add(T::DbWeight::get().reads(15)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) + // Measured: `0 + e * (23 ±0) + v * (241 ±0)` + // Estimated: `9323 + c * (154 ±35) + e * (19 ±1) + v * (2526 ±7)` + // Minimum execution time: 288_329_000 picoseconds. + Weight::from_parts(291_985_000, 0) + .saturating_add(Weight::from_parts(0, 9323)) + // Standard Error: 776_472 + .saturating_add(Weight::from_parts(1_654_140, 0).saturating_mul(c.into())) + // Standard Error: 154_461 + .saturating_add(Weight::from_parts(8_253_388, 0).saturating_mul(v.into())) + // Standard Error: 33_543 + .saturating_add(Weight::from_parts(253_004, 0).saturating_mul(e.into())) + .saturating_add(T::DbWeight::get().reads(17)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into()))) - .saturating_add(T::DbWeight::get().writes(5)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) - .saturating_add(Weight::from_parts(0, 1665).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().writes(7)) + .saturating_add(Weight::from_parts(0, 154).saturating_mul(c.into())) .saturating_add(Weight::from_parts(0, 19).saturating_mul(e.into())) - .saturating_add(Weight::from_parts(0, 2536).saturating_mul(v.into())) + .saturating_add(Weight::from_parts(0, 2526).saturating_mul(v.into())) } } diff --git a/runtime/development/src/weights/pallet_fees.rs b/runtime/development/src/weights/pallet_fees.rs index ddb8a5385c..9f1aa979eb 100644 --- a/runtime/development/src/weights/pallet_fees.rs +++ b/runtime/development/src/weights/pallet_fees.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_fees` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_fees // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_fees.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_fees.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,14 +31,14 @@ use core::marker::PhantomData; /// Weight functions for `pallet_fees`. pub struct WeightInfo(PhantomData); impl pallet_fees::WeightInfo for WeightInfo { - /// Storage: Fees FeeBalances (r:0 w:1) - /// Proof: Fees FeeBalances (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) + /// Storage: `Fees::FeeBalances` (r:0 w:1) + /// Proof: `Fees::FeeBalances` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) fn set_fee() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 12_103_000 picoseconds. - Weight::from_parts(12_533_000, 0) + // Minimum execution time: 8_786_000 picoseconds. + Weight::from_parts(9_347_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/development/src/weights/pallet_identity.rs b/runtime/development/src/weights/pallet_identity.rs index b005595346..6b04d4e622 100644 --- a/runtime/development/src/weights/pallet_identity.rs +++ b/runtime/development/src/weights/pallet_identity.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_identity` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_identity // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_identity.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_identity.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,266 +31,389 @@ use core::marker::PhantomData; /// Weight functions for `pallet_identity`. pub struct WeightInfo(PhantomData); impl pallet_identity::WeightInfo for WeightInfo { - /// Storage: Identity Registrars (r:1 w:1) - /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) + /// Storage: `Identity::Registrars` (r:1 w:1) + /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 19]`. fn add_registrar(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `31 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 16_210_000 picoseconds. - Weight::from_parts(17_286_909, 0) + // Minimum execution time: 11_461_000 picoseconds. + Weight::from_parts(12_329_958, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 2_071 - .saturating_add(Weight::from_parts(93_041, 0).saturating_mul(r.into())) + // Standard Error: 1_709 + .saturating_add(Weight::from_parts(85_260, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity IdentityOf (r:1 w:1) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[0, 100]`. - fn set_identity(_: u32) -> Weight { - Weight::default() + fn set_identity(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `6977 + r * (5 ±0)` + // Estimated: `11037` + // Minimum execution time: 177_182_000 picoseconds. + Weight::from_parts(184_291_666, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 10_202 + .saturating_add(Weight::from_parts(118_377, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity IdentityOf (r:1 w:0) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) - /// Storage: Identity SubsOf (r:1 w:1) - /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) - /// Storage: Identity SuperOf (r:100 w:100) - /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:100 w:100) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 100]`. fn set_subs_new(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `100` - // Estimated: `11003 + s * (2589 ±0)` - // Minimum execution time: 12_743_000 picoseconds. - Weight::from_parts(34_190_321, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 7_399 - .saturating_add(Weight::from_parts(4_731_928, 0).saturating_mul(s.into())) + // Estimated: `11037 + s * (2589 ±0)` + // Minimum execution time: 13_866_000 picoseconds. + Weight::from_parts(32_107_917, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 5_302 + .saturating_add(Weight::from_parts(5_097_828, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(s.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) .saturating_add(Weight::from_parts(0, 2589).saturating_mul(s.into())) } - /// Storage: Identity IdentityOf (r:1 w:0) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) - /// Storage: Identity SubsOf (r:1 w:1) - /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) - /// Storage: Identity SuperOf (r:0 w:100) - /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:0 w:100) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) /// The range of component `p` is `[0, 100]`. fn set_subs_old(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `193 + p * (32 ±0)` - // Estimated: `11003` - // Minimum execution time: 12_934_000 picoseconds. - Weight::from_parts(32_567_793, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 4_528 - .saturating_add(Weight::from_parts(1_884_047, 0).saturating_mul(p.into())) + // Estimated: `11037` + // Minimum execution time: 13_595_000 picoseconds. + Weight::from_parts(31_078_104, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 4_131 + .saturating_add(Weight::from_parts(2_071_635, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) } - /// Storage: Identity SubsOf (r:1 w:1) - /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) - /// Storage: Identity IdentityOf (r:1 w:1) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) - /// Storage: Identity SuperOf (r:0 w:100) - /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:0 w:100) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. /// The range of component `s` is `[0, 100]`. - /// The range of component `x` is `[0, 100]`. - fn clear_identity(_: u32, _: u32) -> Weight { - Weight::default() + fn clear_identity(r: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `7069 + r * (5 ±0) + s * (32 ±0)` + // Estimated: `11037` + // Minimum execution time: 82_014_000 picoseconds. + Weight::from_parts(82_257_399, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 8_823 + .saturating_add(Weight::from_parts(137_193, 0).saturating_mul(r.into())) + // Standard Error: 1_721 + .saturating_add(Weight::from_parts(2_055_434, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) } - /// Storage: Identity Registrars (r:1 w:0) - /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) - /// Storage: Identity IdentityOf (r:1 w:1) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: `Identity::Registrars` (r:1 w:0) + /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[0, 100]`. - fn request_judgement(_: u32) -> Weight { - Weight::default() + fn request_judgement(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `6967 + r * (57 ±0)` + // Estimated: `11037` + // Minimum execution time: 118_782_000 picoseconds. + Weight::from_parts(122_396_298, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 8_997 + .saturating_add(Weight::from_parts(131_018, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity IdentityOf (r:1 w:1) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. - /// The range of component `x` is `[0, 100]`. - fn cancel_request(_: u32) -> Weight { - Weight::default() + fn cancel_request(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `6998` + // Estimated: `11037` + // Minimum execution time: 114_965_000 picoseconds. + Weight::from_parts(119_931_535, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 8_210 + .saturating_add(Weight::from_parts(90_229, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity Registrars (r:1 w:1) - /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) + /// Storage: `Identity::Registrars` (r:1 w:1) + /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 19]`. fn set_fee(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `88 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 9_498_000 picoseconds. - Weight::from_parts(10_110_634, 0) + // Minimum execution time: 8_085_000 picoseconds. + Weight::from_parts(8_745_689, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 1_315 - .saturating_add(Weight::from_parts(74_892, 0).saturating_mul(r.into())) + // Standard Error: 1_017 + .saturating_add(Weight::from_parts(77_434, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity Registrars (r:1 w:1) - /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) + /// Storage: `Identity::Registrars` (r:1 w:1) + /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 19]`. fn set_account_id(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `88 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 9_889_000 picoseconds. - Weight::from_parts(10_330_567, 0) + // Minimum execution time: 8_666_000 picoseconds. + Weight::from_parts(9_025_881, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 980 - .saturating_add(Weight::from_parts(74_021, 0).saturating_mul(r.into())) + // Standard Error: 866 + .saturating_add(Weight::from_parts(69_178, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity Registrars (r:1 w:1) - /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) + /// Storage: `Identity::Registrars` (r:1 w:1) + /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 19]`. fn set_fields(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `88 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 9_678_000 picoseconds. - Weight::from_parts(10_131_437, 0) + // Minimum execution time: 8_466_000 picoseconds. + Weight::from_parts(8_930_474, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 906 - .saturating_add(Weight::from_parts(66_752, 0).saturating_mul(r.into())) + // Standard Error: 909 + .saturating_add(Weight::from_parts(61_820, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity Registrars (r:1 w:0) - /// Proof: Identity Registrars (max_values: Some(1), max_size: Some(1141), added: 1636, mode: MaxEncodedLen) - /// Storage: Identity IdentityOf (r:1 w:1) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) + /// Storage: `Identity::Registrars` (r:1 w:0) + /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 19]`. - /// The range of component `x` is `[0, 100]`. - fn provide_judgement(_: u32) -> Weight { - Weight::default() + fn provide_judgement(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `7045 + r * (57 ±0)` + // Estimated: `11037` + // Minimum execution time: 153_066_000 picoseconds. + Weight::from_parts(158_933_479, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 11_349 + .saturating_add(Weight::from_parts(55_251, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity SubsOf (r:1 w:1) - /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) - /// Storage: Identity IdentityOf (r:1 w:1) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Identity SuperOf (r:0 w:100) - /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:0 w:100) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. /// The range of component `s` is `[0, 100]`. - /// The range of component `x` is `[0, 100]`. - fn kill_identity(_: u32, _: u32) -> Weight { - Weight::default() + fn kill_identity(r: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `7396 + r * (15 ±0) + s * (32 ±0)` + // Estimated: `11037` + // Minimum execution time: 102_231_000 picoseconds. + Weight::from_parts(102_236_164, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 8_449 + .saturating_add(Weight::from_parts(197_958, 0).saturating_mul(r.into())) + // Standard Error: 1_648 + .saturating_add(Weight::from_parts(2_070_834, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) } - /// Storage: Identity IdentityOf (r:1 w:0) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) - /// Storage: Identity SuperOf (r:1 w:1) - /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) - /// Storage: Identity SubsOf (r:1 w:1) - /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:1 w:1) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 99]`. fn add_sub(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `474 + s * (36 ±0)` - // Estimated: `11003` - // Minimum execution time: 41_979_000 picoseconds. - Weight::from_parts(46_603_374, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 1_179 - .saturating_add(Weight::from_parts(74_218, 0).saturating_mul(s.into())) + // Estimated: `11037` + // Minimum execution time: 37_360_000 picoseconds. + Weight::from_parts(42_407_134, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 1_241 + .saturating_add(Weight::from_parts(71_942, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Identity IdentityOf (r:1 w:0) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) - /// Storage: Identity SuperOf (r:1 w:1) - /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:1 w:1) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) /// The range of component `s` is `[1, 100]`. fn rename_sub(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `590 + s * (3 ±0)` - // Estimated: `11003` - // Minimum execution time: 17_282_000 picoseconds. - Weight::from_parts(19_747_060, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 563 - .saturating_add(Weight::from_parts(24_156, 0).saturating_mul(s.into())) + // Estimated: `11037` + // Minimum execution time: 18_885_000 picoseconds. + Weight::from_parts(20_897_159, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 581 + .saturating_add(Weight::from_parts(22_219, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity IdentityOf (r:1 w:0) - /// Proof: Identity IdentityOf (max_values: None, max_size: Some(7538), added: 10013, mode: MaxEncodedLen) - /// Storage: Identity SuperOf (r:1 w:1) - /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) - /// Storage: Identity SubsOf (r:1 w:1) - /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `Identity::SuperOf` (r:1 w:1) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) /// The range of component `s` is `[1, 100]`. fn remove_sub(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `637 + s * (35 ±0)` - // Estimated: `11003` - // Minimum execution time: 45_686_000 picoseconds. - Weight::from_parts(48_850_397, 0) - .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 804 - .saturating_add(Weight::from_parts(55_800, 0).saturating_mul(s.into())) + // Estimated: `11037` + // Minimum execution time: 41_738_000 picoseconds. + Weight::from_parts(44_337_160, 0) + .saturating_add(Weight::from_parts(0, 11037)) + // Standard Error: 846 + .saturating_add(Weight::from_parts(56_189, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Identity SuperOf (r:1 w:1) - /// Proof: Identity SuperOf (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) - /// Storage: Identity SubsOf (r:1 w:1) - /// Proof: Identity SubsOf (max_values: None, max_size: Some(3258), added: 5733, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Identity::SuperOf` (r:1 w:1) + /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:1) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 99]`. fn quit_sub(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `770 + s * (37 ±0)` // Estimated: `6723` - // Minimum execution time: 33_062_000 picoseconds. - Weight::from_parts(35_251_530, 0) + // Minimum execution time: 31_408_000 picoseconds. + Weight::from_parts(33_717_882, 0) .saturating_add(Weight::from_parts(0, 6723)) - // Standard Error: 751 - .saturating_add(Weight::from_parts(63_125, 0).saturating_mul(s.into())) + // Standard Error: 786 + .saturating_add(Weight::from_parts(58_377, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - - fn add_username_authority() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn remove_username_authority() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn set_username_for() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn accept_username() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn remove_expired_approval() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn set_primary_username() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn remove_dangling_username() -> cumulus_primitives_core::Weight { - Weight::default() - } + /// Storage: `Identity::UsernameAuthorities` (r:0 w:1) + /// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + fn add_username_authority() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 9_908_000 picoseconds. + Weight::from_parts(10_289_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::UsernameAuthorities` (r:1 w:1) + /// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + fn remove_username_authority() -> Weight { + // Proof Size summary in bytes: + // Measured: `79` + // Estimated: `3517` + // Minimum execution time: 12_994_000 picoseconds. + Weight::from_parts(13_535_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::UsernameAuthorities` (r:1 w:1) + /// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Identity::AccountOfUsername` (r:1 w:1) + /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) + /// Storage: `Identity::PendingUsernames` (r:1 w:0) + /// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + fn set_username_for() -> Weight { + // Proof Size summary in bytes: + // Measured: `79` + // Estimated: `11037` + // Minimum execution time: 80_831_000 picoseconds. + Weight::from_parts(83_435_000, 0) + .saturating_add(Weight::from_parts(0, 11037)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Identity::PendingUsernames` (r:1 w:1) + /// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `Identity::AccountOfUsername` (r:0 w:1) + /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) + fn accept_username() -> Weight { + // Proof Size summary in bytes: + // Measured: `114` + // Estimated: `11037` + // Minimum execution time: 29_946_000 picoseconds. + Weight::from_parts(30_658_000, 0) + .saturating_add(Weight::from_parts(0, 11037)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Identity::PendingUsernames` (r:1 w:1) + /// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) + fn remove_expired_approval() -> Weight { + // Proof Size summary in bytes: + // Measured: `114` + // Estimated: `3550` + // Minimum execution time: 18_815_000 picoseconds. + Weight::from_parts(19_336_000, 0) + .saturating_add(Weight::from_parts(0, 3550)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::AccountOfUsername` (r:1 w:0) + /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + fn set_primary_username() -> Weight { + // Proof Size summary in bytes: + // Measured: `256` + // Estimated: `11037` + // Minimum execution time: 24_736_000 picoseconds. + Weight::from_parts(25_086_000, 0) + .saturating_add(Weight::from_parts(0, 11037)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::AccountOfUsername` (r:1 w:1) + /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + fn remove_dangling_username() -> Weight { + // Proof Size summary in bytes: + // Measured: `97` + // Estimated: `11037` + // Minimum execution time: 17_082_000 picoseconds. + Weight::from_parts(17_633_000, 0) + .saturating_add(Weight::from_parts(0, 11037)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/runtime/development/src/weights/pallet_interest_accrual.rs b/runtime/development/src/weights/pallet_interest_accrual.rs index a55244601a..769034448e 100644 --- a/runtime/development/src/weights/pallet_interest_accrual.rs +++ b/runtime/development/src/weights/pallet_interest_accrual.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_interest_accrual` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_interest_accrual // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_interest_accrual.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_interest_accrual.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -37,10 +36,10 @@ impl pallet_interest_accrual::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 701_000 picoseconds. - Weight::from_parts(239_342, 0) + // Minimum execution time: 791_000 picoseconds. + Weight::from_parts(164_950, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 239 - .saturating_add(Weight::from_parts(607_860, 0).saturating_mul(n.into())) + // Standard Error: 465 + .saturating_add(Weight::from_parts(729_925, 0).saturating_mul(n.into())) } } diff --git a/runtime/development/src/weights/pallet_investments.rs b/runtime/development/src/weights/pallet_investments.rs index fbd02879b9..2a6edaa5e8 100644 --- a/runtime/development/src/weights/pallet_investments.rs +++ b/runtime/development/src/weights/pallet_investments.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_investments` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_investments // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_investments.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_investments.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,115 +31,115 @@ use core::marker::PhantomData; /// Weight functions for `pallet_investments`. pub struct WeightInfo(PhantomData); impl pallet_investments::WeightInfo for WeightInfo { - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: Investments ActiveInvestOrders (r:1 w:1) - /// Proof: Investments ActiveInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InvestOrders (r:1 w:1) - /// Proof: Investments InvestOrders (max_values: None, max_size: Some(112), added: 2587, mode: MaxEncodedLen) - /// Storage: Investments InvestOrderId (r:1 w:0) - /// Proof: Investments InvestOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveInvestOrders` (r:1 w:1) + /// Proof: `Investments::ActiveInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InvestOrders` (r:1 w:1) + /// Proof: `Investments::InvestOrders` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`) + /// Storage: `Investments::InvestOrderId` (r:1 w:0) + /// Proof: `Investments::InvestOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) fn update_invest_order() -> Weight { // Proof Size summary in bytes: - // Measured: `2525` + // Measured: `2057` // Estimated: `6198` - // Minimum execution time: 99_787_000 picoseconds. - Weight::from_parts(101_520_000, 0) + // Minimum execution time: 93_985_000 picoseconds. + Weight::from_parts(95_147_000, 0) .saturating_add(Weight::from_parts(0, 6198)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: Investments ActiveRedeemOrders (r:1 w:1) - /// Proof: Investments ActiveRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments RedeemOrders (r:1 w:1) - /// Proof: Investments RedeemOrders (max_values: None, max_size: Some(112), added: 2587, mode: MaxEncodedLen) - /// Storage: Investments RedeemOrderId (r:1 w:0) - /// Proof: Investments RedeemOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveRedeemOrders` (r:1 w:1) + /// Proof: `Investments::ActiveRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::RedeemOrders` (r:1 w:1) + /// Proof: `Investments::RedeemOrders` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`) + /// Storage: `Investments::RedeemOrderId` (r:1 w:0) + /// Proof: `Investments::RedeemOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) fn update_redeem_order() -> Weight { // Proof Size summary in bytes: - // Measured: `2421` + // Measured: `1981` // Estimated: `6198` - // Minimum execution time: 99_116_000 picoseconds. - Weight::from_parts(100_518_000, 0) + // Minimum execution time: 93_976_000 picoseconds. + Weight::from_parts(94_897_000, 0) .saturating_add(Weight::from_parts(0, 6198)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: Investments InvestOrders (r:1 w:1) - /// Proof: Investments InvestOrders (max_values: None, max_size: Some(112), added: 2587, mode: MaxEncodedLen) - /// Storage: Investments InvestOrderId (r:1 w:0) - /// Proof: Investments InvestOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Investments ClearedInvestOrders (r:10 w:0) - /// Proof: Investments ClearedInvestOrders (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: ForeignInvestments ForeignInvestmentInfo (r:1 w:1) - /// Proof: ForeignInvestments ForeignInvestmentInfo (max_values: None, max_size: Some(161), added: 2636, mode: MaxEncodedLen) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `Investments::InvestOrders` (r:1 w:1) + /// Proof: `Investments::InvestOrders` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`) + /// Storage: `Investments::InvestOrderId` (r:1 w:0) + /// Proof: `Investments::InvestOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Investments::ClearedInvestOrders` (r:10 w:0) + /// Proof: `Investments::ClearedInvestOrders` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ForeignInvestments::ForeignInvestmentInfo` (r:1 w:1) + /// Proof: `ForeignInvestments::ForeignInvestmentInfo` (`max_values`: None, `max_size`: Some(161), added: 2636, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 10]`. fn collect_investments(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2828 + n * (44 ±0)` - // Estimated: `6293 + n * (2555 ±0)` - // Minimum execution time: 110_367_000 picoseconds. - Weight::from_parts(105_946_000, 0) - .saturating_add(Weight::from_parts(0, 6293)) - // Standard Error: 20_360 - .saturating_add(Weight::from_parts(5_571_103, 0).saturating_mul(n.into())) + // Measured: `2388 + n * (44 ±0)` + // Estimated: `6198 + n * (2555 ±0)` + // Minimum execution time: 103_373_000 picoseconds. + Weight::from_parts(99_437_572, 0) + .saturating_add(Weight::from_parts(0, 6198)) + // Standard Error: 19_681 + .saturating_add(Weight::from_parts(5_637_768, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 2555).saturating_mul(n.into())) } - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: Investments RedeemOrders (r:1 w:1) - /// Proof: Investments RedeemOrders (max_values: None, max_size: Some(112), added: 2587, mode: MaxEncodedLen) - /// Storage: Investments RedeemOrderId (r:1 w:0) - /// Proof: Investments RedeemOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Investments ClearedRedeemOrders (r:10 w:0) - /// Proof: Investments ClearedRedeemOrders (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: ForeignInvestments ForeignRedemptionInfo (r:1 w:1) - /// Proof: ForeignInvestments ForeignRedemptionInfo (max_values: None, max_size: Some(161), added: 2636, mode: MaxEncodedLen) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `Investments::RedeemOrders` (r:1 w:1) + /// Proof: `Investments::RedeemOrders` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`) + /// Storage: `Investments::RedeemOrderId` (r:1 w:0) + /// Proof: `Investments::RedeemOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Investments::ClearedRedeemOrders` (r:10 w:0) + /// Proof: `Investments::ClearedRedeemOrders` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ForeignInvestments::ForeignRedemptionInfo` (r:1 w:1) + /// Proof: `ForeignInvestments::ForeignRedemptionInfo` (`max_values`: None, `max_size`: Some(161), added: 2636, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 10]`. fn collect_redemptions(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2865 + n * (44 ±0)` - // Estimated: `6330 + n * (2555 ±0)` - // Minimum execution time: 111_479_000 picoseconds. - Weight::from_parts(107_429_507, 0) - .saturating_add(Weight::from_parts(0, 6330)) - // Standard Error: 18_573 - .saturating_add(Weight::from_parts(5_264_352, 0).saturating_mul(n.into())) + // Measured: `2397 + n * (44 ±0)` + // Estimated: `6198 + n * (2555 ±0)` + // Minimum execution time: 100_808_000 picoseconds. + Weight::from_parts(95_697_939, 0) + .saturating_add(Weight::from_parts(0, 6198)) + // Standard Error: 19_798 + .saturating_add(Weight::from_parts(5_639_662, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(4)) diff --git a/runtime/development/src/weights/pallet_keystore.rs b/runtime/development/src/weights/pallet_keystore.rs index d7ff004063..074c2e85de 100644 --- a/runtime/development/src/weights/pallet_keystore.rs +++ b/runtime/development/src/weights/pallet_keystore.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_keystore` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_keystore // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_keystore.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_keystore.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,54 +31,54 @@ use core::marker::PhantomData; /// Weight functions for `pallet_keystore`. pub struct WeightInfo(PhantomData); impl pallet_keystore::WeightInfo for WeightInfo { - /// Storage: Keystore KeyDeposit (r:1 w:0) - /// Proof: Keystore KeyDeposit (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Keystore Keys (r:10 w:10) - /// Proof: Keystore Keys (max_values: None, max_size: Some(120), added: 2595, mode: MaxEncodedLen) - /// Storage: Keystore LastKeyByPurpose (r:0 w:1) - /// Proof: Keystore LastKeyByPurpose (max_values: None, max_size: Some(97), added: 2572, mode: MaxEncodedLen) + /// Storage: `Keystore::KeyDeposit` (r:1 w:0) + /// Proof: `Keystore::KeyDeposit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Keystore::Keys` (r:10 w:10) + /// Proof: `Keystore::Keys` (`max_values`: None, `max_size`: Some(120), added: 2595, mode: `MaxEncodedLen`) + /// Storage: `Keystore::LastKeyByPurpose` (r:0 w:1) + /// Proof: `Keystore::LastKeyByPurpose` (`max_values`: None, `max_size`: Some(97), added: 2572, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 10]`. fn add_keys(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `250` + // Measured: `216` // Estimated: `3593 + n * (2595 ±0)` - // Minimum execution time: 43_672_000 picoseconds. - Weight::from_parts(16_926_925, 0) + // Minimum execution time: 37_760_000 picoseconds. + Weight::from_parts(16_409_452, 0) .saturating_add(Weight::from_parts(0, 3593)) - // Standard Error: 10_899 - .saturating_add(Weight::from_parts(27_767_673, 0).saturating_mul(n.into())) + // Standard Error: 9_527 + .saturating_add(Weight::from_parts(22_637_672, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) .saturating_add(Weight::from_parts(0, 2595).saturating_mul(n.into())) } - /// Storage: Keystore Keys (r:10 w:10) - /// Proof: Keystore Keys (max_values: None, max_size: Some(120), added: 2595, mode: MaxEncodedLen) + /// Storage: `Keystore::Keys` (r:10 w:10) + /// Proof: `Keystore::Keys` (`max_values`: None, `max_size`: Some(120), added: 2595, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 10]`. fn revoke_keys(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `148 + n * (75 ±0)` + // Measured: `114 + n * (75 ±0)` // Estimated: `990 + n * (2595 ±0)` - // Minimum execution time: 21_290_000 picoseconds. - Weight::from_parts(8_829_942, 0) + // Minimum execution time: 17_162_000 picoseconds. + Weight::from_parts(8_240_640, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 16_913 - .saturating_add(Weight::from_parts(13_295_862, 0).saturating_mul(n.into())) + // Standard Error: 15_142 + .saturating_add(Weight::from_parts(9_969_400, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) .saturating_add(Weight::from_parts(0, 2595).saturating_mul(n.into())) } - /// Storage: Keystore KeyDeposit (r:0 w:1) - /// Proof: Keystore KeyDeposit (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + /// Storage: `Keystore::KeyDeposit` (r:0 w:1) + /// Proof: `Keystore::KeyDeposit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn set_deposit() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 11_381_000 picoseconds. - Weight::from_parts(11_853_000, 0) + // Minimum execution time: 7_244_000 picoseconds. + Weight::from_parts(7_645_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/development/src/weights/pallet_liquidity_rewards.rs b/runtime/development/src/weights/pallet_liquidity_rewards.rs new file mode 100644 index 0000000000..88c7aa8513 --- /dev/null +++ b/runtime/development/src/weights/pallet_liquidity_rewards.rs @@ -0,0 +1,158 @@ + +//! Autogenerated weights for `pallet_liquidity_rewards` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 + +// Executed Command: +// target/release/centrifuge-chain +// benchmark +// pallet +// --chain=centrifuge-local +// --steps=50 +// --repeat=20 +// --pallet=pallet_liquidity_rewards +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=/tmp/runtime/centrifuge/src/weights/pallet_liquidity_rewards.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_liquidity_rewards`. +pub struct WeightInfo(PhantomData); +impl pallet_liquidity_rewards::WeightInfo for WeightInfo { + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `LiquidityRewards::EndOfEpoch` (r:1 w:0) + /// Proof: `LiquidityRewards::EndOfEpoch` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// The range of component `x` is `[0, 20]`. + /// The range of component `y` is `[0, 50]`. + /// The range of component `z` is `[0, 50]`. + fn on_initialize(x: u32, y: u32, z: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `262` + // Estimated: `1493` + // Minimum execution time: 6_501_000 picoseconds. + Weight::from_parts(6_914_210, 0) + .saturating_add(Weight::from_parts(0, 1493)) + // Standard Error: 473 + .saturating_add(Weight::from_parts(1_250, 0).saturating_mul(x.into())) + // Standard Error: 194 + .saturating_add(Weight::from_parts(626, 0).saturating_mul(y.into())) + // Standard Error: 194 + .saturating_add(Weight::from_parts(7_112, 0).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(2)) + } + /// Storage: `LiquidityRewardsBase::Currency` (r:1 w:1) + /// Proof: `LiquidityRewardsBase::Currency` (`max_values`: None, `max_size`: Some(863), added: 3338, mode: `MaxEncodedLen`) + /// Storage: `LiquidityRewardsBase::Group` (r:1 w:1) + /// Proof: `LiquidityRewardsBase::Group` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `LiquidityRewardsBase::StakeAccount` (r:1 w:1) + /// Proof: `LiquidityRewardsBase::StakeAccount` (`max_values`: None, `max_size`: Some(143), added: 2618, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:1 w:0) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + fn stake() -> Weight { + // Proof Size summary in bytes: + // Measured: `467` + // Estimated: `4407` + // Minimum execution time: 36_218_000 picoseconds. + Weight::from_parts(37_270_000, 0) + .saturating_add(Weight::from_parts(0, 4407)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `LiquidityRewardsBase::Currency` (r:1 w:1) + /// Proof: `LiquidityRewardsBase::Currency` (`max_values`: None, `max_size`: Some(863), added: 3338, mode: `MaxEncodedLen`) + /// Storage: `LiquidityRewardsBase::Group` (r:1 w:1) + /// Proof: `LiquidityRewardsBase::Group` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `LiquidityRewardsBase::StakeAccount` (r:1 w:1) + /// Proof: `LiquidityRewardsBase::StakeAccount` (`max_values`: None, `max_size`: Some(143), added: 2618, mode: `MaxEncodedLen`) + fn unstake() -> Weight { + // Proof Size summary in bytes: + // Measured: `176` + // Estimated: `4328` + // Minimum execution time: 24_386_000 picoseconds. + Weight::from_parts(25_398_000, 0) + .saturating_add(Weight::from_parts(0, 4328)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `LiquidityRewardsBase::Currency` (r:1 w:0) + /// Proof: `LiquidityRewardsBase::Currency` (`max_values`: None, `max_size`: Some(863), added: 3338, mode: `MaxEncodedLen`) + /// Storage: `LiquidityRewardsBase::Group` (r:1 w:0) + /// Proof: `LiquidityRewardsBase::Group` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `LiquidityRewardsBase::StakeAccount` (r:1 w:1) + /// Proof: `LiquidityRewardsBase::StakeAccount` (`max_values`: None, `max_size`: Some(143), added: 2618, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn claim_reward() -> Weight { + // Proof Size summary in bytes: + // Measured: `449` + // Estimated: `4328` + // Minimum execution time: 51_947_000 picoseconds. + Weight::from_parts(53_051_000, 0) + .saturating_add(Weight::from_parts(0, 4328)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `LiquidityRewards::NextEpochChanges` (r:1 w:1) + /// Proof: `LiquidityRewards::NextEpochChanges` (`max_values`: Some(1), `max_size`: Some(2078), added: 2573, mode: `MaxEncodedLen`) + fn set_distributed_reward() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `3563` + // Minimum execution time: 6_522_000 picoseconds. + Weight::from_parts(6_903_000, 0) + .saturating_add(Weight::from_parts(0, 3563)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `LiquidityRewards::NextEpochChanges` (r:1 w:1) + /// Proof: `LiquidityRewards::NextEpochChanges` (`max_values`: Some(1), `max_size`: Some(2078), added: 2573, mode: `MaxEncodedLen`) + fn set_epoch_duration() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `3563` + // Minimum execution time: 6_492_000 picoseconds. + Weight::from_parts(6_773_000, 0) + .saturating_add(Weight::from_parts(0, 3563)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `LiquidityRewards::NextEpochChanges` (r:1 w:1) + /// Proof: `LiquidityRewards::NextEpochChanges` (`max_values`: Some(1), `max_size`: Some(2078), added: 2573, mode: `MaxEncodedLen`) + fn set_group_weight() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `3563` + // Minimum execution time: 6_823_000 picoseconds. + Weight::from_parts(6_923_000, 0) + .saturating_add(Weight::from_parts(0, 3563)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `LiquidityRewards::NextEpochChanges` (r:1 w:1) + /// Proof: `LiquidityRewards::NextEpochChanges` (`max_values`: Some(1), `max_size`: Some(2078), added: 2573, mode: `MaxEncodedLen`) + fn set_currency_group() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `3563` + // Minimum execution time: 6_773_000 picoseconds. + Weight::from_parts(7_103_000, 0) + .saturating_add(Weight::from_parts(0, 3563)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/runtime/development/src/weights/pallet_loans.rs b/runtime/development/src/weights/pallet_loans.rs index 03c9541f19..09cc66a1d7 100644 --- a/runtime/development/src/weights/pallet_loans.rs +++ b/runtime/development/src/weights/pallet_loans.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_loans` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_loans // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_loans.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_loans.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,370 +31,368 @@ use core::marker::PhantomData; /// Weight functions for `pallet_loans`. pub struct WeightInfo(PhantomData); impl pallet_loans::WeightInfo for WeightInfo { - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, 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: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Loans LastLoanId (r:1 w:1) - /// Proof: Loans LastLoanId (max_values: None, max_size: Some(32), added: 2507, mode: MaxEncodedLen) - /// Storage: Loans CreatedLoan (r:0 w:1) - /// Proof: Loans CreatedLoan (max_values: None, max_size: Some(244), added: 2719, mode: MaxEncodedLen) - /// Storage: Uniques Account (r:0 w:2) - /// Proof: Uniques Account (max_values: None, max_size: Some(104), added: 2579, mode: MaxEncodedLen) - /// Storage: Uniques ItemPriceOf (r:0 w:1) - /// Proof: Uniques ItemPriceOf (max_values: None, max_size: Some(105), added: 2580, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, 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: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Loans::LastLoanId` (r:1 w:1) + /// Proof: `Loans::LastLoanId` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) + /// Storage: `Loans::CreatedLoan` (r:0 w:1) + /// Proof: `Loans::CreatedLoan` (`max_values`: None, `max_size`: Some(245), added: 2720, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Account` (r:0 w:2) + /// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ItemPriceOf` (r:0 w:1) + /// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(105), added: 2580, mode: `MaxEncodedLen`) fn create() -> Weight { // Proof Size summary in bytes: - // Measured: `1261` + // Measured: `1228` // Estimated: `4278` - // Minimum execution time: 80_350_000 picoseconds. - Weight::from_parts(81_984_000, 0) + // Minimum execution time: 74_619_000 picoseconds. + Weight::from_parts(76_393_000, 0) .saturating_add(Weight::from_parts(0, 4278)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(6)) } - /// Storage: Loans CreatedLoan (r:1 w:1) - /// Proof: Loans CreatedLoan (max_values: None, max_size: Some(244), added: 2719, 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: InterestAccrual Rates (r:1 w:1) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(36002), added: 36497, mode: MaxEncodedLen) - /// Storage: InterestAccrual LastUpdated (r:1 w:0) - /// Proof: InterestAccrual LastUpdated (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Loans PortfolioValuation (r:1 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:1) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Loans::CreatedLoan` (r:1 w:1) + /// Proof: `Loans::CreatedLoan` (`max_values`: None, `max_size`: Some(245), added: 2720, 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: `InterestAccrual::Rates` (r:1 w:1) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(36002), added: 36497, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::LastUpdated` (r:1 w:0) + /// Proof: `InterestAccrual::LastUpdated` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Loans::PortfolioValuation` (r:1 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:1) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. fn borrow(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `38651 + n * (340 ±0)` - // Estimated: `375491 + n * (340 ±0)` - // Minimum execution time: 258_965_000 picoseconds. - Weight::from_parts(273_923_939, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 57_114 - .saturating_add(Weight::from_parts(607_600, 0).saturating_mul(n.into())) + // Measured: `38081 + n * (340 ±0)` + // Estimated: `376491` + // Minimum execution time: 257_271_000 picoseconds. + Weight::from_parts(271_593_289, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 56_742 + .saturating_add(Weight::from_parts(66_655, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(7)) - .saturating_add(Weight::from_parts(0, 340).saturating_mul(n.into())) } - /// Storage: Loans PortfolioValuation (r:1 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:1) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, 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: InterestAccrual Rates (r:1 w:0) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(36002), added: 36497, mode: MaxEncodedLen) - /// Storage: InterestAccrual LastUpdated (r:1 w:0) - /// Proof: InterestAccrual LastUpdated (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Loans::PortfolioValuation` (r:1 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:1) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, 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: `InterestAccrual::Rates` (r:1 w:0) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(36002), added: 36497, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::LastUpdated` (r:1 w:0) + /// Proof: `InterestAccrual::LastUpdated` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. fn repay(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `38771 + n * (340 ±0)` - // Estimated: `375491 + n * (340 ±0)` - // Minimum execution time: 191_809_000 picoseconds. - Weight::from_parts(197_140_156, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 31_149 - .saturating_add(Weight::from_parts(875_000, 0).saturating_mul(n.into())) + // Measured: `38267 + n * (340 ±0)` + // Estimated: `376491` + // Minimum execution time: 191_979_000 picoseconds. + Weight::from_parts(195_609_642, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 24_834 + .saturating_add(Weight::from_parts(914_255, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(5)) - .saturating_add(Weight::from_parts(0, 340).saturating_mul(n.into())) } - /// Storage: Loans PortfolioValuation (r:1 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:1) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, mode: MaxEncodedLen) - /// Storage: Loans WriteOffPolicy (r:1 w:0) - /// Proof: Loans WriteOffPolicy (max_values: None, max_size: Some(535), added: 3010, 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: InterestAccrual Rates (r:1 w:1) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(36002), added: 36497, mode: MaxEncodedLen) - /// Storage: InterestAccrual LastUpdated (r:1 w:0) - /// Proof: InterestAccrual LastUpdated (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: `Loans::PortfolioValuation` (r:1 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:1) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, mode: `MaxEncodedLen`) + /// Storage: `Loans::WriteOffPolicy` (r:1 w:0) + /// Proof: `Loans::WriteOffPolicy` (`max_values`: None, `max_size`: Some(5126), added: 7601, 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: `InterestAccrual::Rates` (r:1 w:1) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(36002), added: 36497, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::LastUpdated` (r:1 w:0) + /// Proof: `InterestAccrual::LastUpdated` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. fn write_off(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `37360 + n * (340 ±0)` - // Estimated: `375491` - // Minimum execution time: 240_039_000 picoseconds. - Weight::from_parts(253_671_302, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 52_481 - .saturating_add(Weight::from_parts(736_804, 0).saturating_mul(n.into())) + // Measured: `41068 + n * (340 ±0)` + // Estimated: `376491` + // Minimum execution time: 291_074_000 picoseconds. + Weight::from_parts(306_451_616, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 65_729 + .saturating_add(Weight::from_parts(889_240, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: Loans PortfolioValuation (r:1 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:1) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, mode: MaxEncodedLen) - /// Storage: Loans WriteOffPolicy (r:1 w:0) - /// Proof: Loans WriteOffPolicy (max_values: None, max_size: Some(535), added: 3010, 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: InterestAccrual Rates (r:1 w:1) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(36002), added: 36497, mode: MaxEncodedLen) - /// Storage: InterestAccrual LastUpdated (r:1 w:0) - /// Proof: InterestAccrual LastUpdated (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `Loans::PortfolioValuation` (r:1 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:1) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, mode: `MaxEncodedLen`) + /// Storage: `Loans::WriteOffPolicy` (r:1 w:0) + /// Proof: `Loans::WriteOffPolicy` (`max_values`: None, `max_size`: Some(5126), added: 7601, 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: `InterestAccrual::Rates` (r:1 w:1) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(36002), added: 36497, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::LastUpdated` (r:1 w:0) + /// Proof: `InterestAccrual::LastUpdated` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. fn admin_write_off(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `37611 + n * (340 ±0)` - // Estimated: `375491` - // Minimum execution time: 251_641_000 picoseconds. - Weight::from_parts(269_631_279, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 49_436 - .saturating_add(Weight::from_parts(898_913, 0).saturating_mul(n.into())) + // Measured: `41319 + n * (340 ±0)` + // Estimated: `376491` + // Minimum execution time: 336_618_000 picoseconds. + Weight::from_parts(351_659_527, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 59_611 + .saturating_add(Weight::from_parts(790_271, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:0) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, 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: PoolSystem NotedChange (r:0 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(3116), added: 5591, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:0) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, 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: `PoolSystem::NotedChange` (r:0 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. fn propose_loan_mutation(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `971 + n * (316 ±0)` - // Estimated: `375491` - // Minimum execution time: 45_165_000 picoseconds. - Weight::from_parts(45_298_209, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 12_320 - .saturating_add(Weight::from_parts(714_558, 0).saturating_mul(n.into())) + // Estimated: `376491` + // Minimum execution time: 41_297_000 picoseconds. + Weight::from_parts(42_125_690, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 5_612 + .saturating_add(Weight::from_parts(468_060, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PoolSystem NotedChange (r:1 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(3116), added: 5591, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: Loans PortfolioValuation (r:1 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:1) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, 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: InterestAccrual Rates (r:1 w:0) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(36002), added: 36497, mode: MaxEncodedLen) - /// Storage: InterestAccrual LastUpdated (r:1 w:0) - /// Proof: InterestAccrual LastUpdated (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: `PoolSystem::NotedChange` (r:1 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `Loans::PortfolioValuation` (r:1 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:1) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, 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: `InterestAccrual::Rates` (r:1 w:0) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(36002), added: 36497, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::LastUpdated` (r:1 w:0) + /// Proof: `InterestAccrual::LastUpdated` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. fn apply_loan_mutation(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `37477 + n * (340 ±0)` - // Estimated: `375491` - // Minimum execution time: 99_717_000 picoseconds. - Weight::from_parts(101_939_910, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 18_626 - .saturating_add(Weight::from_parts(640_848, 0).saturating_mul(n.into())) + // Measured: `37404 + n * (340 ±0)` + // Estimated: `376491` + // Minimum execution time: 121_217_000 picoseconds. + Weight::from_parts(123_415_693, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 16_707 + .saturating_add(Weight::from_parts(571_387, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Loans CreatedLoan (r:1 w:0) - /// Proof: Loans CreatedLoan (max_values: None, max_size: Some(244), added: 2719, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:1) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, mode: MaxEncodedLen) - /// Storage: Loans PortfolioValuation (r:1 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: InterestAccrual Rates (r:1 w:1) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(36002), added: 36497, mode: MaxEncodedLen) - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Loans ClosedLoan (r:0 w:1) - /// Proof: Loans ClosedLoan (max_values: None, max_size: Some(280), added: 2755, mode: MaxEncodedLen) - /// Storage: Uniques Account (r:0 w:2) - /// Proof: Uniques Account (max_values: None, max_size: Some(104), added: 2579, mode: MaxEncodedLen) - /// Storage: Uniques ItemPriceOf (r:0 w:1) - /// Proof: Uniques ItemPriceOf (max_values: None, max_size: Some(105), added: 2580, mode: MaxEncodedLen) + /// Storage: `Loans::CreatedLoan` (r:1 w:0) + /// Proof: `Loans::CreatedLoan` (`max_values`: None, `max_size`: Some(245), added: 2720, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:1) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, mode: `MaxEncodedLen`) + /// Storage: `Loans::PortfolioValuation` (r:1 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::Rates` (r:1 w:1) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(36002), added: 36497, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Loans::ClosedLoan` (r:0 w:1) + /// Proof: `Loans::ClosedLoan` (`max_values`: None, `max_size`: Some(281), added: 2756, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Account` (r:0 w:2) + /// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ItemPriceOf` (r:0 w:1) + /// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(105), added: 2580, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. fn close(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `37370 + n * (373 ±0)` - // Estimated: `375491` - // Minimum execution time: 142_897_000 picoseconds. - Weight::from_parts(152_648_479, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 36_308 - .saturating_add(Weight::from_parts(464_350, 0).saturating_mul(n.into())) + // Measured: `37264 + n * (373 ±0)` + // Estimated: `376491` + // Minimum execution time: 134_531_000 picoseconds. + Weight::from_parts(142_641_726, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 26_601 + .saturating_add(Weight::from_parts(601_280, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(8)) } - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, 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: PoolSystem NotedChange (r:0 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(3116), added: 5591, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, 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: `PoolSystem::NotedChange` (r:0 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) fn propose_write_off_policy() -> Weight { // Proof Size summary in bytes: // Measured: `478` // Estimated: `4278` - // Minimum execution time: 44_153_000 picoseconds. - Weight::from_parts(44_754_000, 0) + // Minimum execution time: 99_716_000 picoseconds. + Weight::from_parts(100_969_000, 0) .saturating_add(Weight::from_parts(0, 4278)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PoolSystem NotedChange (r:1 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(3116), added: 5591, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: Loans WriteOffPolicy (r:0 w:1) - /// Proof: Loans WriteOffPolicy (max_values: None, max_size: Some(535), added: 3010, mode: MaxEncodedLen) + /// Storage: `PoolSystem::NotedChange` (r:1 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `Loans::WriteOffPolicy` (r:0 w:1) + /// Proof: `Loans::WriteOffPolicy` (`max_values`: None, `max_size`: Some(5126), added: 7601, mode: `MaxEncodedLen`) fn apply_write_off_policy() -> Weight { // Proof Size summary in bytes: - // Measured: `1073` - // Estimated: `6581` - // Minimum execution time: 43_742_000 picoseconds. - Weight::from_parts(44_454_000, 0) - .saturating_add(Weight::from_parts(0, 6581)) + // Measured: `4854` + // Estimated: `8649` + // Minimum execution time: 131_546_000 picoseconds. + Weight::from_parts(132_908_000, 0) + .saturating_add(Weight::from_parts(0, 8649)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: InterestAccrual Rates (r:1 w:0) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(36002), added: 36497, mode: MaxEncodedLen) - /// Storage: OraclePriceCollection Collection (r:1 w:0) - /// Proof: OraclePriceCollection Collection (max_values: None, max_size: Some(7542), added: 10017, mode: MaxEncodedLen) - /// Storage: OraclePriceCollection CollectionInfo (r:1 w:0) - /// Proof: OraclePriceCollection CollectionInfo (max_values: None, max_size: Some(3058), added: 5533, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:0) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, 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 PortfolioValuation (r:0 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::Rates` (r:1 w:0) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(36002), added: 36497, mode: `MaxEncodedLen`) + /// Storage: `OraclePriceCollection::Collection` (r:1 w:0) + /// Proof: `OraclePriceCollection::Collection` (`max_values`: None, `max_size`: Some(7542), added: 10017, mode: `MaxEncodedLen`) + /// Storage: `OraclePriceCollection::CollectionInfo` (r:1 w:0) + /// Proof: `OraclePriceCollection::CollectionInfo` (`max_values`: None, `max_size`: Some(3058), added: 5533, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:0) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, 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::PortfolioValuation` (r:0 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 10]`. fn update_portfolio_valuation(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `37026 + n * (353 ±0)` - // Estimated: `375491` - // Minimum execution time: 91_371_000 picoseconds. - Weight::from_parts(86_053_471, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 42_303 - .saturating_add(Weight::from_parts(10_607_794, 0).saturating_mul(n.into())) + // Measured: `36953 + n * (353 ±0)` + // Estimated: `376491` + // Minimum execution time: 110_657_000 picoseconds. + Weight::from_parts(80_744_391, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 40_449 + .saturating_add(Weight::from_parts(34_591_694, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Loans PortfolioValuation (r:1 w:0) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:0) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, 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: InterestAccrual Rates (r:1 w:0) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(36002), added: 36497, mode: MaxEncodedLen) - /// Storage: InterestAccrual LastUpdated (r:1 w:0) - /// Proof: InterestAccrual LastUpdated (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Loans CreatedLoan (r:1 w:0) - /// Proof: Loans CreatedLoan (max_values: None, max_size: Some(244), added: 2719, mode: MaxEncodedLen) - /// Storage: PoolSystem NotedChange (r:0 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(3116), added: 5591, mode: MaxEncodedLen) + /// Storage: `Loans::PortfolioValuation` (r:1 w:0) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:0) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, 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: `InterestAccrual::Rates` (r:1 w:0) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(36002), added: 36497, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::LastUpdated` (r:1 w:0) + /// Proof: `InterestAccrual::LastUpdated` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Loans::CreatedLoan` (r:1 w:0) + /// Proof: `Loans::CreatedLoan` (`max_values`: None, `max_size`: Some(245), added: 2720, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::NotedChange` (r:0 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) /// The range of component `n` is `[2, 8]`. fn propose_transfer_debt(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `37144 + n * (340 ±0)` - // Estimated: `375491` - // Minimum execution time: 283_661_000 picoseconds. - Weight::from_parts(295_272_087, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 88_073 - .saturating_add(Weight::from_parts(1_367_999, 0).saturating_mul(n.into())) + // Measured: `37071 + n * (340 ±0)` + // Estimated: `376491` + // Minimum execution time: 306_813_000 picoseconds. + Weight::from_parts(320_875_517, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 85_096 + .saturating_add(Weight::from_parts(1_049_642, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PoolSystem NotedChange (r:1 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(3116), added: 5591, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: Loans PortfolioValuation (r:1 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:1) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, 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: InterestAccrual Rates (r:1 w:1) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(36002), added: 36497, mode: MaxEncodedLen) - /// Storage: InterestAccrual LastUpdated (r:1 w:0) - /// Proof: InterestAccrual LastUpdated (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Loans CreatedLoan (r:1 w:1) - /// Proof: Loans CreatedLoan (max_values: None, max_size: Some(244), added: 2719, mode: MaxEncodedLen) + /// Storage: `PoolSystem::NotedChange` (r:1 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `Loans::PortfolioValuation` (r:1 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:1) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, 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: `InterestAccrual::Rates` (r:1 w:1) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(36002), added: 36497, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::LastUpdated` (r:1 w:0) + /// Proof: `InterestAccrual::LastUpdated` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Loans::CreatedLoan` (r:1 w:1) + /// Proof: `Loans::CreatedLoan` (`max_values`: None, `max_size`: Some(245), added: 2720, mode: `MaxEncodedLen`) /// The range of component `n` is `[2, 8]`. fn apply_transfer_debt(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `37805 + n * (340 ±0)` - // Estimated: `375491` - // Minimum execution time: 286_618_000 picoseconds. - Weight::from_parts(301_381_602, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 88_453 - .saturating_add(Weight::from_parts(956_537, 0).saturating_mul(n.into())) + // Measured: `37732 + n * (340 ±0)` + // Estimated: `376491` + // Minimum execution time: 317_713_000 picoseconds. + Weight::from_parts(330_762_786, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 82_499 + .saturating_add(Weight::from_parts(726_621, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: Loans CreatedLoan (r:1 w:1) - /// Proof: Loans CreatedLoan (max_values: None, max_size: Some(244), added: 2719, 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: InterestAccrual Rates (r:1 w:1) - /// Proof: InterestAccrual Rates (max_values: Some(1), max_size: Some(36002), added: 36497, mode: MaxEncodedLen) - /// Storage: InterestAccrual LastUpdated (r:1 w:0) - /// Proof: InterestAccrual LastUpdated (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Loans PortfolioValuation (r:1 w:1) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: Loans ActiveLoans (r:1 w:1) - /// Proof: Loans ActiveLoans (max_values: None, max_size: Some(372026), added: 374501, mode: MaxEncodedLen) + /// Storage: `Loans::CreatedLoan` (r:1 w:1) + /// Proof: `Loans::CreatedLoan` (`max_values`: None, `max_size`: Some(245), added: 2720, 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: `InterestAccrual::Rates` (r:1 w:1) + /// Proof: `InterestAccrual::Rates` (`max_values`: Some(1), `max_size`: Some(36002), added: 36497, mode: `MaxEncodedLen`) + /// Storage: `InterestAccrual::LastUpdated` (r:1 w:0) + /// Proof: `InterestAccrual::LastUpdated` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Loans::PortfolioValuation` (r:1 w:1) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `Loans::ActiveLoans` (r:1 w:1) + /// Proof: `Loans::ActiveLoans` (`max_values`: None, `max_size`: Some(373026), added: 375501, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. fn increase_debt(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `36804 + n * (340 ±0)` - // Estimated: `375491` - // Minimum execution time: 187_943_000 picoseconds. - Weight::from_parts(195_618_379, 0) - .saturating_add(Weight::from_parts(0, 375491)) - // Standard Error: 44_252 - .saturating_add(Weight::from_parts(1_090_526, 0).saturating_mul(n.into())) + // Measured: `36731 + n * (340 ±0)` + // Estimated: `376491` + // Minimum execution time: 200_694_000 picoseconds. + Weight::from_parts(213_050_296, 0) + .saturating_add(Weight::from_parts(0, 376491)) + // Standard Error: 68_417 + .saturating_add(Weight::from_parts(887_808, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/runtime/development/src/weights/pallet_multisig.rs b/runtime/development/src/weights/pallet_multisig.rs index 1e120ecdf9..684c0cb6f3 100644 --- a/runtime/development/src/weights/pallet_multisig.rs +++ b/runtime/development/src/weights/pallet_multisig.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_multisig` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_multisig // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_multisig.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_multisig.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -37,110 +36,110 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 16_201_000 picoseconds. - Weight::from_parts(17_023_793, 0) + // Minimum execution time: 15_338_000 picoseconds. + Weight::from_parts(16_533_180, 0) .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 3 - .saturating_add(Weight::from_parts(474, 0).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(574, 0).saturating_mul(z.into())) } - /// Storage: Multisig Multisigs (r:1 w:1) - /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `334 + s * (1 ±0)` // Estimated: `6811` - // Minimum execution time: 55_184_000 picoseconds. - Weight::from_parts(47_625_938, 0) + // Minimum execution time: 50_915_000 picoseconds. + Weight::from_parts(43_873_293, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 953 - .saturating_add(Weight::from_parts(92_681, 0).saturating_mul(s.into())) - // Standard Error: 9 - .saturating_add(Weight::from_parts(1_575, 0).saturating_mul(z.into())) + // Standard Error: 815 + .saturating_add(Weight::from_parts(91_909, 0).saturating_mul(s.into())) + // Standard Error: 7 + .saturating_add(Weight::from_parts(1_538, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Multisig Multisigs (r:1 w:1) - /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) /// The range of component `s` is `[3, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `315` // Estimated: `6811` - // Minimum execution time: 34_355_000 picoseconds. - Weight::from_parts(27_105_453, 0) + // Minimum execution time: 31_569_000 picoseconds. + Weight::from_parts(24_463_345, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 479 - .saturating_add(Weight::from_parts(80_857, 0).saturating_mul(s.into())) - // Standard Error: 4 - .saturating_add(Weight::from_parts(1_530, 0).saturating_mul(z.into())) + // Standard Error: 531 + .saturating_add(Weight::from_parts(82_688, 0).saturating_mul(s.into())) + // Standard Error: 5 + .saturating_add(Weight::from_parts(1_606, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Multisig Multisigs (r:1 w:1) - /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `456 + s * (33 ±0)` // Estimated: `6811` - // Minimum execution time: 63_038_000 picoseconds. - Weight::from_parts(51_996_533, 0) + // Minimum execution time: 57_838_000 picoseconds. + Weight::from_parts(47_255_589, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 658 - .saturating_add(Weight::from_parts(125_530, 0).saturating_mul(s.into())) - // Standard Error: 6 - .saturating_add(Weight::from_parts(1_584, 0).saturating_mul(z.into())) + // Standard Error: 768 + .saturating_add(Weight::from_parts(122_970, 0).saturating_mul(s.into())) + // Standard Error: 7 + .saturating_add(Weight::from_parts(1_675, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Multisig Multisigs (r:1 w:1) - /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_create(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `334 + s * (1 ±0)` // Estimated: `6811` - // Minimum execution time: 44_584_000 picoseconds. - Weight::from_parts(45_966_461, 0) + // Minimum execution time: 40_035_000 picoseconds. + Weight::from_parts(41_467_020, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 927 - .saturating_add(Weight::from_parts(94_698, 0).saturating_mul(s.into())) + // Standard Error: 716 + .saturating_add(Weight::from_parts(90_922, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Multisig Multisigs (r:1 w:1) - /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_approve(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `315` // Estimated: `6811` - // Minimum execution time: 24_296_000 picoseconds. - Weight::from_parts(25_023_749, 0) + // Minimum execution time: 21_891_000 picoseconds. + Weight::from_parts(22_563_240, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 504 - .saturating_add(Weight::from_parts(84_010, 0).saturating_mul(s.into())) + // Standard Error: 568 + .saturating_add(Weight::from_parts(83_269, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Multisig Multisigs (r:1 w:1) - /// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 100]`. fn cancel_as_multi(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `520 + s * (1 ±0)` // Estimated: `6811` - // Minimum execution time: 44_965_000 picoseconds. - Weight::from_parts(46_528_960, 0) + // Minimum execution time: 41_267_000 picoseconds. + Weight::from_parts(42_346_960, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 787 - .saturating_add(Weight::from_parts(90_262, 0).saturating_mul(s.into())) + // Standard Error: 606 + .saturating_add(Weight::from_parts(85_093, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/development/src/weights/pallet_oracle_collection.rs b/runtime/development/src/weights/pallet_oracle_collection.rs index 92caaa381c..bd0acee940 100644 --- a/runtime/development/src/weights/pallet_oracle_collection.rs +++ b/runtime/development/src/weights/pallet_oracle_collection.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_oracle_collection` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_oracle_collection // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_oracle_collection.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_oracle_collection.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,73 +31,73 @@ use core::marker::PhantomData; /// Weight functions for `pallet_oracle_collection`. pub struct WeightInfo(PhantomData); impl pallet_oracle_collection::WeightInfo for WeightInfo { - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, 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: PoolSystem NotedChange (r:0 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(3116), added: 5591, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, 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: `PoolSystem::NotedChange` (r:0 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. fn propose_update_collection_info(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `222` // Estimated: `3693` - // Minimum execution time: 28_865_000 picoseconds. - Weight::from_parts(28_313_405, 0) + // Minimum execution time: 24_276_000 picoseconds. + Weight::from_parts(24_755_058, 0) .saturating_add(Weight::from_parts(0, 3693)) - // Standard Error: 8_302 - .saturating_add(Weight::from_parts(1_508_067, 0).saturating_mul(n.into())) + // Standard Error: 8_436 + .saturating_add(Weight::from_parts(511_561, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PoolSystem NotedChange (r:1 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(3116), added: 5591, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: OraclePriceCollection Collection (r:0 w:1) - /// Proof: OraclePriceCollection Collection (max_values: None, max_size: Some(7542), added: 10017, mode: MaxEncodedLen) - /// Storage: OraclePriceCollection CollectionInfo (r:0 w:1) - /// Proof: OraclePriceCollection CollectionInfo (max_values: None, max_size: Some(3058), added: 5533, mode: MaxEncodedLen) + /// Storage: `PoolSystem::NotedChange` (r:1 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `OraclePriceCollection::Collection` (r:0 w:1) + /// Proof: `OraclePriceCollection::Collection` (`max_values`: None, `max_size`: Some(7542), added: 10017, mode: `MaxEncodedLen`) + /// Storage: `OraclePriceCollection::CollectionInfo` (r:0 w:1) + /// Proof: `OraclePriceCollection::CollectionInfo` (`max_values`: None, `max_size`: Some(3058), added: 5533, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. fn apply_update_collection_info(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `657 + n * (34 ±0)` - // Estimated: `6581` - // Minimum execution time: 34_686_000 picoseconds. - Weight::from_parts(34_127_332, 0) - .saturating_add(Weight::from_parts(0, 6581)) - // Standard Error: 9_263 - .saturating_add(Weight::from_parts(1_611_448, 0).saturating_mul(n.into())) + // Estimated: `8649` + // Minimum execution time: 35_065_000 picoseconds. + Weight::from_parts(35_541_621, 0) + .saturating_add(Weight::from_parts(0, 8649)) + // Standard Error: 8_931 + .saturating_add(Weight::from_parts(522_188, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: OraclePriceCollection Keys (r:101 w:0) - /// Proof: OraclePriceCollection Keys (max_values: None, max_size: Some(95), added: 2570, mode: MaxEncodedLen) - /// Storage: OraclePriceCollection CollectionInfo (r:1 w:0) - /// Proof: OraclePriceCollection CollectionInfo (max_values: None, max_size: Some(3058), added: 5533, mode: MaxEncodedLen) - /// Storage: OraclePriceFeed FedValues (r:500 w:0) - /// Proof: OraclePriceFeed FedValues (max_values: None, max_size: Some(711), added: 3186, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OraclePriceCollection Collection (r:0 w:1) - /// Proof: OraclePriceCollection Collection (max_values: None, max_size: Some(7542), added: 10017, 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: `OraclePriceCollection::Keys` (r:101 w:0) + /// Proof: `OraclePriceCollection::Keys` (`max_values`: None, `max_size`: Some(95), added: 2570, mode: `MaxEncodedLen`) + /// Storage: `OraclePriceCollection::CollectionInfo` (r:1 w:0) + /// Proof: `OraclePriceCollection::CollectionInfo` (`max_values`: None, `max_size`: Some(3058), added: 5533, mode: `MaxEncodedLen`) + /// Storage: `OraclePriceFeed::FedValues` (r:500 w:0) + /// Proof: `OraclePriceFeed::FedValues` (`max_values`: None, `max_size`: Some(711), added: 3186, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OraclePriceCollection::Collection` (r:0 w:1) + /// Proof: `OraclePriceCollection::Collection` (`max_values`: None, `max_size`: Some(7542), added: 10017, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[1, 100]`. fn update_collection(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + m * (326 ±0) + n * (5851 ±0)` // Estimated: `16920 + m * (6039 ±164) + n * (100600 ±3_323)` - // Minimum execution time: 162_866_000 picoseconds. - Weight::from_parts(164_109_000, 0) + // Minimum execution time: 129_342_000 picoseconds. + Weight::from_parts(130_825_000, 0) .saturating_add(Weight::from_parts(0, 16920)) - // Standard Error: 22_002_017 - .saturating_add(Weight::from_parts(697_156_624, 0).saturating_mul(n.into())) - // Standard Error: 1_089_783 - .saturating_add(Weight::from_parts(36_441_120, 0).saturating_mul(m.into())) + // Standard Error: 15_277_105 + .saturating_add(Weight::from_parts(473_216_566, 0).saturating_mul(n.into())) + // Standard Error: 756_691 + .saturating_add(Weight::from_parts(30_611_211, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().reads((31_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(m.into()))) diff --git a/runtime/development/src/weights/pallet_oracle_feed.rs b/runtime/development/src/weights/pallet_oracle_feed.rs index 305a11dbc2..8bd62c36d7 100644 --- a/runtime/development/src/weights/pallet_oracle_feed.rs +++ b/runtime/development/src/weights/pallet_oracle_feed.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_oracle_feed` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_oracle_feed // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_oracle_feed.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_oracle_feed.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,32 +31,32 @@ use core::marker::PhantomData; /// Weight functions for `pallet_oracle_feed`. pub struct WeightInfo(PhantomData); impl pallet_oracle_feed::WeightInfo for WeightInfo { - /// Storage: OraclePriceFeed FedValues (r:1 w:1) - /// Proof: OraclePriceFeed FedValues (max_values: None, max_size: Some(711), added: 3186, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, 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: `OraclePriceFeed::FedValues` (r:1 w:1) + /// Proof: `OraclePriceFeed::FedValues` (`max_values`: None, `max_size`: Some(711), added: 3186, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn feed_with_fee() -> Weight { // Proof Size summary in bytes: // Measured: `387` // Estimated: `4176` - // Minimum execution time: 64_792_000 picoseconds. - Weight::from_parts(65_763_000, 0) + // Minimum execution time: 50_644_000 picoseconds. + Weight::from_parts(51_506_000, 0) .saturating_add(Weight::from_parts(0, 4176)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: OraclePriceFeed FedValues (r:1 w:1) - /// Proof: OraclePriceFeed FedValues (max_values: None, max_size: Some(711), added: 3186, 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: `OraclePriceFeed::FedValues` (r:1 w:1) + /// Proof: `OraclePriceFeed::FedValues` (`max_values`: None, `max_size`: Some(711), added: 3186, mode: `MaxEncodedLen`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn feed_without_fee() -> Weight { // Proof Size summary in bytes: // Measured: `413` // Estimated: `4176` - // Minimum execution time: 22_802_000 picoseconds. - Weight::from_parts(23_564_000, 0) + // Minimum execution time: 19_166_000 picoseconds. + Weight::from_parts(19_607_000, 0) .saturating_add(Weight::from_parts(0, 4176)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/development/src/weights/pallet_order_book.rs b/runtime/development/src/weights/pallet_order_book.rs index a7abfd1c6e..fb6f1f781c 100644 --- a/runtime/development/src/weights/pallet_order_book.rs +++ b/runtime/development/src/weights/pallet_order_book.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_order_book` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_order_book // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_order_book.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_order_book.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,94 +31,94 @@ use core::marker::PhantomData; /// Weight functions for `pallet_order_book`. pub struct WeightInfo(PhantomData); impl pallet_order_book::WeightInfo for WeightInfo { - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OrderBook OrderIdNonceStore (r:1 w:1) - /// Proof: OrderBook OrderIdNonceStore (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:1 w:1) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrderBook Orders (r:0 w:1) - /// Proof: OrderBook Orders (max_values: None, max_size: Some(171), added: 2646, mode: MaxEncodedLen) - /// Storage: OrderBook UserOrders (r:0 w:1) - /// Proof: OrderBook UserOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OrderBook::OrderIdNonceStore` (r:1 w:1) + /// Proof: `OrderBook::OrderIdNonceStore` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:1 w:1) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrderBook::Orders` (r:0 w:1) + /// Proof: `OrderBook::Orders` (`max_values`: None, `max_size`: Some(171), added: 2646, mode: `MaxEncodedLen`) + /// Storage: `OrderBook::UserOrders` (r:0 w:1) + /// Proof: `OrderBook::UserOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) fn place_order() -> Weight { // Proof Size summary in bytes: - // Measured: `1148` - // Estimated: `4613` - // Minimum execution time: 56_065_000 picoseconds. - Weight::from_parts(57_078_000, 0) - .saturating_add(Weight::from_parts(0, 4613)) + // Measured: `692` + // Estimated: `4407` + // Minimum execution time: 45_916_000 picoseconds. + Weight::from_parts(47_449_000, 0) + .saturating_add(Weight::from_parts(0, 4407)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: OrderBook Orders (r:1 w:1) - /// Proof: OrderBook Orders (max_values: None, max_size: Some(171), added: 2646, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OrmlTokens Accounts (r:1 w:1) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) + /// Storage: `OrderBook::Orders` (r:1 w:1) + /// Proof: `OrderBook::Orders` (`max_values`: None, `max_size`: Some(171), added: 2646, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:1 w:1) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) fn update_order() -> Weight { // Proof Size summary in bytes: - // Measured: `1352` - // Estimated: `4817` - // Minimum execution time: 51_137_000 picoseconds. - Weight::from_parts(52_549_000, 0) - .saturating_add(Weight::from_parts(0, 4817)) + // Measured: `896` + // Estimated: `4407` + // Minimum execution time: 44_593_000 picoseconds. + Weight::from_parts(45_495_000, 0) + .saturating_add(Weight::from_parts(0, 4407)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: OrderBook Orders (r:1 w:1) - /// Proof: OrderBook Orders (max_values: None, max_size: Some(171), added: 2646, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:1 w:1) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OrderBook UserOrders (r:0 w:1) - /// Proof: OrderBook UserOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + /// Storage: `OrderBook::Orders` (r:1 w:1) + /// Proof: `OrderBook::Orders` (`max_values`: None, `max_size`: Some(171), added: 2646, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:1 w:1) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OrderBook::UserOrders` (r:0 w:1) + /// Proof: `OrderBook::UserOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) fn cancel_order() -> Weight { // Proof Size summary in bytes: - // Measured: `1352` - // Estimated: `4817` - // Minimum execution time: 54_483_000 picoseconds. - Weight::from_parts(55_474_000, 0) - .saturating_add(Weight::from_parts(0, 4817)) + // Measured: `896` + // Estimated: `4407` + // Minimum execution time: 47_599_000 picoseconds. + Weight::from_parts(48_360_000, 0) + .saturating_add(Weight::from_parts(0, 4407)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: OrderBook Orders (r:1 w:1) - /// Proof: OrderBook Orders (max_values: None, max_size: Some(171), added: 2646, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:2 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OrderBook MarketFeederId (r:1 w:0) - /// Proof: OrderBook MarketFeederId (max_values: Some(1), max_size: Some(604), added: 1099, mode: MaxEncodedLen) - /// Storage: OraclePriceFeed FedValues (r:1 w:0) - /// Proof: OraclePriceFeed FedValues (max_values: None, max_size: Some(711), added: 3186, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:4 w:4) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Swaps OrderIdToSwapId (r:1 w:0) - /// Proof: Swaps OrderIdToSwapId (max_values: None, max_size: Some(81), added: 2556, mode: MaxEncodedLen) - /// Storage: OrderBook UserOrders (r:0 w:1) - /// Proof: OrderBook UserOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + /// Storage: `OrderBook::Orders` (r:1 w:1) + /// Proof: `OrderBook::Orders` (`max_values`: None, `max_size`: Some(171), added: 2646, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:2 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OrderBook::MarketFeederId` (r:1 w:0) + /// Proof: `OrderBook::MarketFeederId` (`max_values`: Some(1), `max_size`: Some(604), added: 1099, mode: `MaxEncodedLen`) + /// Storage: `OraclePriceFeed::FedValues` (r:1 w:0) + /// Proof: `OraclePriceFeed::FedValues` (`max_values`: None, `max_size`: Some(711), added: 3186, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:4 w:4) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Swaps::OrderIdToSwapId` (r:1 w:0) + /// Proof: `Swaps::OrderIdToSwapId` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) + /// Storage: `OrderBook::UserOrders` (r:0 w:1) + /// Proof: `OrderBook::UserOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) fn fill_order() -> Weight { // Proof Size summary in bytes: - // Measured: `2137` + // Measured: `1628` // Estimated: `11406` - // Minimum execution time: 163_798_000 picoseconds. - Weight::from_parts(167_515_000, 0) + // Minimum execution time: 148_507_000 picoseconds. + Weight::from_parts(150_471_000, 0) .saturating_add(Weight::from_parts(0, 11406)) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(8)) } - /// Storage: OrderBook MarketFeederId (r:0 w:1) - /// Proof: OrderBook MarketFeederId (max_values: Some(1), max_size: Some(604), added: 1099, mode: MaxEncodedLen) + /// Storage: `OrderBook::MarketFeederId` (r:0 w:1) + /// Proof: `OrderBook::MarketFeederId` (`max_values`: Some(1), `max_size`: Some(604), added: 1099, mode: `MaxEncodedLen`) fn set_market_feeder() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 12_483_000 picoseconds. - Weight::from_parts(13_014_000, 0) + // Minimum execution time: 8_285_000 picoseconds. + Weight::from_parts(8_867_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/development/src/weights/pallet_permissions.rs b/runtime/development/src/weights/pallet_permissions.rs index 9f22845b4a..5f7fd5cc64 100644 --- a/runtime/development/src/weights/pallet_permissions.rs +++ b/runtime/development/src/weights/pallet_permissions.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_permissions` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_permissions // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_permissions.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_permissions.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,82 +31,82 @@ use core::marker::PhantomData; /// Weight functions for `pallet_permissions`. pub struct WeightInfo(PhantomData); impl pallet_permissions::WeightInfo for WeightInfo { - /// Storage: Permissions PermissionCount (r:1 w:1) - /// Proof: Permissions PermissionCount (max_values: None, max_size: Some(46), added: 2521, mode: MaxEncodedLen) - /// Storage: Permissions Permission (r:1 w:1) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) + /// Storage: `Permissions::PermissionCount` (r:1 w:1) + /// Proof: `Permissions::PermissionCount` (`max_values`: None, `max_size`: Some(46), added: 2521, mode: `MaxEncodedLen`) + /// Storage: `Permissions::Permission` (r:1 w:1) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) fn add_as_admin() -> Weight { // Proof Size summary in bytes: // Measured: `3` // Estimated: `3693` - // Minimum execution time: 20_308_000 picoseconds. - Weight::from_parts(21_210_000, 0) + // Minimum execution time: 16_992_000 picoseconds. + Weight::from_parts(17_683_000, 0) .saturating_add(Weight::from_parts(0, 3693)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Permissions Permission (r:2 w:1) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: Permissions PermissionCount (r:1 w:1) - /// Proof: Permissions PermissionCount (max_values: None, max_size: Some(46), added: 2521, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:2 w:1) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `Permissions::PermissionCount` (r:1 w:1) + /// Proof: `Permissions::PermissionCount` (`max_values`: None, `max_size`: Some(46), added: 2521, mode: `MaxEncodedLen`) fn add_as_editor() -> Weight { // Proof Size summary in bytes: // Measured: `162` // Estimated: `6396` - // Minimum execution time: 28_213_000 picoseconds. - Weight::from_parts(28_814_000, 0) + // Minimum execution time: 24_876_000 picoseconds. + Weight::from_parts(25_528_000, 0) .saturating_add(Weight::from_parts(0, 6396)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Permissions PermissionCount (r:1 w:1) - /// Proof: Permissions PermissionCount (max_values: None, max_size: Some(46), added: 2521, mode: MaxEncodedLen) - /// Storage: Permissions Permission (r:1 w:1) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) + /// Storage: `Permissions::PermissionCount` (r:1 w:1) + /// Proof: `Permissions::PermissionCount` (`max_values`: None, `max_size`: Some(46), added: 2521, mode: `MaxEncodedLen`) + /// Storage: `Permissions::Permission` (r:1 w:1) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) fn remove_as_admin() -> Weight { // Proof Size summary in bytes: // Measured: `162` // Estimated: `3693` - // Minimum execution time: 23_554_000 picoseconds. - Weight::from_parts(24_205_000, 0) + // Minimum execution time: 20_128_000 picoseconds. + Weight::from_parts(20_548_000, 0) .saturating_add(Weight::from_parts(0, 3693)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Permissions Permission (r:2 w:1) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: Permissions PermissionCount (r:1 w:1) - /// Proof: Permissions PermissionCount (max_values: None, max_size: Some(46), added: 2521, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:2 w:1) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `Permissions::PermissionCount` (r:1 w:1) + /// Proof: `Permissions::PermissionCount` (`max_values`: None, `max_size`: Some(46), added: 2521, mode: `MaxEncodedLen`) fn remove_as_editor() -> Weight { // Proof Size summary in bytes: // Measured: `256` // Estimated: `6396` - // Minimum execution time: 30_557_000 picoseconds. - Weight::from_parts(31_018_000, 0) + // Minimum execution time: 27_151_000 picoseconds. + Weight::from_parts(27_842_000, 0) .saturating_add(Weight::from_parts(0, 6396)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Permissions Permission (r:1 w:1) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:1) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) fn purge() -> Weight { // Proof Size summary in bytes: // Measured: `146` // Estimated: `3693` - // Minimum execution time: 20_549_000 picoseconds. - Weight::from_parts(20_999_000, 0) + // Minimum execution time: 17_081_000 picoseconds. + Weight::from_parts(17_573_000, 0) .saturating_add(Weight::from_parts(0, 3693)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Permissions Permission (r:1 w:1) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:1) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) fn admin_purge() -> Weight { // Proof Size summary in bytes: // Measured: `146` // Estimated: `3693` - // Minimum execution time: 21_009_000 picoseconds. - Weight::from_parts(21_631_000, 0) + // Minimum execution time: 17_492_000 picoseconds. + Weight::from_parts(18_124_000, 0) .saturating_add(Weight::from_parts(0, 3693)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/development/src/weights/pallet_pool_fees.rs b/runtime/development/src/weights/pallet_pool_fees.rs index ebd7e24a9c..a02e2d1026 100644 --- a/runtime/development/src/weights/pallet_pool_fees.rs +++ b/runtime/development/src/weights/pallet_pool_fees.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_pool_fees` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_pool_fees // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_pool_fees.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_pool_fees.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,122 +31,122 @@ use core::marker::PhantomData; /// Weight functions for `pallet_pool_fees`. pub struct WeightInfo(PhantomData); impl pallet_pool_fees::WeightInfo for WeightInfo { - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: PoolFees LastFeeId (r:1 w:1) - /// Proof: PoolFees LastFeeId (max_values: Some(1), max_size: Some(8), added: 503, 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: PoolSystem NotedChange (r:0 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(3116), added: 5591, mode: MaxEncodedLen) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::LastFeeId` (r:1 w:1) + /// Proof: `PoolFees::LastFeeId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, 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: `PoolSystem::NotedChange` (r:0 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) fn propose_new_fee() -> Weight { // Proof Size summary in bytes: // Measured: `581` // Estimated: `4278` - // Minimum execution time: 42_871_000 picoseconds. - Weight::from_parts(43_642_000, 0) + // Minimum execution time: 35_577_000 picoseconds. + Weight::from_parts(36_578_000, 0) .saturating_add(Weight::from_parts(0, 4278)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: PoolSystem NotedChange (r:1 w:1) - /// Proof: PoolSystem NotedChange (max_values: None, max_size: Some(3116), added: 5591, mode: MaxEncodedLen) - /// Storage: PoolFees FeeIdsToPoolBucket (r:1 w:1) - /// Proof: PoolFees FeeIdsToPoolBucket (max_values: None, max_size: Some(33), added: 2508, mode: MaxEncodedLen) - /// Storage: PoolFees FeeIds (r:1 w:1) - /// Proof: PoolFees FeeIds (max_values: None, max_size: Some(843), added: 3318, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::NotedChange` (r:1 w:1) + /// Proof: `PoolSystem::NotedChange` (`max_values`: None, `max_size`: Some(5184), added: 7659, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::FeeIdsToPoolBucket` (r:1 w:1) + /// Proof: `PoolFees::FeeIdsToPoolBucket` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::FeeIds` (r:1 w:1) + /// Proof: `PoolFees::FeeIds` (`max_values`: None, `max_size`: Some(843), added: 3318, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 99]`. fn apply_new_fee(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1395 + n * (137 ±0)` // Estimated: `17508` - // Minimum execution time: 54_252_000 picoseconds. - Weight::from_parts(54_430_369, 0) + // Minimum execution time: 56_726_000 picoseconds. + Weight::from_parts(57_282_882, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 1_919 - .saturating_add(Weight::from_parts(295_209, 0).saturating_mul(n.into())) + // Standard Error: 1_865 + .saturating_add(Weight::from_parts(289_067, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: PoolFees FeeIdsToPoolBucket (r:1 w:1) - /// Proof: PoolFees FeeIdsToPoolBucket (max_values: None, max_size: Some(33), added: 2508, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) - /// Storage: PoolFees FeeIds (r:1 w:1) - /// Proof: PoolFees FeeIds (max_values: None, max_size: Some(843), added: 3318, mode: MaxEncodedLen) + /// Storage: `PoolFees::FeeIdsToPoolBucket` (r:1 w:1) + /// Proof: `PoolFees::FeeIdsToPoolBucket` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::FeeIds` (r:1 w:1) + /// Proof: `PoolFees::FeeIds` (`max_values`: None, `max_size`: Some(843), added: 3318, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 100]`. fn remove_fee(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `709 + n * (136 ±0)` // Estimated: `17508` - // Minimum execution time: 36_939_000 picoseconds. - Weight::from_parts(37_417_528, 0) + // Minimum execution time: 34_966_000 picoseconds. + Weight::from_parts(37_186_153, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 3_755 - .saturating_add(Weight::from_parts(415_086, 0).saturating_mul(n.into())) + // Standard Error: 3_901 + .saturating_add(Weight::from_parts(428_616, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: PoolFees FeeIdsToPoolBucket (r:1 w:0) - /// Proof: PoolFees FeeIdsToPoolBucket (max_values: None, max_size: Some(33), added: 2508, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) + /// Storage: `PoolFees::FeeIdsToPoolBucket` (r:1 w:0) + /// Proof: `PoolFees::FeeIdsToPoolBucket` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 99]`. fn charge_fee(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `795 + n * (129 ±0)` // Estimated: `17508` - // Minimum execution time: 26_860_000 picoseconds. - Weight::from_parts(26_714_451, 0) + // Minimum execution time: 24_425_000 picoseconds. + Weight::from_parts(24_164_408, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 1_782 - .saturating_add(Weight::from_parts(266_514, 0).saturating_mul(n.into())) + // Standard Error: 2_222 + .saturating_add(Weight::from_parts(262_898, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PoolFees FeeIdsToPoolBucket (r:1 w:0) - /// Proof: PoolFees FeeIdsToPoolBucket (max_values: None, max_size: Some(33), added: 2508, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) + /// Storage: `PoolFees::FeeIdsToPoolBucket` (r:1 w:0) + /// Proof: `PoolFees::FeeIdsToPoolBucket` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 99]`. fn uncharge_fee(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `795 + n * (129 ±0)` // Estimated: `17508` - // Minimum execution time: 26_590_000 picoseconds. - Weight::from_parts(25_909_323, 0) + // Minimum execution time: 23_915_000 picoseconds. + Weight::from_parts(23_620_971, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 2_074 - .saturating_add(Weight::from_parts(264_449, 0).saturating_mul(n.into())) + // Standard Error: 2_185 + .saturating_add(Weight::from_parts(260_376, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: PoolFees PortfolioValuation (r:1 w:1) - /// Proof: PoolFees PortfolioValuation (max_values: None, max_size: Some(4850), added: 7325, 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: PoolFees AssetsUnderManagement (r:1 w:0) - /// Proof: PoolFees AssetsUnderManagement (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::PortfolioValuation` (r:1 w:1) + /// Proof: `PoolFees::PortfolioValuation` (`max_values`: None, `max_size`: Some(4850), added: 7325, 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: `PoolFees::AssetsUnderManagement` (r:1 w:0) + /// Proof: `PoolFees::AssetsUnderManagement` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 100]`. fn update_portfolio_valuation(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `603 + n * (124 ±0)` // Estimated: `17508` - // Minimum execution time: 48_390_000 picoseconds. - Weight::from_parts(41_924_329, 0) + // Minimum execution time: 42_099_000 picoseconds. + Weight::from_parts(39_371_621, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 5_097 - .saturating_add(Weight::from_parts(6_031_986, 0).saturating_mul(n.into())) + // Standard Error: 3_636 + .saturating_add(Weight::from_parts(2_980_612, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/development/src/weights/pallet_pool_registry.rs b/runtime/development/src/weights/pallet_pool_registry.rs index 7e7a0934f9..83b032d6bc 100644 --- a/runtime/development/src/weights/pallet_pool_registry.rs +++ b/runtime/development/src/weights/pallet_pool_registry.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_pool_registry` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_pool_registry // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_pool_registry.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_pool_registry.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,171 +31,171 @@ use core::marker::PhantomData; /// Weight functions for `pallet_pool_registry`. pub struct WeightInfo(PhantomData); impl pallet_pool_registry::WeightInfo for WeightInfo { - /// Storage: PoolRegistry Pools (r:1 w:1) - /// Proof: PoolRegistry Pools (max_values: None, max_size: Some(25), added: 2500, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:6 w:5) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: PoolSystem AccountDeposit (r:1 w:1) - /// Proof: PoolSystem AccountDeposit (max_values: None, max_size: Some(64), added: 2539, 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: PoolFees LastFeeId (r:1 w:1) - /// Proof: PoolFees LastFeeId (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: PoolFees FeeIdsToPoolBucket (r:100 w:100) - /// Proof: PoolFees FeeIdsToPoolBucket (max_values: None, max_size: Some(33), added: 2508, mode: MaxEncodedLen) - /// Storage: PoolFees FeeIds (r:1 w:1) - /// Proof: PoolFees FeeIds (max_values: None, max_size: Some(843), added: 3318, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) - /// Storage: Permissions PermissionCount (r:1 w:1) - /// Proof: Permissions PermissionCount (max_values: None, max_size: Some(46), added: 2521, mode: MaxEncodedLen) - /// Storage: Permissions Permission (r:1 w:1) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: Loans WriteOffPolicy (r:0 w:1) - /// Proof: Loans WriteOffPolicy (max_values: None, max_size: Some(535), added: 3010, mode: MaxEncodedLen) - /// Storage: PoolSystem PoolDeposit (r:0 w:1) - /// Proof: PoolSystem PoolDeposit (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: `PoolRegistry::Pools` (r:1 w:1) + /// Proof: `PoolRegistry::Pools` (`max_values`: None, `max_size`: Some(25), added: 2500, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:6 w:5) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::AccountDeposit` (r:1 w:1) + /// Proof: `PoolSystem::AccountDeposit` (`max_values`: None, `max_size`: Some(64), added: 2539, 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: `PoolFees::LastFeeId` (r:1 w:1) + /// Proof: `PoolFees::LastFeeId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::FeeIdsToPoolBucket` (r:100 w:100) + /// Proof: `PoolFees::FeeIdsToPoolBucket` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::FeeIds` (r:1 w:1) + /// Proof: `PoolFees::FeeIds` (`max_values`: None, `max_size`: Some(843), added: 3318, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) + /// Storage: `Permissions::PermissionCount` (r:1 w:1) + /// Proof: `Permissions::PermissionCount` (`max_values`: None, `max_size`: Some(46), added: 2521, mode: `MaxEncodedLen`) + /// Storage: `Permissions::Permission` (r:1 w:1) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `Loans::WriteOffPolicy` (r:0 w:1) + /// Proof: `Loans::WriteOffPolicy` (`max_values`: None, `max_size`: Some(5126), added: 7601, mode: `MaxEncodedLen`) + /// Storage: `PoolRegistry::PoolMetadata` (r:0 w:1) + /// Proof: `PoolRegistry::PoolMetadata` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::PoolDeposit` (r:0 w:1) + /// Proof: `PoolSystem::PoolDeposit` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[0, 100]`. fn register(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `757 + n * (5 ±0)` - // Estimated: `17508 + m * (2508 ±0) + n * (2479 ±0)` - // Minimum execution time: 199_996_000 picoseconds. - Weight::from_parts(80_455_940, 0) + // Measured: `595` + // Estimated: `17508 + m * (2508 ±0) + n * (3417 ±0)` + // Minimum execution time: 207_187_000 picoseconds. + Weight::from_parts(134_932_487, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 89_402 - .saturating_add(Weight::from_parts(27_223_509, 0).saturating_mul(m.into())) + // Standard Error: 83_180 + .saturating_add(Weight::from_parts(24_022_038, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into()))) - .saturating_add(T::DbWeight::get().writes(11)) + .saturating_add(T::DbWeight::get().writes(12)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m.into()))) .saturating_add(Weight::from_parts(0, 2508).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 2479).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 3417).saturating_mul(n.into())) } - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: PoolSystem EpochExecution (r:1 w:0) - /// Proof: PoolSystem EpochExecution (max_values: None, max_size: Some(754), added: 3229, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, 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: Investments ActiveRedeemOrders (r:5 w:0) - /// Proof: Investments ActiveRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:0) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) - /// Storage: PoolSystem ScheduledUpdate (r:0 w:1) - /// Proof: PoolSystem ScheduledUpdate (max_values: None, max_size: Some(1019), added: 3494, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::EpochExecution` (r:1 w:0) + /// Proof: `PoolSystem::EpochExecution` (`max_values`: None, `max_size`: Some(754), added: 3229, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, 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: `Investments::ActiveRedeemOrders` (r:5 w:0) + /// Proof: `Investments::ActiveRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:0) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::ScheduledUpdate` (r:0 w:1) + /// Proof: `PoolSystem::ScheduledUpdate` (`max_values`: None, `max_size`: Some(1504), added: 3979, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[0, 100]`. fn update_no_execution(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `957 + m * (124 ±0) + n * (133 ±0)` // Estimated: `17508 + n * (2531 ±0)` - // Minimum execution time: 64_161_000 picoseconds. - Weight::from_parts(57_081_855, 0) + // Minimum execution time: 60_493_000 picoseconds. + Weight::from_parts(50_920_021, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 38_438 - .saturating_add(Weight::from_parts(2_932_779, 0).saturating_mul(n.into())) - // Standard Error: 1_754 - .saturating_add(Weight::from_parts(216_729, 0).saturating_mul(m.into())) + // Standard Error: 34_654 + .saturating_add(Weight::from_parts(2_983_125, 0).saturating_mul(n.into())) + // Standard Error: 1_581 + .saturating_add(Weight::from_parts(208_639, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 2531).saturating_mul(n.into())) } - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: PoolSystem EpochExecution (r:1 w:0) - /// Proof: PoolSystem EpochExecution (max_values: None, max_size: Some(754), added: 3229, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, 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: Investments ActiveRedeemOrders (r:5 w:0) - /// Proof: Investments ActiveRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:2 w:1) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: PoolFees ActiveFees (r:1 w:0) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) - /// Storage: PoolSystem ScheduledUpdate (r:0 w:1) - /// Proof: PoolSystem ScheduledUpdate (max_values: None, max_size: Some(1019), added: 3494, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::EpochExecution` (r:1 w:0) + /// Proof: `PoolSystem::EpochExecution` (`max_values`: None, `max_size`: Some(754), added: 3229, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, 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: `Investments::ActiveRedeemOrders` (r:5 w:0) + /// Proof: `Investments::ActiveRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:5 w:1) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:0) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::ScheduledUpdate` (r:0 w:1) + /// Proof: `PoolSystem::ScheduledUpdate` (`max_values`: None, `max_size`: Some(1504), added: 3979, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[0, 100]`. fn update_and_execute(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1178 + m * (124 ±0) + n * (155 ±0)` - // Estimated: `17508 + m * (124 ±0) + n * (2531 ±0)` - // Minimum execution time: 118_332_000 picoseconds. - Weight::from_parts(87_721_649, 0) + // Measured: `960 + m * (124 ±0) + n * (200 ±0)` + // Estimated: `17508 + n * (3417 ±0)` + // Minimum execution time: 100_818_000 picoseconds. + Weight::from_parts(70_751_268, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 40_220 - .saturating_add(Weight::from_parts(10_041_182, 0).saturating_mul(n.into())) - // Standard Error: 1_835 - .saturating_add(Weight::from_parts(227_595, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) + // Standard Error: 41_555 + .saturating_add(Weight::from_parts(10_532_795, 0).saturating_mul(n.into())) + // Standard Error: 1_896 + .saturating_add(Weight::from_parts(220_140, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 124).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 2531).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 3417).saturating_mul(n.into())) } - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: PoolSystem EpochExecution (r:1 w:0) - /// Proof: PoolSystem EpochExecution (max_values: None, max_size: Some(754), added: 3229, mode: MaxEncodedLen) - /// Storage: PoolSystem ScheduledUpdate (r:1 w:1) - /// Proof: PoolSystem ScheduledUpdate (max_values: None, max_size: Some(1019), added: 3494, 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: Investments ActiveRedeemOrders (r:5 w:0) - /// Proof: Investments ActiveRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:2 w:1) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: PoolFees ActiveFees (r:1 w:0) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::EpochExecution` (r:1 w:0) + /// Proof: `PoolSystem::EpochExecution` (`max_values`: None, `max_size`: Some(754), added: 3229, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::ScheduledUpdate` (r:1 w:1) + /// Proof: `PoolSystem::ScheduledUpdate` (`max_values`: None, `max_size`: Some(1504), added: 3979, 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: `Investments::ActiveRedeemOrders` (r:5 w:0) + /// Proof: `Investments::ActiveRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:5 w:1) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:0) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[0, 100]`. fn execute_update(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1169 + m * (124 ±0) + n * (181 ±0)` - // Estimated: `17508 + m * (124 ±0) + n * (2531 ±0)` - // Minimum execution time: 105_027_000 picoseconds. - Weight::from_parts(74_405_248, 0) + // Measured: `948 + m * (124 ±0) + n * (227 ±0)` + // Estimated: `17508 + n * (3417 ±0)` + // Minimum execution time: 92_523_000 picoseconds. + Weight::from_parts(62_401_403, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 38_428 - .saturating_add(Weight::from_parts(10_332_690, 0).saturating_mul(n.into())) - // Standard Error: 1_753 - .saturating_add(Weight::from_parts(225_564, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) + // Standard Error: 45_703 + .saturating_add(Weight::from_parts(11_004_977, 0).saturating_mul(n.into())) + // Standard Error: 2_085 + .saturating_add(Weight::from_parts(214_718, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 124).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 2531).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 3417).saturating_mul(n.into())) } - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: PoolRegistry PoolMetadata (r:0 w:1) - /// Proof: PoolRegistry PoolMetadata (max_values: None, max_size: Some(71), added: 2546, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolRegistry::PoolMetadata` (r:0 w:1) + /// Proof: `PoolRegistry::PoolMetadata` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 46]`. /// The range of component `m` is `[0, 100]`. fn set_metadata(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `146` // Estimated: `3693` - // Minimum execution time: 22_473_000 picoseconds. - Weight::from_parts(22_771_703, 0) + // Minimum execution time: 18_926_000 picoseconds. + Weight::from_parts(19_576_499, 0) .saturating_add(Weight::from_parts(0, 3693)) - // Standard Error: 687 - .saturating_add(Weight::from_parts(11_218, 0).saturating_mul(n.into())) - // Standard Error: 319 - .saturating_add(Weight::from_parts(28_624, 0).saturating_mul(m.into())) + // Standard Error: 670 + .saturating_add(Weight::from_parts(8_248, 0).saturating_mul(n.into())) + // Standard Error: 311 + .saturating_add(Weight::from_parts(21_318, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/development/src/weights/pallet_pool_system.rs b/runtime/development/src/weights/pallet_pool_system.rs index 71093e4310..abf51c4efc 100644 --- a/runtime/development/src/weights/pallet_pool_system.rs +++ b/runtime/development/src/weights/pallet_pool_system.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_pool_system` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_pool_system // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_pool_system.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_pool_system.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,253 +31,259 @@ use core::marker::PhantomData; /// Weight functions for `pallet_pool_system`. pub struct WeightInfo(PhantomData); impl pallet_pool_system::WeightInfo for WeightInfo { - /// Storage: Permissions Permission (r:1 w:0) - /// Proof: Permissions Permission (max_values: None, max_size: Some(228), added: 2703, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) /// The range of component `m` is `[0, 100]`. fn set_max_reserve(m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `592` + // Measured: `554` // Estimated: `4278` - // Minimum execution time: 28_233_000 picoseconds. - Weight::from_parts(28_951_685, 0) + // Minimum execution time: 24_495_000 picoseconds. + Weight::from_parts(25_394_511, 0) .saturating_add(Weight::from_parts(0, 4278)) - // Standard Error: 408 - .saturating_add(Weight::from_parts(28_142, 0).saturating_mul(m.into())) + // Standard Error: 442 + .saturating_add(Weight::from_parts(28_512, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: PoolSystem EpochExecution (r:1 w:0) - /// Proof: PoolSystem EpochExecution (max_values: None, max_size: Some(754), added: 3229, 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 PortfolioValuation (r:1 w:0) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: PoolFees PortfolioValuation (r:1 w:1) - /// Proof: PoolFees PortfolioValuation (max_values: None, max_size: Some(4850), added: 7325, mode: MaxEncodedLen) - /// Storage: PoolFees AssetsUnderManagement (r:1 w:1) - /// Proof: PoolFees AssetsUnderManagement (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) - /// Storage: OrmlTokens TotalIssuance (r:5 w:0) - /// Proof: OrmlTokens TotalIssuance (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) - /// Storage: Investments ActiveInvestOrders (r:5 w:5) - /// Proof: Investments ActiveInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InProcessingInvestOrders (r:5 w:5) - /// Proof: Investments InProcessingInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InvestOrderId (r:5 w:5) - /// Proof: Investments InvestOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Investments ActiveRedeemOrders (r:5 w:5) - /// Proof: Investments ActiveRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InProcessingRedeemOrders (r:5 w:5) - /// Proof: Investments InProcessingRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments RedeemOrderId (r:5 w:5) - /// Proof: Investments RedeemOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:5 w:0) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: Investments ClearedInvestOrders (r:0 w:5) - /// Proof: Investments ClearedInvestOrders (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen) - /// Storage: Investments ClearedRedeemOrders (r:0 w:5) - /// Proof: Investments ClearedRedeemOrders (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::EpochExecution` (r:1 w:0) + /// Proof: `PoolSystem::EpochExecution` (`max_values`: None, `max_size`: Some(754), added: 3229, 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::PortfolioValuation` (r:1 w:0) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::PortfolioValuation` (r:1 w:1) + /// Proof: `PoolFees::PortfolioValuation` (`max_values`: None, `max_size`: Some(4850), added: 7325, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::AssetsUnderManagement` (r:1 w:1) + /// Proof: `PoolFees::AssetsUnderManagement` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::TotalIssuance` (r:5 w:0) + /// Proof: `OrmlTokens::TotalIssuance` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveInvestOrders` (r:5 w:5) + /// Proof: `Investments::ActiveInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InProcessingInvestOrders` (r:5 w:5) + /// Proof: `Investments::InProcessingInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InvestOrderId` (r:5 w:5) + /// Proof: `Investments::InvestOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveRedeemOrders` (r:5 w:5) + /// Proof: `Investments::ActiveRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InProcessingRedeemOrders` (r:5 w:5) + /// Proof: `Investments::InProcessingRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::RedeemOrderId` (r:5 w:5) + /// Proof: `Investments::RedeemOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:5 w:0) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `Investments::ClearedInvestOrders` (r:0 w:5) + /// Proof: `Investments::ClearedInvestOrders` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) + /// Storage: `Investments::ClearedRedeemOrders` (r:0 w:5) + /// Proof: `Investments::ClearedRedeemOrders` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[1, 100]`. fn close_epoch_no_orders(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1425 + m * (124 ±0) + n * (175 ±0)` + // Measured: `1216 + m * (124 ±0) + n * (133 ±0)` // Estimated: `27515 + n * (2604 ±0)` - // Minimum execution time: 488_026_000 picoseconds. - Weight::from_parts(85_726_776, 0) + // Minimum execution time: 436_896_000 picoseconds. + Weight::from_parts(81_585_373, 0) .saturating_add(Weight::from_parts(0, 27515)) - // Standard Error: 167_057 - .saturating_add(Weight::from_parts(80_462_577, 0).saturating_mul(n.into())) - // Standard Error: 7_715 - .saturating_add(Weight::from_parts(6_333_393, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(7)) + // Standard Error: 123_362 + .saturating_add(Weight::from_parts(71_083_398, 0).saturating_mul(n.into())) + // Standard Error: 5_697 + .saturating_add(Weight::from_parts(3_386_226, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().reads((8_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((8_u64).saturating_mul(n.into()))) .saturating_add(Weight::from_parts(0, 2604).saturating_mul(n.into())) } - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: PoolSystem EpochExecution (r:1 w:1) - /// Proof: PoolSystem EpochExecution (max_values: None, max_size: Some(754), added: 3229, 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 PortfolioValuation (r:1 w:0) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: PoolFees PortfolioValuation (r:1 w:1) - /// Proof: PoolFees PortfolioValuation (max_values: None, max_size: Some(4850), added: 7325, mode: MaxEncodedLen) - /// Storage: PoolFees AssetsUnderManagement (r:1 w:1) - /// Proof: PoolFees AssetsUnderManagement (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) - /// Storage: OrmlTokens TotalIssuance (r:5 w:0) - /// Proof: OrmlTokens TotalIssuance (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) - /// Storage: Investments ActiveInvestOrders (r:5 w:5) - /// Proof: Investments ActiveInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InProcessingInvestOrders (r:5 w:5) - /// Proof: Investments InProcessingInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InvestOrderId (r:5 w:5) - /// Proof: Investments InvestOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Investments ActiveRedeemOrders (r:5 w:5) - /// Proof: Investments ActiveRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InProcessingRedeemOrders (r:5 w:5) - /// Proof: Investments InProcessingRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments RedeemOrderId (r:5 w:5) - /// Proof: Investments RedeemOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::EpochExecution` (r:1 w:1) + /// Proof: `PoolSystem::EpochExecution` (`max_values`: None, `max_size`: Some(754), added: 3229, 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::PortfolioValuation` (r:1 w:0) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::PortfolioValuation` (r:1 w:1) + /// Proof: `PoolFees::PortfolioValuation` (`max_values`: None, `max_size`: Some(4850), added: 7325, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::AssetsUnderManagement` (r:1 w:1) + /// Proof: `PoolFees::AssetsUnderManagement` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::TotalIssuance` (r:5 w:0) + /// Proof: `OrmlTokens::TotalIssuance` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveInvestOrders` (r:5 w:5) + /// Proof: `Investments::ActiveInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InProcessingInvestOrders` (r:5 w:5) + /// Proof: `Investments::InProcessingInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InvestOrderId` (r:5 w:5) + /// Proof: `Investments::InvestOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveRedeemOrders` (r:5 w:5) + /// Proof: `Investments::ActiveRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InProcessingRedeemOrders` (r:5 w:5) + /// Proof: `Investments::InProcessingRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::RedeemOrderId` (r:5 w:5) + /// Proof: `Investments::RedeemOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[0, 100]`. fn close_epoch_no_execution(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1276 + m * (124 ±0) + n * (133 ±0)` + // Measured: `1428 + m * (124 ±0) + n * (133 ±0)` // Estimated: `27515 + n * (2531 ±0)` - // Minimum execution time: 247_905_000 picoseconds. - Weight::from_parts(89_711_306, 0) + // Minimum execution time: 223_157_000 picoseconds. + Weight::from_parts(91_267_466, 0) .saturating_add(Weight::from_parts(0, 27515)) - // Standard Error: 122_857 - .saturating_add(Weight::from_parts(32_966_523, 0).saturating_mul(n.into())) - // Standard Error: 5_606 - .saturating_add(Weight::from_parts(6_104_967, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(7)) + // Standard Error: 84_017 + .saturating_add(Weight::from_parts(27_905_302, 0).saturating_mul(n.into())) + // Standard Error: 3_834 + .saturating_add(Weight::from_parts(3_184_077, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(5)) .saturating_add(T::DbWeight::get().writes((6_u64).saturating_mul(n.into()))) .saturating_add(Weight::from_parts(0, 2531).saturating_mul(n.into())) } - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: PoolSystem EpochExecution (r:1 w:0) - /// Proof: PoolSystem EpochExecution (max_values: None, max_size: Some(754), added: 3229, 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 PortfolioValuation (r:1 w:0) - /// Proof: Loans PortfolioValuation (max_values: None, max_size: Some(24050), added: 26525, mode: MaxEncodedLen) - /// Storage: PoolFees PortfolioValuation (r:1 w:1) - /// Proof: PoolFees PortfolioValuation (max_values: None, max_size: Some(4850), added: 7325, mode: MaxEncodedLen) - /// Storage: PoolFees AssetsUnderManagement (r:1 w:1) - /// Proof: PoolFees AssetsUnderManagement (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) - /// Storage: OrmlTokens TotalIssuance (r:5 w:1) - /// Proof: OrmlTokens TotalIssuance (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) - /// Storage: Investments ActiveInvestOrders (r:5 w:5) - /// Proof: Investments ActiveInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InProcessingInvestOrders (r:5 w:5) - /// Proof: Investments InProcessingInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InvestOrderId (r:5 w:5) - /// Proof: Investments InvestOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Investments ActiveRedeemOrders (r:5 w:5) - /// Proof: Investments ActiveRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InProcessingRedeemOrders (r:5 w:5) - /// Proof: Investments InProcessingRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments RedeemOrderId (r:5 w:5) - /// Proof: Investments RedeemOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:7 w:3) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:2 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Investments ClearedInvestOrders (r:0 w:5) - /// Proof: Investments ClearedInvestOrders (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen) - /// Storage: Investments ClearedRedeemOrders (r:0 w:5) - /// Proof: Investments ClearedRedeemOrders (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::EpochExecution` (r:1 w:0) + /// Proof: `PoolSystem::EpochExecution` (`max_values`: None, `max_size`: Some(754), added: 3229, 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::PortfolioValuation` (r:1 w:0) + /// Proof: `Loans::PortfolioValuation` (`max_values`: None, `max_size`: Some(24050), added: 26525, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::PortfolioValuation` (r:1 w:1) + /// Proof: `PoolFees::PortfolioValuation` (`max_values`: None, `max_size`: Some(4850), added: 7325, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::AssetsUnderManagement` (r:1 w:1) + /// Proof: `PoolFees::AssetsUnderManagement` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::TotalIssuance` (r:5 w:1) + /// Proof: `OrmlTokens::TotalIssuance` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveInvestOrders` (r:5 w:5) + /// Proof: `Investments::ActiveInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InProcessingInvestOrders` (r:5 w:5) + /// Proof: `Investments::InProcessingInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InvestOrderId` (r:5 w:5) + /// Proof: `Investments::InvestOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveRedeemOrders` (r:5 w:5) + /// Proof: `Investments::ActiveRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InProcessingRedeemOrders` (r:5 w:5) + /// Proof: `Investments::InProcessingRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::RedeemOrderId` (r:5 w:5) + /// Proof: `Investments::RedeemOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:7 w:3) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:2 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Investments::ClearedInvestOrders` (r:0 w:5) + /// Proof: `Investments::ClearedInvestOrders` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) + /// Storage: `Investments::ClearedRedeemOrders` (r:0 w:5) + /// Proof: `Investments::ClearedRedeemOrders` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[0, 100]`. fn close_epoch_execute(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2462 + m * (124 ±0) + n * (197 ±0)` - // Estimated: `27515 + m * (124 ±0) + n * (2604 ±0)` - // Minimum execution time: 599_265_000 picoseconds. - Weight::from_parts(196_920_651, 0) + // Measured: `2120 + m * (124 ±0) + n * (167 ±0)` + // Estimated: `27515 + n * (2604 ±0)` + // Minimum execution time: 531_753_000 picoseconds. + Weight::from_parts(177_037_674, 0) .saturating_add(Weight::from_parts(0, 27515)) - // Standard Error: 174_251 - .saturating_add(Weight::from_parts(83_251_293, 0).saturating_mul(n.into())) - // Standard Error: 7_951 - .saturating_add(Weight::from_parts(6_318_897, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(13)) + // Standard Error: 151_845 + .saturating_add(Weight::from_parts(73_612_531, 0).saturating_mul(n.into())) + // Standard Error: 6_929 + .saturating_add(Weight::from_parts(3_395_975, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(14)) .saturating_add(T::DbWeight::get().reads((8_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(10)) .saturating_add(T::DbWeight::get().writes((8_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_parts(0, 124).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 2604).saturating_mul(n.into())) } - /// Storage: PoolSystem EpochExecution (r:1 w:1) - /// Proof: PoolSystem EpochExecution (max_values: None, max_size: Some(754), added: 3229, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:0) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:0) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) + /// Storage: `PoolSystem::EpochExecution` (r:1 w:1) + /// Proof: `PoolSystem::EpochExecution` (`max_values`: None, `max_size`: Some(754), added: 3229, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:0) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:0) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[0, 100]`. fn submit_solution(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `821 + m * (124 ±0) + n * (249 ±0)` // Estimated: `17508` - // Minimum execution time: 41_467_000 picoseconds. - Weight::from_parts(36_167_525, 0) + // Minimum execution time: 39_494_000 picoseconds. + Weight::from_parts(34_485_549, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 32_450 - .saturating_add(Weight::from_parts(1_545_250, 0).saturating_mul(n.into())) - // Standard Error: 1_480 - .saturating_add(Weight::from_parts(202_119, 0).saturating_mul(m.into())) + // Standard Error: 33_558 + .saturating_add(Weight::from_parts(1_408_318, 0).saturating_mul(n.into())) + // Standard Error: 1_531 + .saturating_add(Weight::from_parts(202_749, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PoolSystem EpochExecution (r:1 w:1) - /// Proof: PoolSystem EpochExecution (max_values: None, max_size: Some(754), added: 3229, mode: MaxEncodedLen) - /// Storage: PoolSystem Pool (r:1 w:1) - /// Proof: PoolSystem Pool (max_values: None, max_size: Some(813), added: 3288, mode: MaxEncodedLen) - /// Storage: PoolFees ActiveFees (r:1 w:1) - /// Proof: PoolFees ActiveFees (max_values: None, max_size: Some(14043), added: 16518, mode: MaxEncodedLen) - /// Storage: Investments InProcessingInvestOrders (r:5 w:5) - /// Proof: Investments InProcessingInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:7 w:3) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:2 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: OrmlTokens TotalIssuance (r:1 w:1) - /// Proof: OrmlTokens TotalIssuance (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) - /// Storage: Investments InvestOrderId (r:5 w:0) - /// Proof: Investments InvestOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Investments ActiveInvestOrders (r:5 w:5) - /// Proof: Investments ActiveInvestOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments InProcessingRedeemOrders (r:5 w:5) - /// Proof: Investments InProcessingRedeemOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Investments RedeemOrderId (r:5 w:0) - /// Proof: Investments RedeemOrderId (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Investments ActiveRedeemOrders (r:5 w:5) - /// Proof: Investments ActiveRedeemOrders (max_values: None, max_size: Some(56), added: 2531, 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: Investments ClearedInvestOrders (r:0 w:5) - /// Proof: Investments ClearedInvestOrders (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen) - /// Storage: Investments ClearedRedeemOrders (r:0 w:5) - /// Proof: Investments ClearedRedeemOrders (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen) + /// Storage: `Permissions::Permission` (r:1 w:0) + /// Proof: `Permissions::Permission` (`max_values`: None, `max_size`: Some(228), added: 2703, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::EpochExecution` (r:1 w:1) + /// Proof: `PoolSystem::EpochExecution` (`max_values`: None, `max_size`: Some(754), added: 3229, mode: `MaxEncodedLen`) + /// Storage: `PoolSystem::Pool` (r:1 w:1) + /// Proof: `PoolSystem::Pool` (`max_values`: None, `max_size`: Some(813), added: 3288, mode: `MaxEncodedLen`) + /// Storage: `PoolFees::ActiveFees` (r:1 w:1) + /// Proof: `PoolFees::ActiveFees` (`max_values`: None, `max_size`: Some(14043), added: 16518, mode: `MaxEncodedLen`) + /// Storage: `Investments::InProcessingInvestOrders` (r:5 w:5) + /// Proof: `Investments::InProcessingInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:7 w:3) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:2 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::TotalIssuance` (r:1 w:1) + /// Proof: `OrmlTokens::TotalIssuance` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `Investments::InvestOrderId` (r:5 w:0) + /// Proof: `Investments::InvestOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveInvestOrders` (r:5 w:5) + /// Proof: `Investments::ActiveInvestOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::InProcessingRedeemOrders` (r:5 w:5) + /// Proof: `Investments::InProcessingRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Investments::RedeemOrderId` (r:5 w:0) + /// Proof: `Investments::RedeemOrderId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Investments::ActiveRedeemOrders` (r:5 w:5) + /// Proof: `Investments::ActiveRedeemOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, 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: `Investments::ClearedInvestOrders` (r:0 w:5) + /// Proof: `Investments::ClearedInvestOrders` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) + /// Storage: `Investments::ClearedRedeemOrders` (r:0 w:5) + /// Proof: `Investments::ClearedRedeemOrders` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 5]`. /// The range of component `m` is `[0, 100]`. fn execute_epoch(n: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2359 + m * (124 ±0) + n * (671 ±0)` - // Estimated: `17508 + m * (124 ±0) + n * (2604 ±0)` - // Minimum execution time: 255_491_000 picoseconds. - Weight::from_parts(159_932_357, 0) + // Measured: `2042 + m * (124 ±0) + n * (633 ±0)` + // Estimated: `17508 + n * (2604 ±0)` + // Minimum execution time: 241_661_000 picoseconds. + Weight::from_parts(150_024_240, 0) .saturating_add(Weight::from_parts(0, 17508)) - // Standard Error: 116_803 - .saturating_add(Weight::from_parts(61_351_628, 0).saturating_mul(n.into())) - // Standard Error: 5_330 - .saturating_add(Weight::from_parts(392_140, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(11)) + // Standard Error: 92_293 + .saturating_add(Weight::from_parts(55_452_128, 0).saturating_mul(n.into())) + // Standard Error: 4_211 + .saturating_add(Weight::from_parts(392_999, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(9)) .saturating_add(T::DbWeight::get().writes((6_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_parts(0, 124).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 2604).saturating_mul(n.into())) } } diff --git a/runtime/development/src/weights/pallet_preimage.rs b/runtime/development/src/weights/pallet_preimage.rs index b83edd57e2..f7f83d8228 100644 --- a/runtime/development/src/weights/pallet_preimage.rs +++ b/runtime/development/src/weights/pallet_preimage.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_preimage` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_preimage // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_preimage.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_preimage.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,173 +31,219 @@ use core::marker::PhantomData; /// Weight functions for `pallet_preimage`. pub struct WeightInfo(PhantomData); impl pallet_preimage::WeightInfo for WeightInfo { - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Preimage PreimageFor (r:0 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 4194304]`. fn note_preimage(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `178` - // Estimated: `3556` - // Minimum execution time: 41_548_000 picoseconds. - Weight::from_parts(547_954_960, 0) - .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 17 - .saturating_add(Weight::from_parts(2_012, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `76` + // Estimated: `3568` + // Minimum execution time: 67_957_000 picoseconds. + Weight::from_parts(68_688_000, 0) + .saturating_add(Weight::from_parts(0, 3568)) + // Standard Error: 10 + .saturating_add(Weight::from_parts(2_734, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Preimage PreimageFor (r:0 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 4194304]`. fn note_requested_preimage(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3556` - // Minimum execution time: 22_382_000 picoseconds. - Weight::from_parts(22_813_000, 0) + // Minimum execution time: 22_232_000 picoseconds. + Weight::from_parts(22_442_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 4 - .saturating_add(Weight::from_parts(2_665, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) + // Standard Error: 9 + .saturating_add(Weight::from_parts(2_861, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Preimage PreimageFor (r:0 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 4194304]`. fn note_no_deposit_preimage(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3556` - // Minimum execution time: 21_560_000 picoseconds. - Weight::from_parts(59_253_289, 0) + // Minimum execution time: 21_240_000 picoseconds. + Weight::from_parts(21_380_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 8 - .saturating_add(Weight::from_parts(2_620, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) + // Standard Error: 10 + .saturating_add(Weight::from_parts(2_811, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Preimage PreimageFor (r:0 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) fn unnote_preimage() -> Weight { // Proof Size summary in bytes: - // Measured: `324` - // Estimated: `3556` - // Minimum execution time: 47_720_000 picoseconds. - Weight::from_parts(50_585_000, 0) - .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `277` + // Estimated: `3568` + // Minimum execution time: 67_567_000 picoseconds. + Weight::from_parts(71_203_000, 0) + .saturating_add(Weight::from_parts(0, 3568)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Preimage PreimageFor (r:0 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) fn unnote_no_deposit_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `178` // Estimated: `3556` - // Minimum execution time: 27_011_000 picoseconds. - Weight::from_parts(31_429_000, 0) + // Minimum execution time: 29_836_000 picoseconds. + Weight::from_parts(31_940_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn request_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `222` // Estimated: `3556` - // Minimum execution time: 23_394_000 picoseconds. - Weight::from_parts(28_213_000, 0) + // Minimum execution time: 22_872_000 picoseconds. + Weight::from_parts(24_416_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn request_no_deposit_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `178` // Estimated: `3556` - // Minimum execution time: 13_114_000 picoseconds. - Weight::from_parts(14_517_000, 0) + // Minimum execution time: 17_282_000 picoseconds. + Weight::from_parts(18_875_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn request_unnoted_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3556` - // Minimum execution time: 19_617_000 picoseconds. - Weight::from_parts(20_849_000, 0) + // Minimum execution time: 18_846_000 picoseconds. + Weight::from_parts(19_627_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn request_requested_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3556` - // Minimum execution time: 11_482_000 picoseconds. - Weight::from_parts(11_903_000, 0) + // Minimum execution time: 13_816_000 picoseconds. + Weight::from_parts(14_387_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - /// Storage: Preimage PreimageFor (r:0 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) fn unrequest_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `178` // Estimated: `3556` - // Minimum execution time: 26_269_000 picoseconds. - Weight::from_parts(30_888_000, 0) + // Minimum execution time: 25_207_000 picoseconds. + Weight::from_parts(26_880_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn unrequest_unnoted_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3556` - // Minimum execution time: 11_612_000 picoseconds. - Weight::from_parts(12_053_000, 0) + // Minimum execution time: 13_846_000 picoseconds. + Weight::from_parts(14_167_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) fn unrequest_multi_referenced_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `3556` - // Minimum execution time: 11_431_000 picoseconds. - Weight::from_parts(11_793_000, 0) + // Minimum execution time: 13_835_000 picoseconds. + Weight::from_parts(14_246_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - - fn ensure_updated(_: u32) -> cumulus_primitives_core::Weight { - Weight::default() - } + /// Storage: `Preimage::StatusFor` (r:1023 w:1023) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1023 w:1023) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1023 w:1023) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:0 w:1023) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// The range of component `n` is `[1, 1024]`. + fn ensure_updated(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `404 + n * (227 ±0)` + // Estimated: `990 + n * (2603 ±0)` + // Minimum execution time: 77_144_000 picoseconds. + Weight::from_parts(77_675_000, 0) + .saturating_add(Weight::from_parts(0, 990)) + // Standard Error: 35_892 + .saturating_add(Weight::from_parts(75_015_178, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(n.into()))) + .saturating_add(Weight::from_parts(0, 2603).saturating_mul(n.into())) + } } diff --git a/runtime/development/src/weights/pallet_proxy.rs b/runtime/development/src/weights/pallet_proxy.rs index 63d6da424a..416c369eb9 100644 --- a/runtime/development/src/weights/pallet_proxy.rs +++ b/runtime/development/src/weights/pallet_proxy.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_proxy` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_proxy // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_proxy.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_proxy.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,172 +31,172 @@ use core::marker::PhantomData; /// Weight functions for `pallet_proxy`. pub struct WeightInfo(PhantomData); impl pallet_proxy::WeightInfo for WeightInfo { - /// Storage: Proxy Proxies (r:1 w:0) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:0) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn proxy(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `293 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 22_021_000 picoseconds. - Weight::from_parts(22_864_348, 0) + // Minimum execution time: 18_384_000 picoseconds. + Weight::from_parts(19_097_838, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_185 - .saturating_add(Weight::from_parts(52_255, 0).saturating_mul(p.into())) + // Standard Error: 1_242 + .saturating_add(Weight::from_parts(47_304, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) } - /// Storage: Proxy Proxies (r:1 w:0) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) - /// Storage: Proxy Announcements (r:1 w:1) - /// Proof: Proxy Announcements (max_values: None, max_size: Some(2233), added: 4708, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:0) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) + /// Storage: `Proxy::Announcements` (r:1 w:1) + /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn proxy_announced(a: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `620 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5698` - // Minimum execution time: 51_607_000 picoseconds. - Weight::from_parts(51_796_899, 0) + // Minimum execution time: 48_761_000 picoseconds. + Weight::from_parts(49_720_241, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 2_325 - .saturating_add(Weight::from_parts(230_433, 0).saturating_mul(a.into())) - // Standard Error: 2_402 - .saturating_add(Weight::from_parts(35_401, 0).saturating_mul(p.into())) + // Standard Error: 4_236 + .saturating_add(Weight::from_parts(198_243, 0).saturating_mul(a.into())) + // Standard Error: 4_377 + .saturating_add(Weight::from_parts(27_827, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Proxy Announcements (r:1 w:1) - /// Proof: Proxy Announcements (max_values: None, max_size: Some(2233), added: 4708, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Proxy::Announcements` (r:1 w:1) + /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn remove_announcement(a: u32, _p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `535 + a * (68 ±0)` // Estimated: `5698` - // Minimum execution time: 33_192_000 picoseconds. - Weight::from_parts(34_247_959, 0) + // Minimum execution time: 31_219_000 picoseconds. + Weight::from_parts(32_252_523, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 2_051 - .saturating_add(Weight::from_parts(211_748, 0).saturating_mul(a.into())) + // Standard Error: 1_985 + .saturating_add(Weight::from_parts(226_389, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Proxy Announcements (r:1 w:1) - /// Proof: Proxy Announcements (max_values: None, max_size: Some(2233), added: 4708, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Proxy::Announcements` (r:1 w:1) + /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn reject_announcement(a: u32, _p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `535 + a * (68 ±0)` // Estimated: `5698` - // Minimum execution time: 32_881_000 picoseconds. - Weight::from_parts(34_081_692, 0) + // Minimum execution time: 30_968_000 picoseconds. + Weight::from_parts(32_225_799, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 2_117 - .saturating_add(Weight::from_parts(214_356, 0).saturating_mul(a.into())) + // Standard Error: 1_898 + .saturating_add(Weight::from_parts(222_682, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Proxy Proxies (r:1 w:0) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) - /// Storage: Proxy Announcements (r:1 w:1) - /// Proof: Proxy Announcements (max_values: None, max_size: Some(2233), added: 4708, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:0) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) + /// Storage: `Proxy::Announcements` (r:1 w:1) + /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn announce(a: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `552 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5698` - // Minimum execution time: 45_746_000 picoseconds. - Weight::from_parts(46_034_362, 0) + // Minimum execution time: 41_467_000 picoseconds. + Weight::from_parts(43_094_252, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_789 - .saturating_add(Weight::from_parts(224_944, 0).saturating_mul(a.into())) - // Standard Error: 1_849 - .saturating_add(Weight::from_parts(31_655, 0).saturating_mul(p.into())) + // Standard Error: 4_013 + .saturating_add(Weight::from_parts(218_559, 0).saturating_mul(a.into())) + // Standard Error: 4_146 + .saturating_add(Weight::from_parts(44_158, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Proxy Proxies (r:1 w:1) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn add_proxy(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `293 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 34_856_000 picoseconds. - Weight::from_parts(35_665_629, 0) + // Minimum execution time: 29_695_000 picoseconds. + Weight::from_parts(30_725_974, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_181 - .saturating_add(Weight::from_parts(42_996, 0).saturating_mul(p.into())) + // Standard Error: 1_268 + .saturating_add(Weight::from_parts(41_910, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Proxy Proxies (r:1 w:1) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn remove_proxy(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `293 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 34_365_000 picoseconds. - Weight::from_parts(36_021_565, 0) + // Minimum execution time: 29_635_000 picoseconds. + Weight::from_parts(31_078_426, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 2_305 - .saturating_add(Weight::from_parts(42_028, 0).saturating_mul(p.into())) + // Standard Error: 2_453 + .saturating_add(Weight::from_parts(33_692, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Proxy Proxies (r:1 w:1) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn remove_proxies(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `293 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 31_048_000 picoseconds. - Weight::from_parts(31_959_271, 0) + // Minimum execution time: 28_854_000 picoseconds. + Weight::from_parts(29_891_464, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_370 - .saturating_add(Weight::from_parts(41_038, 0).saturating_mul(p.into())) + // Standard Error: 1_510 + .saturating_add(Weight::from_parts(34_316, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Proxy Proxies (r:1 w:1) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn create_pure(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `305` // Estimated: `4706` - // Minimum execution time: 38_021_000 picoseconds. - Weight::from_parts(39_065_754, 0) + // Minimum execution time: 31_980_000 picoseconds. + Weight::from_parts(33_124_220, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_468 - .saturating_add(Weight::from_parts(17_337, 0).saturating_mul(p.into())) + // Standard Error: 1_545 + .saturating_add(Weight::from_parts(9_586, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Proxy Proxies (r:1 w:1) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1241), added: 3716, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[0, 30]`. fn kill_pure(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `330 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 32_300_000 picoseconds. - Weight::from_parts(33_718_715, 0) + // Minimum execution time: 29_976_000 picoseconds. + Weight::from_parts(31_111_792, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_720 - .saturating_add(Weight::from_parts(29_996, 0).saturating_mul(p.into())) + // Standard Error: 1_519 + .saturating_add(Weight::from_parts(40_969, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/development/src/weights/pallet_remarks.rs b/runtime/development/src/weights/pallet_remarks.rs index db89aba8fe..8e7c1cf3bd 100644 --- a/runtime/development/src/weights/pallet_remarks.rs +++ b/runtime/development/src/weights/pallet_remarks.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_remarks` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_remarks // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_remarks.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_remarks.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -37,10 +36,10 @@ impl pallet_remarks::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 16_872_000 picoseconds. - Weight::from_parts(17_442_789, 0) + // Minimum execution time: 12_233_000 picoseconds. + Weight::from_parts(12_745_452, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_718 - .saturating_add(Weight::from_parts(120_160, 0).saturating_mul(n.into())) + // Standard Error: 2_323 + .saturating_add(Weight::from_parts(129_352, 0).saturating_mul(n.into())) } } diff --git a/runtime/development/src/weights/pallet_restricted_tokens.rs b/runtime/development/src/weights/pallet_restricted_tokens.rs index cc29d05c60..83f01b7679 100644 --- a/runtime/development/src/weights/pallet_restricted_tokens.rs +++ b/runtime/development/src/weights/pallet_restricted_tokens.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_restricted_tokens` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_restricted_tokens // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_restricted_tokens.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_restricted_tokens.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,157 +31,157 @@ use core::marker::PhantomData; /// Weight functions for `pallet_restricted_tokens`. pub struct WeightInfo(PhantomData); impl pallet_restricted_tokens::WeightInfo for WeightInfo { - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:2 w:0) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:2 w:0) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_native() -> Weight { // Proof Size summary in bytes: // Measured: `505` // Estimated: `6124` - // Minimum execution time: 93_275_000 picoseconds. - Weight::from_parts(94_888_000, 0) + // Minimum execution time: 82_273_000 picoseconds. + Weight::from_parts(83_316_000, 0) .saturating_add(Weight::from_parts(0, 6124)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:2 w:0) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:2 w:0) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_other() -> Weight { // Proof Size summary in bytes: - // Measured: `1507` + // Measured: `856` // Estimated: `6198` - // Minimum execution time: 86_031_000 picoseconds. - Weight::from_parts(87_334_000, 0) + // Minimum execution time: 66_654_000 picoseconds. + Weight::from_parts(67_506_000, 0) .saturating_add(Weight::from_parts(0, 6198)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:2 w:0) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:2 w:0) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_keep_alive_native() -> Weight { // Proof Size summary in bytes: // Measured: `505` // Estimated: `6124` - // Minimum execution time: 80_842_000 picoseconds. - Weight::from_parts(81_703_000, 0) + // Minimum execution time: 71_644_000 picoseconds. + Weight::from_parts(73_167_000, 0) .saturating_add(Weight::from_parts(0, 6124)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:2 w:0) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:2 w:0) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_keep_alive_other() -> Weight { // Proof Size summary in bytes: - // Measured: `1404` + // Measured: `753` // Estimated: `6198` - // Minimum execution time: 81_634_000 picoseconds. - Weight::from_parts(82_725_000, 0) + // Minimum execution time: 61_605_000 picoseconds. + Weight::from_parts(63_288_000, 0) .saturating_add(Weight::from_parts(0, 6198)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:2 w:0) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:2 w:0) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_all_native() -> Weight { // Proof Size summary in bytes: // Measured: `505` // Estimated: `6124` - // Minimum execution time: 96_992_000 picoseconds. - Weight::from_parts(98_805_000, 0) + // Minimum execution time: 85_871_000 picoseconds. + Weight::from_parts(87_754_000, 0) .saturating_add(Weight::from_parts(0, 6124)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:2 w:0) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:2 w:0) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_all_other() -> Weight { // Proof Size summary in bytes: - // Measured: `1507` + // Measured: `856` // Estimated: `6198` - // Minimum execution time: 90_630_000 picoseconds. - Weight::from_parts(91_722_000, 0) + // Minimum execution time: 70_893_000 picoseconds. + Weight::from_parts(71_895_000, 0) .saturating_add(Weight::from_parts(0, 6198)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_transfer_native() -> Weight { // Proof Size summary in bytes: // Measured: `259` // Estimated: `3593` - // Minimum execution time: 85_660_000 picoseconds. - Weight::from_parts(86_452_000, 0) + // Minimum execution time: 72_526_000 picoseconds. + Weight::from_parts(74_039_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: OrmlTokens Accounts (r:2 w:2) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `OrmlTokens::Accounts` (r:2 w:2) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_transfer_other() -> Weight { // Proof Size summary in bytes: - // Measured: `1261` + // Measured: `610` // Estimated: `6198` - // Minimum execution time: 77_095_000 picoseconds. - Weight::from_parts(78_347_000, 0) + // Minimum execution time: 53_661_000 picoseconds. + Weight::from_parts(55_263_000, 0) .saturating_add(Weight::from_parts(0, 6198)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Balances Holds (r:1 w:1) - /// Proof: Balances Holds (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn set_balance_native() -> Weight { // Proof Size summary in bytes: - // Measured: `298` - // Estimated: `3674` - // Minimum execution time: 169_979_000 picoseconds. - Weight::from_parts(171_382_000, 0) - .saturating_add(Weight::from_parts(0, 3674)) + // Measured: `300` + // Estimated: `3593` + // Minimum execution time: 157_094_000 picoseconds. + Weight::from_parts(159_549_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: OrmlTokens Accounts (r:1 w:1) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OrmlTokens TotalIssuance (r:1 w:1) - /// Proof: OrmlTokens TotalIssuance (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) + /// Storage: `OrmlTokens::Accounts` (r:1 w:1) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:1 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::TotalIssuance` (r:1 w:1) + /// Proof: `OrmlTokens::TotalIssuance` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) fn set_balance_other() -> Weight { // Proof Size summary in bytes: - // Measured: `1000` - // Estimated: `4465` - // Minimum execution time: 118_192_000 picoseconds. - Weight::from_parts(119_845_000, 0) - .saturating_add(Weight::from_parts(0, 4465)) + // Measured: `400` + // Estimated: `4407` + // Minimum execution time: 91_301_000 picoseconds. + Weight::from_parts(92_442_000, 0) + .saturating_add(Weight::from_parts(0, 4407)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/development/src/weights/pallet_scheduler.rs b/runtime/development/src/weights/pallet_scheduler.rs index 6470dd3235..41579f944a 100644 --- a/runtime/development/src/weights/pallet_scheduler.rs +++ b/runtime/development/src/weights/pallet_scheduler.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_scheduler` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_scheduler // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_scheduler.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_scheduler.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,30 +31,30 @@ use core::marker::PhantomData; /// Weight functions for `pallet_scheduler`. pub struct WeightInfo(PhantomData); impl pallet_scheduler::WeightInfo for WeightInfo { - /// Storage: Scheduler IncompleteSince (r:1 w:1) - /// Proof: Scheduler IncompleteSince (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: `Scheduler::IncompleteSince` (r:1 w:1) + /// Proof: `Scheduler::IncompleteSince` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn service_agendas_base() -> Weight { // Proof Size summary in bytes: // Measured: `31` // Estimated: `1489` - // Minimum execution time: 4_890_000 picoseconds. - Weight::from_parts(5_160_000, 0) + // Minimum execution time: 3_968_000 picoseconds. + Weight::from_parts(4_148_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Scheduler Agenda (r:1 w:1) - /// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 50]`. fn service_agenda_base(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `78 + s * (177 ±0)` // Estimated: `42428` - // Minimum execution time: 4_869_000 picoseconds. - Weight::from_parts(7_401_777, 0) + // Minimum execution time: 5_249_000 picoseconds. + Weight::from_parts(8_455_668, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 3_942 - .saturating_add(Weight::from_parts(1_180_604, 0).saturating_mul(s.into())) + // Standard Error: 3_978 + .saturating_add(Weight::from_parts(613_461, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -63,36 +62,38 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_465_000 picoseconds. - Weight::from_parts(8_646_000, 0) + // Minimum execution time: 4_970_000 picoseconds. + Weight::from_parts(5_120_000, 0) .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: Preimage PreimageFor (r:1 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: Measured) - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: `Preimage::PreimageFor` (r:1 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) /// The range of component `s` is `[128, 4194304]`. fn service_task_fetched(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `213 + s * (1 ±0)` // Estimated: `3678 + s * (1 ±0)` - // Minimum execution time: 28_544_000 picoseconds. - Weight::from_parts(52_629_661, 0) + // Minimum execution time: 25_228_000 picoseconds. + Weight::from_parts(25_808_000, 0) .saturating_add(Weight::from_parts(0, 3678)) - // Standard Error: 8 - .saturating_add(Weight::from_parts(1_037, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(2)) + // Standard Error: 14 + .saturating_add(Weight::from_parts(1_379, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into())) } - /// Storage: Scheduler Lookup (r:0 w:1) - /// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) + /// Storage: `Scheduler::Lookup` (r:0 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) fn service_task_named() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 10_439_000 picoseconds. - Weight::from_parts(10_840_000, 0) + // Minimum execution time: 7_264_000 picoseconds. + Weight::from_parts(7_554_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -100,89 +101,89 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_456_000 picoseconds. - Weight::from_parts(8_747_000, 0) + // Minimum execution time: 4_899_000 picoseconds. + Weight::from_parts(5_200_000, 0) .saturating_add(Weight::from_parts(0, 0)) } fn execute_dispatch_signed() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_448_000 picoseconds. - Weight::from_parts(4_699_000, 0) + // Minimum execution time: 3_887_000 picoseconds. + Weight::from_parts(4_138_000, 0) .saturating_add(Weight::from_parts(0, 0)) } fn execute_dispatch_unsigned() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_288_000 picoseconds. - Weight::from_parts(4_559_000, 0) + // Minimum execution time: 3_867_000 picoseconds. + Weight::from_parts(4_028_000, 0) .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: Scheduler Agenda (r:1 w:1) - /// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 49]`. fn schedule(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `78 + s * (177 ±0)` // Estimated: `42428` - // Minimum execution time: 19_115_000 picoseconds. - Weight::from_parts(21_727_436, 0) + // Minimum execution time: 14_648_000 picoseconds. + Weight::from_parts(17_990_542, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 3_706 - .saturating_add(Weight::from_parts(1_182_303, 0).saturating_mul(s.into())) + // Standard Error: 4_276 + .saturating_add(Weight::from_parts(629_105, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Scheduler Agenda (r:1 w:1) - /// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen) - /// Storage: Scheduler Lookup (r:0 w:1) - /// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Lookup` (r:0 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// The range of component `s` is `[1, 50]`. fn cancel(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `78 + s * (177 ±0)` // Estimated: `42428` - // Minimum execution time: 25_217_000 picoseconds. - Weight::from_parts(21_904_236, 0) + // Minimum execution time: 20_208_000 picoseconds. + Weight::from_parts(18_944_972, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 5_129 - .saturating_add(Weight::from_parts(2_160_535, 0).saturating_mul(s.into())) + // Standard Error: 5_325 + .saturating_add(Weight::from_parts(974_711, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Scheduler Lookup (r:1 w:1) - /// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Scheduler Agenda (r:1 w:1) - /// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen) + /// Storage: `Scheduler::Lookup` (r:1 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 49]`. fn schedule_named(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `255 + s * (185 ±0)` // Estimated: `42428` - // Minimum execution time: 23_675_000 picoseconds. - Weight::from_parts(27_184_135, 0) + // Minimum execution time: 19_917_000 picoseconds. + Weight::from_parts(24_367_159, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 4_101 - .saturating_add(Weight::from_parts(1_211_083, 0).saturating_mul(s.into())) + // Standard Error: 4_143 + .saturating_add(Weight::from_parts(664_976, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Scheduler Lookup (r:1 w:1) - /// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Scheduler Agenda (r:1 w:1) - /// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen) + /// Storage: `Scheduler::Lookup` (r:1 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) /// The range of component `s` is `[1, 50]`. fn cancel_named(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `281 + s * (185 ±0)` // Estimated: `42428` - // Minimum execution time: 26_840_000 picoseconds. - Weight::from_parts(24_464_029, 0) + // Minimum execution time: 23_364_000 picoseconds. + Weight::from_parts(22_474_466, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 4_805 - .saturating_add(Weight::from_parts(2_194_904, 0).saturating_mul(s.into())) + // Standard Error: 5_379 + .saturating_add(Weight::from_parts(1_009_547, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/development/src/weights/pallet_session.rs b/runtime/development/src/weights/pallet_session.rs index 270db5fca0..e5e44ff9f0 100644 --- a/runtime/development/src/weights/pallet_session.rs +++ b/runtime/development/src/weights/pallet_session.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_session` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_session // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_session.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_session.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,30 +31,30 @@ use core::marker::PhantomData; /// Weight functions for `pallet_session`. pub struct WeightInfo(PhantomData); impl pallet_session::WeightInfo for WeightInfo { - /// Storage: Session NextKeys (r:1 w:1) - /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - /// Storage: Session KeyOwner (r:1 w:1) - /// Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) + /// Storage: `Session::NextKeys` (r:1 w:1) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Session::KeyOwner` (r:1 w:1) + /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_keys() -> Weight { // Proof Size summary in bytes: // Measured: `308` // Estimated: `3773` - // Minimum execution time: 26_599_000 picoseconds. - Weight::from_parts(27_121_000, 0) + // Minimum execution time: 29_145_000 picoseconds. + Weight::from_parts(29_686_000, 0) .saturating_add(Weight::from_parts(0, 3773)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Session NextKeys (r:1 w:1) - /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - /// Storage: Session KeyOwner (r:0 w:1) - /// Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) + /// Storage: `Session::NextKeys` (r:1 w:1) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Session::KeyOwner` (r:0 w:1) + /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn purge_keys() -> Weight { // Proof Size summary in bytes: // Measured: `315` // Estimated: `3780` - // Minimum execution time: 17_763_000 picoseconds. - Weight::from_parts(18_334_000, 0) + // Minimum execution time: 18_775_000 picoseconds. + Weight::from_parts(19_285_000, 0) .saturating_add(Weight::from_parts(0, 3780)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/runtime/development/src/weights/pallet_timestamp.rs b/runtime/development/src/weights/pallet_timestamp.rs index df4b27dcae..245c250d58 100644 --- a/runtime/development/src/weights/pallet_timestamp.rs +++ b/runtime/development/src/weights/pallet_timestamp.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_timestamp` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_timestamp // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_timestamp.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_timestamp.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,16 +31,16 @@ use core::marker::PhantomData; /// Weight functions for `pallet_timestamp`. pub struct WeightInfo(PhantomData); impl pallet_timestamp::WeightInfo for WeightInfo { - /// Storage: Timestamp Now (r:1 w:1) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Aura CurrentSlot (r:1 w:0) - /// Proof: Aura CurrentSlot (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: `Timestamp::Now` (r:1 w:1) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Aura::CurrentSlot` (r:1 w:0) + /// Proof: `Aura::CurrentSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set() -> Weight { // Proof Size summary in bytes: - // Measured: `256` + // Measured: `223` // Estimated: `1493` - // Minimum execution time: 12_534_000 picoseconds. - Weight::from_parts(12_884_000, 0) + // Minimum execution time: 10_469_000 picoseconds. + Weight::from_parts(10_830_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -50,8 +49,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `128` // Estimated: `0` - // Minimum execution time: 5_220_000 picoseconds. - Weight::from_parts(5_310_000, 0) + // Minimum execution time: 4_629_000 picoseconds. + Weight::from_parts(4_799_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/runtime/development/src/weights/pallet_token_mux.rs b/runtime/development/src/weights/pallet_token_mux.rs index cdfacd2ca9..a949d39389 100644 --- a/runtime/development/src/weights/pallet_token_mux.rs +++ b/runtime/development/src/weights/pallet_token_mux.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_token_mux` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_token_mux // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_token_mux.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_token_mux.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,62 +31,62 @@ use core::marker::PhantomData; /// Weight functions for `pallet_token_mux`. pub struct WeightInfo(PhantomData); impl pallet_token_mux::WeightInfo for WeightInfo { - /// Storage: OrmlAssetRegistry Metadata (r:2 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OrmlTokens Accounts (r:3 w:3) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: OrmlTokens TotalIssuance (r:1 w:1) - /// Proof: OrmlTokens TotalIssuance (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) + /// Storage: `OrmlAssetRegistry::Metadata` (r:2 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:3 w:3) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::TotalIssuance` (r:1 w:1) + /// Proof: `OrmlTokens::TotalIssuance` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) fn deposit() -> Weight { // Proof Size summary in bytes: - // Measured: `1357` + // Measured: `690` // Estimated: `8802` - // Minimum execution time: 119_644_000 picoseconds. - Weight::from_parts(120_776_000, 0) + // Minimum execution time: 99_926_000 picoseconds. + Weight::from_parts(100_939_000, 0) .saturating_add(Weight::from_parts(0, 8802)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(6)) } - /// Storage: OrmlAssetRegistry Metadata (r:2 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OrmlTokens Accounts (r:3 w:3) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlTokens TotalIssuance (r:1 w:1) - /// Proof: OrmlTokens TotalIssuance (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `OrmlAssetRegistry::Metadata` (r:2 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:3 w:3) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::TotalIssuance` (r:1 w:1) + /// Proof: `OrmlTokens::TotalIssuance` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn burn() -> Weight { // Proof Size summary in bytes: - // Measured: `1567` + // Measured: `980` // Estimated: `8802` - // Minimum execution time: 105_257_000 picoseconds. - Weight::from_parts(106_230_000, 0) + // Minimum execution time: 94_646_000 picoseconds. + Weight::from_parts(95_629_000, 0) .saturating_add(Weight::from_parts(0, 8802)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: OrderBook Orders (r:1 w:1) - /// Proof: OrderBook Orders (max_values: None, max_size: Some(171), added: 2646, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry Metadata (r:2 w:0) - /// Proof Skipped: OrmlAssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: OrmlTokens Accounts (r:4 w:4) - /// Proof: OrmlTokens Accounts (max_values: None, max_size: Some(129), added: 2604, mode: MaxEncodedLen) - /// Storage: OrmlTokens TotalIssuance (r:1 w:1) - /// Proof: OrmlTokens TotalIssuance (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Swaps OrderIdToSwapId (r:1 w:0) - /// Proof: Swaps OrderIdToSwapId (max_values: None, max_size: Some(81), added: 2556, mode: MaxEncodedLen) - /// Storage: OrderBook UserOrders (r:0 w:1) - /// Proof: OrderBook UserOrders (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + /// Storage: `OrderBook::Orders` (r:1 w:1) + /// Proof: `OrderBook::Orders` (`max_values`: None, `max_size`: Some(171), added: 2646, mode: `MaxEncodedLen`) + /// Storage: `OrmlAssetRegistry::Metadata` (r:2 w:0) + /// Proof: `OrmlAssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(942), added: 3417, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::Accounts` (r:4 w:4) + /// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`) + /// Storage: `OrmlTokens::TotalIssuance` (r:1 w:1) + /// Proof: `OrmlTokens::TotalIssuance` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Swaps::OrderIdToSwapId` (r:1 w:0) + /// Proof: `Swaps::OrderIdToSwapId` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) + /// Storage: `OrderBook::UserOrders` (r:0 w:1) + /// Proof: `OrderBook::UserOrders` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) fn match_swap() -> Weight { // Proof Size summary in bytes: - // Measured: `1993` + // Measured: `1326` // Estimated: `11406` - // Minimum execution time: 207_028_000 picoseconds. - Weight::from_parts(209_022_000, 0) + // Minimum execution time: 179_345_000 picoseconds. + Weight::from_parts(181_790_000, 0) .saturating_add(Weight::from_parts(0, 11406)) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(9)) diff --git a/runtime/development/src/weights/pallet_transfer_allowlist.rs b/runtime/development/src/weights/pallet_transfer_allowlist.rs index 218946cd5f..36bcc8c220 100644 --- a/runtime/development/src/weights/pallet_transfer_allowlist.rs +++ b/runtime/development/src/weights/pallet_transfer_allowlist.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_transfer_allowlist` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_transfer_allowlist // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_transfer_allowlist.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_transfer_allowlist.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,183 +31,183 @@ use core::marker::PhantomData; /// Weight functions for `pallet_transfer_allowlist`. pub struct WeightInfo(PhantomData); impl pallet_transfer_allowlist::WeightInfo for WeightInfo { - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: TransferAllowList AccountCurrencyTransferAllowance (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferAllowance (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) - /// Storage: Fees FeeBalances (r:1 w:0) - /// Proof: Fees FeeBalances (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Balances Holds (r:1 w:1) - /// Proof: Balances Holds (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `TransferAllowList::AccountCurrencyTransferAllowance` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferAllowance` (`max_values`: None, `max_size`: Some(701), added: 3176, mode: `MaxEncodedLen`) + /// Storage: `Fees::FeeBalances` (r:1 w:0) + /// Proof: `Fees::FeeBalances` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) fn add_transfer_allowance_no_existing_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `603` - // Estimated: `3674` - // Minimum execution time: 85_090_000 picoseconds. - Weight::from_parts(85_961_000, 0) - .saturating_add(Weight::from_parts(0, 3674)) + // Measured: `570` + // Estimated: `4166` + // Minimum execution time: 89_497_000 picoseconds. + Weight::from_parts(91_170_000, 0) + .saturating_add(Weight::from_parts(0, 4166)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: TransferAllowList AccountCurrencyTransferAllowance (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferAllowance (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) - /// Storage: Fees FeeBalances (r:1 w:0) - /// Proof: Fees FeeBalances (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Balances Holds (r:1 w:1) - /// Proof: Balances Holds (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `TransferAllowList::AccountCurrencyTransferAllowance` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferAllowance` (`max_values`: None, `max_size`: Some(701), added: 3176, mode: `MaxEncodedLen`) + /// Storage: `Fees::FeeBalances` (r:1 w:0) + /// Proof: `Fees::FeeBalances` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) fn add_transfer_allowance_existing_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `697` - // Estimated: `3674` - // Minimum execution time: 87_604_000 picoseconds. - Weight::from_parts(89_237_000, 0) - .saturating_add(Weight::from_parts(0, 3674)) + // Measured: `664` + // Estimated: `4166` + // Minimum execution time: 91_241_000 picoseconds. + Weight::from_parts(93_384_000, 0) + .saturating_add(Weight::from_parts(0, 4166)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn add_allowance_delay_no_existing_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `246` // Estimated: `3557` - // Minimum execution time: 19_227_000 picoseconds. - Weight::from_parts(19_547_000, 0) + // Minimum execution time: 16_420_000 picoseconds. + Weight::from_parts(17_363_000, 0) .saturating_add(Weight::from_parts(0, 3557)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn add_allowance_delay_existing_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `370` // Estimated: `3557` - // Minimum execution time: 21_681_000 picoseconds. - Weight::from_parts(22_151_000, 0) + // Minimum execution time: 19_176_000 picoseconds. + Weight::from_parts(19_786_000, 0) .saturating_add(Weight::from_parts(0, 3557)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn toggle_allowance_delay_once_future_modifiable() -> Weight { // Proof Size summary in bytes: // Measured: `340` // Estimated: `3557` - // Minimum execution time: 21_551_000 picoseconds. - Weight::from_parts(21_971_000, 0) + // Minimum execution time: 18_474_000 picoseconds. + Weight::from_parts(19_256_000, 0) .saturating_add(Weight::from_parts(0, 3557)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn update_allowance_delay() -> Weight { // Proof Size summary in bytes: // Measured: `344` // Estimated: `3557` - // Minimum execution time: 21_591_000 picoseconds. - Weight::from_parts(22_161_000, 0) + // Minimum execution time: 18_866_000 picoseconds. + Weight::from_parts(19_306_000, 0) .saturating_add(Weight::from_parts(0, 3557)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn purge_allowance_delay_no_remaining_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `344` // Estimated: `3557` - // Minimum execution time: 21_440_000 picoseconds. - Weight::from_parts(21_971_000, 0) + // Minimum execution time: 18_594_000 picoseconds. + Weight::from_parts(19_056_000, 0) .saturating_add(Weight::from_parts(0, 3557)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn purge_allowance_delay_remaining_metadata() -> Weight { // Proof Size summary in bytes: // Measured: `378` // Estimated: `3557` - // Minimum execution time: 22_642_000 picoseconds. - Weight::from_parts(23_174_000, 0) + // Minimum execution time: 19_146_000 picoseconds. + Weight::from_parts(19_897_000, 0) .saturating_add(Weight::from_parts(0, 3557)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:0) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: TransferAllowList AccountCurrencyTransferAllowance (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferAllowance (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:0) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `TransferAllowList::AccountCurrencyTransferAllowance` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferAllowance` (`max_values`: None, `max_size`: Some(701), added: 3176, mode: `MaxEncodedLen`) fn remove_transfer_allowance_delay_present() -> Weight { // Proof Size summary in bytes: // Measured: `473` - // Estimated: `3597` - // Minimum execution time: 32_411_000 picoseconds. - Weight::from_parts(33_603_000, 0) - .saturating_add(Weight::from_parts(0, 3597)) + // Estimated: `4166` + // Minimum execution time: 30_778_000 picoseconds. + Weight::from_parts(31_509_000, 0) + .saturating_add(Weight::from_parts(0, 4166)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:0) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: TransferAllowList AccountCurrencyTransferAllowance (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferAllowance (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:0) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `TransferAllowList::AccountCurrencyTransferAllowance` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferAllowance` (`max_values`: None, `max_size`: Some(701), added: 3176, mode: `MaxEncodedLen`) fn remove_transfer_allowance_no_delay() -> Weight { // Proof Size summary in bytes: // Measured: `469` - // Estimated: `3597` - // Minimum execution time: 32_952_000 picoseconds. - Weight::from_parts(33_864_000, 0) - .saturating_add(Weight::from_parts(0, 3597)) + // Estimated: `4166` + // Minimum execution time: 30_928_000 picoseconds. + Weight::from_parts(31_579_000, 0) + .saturating_add(Weight::from_parts(0, 4166)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TransferAllowList AccountCurrencyTransferAllowance (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferAllowance (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) - /// Storage: Fees FeeBalances (r:1 w:0) - /// Proof: Fees FeeBalances (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Balances Holds (r:1 w:1) - /// Proof: Balances Holds (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferAllowance` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferAllowance` (`max_values`: None, `max_size`: Some(701), added: 3176, mode: `MaxEncodedLen`) + /// Storage: `Fees::FeeBalances` (r:1 w:0) + /// Proof: `Fees::FeeBalances` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn purge_transfer_allowance_no_remaining_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `879` - // Estimated: `3674` - // Minimum execution time: 79_720_000 picoseconds. - Weight::from_parts(81_352_000, 0) - .saturating_add(Weight::from_parts(0, 3674)) + // Measured: `848` + // Estimated: `4166` + // Minimum execution time: 84_217_000 picoseconds. + Weight::from_parts(85_830_000, 0) + .saturating_add(Weight::from_parts(0, 4166)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: TransferAllowList AccountCurrencyTransferAllowance (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferAllowance (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) - /// Storage: Fees FeeBalances (r:1 w:0) - /// Proof: Fees FeeBalances (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Balances Holds (r:1 w:1) - /// Proof: Balances Holds (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: TransferAllowList AccountCurrencyTransferCountDelay (r:1 w:1) - /// Proof: TransferAllowList AccountCurrencyTransferCountDelay (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) + /// Storage: `TransferAllowList::AccountCurrencyTransferAllowance` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferAllowance` (`max_values`: None, `max_size`: Some(701), added: 3176, mode: `MaxEncodedLen`) + /// Storage: `Fees::FeeBalances` (r:1 w:0) + /// Proof: `Fees::FeeBalances` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) + /// Storage: `TransferAllowList::AccountCurrencyTransferCountDelay` (r:1 w:1) + /// Proof: `TransferAllowList::AccountCurrencyTransferCountDelay` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn purge_transfer_allowance_remaining_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `918` - // Estimated: `3674` - // Minimum execution time: 79_259_000 picoseconds. - Weight::from_parts(80_852_000, 0) - .saturating_add(Weight::from_parts(0, 3674)) + // Measured: `887` + // Estimated: `4166` + // Minimum execution time: 83_276_000 picoseconds. + Weight::from_parts(84_749_000, 0) + .saturating_add(Weight::from_parts(0, 4166)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/runtime/development/src/weights/pallet_treasury.rs b/runtime/development/src/weights/pallet_treasury.rs deleted file mode 100644 index 54f4091f70..0000000000 --- a/runtime/development/src/weights/pallet_treasury.rs +++ /dev/null @@ -1,139 +0,0 @@ - -//! Autogenerated weights for `pallet_treasury` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 - -// Executed Command: -// target/release/centrifuge-chain -// benchmark -// pallet -// --chain=development-local -// --steps=50 -// --repeat=20 -// --pallet=pallet_treasury -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_treasury.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_treasury`. -pub struct WeightInfo(PhantomData); -impl pallet_treasury::WeightInfo for WeightInfo { - fn spend() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 370_000 picoseconds. - Weight::from_parts(441_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - /// Storage: Treasury ProposalCount (r:1 w:1) - /// Proof: Treasury ProposalCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Treasury Proposals (r:0 w:1) - /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - fn propose_spend() -> Weight { - // Proof Size summary in bytes: - // Measured: `144` - // Estimated: `1489` - // Minimum execution time: 38_322_000 picoseconds. - Weight::from_parts(38_943_000, 0) - .saturating_add(Weight::from_parts(0, 1489)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: Treasury Proposals (r:1 w:1) - /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - fn reject_proposal() -> Weight { - // Proof Size summary in bytes: - // Measured: `405` - // Estimated: `6196` - // Minimum execution time: 60_043_000 picoseconds. - Weight::from_parts(60_774_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: Treasury Proposals (r:1 w:0) - /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - /// Storage: Treasury Approvals (r:1 w:1) - /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) - /// The range of component `p` is `[0, 99]`. - fn approve_proposal(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `470 + p * (8 ±0)` - // Estimated: `3573` - // Minimum execution time: 13_426_000 picoseconds. - Weight::from_parts(15_919_766, 0) - .saturating_add(Weight::from_parts(0, 3573)) - // Standard Error: 986 - .saturating_add(Weight::from_parts(53_350, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Treasury Approvals (r:1 w:1) - /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) - fn remove_approval() -> Weight { - // Proof Size summary in bytes: - // Measured: `127` - // Estimated: `1887` - // Minimum execution time: 10_179_000 picoseconds. - Weight::from_parts(10_440_000, 0) - .saturating_add(Weight::from_parts(0, 1887)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Treasury Deactivated (r:1 w:1) - /// Proof: Treasury Deactivated (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) - /// Storage: Treasury Approvals (r:1 w:1) - /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) - /// Storage: Treasury Proposals (r:100 w:0) - /// Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - /// The range of component `p` is `[0, 100]`. - fn on_initialize_proposals(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `230 + p * (120 ±0)` - // Estimated: `3593 + p * (2583 ±0)` - // Minimum execution time: 41_167_000 picoseconds. - Weight::from_parts(35_902_776, 0) - .saturating_add(Weight::from_parts(0, 3593)) - // Standard Error: 7_436 - .saturating_add(Weight::from_parts(3_813_591, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 2583).saturating_mul(p.into())) - } - - fn spend_local() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn payout() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn check_status() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn void_spend() -> cumulus_primitives_core::Weight { - Weight::default() - } -} diff --git a/runtime/development/src/weights/pallet_uniques.rs b/runtime/development/src/weights/pallet_uniques.rs index 60aa2c77ce..94833ecc03 100644 --- a/runtime/development/src/weights/pallet_uniques.rs +++ b/runtime/development/src/weights/pallet_uniques.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_uniques` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_uniques // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_uniques.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_uniques.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,66 +31,66 @@ use core::marker::PhantomData; /// Weight functions for `pallet_uniques`. pub struct WeightInfo(PhantomData); impl pallet_uniques::WeightInfo for WeightInfo { - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques ClassAccount (r:0 w:1) - /// Proof: Uniques ClassAccount (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ClassAccount` (r:0 w:1) + /// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) fn create() -> Weight { // Proof Size summary in bytes: - // Measured: `282` + // Measured: `249` // Estimated: `3647` - // Minimum execution time: 41_568_000 picoseconds. - Weight::from_parts(42_650_000, 0) + // Minimum execution time: 36_659_000 picoseconds. + Weight::from_parts(37_541_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques ClassAccount (r:0 w:1) - /// Proof: Uniques ClassAccount (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ClassAccount` (r:0 w:1) + /// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) fn force_create() -> Weight { // Proof Size summary in bytes: - // Measured: `142` + // Measured: `109` // Estimated: `3647` - // Minimum execution time: 20_178_000 picoseconds. - Weight::from_parts(20_719_000, 0) + // Minimum execution time: 16_871_000 picoseconds. + Weight::from_parts(17_242_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques Asset (r:1001 w:1000) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Uniques InstanceMetadataOf (r:1000 w:1000) - /// Proof: Uniques InstanceMetadataOf (max_values: None, max_size: Some(331), added: 2806, mode: MaxEncodedLen) - /// Storage: Uniques Attribute (r:1000 w:1000) - /// Proof: Uniques Attribute (max_values: None, max_size: Some(605), added: 3080, mode: MaxEncodedLen) - /// Storage: Uniques ClassAccount (r:0 w:1) - /// Proof: Uniques ClassAccount (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) - /// Storage: Uniques ClassMetadataOf (r:0 w:1) - /// Proof: Uniques ClassMetadataOf (max_values: None, max_size: Some(299), added: 2774, mode: MaxEncodedLen) - /// Storage: Uniques Account (r:0 w:1000) - /// Proof: Uniques Account (max_values: None, max_size: Some(104), added: 2579, mode: MaxEncodedLen) - /// Storage: Uniques CollectionMaxSupply (r:0 w:1) - /// Proof: Uniques CollectionMaxSupply (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Asset` (r:1001 w:1000) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Uniques::InstanceMetadataOf` (r:1000 w:1000) + /// Proof: `Uniques::InstanceMetadataOf` (`max_values`: None, `max_size`: Some(331), added: 2806, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Attribute` (r:1000 w:1000) + /// Proof: `Uniques::Attribute` (`max_values`: None, `max_size`: Some(605), added: 3080, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ClassAccount` (r:0 w:1) + /// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ClassMetadataOf` (r:0 w:1) + /// Proof: `Uniques::ClassMetadataOf` (`max_values`: None, `max_size`: Some(299), added: 2774, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Account` (r:0 w:1000) + /// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) + /// Storage: `Uniques::CollectionMaxSupply` (r:0 w:1) + /// Proof: `Uniques::CollectionMaxSupply` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 1000]`. /// The range of component `m` is `[0, 1000]`. /// The range of component `a` is `[0, 1000]`. fn destroy(n: u32, m: u32, a: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `544 + a * (346 ±0) + m * (69 ±0) + n * (88 ±0)` + // Measured: `511 + a * (346 ±0) + m * (69 ±0) + n * (88 ±0)` // Estimated: `3647 + a * (3080 ±0) + m * (2806 ±0) + n * (2613 ±0)` - // Minimum execution time: 2_994_634_000 picoseconds. - Weight::from_parts(3_046_591_000, 0) + // Minimum execution time: 3_004_732_000 picoseconds. + Weight::from_parts(3_014_581_000, 0) .saturating_add(Weight::from_parts(0, 3647)) - // Standard Error: 29_715 - .saturating_add(Weight::from_parts(9_828_659, 0).saturating_mul(n.into())) - // Standard Error: 29_715 - .saturating_add(Weight::from_parts(140_176, 0).saturating_mul(m.into())) - // Standard Error: 29_715 - .saturating_add(Weight::from_parts(574_840, 0).saturating_mul(a.into())) + // Standard Error: 29_103 + .saturating_add(Weight::from_parts(10_066_324, 0).saturating_mul(n.into())) + // Standard Error: 29_103 + .saturating_add(Weight::from_parts(276_468, 0).saturating_mul(m.into())) + // Standard Error: 29_103 + .saturating_add(Weight::from_parts(519_952, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into()))) @@ -104,344 +103,346 @@ impl pallet_uniques::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 2806).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 2613).saturating_mul(n.into())) } - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques CollectionMaxSupply (r:1 w:0) - /// Proof: Uniques CollectionMaxSupply (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - /// Storage: Uniques Account (r:0 w:1) - /// Proof: Uniques Account (max_values: None, max_size: Some(104), added: 2579, mode: MaxEncodedLen) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::CollectionMaxSupply` (r:1 w:0) + /// Proof: `Uniques::CollectionMaxSupply` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Account` (r:0 w:1) + /// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) fn mint() -> Weight { // Proof Size summary in bytes: - // Measured: `386` + // Measured: `353` // Estimated: `3647` - // Minimum execution time: 51_677_000 picoseconds. - Weight::from_parts(52_789_000, 0) + // Minimum execution time: 46_878_000 picoseconds. + Weight::from_parts(47_749_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Uniques Account (r:0 w:1) - /// Proof: Uniques Account (max_values: None, max_size: Some(104), added: 2579, mode: MaxEncodedLen) - /// Storage: Uniques ItemPriceOf (r:0 w:1) - /// Proof: Uniques ItemPriceOf (max_values: None, max_size: Some(105), added: 2580, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Account` (r:0 w:1) + /// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ItemPriceOf` (r:0 w:1) + /// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(105), added: 2580, mode: `MaxEncodedLen`) fn burn() -> Weight { // Proof Size summary in bytes: - // Measured: `549` + // Measured: `516` // Estimated: `3647` - // Minimum execution time: 53_360_000 picoseconds. - Weight::from_parts(54_733_000, 0) + // Minimum execution time: 49_442_000 picoseconds. + Weight::from_parts(50_063_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Uniques Account (r:0 w:2) - /// Proof: Uniques Account (max_values: None, max_size: Some(104), added: 2579, mode: MaxEncodedLen) - /// Storage: Uniques ItemPriceOf (r:0 w:1) - /// Proof: Uniques ItemPriceOf (max_values: None, max_size: Some(105), added: 2580, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Account` (r:0 w:2) + /// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ItemPriceOf` (r:0 w:1) + /// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(105), added: 2580, mode: `MaxEncodedLen`) fn transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `549` + // Measured: `516` // Estimated: `3647` - // Minimum execution time: 38_362_000 picoseconds. - Weight::from_parts(39_454_000, 0) + // Minimum execution time: 37_399_000 picoseconds. + Weight::from_parts(37_761_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques Asset (r:5000 w:5000) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Asset` (r:5000 w:5000) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) /// The range of component `i` is `[0, 5000]`. fn redeposit(i: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `854 + i * (88 ±0)` + // Measured: `821 + i * (88 ±0)` // Estimated: `3647 + i * (2613 ±0)` - // Minimum execution time: 19_847_000 picoseconds. - Weight::from_parts(20_017_000, 0) + // Minimum execution time: 16_952_000 picoseconds. + Weight::from_parts(17_132_000, 0) .saturating_add(Weight::from_parts(0, 3647)) - // Standard Error: 17_851 - .saturating_add(Weight::from_parts(24_502_247, 0).saturating_mul(i.into())) + // Standard Error: 14_760 + .saturating_add(Weight::from_parts(22_704_797, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) .saturating_add(Weight::from_parts(0, 2613).saturating_mul(i.into())) } - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) fn freeze() -> Weight { // Proof Size summary in bytes: - // Measured: `549` + // Measured: `516` // Estimated: `3647` - // Minimum execution time: 25_357_000 picoseconds. - Weight::from_parts(26_129_000, 0) + // Minimum execution time: 23_314_000 picoseconds. + Weight::from_parts(23_925_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) fn thaw() -> Weight { // Proof Size summary in bytes: - // Measured: `549` + // Measured: `516` // Estimated: `3647` - // Minimum execution time: 25_237_000 picoseconds. - Weight::from_parts(25_919_000, 0) + // Minimum execution time: 23_103_000 picoseconds. + Weight::from_parts(23_533_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) fn freeze_collection() -> Weight { // Proof Size summary in bytes: - // Measured: `386` + // Measured: `353` // Estimated: `3647` - // Minimum execution time: 18_294_000 picoseconds. - Weight::from_parts(18_946_000, 0) + // Minimum execution time: 15_069_000 picoseconds. + Weight::from_parts(15_489_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) fn thaw_collection() -> Weight { // Proof Size summary in bytes: - // Measured: `386` + // Measured: `353` // Estimated: `3647` - // Minimum execution time: 18_464_000 picoseconds. - Weight::from_parts(18_945_000, 0) + // Minimum execution time: 14_888_000 picoseconds. + Weight::from_parts(15_269_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques OwnershipAcceptance (r:1 w:1) - /// Proof: Uniques OwnershipAcceptance (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques ClassAccount (r:0 w:2) - /// Proof: Uniques ClassAccount (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: `Uniques::OwnershipAcceptance` (r:1 w:1) + /// Proof: `Uniques::OwnershipAcceptance` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ClassAccount` (r:0 w:2) + /// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) fn transfer_ownership() -> Weight { // Proof Size summary in bytes: - // Measured: `464` + // Measured: `638` // Estimated: `3647` - // Minimum execution time: 29_846_000 picoseconds. - Weight::from_parts(30_377_000, 0) + // Minimum execution time: 33_433_000 picoseconds. + Weight::from_parts(34_204_000, 0) .saturating_add(Weight::from_parts(0, 3647)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) fn set_team() -> Weight { // Proof Size summary in bytes: - // Measured: `386` + // Measured: `353` // Estimated: `3647` - // Minimum execution time: 18_705_000 picoseconds. - Weight::from_parts(19_086_000, 0) + // Minimum execution time: 15_369_000 picoseconds. + Weight::from_parts(15_860_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques ClassAccount (r:0 w:1) - /// Proof: Uniques ClassAccount (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ClassAccount` (r:0 w:1) + /// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) fn force_item_status() -> Weight { // Proof Size summary in bytes: - // Measured: `386` + // Measured: `353` // Estimated: `3647` - // Minimum execution time: 23_423_000 picoseconds. - Weight::from_parts(23_874_000, 0) + // Minimum execution time: 20_008_000 picoseconds. + Weight::from_parts(20_518_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques InstanceMetadataOf (r:1 w:0) - /// Proof: Uniques InstanceMetadataOf (max_values: None, max_size: Some(331), added: 2806, mode: MaxEncodedLen) - /// Storage: Uniques Attribute (r:1 w:1) - /// Proof: Uniques Attribute (max_values: None, max_size: Some(605), added: 3080, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::InstanceMetadataOf` (r:1 w:0) + /// Proof: `Uniques::InstanceMetadataOf` (`max_values`: None, `max_size`: Some(331), added: 2806, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Attribute` (r:1 w:1) + /// Proof: `Uniques::Attribute` (`max_values`: None, `max_size`: Some(605), added: 3080, mode: `MaxEncodedLen`) fn set_attribute() -> Weight { // Proof Size summary in bytes: - // Measured: `808` + // Measured: `775` // Estimated: `4070` - // Minimum execution time: 57_478_000 picoseconds. - Weight::from_parts(58_800_000, 0) + // Minimum execution time: 53_901_000 picoseconds. + Weight::from_parts(54_763_000, 0) .saturating_add(Weight::from_parts(0, 4070)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques InstanceMetadataOf (r:1 w:0) - /// Proof: Uniques InstanceMetadataOf (max_values: None, max_size: Some(331), added: 2806, mode: MaxEncodedLen) - /// Storage: Uniques Attribute (r:1 w:1) - /// Proof: Uniques Attribute (max_values: None, max_size: Some(605), added: 3080, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::InstanceMetadataOf` (r:1 w:0) + /// Proof: `Uniques::InstanceMetadataOf` (`max_values`: None, `max_size`: Some(331), added: 2806, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Attribute` (r:1 w:1) + /// Proof: `Uniques::Attribute` (`max_values`: None, `max_size`: Some(605), added: 3080, mode: `MaxEncodedLen`) fn clear_attribute() -> Weight { // Proof Size summary in bytes: - // Measured: `1440` + // Measured: `1407` // Estimated: `4070` - // Minimum execution time: 55_735_000 picoseconds. - Weight::from_parts(56_746_000, 0) + // Minimum execution time: 51_977_000 picoseconds. + Weight::from_parts(52_808_000, 0) .saturating_add(Weight::from_parts(0, 4070)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques InstanceMetadataOf (r:1 w:1) - /// Proof: Uniques InstanceMetadataOf (max_values: None, max_size: Some(331), added: 2806, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::InstanceMetadataOf` (r:1 w:1) + /// Proof: `Uniques::InstanceMetadataOf` (`max_values`: None, `max_size`: Some(331), added: 2806, mode: `MaxEncodedLen`) fn set_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `452` + // Measured: `419` // Estimated: `3796` - // Minimum execution time: 42_850_000 picoseconds. - Weight::from_parts(43_713_000, 0) + // Minimum execution time: 37_340_000 picoseconds. + Weight::from_parts(38_342_000, 0) .saturating_add(Weight::from_parts(0, 3796)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques InstanceMetadataOf (r:1 w:1) - /// Proof: Uniques InstanceMetadataOf (max_values: None, max_size: Some(331), added: 2806, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::InstanceMetadataOf` (r:1 w:1) + /// Proof: `Uniques::InstanceMetadataOf` (`max_values`: None, `max_size`: Some(331), added: 2806, mode: `MaxEncodedLen`) fn clear_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `808` + // Measured: `775` // Estimated: `3796` - // Minimum execution time: 43_983_000 picoseconds. - Weight::from_parts(44_734_000, 0) + // Minimum execution time: 38_502_000 picoseconds. + Weight::from_parts(39_594_000, 0) .saturating_add(Weight::from_parts(0, 3796)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Uniques Class (r:1 w:1) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques ClassMetadataOf (r:1 w:1) - /// Proof: Uniques ClassMetadataOf (max_values: None, max_size: Some(299), added: 2774, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:1) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ClassMetadataOf` (r:1 w:1) + /// Proof: `Uniques::ClassMetadataOf` (`max_values`: None, `max_size`: Some(299), added: 2774, mode: `MaxEncodedLen`) fn set_collection_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `386` + // Measured: `353` // Estimated: `3764` - // Minimum execution time: 44_613_000 picoseconds. - Weight::from_parts(45_415_000, 0) + // Minimum execution time: 39_264_000 picoseconds. + Weight::from_parts(40_305_000, 0) .saturating_add(Weight::from_parts(0, 3764)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques ClassMetadataOf (r:1 w:1) - /// Proof: Uniques ClassMetadataOf (max_values: None, max_size: Some(299), added: 2774, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ClassMetadataOf` (r:1 w:1) + /// Proof: `Uniques::ClassMetadataOf` (`max_values`: None, `max_size`: Some(299), added: 2774, mode: `MaxEncodedLen`) fn clear_collection_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `709` + // Measured: `676` // Estimated: `3764` - // Minimum execution time: 42_430_000 picoseconds. - Weight::from_parts(43_561_000, 0) + // Minimum execution time: 37_700_000 picoseconds. + Weight::from_parts(38_221_000, 0) .saturating_add(Weight::from_parts(0, 3764)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) fn approve_transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `549` + // Measured: `516` // Estimated: `3647` - // Minimum execution time: 26_480_000 picoseconds. - Weight::from_parts(26_881_000, 0) + // Minimum execution time: 23_664_000 picoseconds. + Weight::from_parts(24_105_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) fn cancel_approval() -> Weight { // Proof Size summary in bytes: - // Measured: `582` + // Measured: `549` // Estimated: `3647` - // Minimum execution time: 26_219_000 picoseconds. - Weight::from_parts(26_991_000, 0) + // Minimum execution time: 23_874_000 picoseconds. + Weight::from_parts(24_255_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques OwnershipAcceptance (r:1 w:1) - /// Proof: Uniques OwnershipAcceptance (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + /// Storage: `Uniques::OwnershipAcceptance` (r:1 w:1) + /// Proof: `Uniques::OwnershipAcceptance` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) fn set_accept_ownership() -> Weight { // Proof Size summary in bytes: - // Measured: `142` + // Measured: `109` // Estimated: `3521` - // Minimum execution time: 20_528_000 picoseconds. - Weight::from_parts(21_240_000, 0) + // Minimum execution time: 17_633_000 picoseconds. + Weight::from_parts(18_184_000, 0) .saturating_add(Weight::from_parts(0, 3521)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques CollectionMaxSupply (r:1 w:1) - /// Proof: Uniques CollectionMaxSupply (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) + /// Storage: `Uniques::CollectionMaxSupply` (r:1 w:1) + /// Proof: `Uniques::CollectionMaxSupply` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) fn set_collection_max_supply() -> Weight { // Proof Size summary in bytes: - // Measured: `386` + // Measured: `353` // Estimated: `3647` - // Minimum execution time: 22_943_000 picoseconds. - Weight::from_parts(23_514_000, 0) + // Minimum execution time: 19_627_000 picoseconds. + Weight::from_parts(20_148_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques Asset (r:1 w:0) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Uniques ItemPriceOf (r:0 w:1) - /// Proof: Uniques ItemPriceOf (max_values: None, max_size: Some(105), added: 2580, mode: MaxEncodedLen) + /// Storage: `Uniques::Asset` (r:1 w:0) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ItemPriceOf` (r:0 w:1) + /// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(105), added: 2580, mode: `MaxEncodedLen`) fn set_price() -> Weight { // Proof Size summary in bytes: - // Measured: `376` + // Measured: `343` // Estimated: `3603` - // Minimum execution time: 22_092_000 picoseconds. - Weight::from_parts(22_502_000, 0) + // Minimum execution time: 18_915_000 picoseconds. + Weight::from_parts(19_457_000, 0) .saturating_add(Weight::from_parts(0, 3603)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Uniques Asset (r:1 w:1) - /// Proof: Uniques Asset (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: Uniques ItemPriceOf (r:1 w:1) - /// Proof: Uniques ItemPriceOf (max_values: None, max_size: Some(105), added: 2580, mode: MaxEncodedLen) - /// Storage: Uniques Class (r:1 w:0) - /// Proof: Uniques Class (max_values: None, max_size: Some(182), added: 2657, mode: MaxEncodedLen) - /// Storage: Uniques Account (r:0 w:2) - /// Proof: Uniques Account (max_values: None, max_size: Some(104), added: 2579, mode: MaxEncodedLen) + /// Storage: `Uniques::Asset` (r:1 w:1) + /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(138), added: 2613, mode: `MaxEncodedLen`) + /// Storage: `Uniques::ItemPriceOf` (r:1 w:1) + /// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(105), added: 2580, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Class` (r:1 w:0) + /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(182), added: 2657, mode: `MaxEncodedLen`) + /// Storage: `Uniques::Account` (r:0 w:2) + /// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(104), added: 2579, mode: `MaxEncodedLen`) fn buy_item() -> Weight { // Proof Size summary in bytes: - // Measured: `678` + // Measured: `645` // Estimated: `3647` - // Minimum execution time: 54_151_000 picoseconds. - Weight::from_parts(54_973_000, 0) + // Minimum execution time: 47_038_000 picoseconds. + Weight::from_parts(48_631_000, 0) .saturating_add(Weight::from_parts(0, 3647)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) diff --git a/runtime/development/src/weights/pallet_utility.rs b/runtime/development/src/weights/pallet_utility.rs index cecb4fa49a..dd180f3c76 100644 --- a/runtime/development/src/weights/pallet_utility.rs +++ b/runtime/development/src/weights/pallet_utility.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_utility` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_utility // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_utility.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_utility.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -37,18 +36,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 10_179_000 picoseconds. - Weight::from_parts(10_449_000, 0) + // Minimum execution time: 6_852_000 picoseconds. + Weight::from_parts(3_779_214, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 5_057 - .saturating_add(Weight::from_parts(8_509_036, 0).saturating_mul(c.into())) + // Standard Error: 2_185 + .saturating_add(Weight::from_parts(4_705_310, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_905_000 picoseconds. - Weight::from_parts(8_125_000, 0) + // Minimum execution time: 6_613_000 picoseconds. + Weight::from_parts(7_043_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -56,18 +55,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 10_309_000 picoseconds. - Weight::from_parts(26_318_204, 0) + // Minimum execution time: 6_603_000 picoseconds. + Weight::from_parts(6_813_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 5_214 - .saturating_add(Weight::from_parts(8_861_852, 0).saturating_mul(c.into())) + // Standard Error: 1_474 + .saturating_add(Weight::from_parts(5_109_510, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 13_876_000 picoseconds. - Weight::from_parts(14_467_000, 0) + // Minimum execution time: 9_368_000 picoseconds. + Weight::from_parts(9_769_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -75,10 +74,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 10_259_000 picoseconds. - Weight::from_parts(10_529_000, 0) + // Minimum execution time: 6_812_000 picoseconds. + Weight::from_parts(7_053_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 3_695 - .saturating_add(Weight::from_parts(8_495_881, 0).saturating_mul(c.into())) + // Standard Error: 1_310 + .saturating_add(Weight::from_parts(4_734_507, 0).saturating_mul(c.into())) } } diff --git a/runtime/development/src/weights/pallet_vesting.rs b/runtime/development/src/weights/pallet_vesting.rs index fabf138ed7..4defe13506 100644 --- a/runtime/development/src/weights/pallet_vesting.rs +++ b/runtime/development/src/weights/pallet_vesting.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_vesting` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_vesting // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_vesting.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_vesting.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,196 +31,214 @@ use core::marker::PhantomData; /// Weight functions for `pallet_vesting`. pub struct WeightInfo(PhantomData); impl pallet_vesting::WeightInfo for WeightInfo { - /// Storage: Vesting Vesting (r:1 w:1) - /// Proof: Vesting Vesting (max_values: None, max_size: Some(1057), added: 3532, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. - /// The range of component `s` is `[1, 28]`. + /// The range of component `s` is `[1, 3]`. fn vest_locked(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `305 + l * (25 ±0) + s * (36 ±0)` + // Measured: `269 + l * (25 ±0) + s * (37 ±0)` // Estimated: `4764` - // Minimum execution time: 45_906_000 picoseconds. - Weight::from_parts(45_306_801, 0) + // Minimum execution time: 39_564_000 picoseconds. + Weight::from_parts(39_981_239, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 921 - .saturating_add(Weight::from_parts(46_483, 0).saturating_mul(l.into())) - // Standard Error: 1_639 - .saturating_add(Weight::from_parts(83_544, 0).saturating_mul(s.into())) + // Standard Error: 1_037 + .saturating_add(Weight::from_parts(43_712, 0).saturating_mul(l.into())) + // Standard Error: 19_876 + .saturating_add(Weight::from_parts(229_682, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Vesting Vesting (r:1 w:1) - /// Proof: Vesting Vesting (max_values: None, max_size: Some(1057), added: 3532, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. - /// The range of component `s` is `[1, 28]`. + /// The range of component `s` is `[1, 3]`. fn vest_unlocked(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `305 + l * (25 ±0) + s * (36 ±0)` + // Measured: `269 + l * (25 ±0) + s * (37 ±0)` // Estimated: `4764` - // Minimum execution time: 51_837_000 picoseconds. - Weight::from_parts(52_154_167, 0) + // Minimum execution time: 41_808_000 picoseconds. + Weight::from_parts(43_269_209, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_373 - .saturating_add(Weight::from_parts(23_651, 0).saturating_mul(l.into())) - // Standard Error: 2_444 - .saturating_add(Weight::from_parts(67_156, 0).saturating_mul(s.into())) + // Standard Error: 1_148 + .saturating_add(Weight::from_parts(40_780, 0).saturating_mul(l.into())) + // Standard Error: 22_013 + .saturating_add(Weight::from_parts(93_733, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Vesting Vesting (r:1 w:1) - /// Proof: Vesting Vesting (max_values: None, max_size: Some(1057), added: 3532, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. - /// The range of component `s` is `[1, 28]`. + /// The range of component `s` is `[1, 3]`. fn vest_other_locked(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `408 + l * (25 ±0) + s * (36 ±0)` + // Measured: `372 + l * (25 ±0) + s * (37 ±0)` // Estimated: `4764` - // Minimum execution time: 47_980_000 picoseconds. - Weight::from_parts(47_314_080, 0) + // Minimum execution time: 41_467_000 picoseconds. + Weight::from_parts(41_941_236, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 970 - .saturating_add(Weight::from_parts(46_624, 0).saturating_mul(l.into())) - // Standard Error: 1_727 - .saturating_add(Weight::from_parts(91_088, 0).saturating_mul(s.into())) + // Standard Error: 1_114 + .saturating_add(Weight::from_parts(44_127, 0).saturating_mul(l.into())) + // Standard Error: 21_345 + .saturating_add(Weight::from_parts(397_753, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Vesting Vesting (r:1 w:1) - /// Proof: Vesting Vesting (max_values: None, max_size: Some(1057), added: 3532, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. - /// The range of component `s` is `[1, 28]`. + /// The range of component `s` is `[1, 3]`. fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `408 + l * (25 ±0) + s * (36 ±0)` + // Measured: `372 + l * (25 ±0) + s * (37 ±0)` // Estimated: `4764` - // Minimum execution time: 53_660_000 picoseconds. - Weight::from_parts(54_119_133, 0) + // Minimum execution time: 44_693_000 picoseconds. + Weight::from_parts(45_550_838, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_478 - .saturating_add(Weight::from_parts(27_585, 0).saturating_mul(l.into())) - // Standard Error: 2_631 - .saturating_add(Weight::from_parts(73_236, 0).saturating_mul(s.into())) + // Standard Error: 1_152 + .saturating_add(Weight::from_parts(42_064, 0).saturating_mul(l.into())) + // Standard Error: 22_075 + .saturating_add(Weight::from_parts(232_605, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Vesting Vesting (r:1 w:1) - /// Proof: Vesting Vesting (max_values: None, max_size: Some(1057), added: 3532, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. - /// The range of component `s` is `[0, 27]`. + /// The range of component `s` is `[0, 2]`. fn vested_transfer(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `512 + l * (25 ±0) + s * (36 ±0)` + // Measured: `283 + l * (25 ±0) + s * (134 ±0)` // Estimated: `4764` - // Minimum execution time: 103_073_000 picoseconds. - Weight::from_parts(104_737_511, 0) + // Minimum execution time: 93_545_000 picoseconds. + Weight::from_parts(92_993_209, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_698 - .saturating_add(Weight::from_parts(43_958, 0).saturating_mul(l.into())) - // Standard Error: 3_021 - .saturating_add(Weight::from_parts(88_455, 0).saturating_mul(s.into())) + // Standard Error: 1_581 + .saturating_add(Weight::from_parts(61_450, 0).saturating_mul(l.into())) + // Standard Error: 30_294 + .saturating_add(Weight::from_parts(1_040_335, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Vesting Vesting (r:1 w:1) - /// Proof: Vesting Vesting (max_values: None, max_size: Some(1057), added: 3532, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. - /// The range of component `s` is `[0, 27]`. + /// The range of component `s` is `[0, 2]`. fn force_vested_transfer(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `652 + l * (25 ±0) + s * (36 ±0)` + // Measured: `423 + l * (25 ±0) + s * (134 ±0)` // Estimated: `6196` - // Minimum execution time: 105_879_000 picoseconds. - Weight::from_parts(106_705_022, 0) + // Minimum execution time: 95_989_000 picoseconds. + Weight::from_parts(95_019_286, 0) .saturating_add(Weight::from_parts(0, 6196)) - // Standard Error: 2_206 - .saturating_add(Weight::from_parts(47_352, 0).saturating_mul(l.into())) - // Standard Error: 3_924 - .saturating_add(Weight::from_parts(108_241, 0).saturating_mul(s.into())) + // Standard Error: 2_465 + .saturating_add(Weight::from_parts(86_005, 0).saturating_mul(l.into())) + // Standard Error: 47_232 + .saturating_add(Weight::from_parts(2_593_636, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: Vesting Vesting (r:1 w:1) - /// Proof: Vesting Vesting (max_values: None, max_size: Some(1057), added: 3532, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. - /// The range of component `s` is `[2, 28]`. + /// The range of component `s` is `[2, 3]`. fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `407 + l * (25 ±0) + s * (36 ±0)` + // Measured: `374 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 49_543_000 picoseconds. - Weight::from_parts(49_143_417, 0) + // Minimum execution time: 41_888_000 picoseconds. + Weight::from_parts(42_630_812, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_221 - .saturating_add(Weight::from_parts(40_309, 0).saturating_mul(l.into())) - // Standard Error: 2_255 - .saturating_add(Weight::from_parts(74_526, 0).saturating_mul(s.into())) + // Standard Error: 1_054 + .saturating_add(Weight::from_parts(55_222, 0).saturating_mul(l.into())) + // Standard Error: 33_643 + .saturating_add(Weight::from_parts(196_992, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Vesting Vesting (r:1 w:1) - /// Proof: Vesting Vesting (max_values: None, max_size: Some(1057), added: 3532, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. - /// The range of component `s` is `[2, 28]`. + /// The range of component `s` is `[2, 3]`. fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `407 + l * (25 ±0) + s * (36 ±0)` + // Measured: `374 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 55_093_000 picoseconds. - Weight::from_parts(54_734_655, 0) + // Minimum execution time: 44_733_000 picoseconds. + Weight::from_parts(45_724_733, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 1_073 - .saturating_add(Weight::from_parts(43_640, 0).saturating_mul(l.into())) - // Standard Error: 1_982 - .saturating_add(Weight::from_parts(88_713, 0).saturating_mul(s.into())) + // Standard Error: 1_061 + .saturating_add(Weight::from_parts(46_527, 0).saturating_mul(l.into())) + // Standard Error: 33_842 + .saturating_add(Weight::from_parts(193_383, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(209), added: 2684, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[2, 3]`. + fn force_remove_vesting_schedule(l: u32, _s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `479 + l * (25 ±0) + s * (36 ±0)` + // Estimated: `4764` + // Minimum execution time: 47_398_000 picoseconds. + Weight::from_parts(49_317_822, 0) + .saturating_add(Weight::from_parts(0, 4764)) + // Standard Error: 1_305 + .saturating_add(Weight::from_parts(43_381, 0).saturating_mul(l.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - - fn force_remove_vesting_schedule(_: u32, _: u32) -> cumulus_primitives_core::Weight { - Weight::default() - } } diff --git a/runtime/development/src/weights/pallet_xcm.rs b/runtime/development/src/weights/pallet_xcm.rs index 79671573aa..ff8118d8bd 100644 --- a/runtime/development/src/weights/pallet_xcm.rs +++ b/runtime/development/src/weights/pallet_xcm.rs @@ -1,25 +1,24 @@ //! Autogenerated weights for `pallet_xcm` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 // Executed Command: // target/release/centrifuge-chain // benchmark // pallet -// --chain=development-local +// --chain=centrifuge-local // --steps=50 // --repeat=20 // --pallet=pallet_xcm // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=/tmp/runtime/development/src/weights/pallet_xcm.rs +// --output=/tmp/runtime/centrifuge/src/weights/pallet_xcm.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,54 +31,48 @@ use core::marker::PhantomData; /// Weight functions for `pallet_xcm`. pub struct WeightInfo(PhantomData); impl pallet_xcm::WeightInfo for WeightInfo { - /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) - /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem HostConfiguration (r:1 w:0) - /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) - /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn send() -> Weight { // Proof Size summary in bytes: - // Measured: `311` - // Estimated: `3776` - // Minimum execution time: 40_075_000 picoseconds. - Weight::from_parts(40_816_000, 0) - .saturating_add(Weight::from_parts(0, 3776)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry LocationToAssetId (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry LocationToAssetId (max_values: None, max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn teleport_assets() -> Weight { // Proof Size summary in bytes: - // Measured: `351` - // Estimated: `3816` - // Minimum execution time: 41_107_000 picoseconds. - Weight::from_parts(41_959_000, 0) - .saturating_add(Weight::from_parts(0, 3816)) - .saturating_add(T::DbWeight::get().reads(2)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: OrmlAssetRegistry LocationToAssetId (r:1 w:0) - /// Proof Skipped: OrmlAssetRegistry LocationToAssetId (max_values: None, max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn reserve_transfer_assets() -> Weight { // Proof Size summary in bytes: - // Measured: `351` - // Estimated: `3816` - // Minimum execution time: 40_215_000 picoseconds. - Weight::from_parts(41_167_000, 0) - .saturating_add(Weight::from_parts(0, 3816)) - .saturating_add(T::DbWeight::get().reads(2)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: Benchmark Override (r:0 w:0) - /// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute() -> Weight { // Proof Size summary in bytes: // Measured: `0` @@ -88,201 +81,156 @@ impl pallet_xcm::WeightInfo for WeightInfo { Weight::from_parts(18_446_744_073_709_551_000, 0) .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: PolkadotXcm SupportedVersion (r:0 w:1) - /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_xcm_version() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 13_796_000 picoseconds. - Weight::from_parts(14_317_000, 0) + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PolkadotXcm SafeXcmVersion (r:0 w:1) - /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) fn force_default_xcm_version() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_578_000 picoseconds. - Weight::from_parts(4_739_000, 0) + // Minimum execution time: 3_717_000 picoseconds. + Weight::from_parts(3_967_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PolkadotXcm VersionNotifiers (r:1 w:1) - /// Proof Skipped: PolkadotXcm VersionNotifiers (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm QueryCounter (r:1 w:1) - /// Proof Skipped: PolkadotXcm QueryCounter (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) - /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem HostConfiguration (r:1 w:0) - /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) - /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PolkadotXcm Queries (r:0 w:1) - /// Proof Skipped: PolkadotXcm Queries (max_values: None, max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_subscribe_version_notify() -> Weight { // Proof Size summary in bytes: - // Measured: `311` - // Estimated: `3776` - // Minimum execution time: 47_028_000 picoseconds. - Weight::from_parts(48_121_000, 0) - .saturating_add(Weight::from_parts(0, 3776)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(5)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: PolkadotXcm VersionNotifiers (r:1 w:1) - /// Proof Skipped: PolkadotXcm VersionNotifiers (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) - /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem HostConfiguration (r:1 w:0) - /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) - /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PolkadotXcm Queries (r:0 w:1) - /// Proof Skipped: PolkadotXcm Queries (max_values: None, max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_unsubscribe_version_notify() -> Weight { // Proof Size summary in bytes: - // Measured: `493` - // Estimated: `3958` - // Minimum execution time: 47_359_000 picoseconds. - Weight::from_parts(48_000_000, 0) - .saturating_add(Weight::from_parts(0, 3958)) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(4)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: PolkadotXcm XcmExecutionSuspended (r:0 w:1) - /// Proof Skipped: PolkadotXcm XcmExecutionSuspended (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `PolkadotXcm::XcmExecutionSuspended` (r:0 w:1) + /// Proof: `PolkadotXcm::XcmExecutionSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn force_suspension() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_629_000 picoseconds. - Weight::from_parts(4_799_000, 0) + // Minimum execution time: 3_877_000 picoseconds. + Weight::from_parts(4_147_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PolkadotXcm SupportedVersion (r:4 w:2) - /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: `PolkadotXcm::SupportedVersion` (r:5 w:2) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) fn migrate_supported_version() -> Weight { // Proof Size summary in bytes: - // Measured: `235` - // Estimated: `11125` - // Minimum execution time: 24_065_000 picoseconds. - Weight::from_parts(24_686_000, 0) - .saturating_add(Weight::from_parts(0, 11125)) - .saturating_add(T::DbWeight::get().reads(4)) + // Measured: `22` + // Estimated: `13387` + // Minimum execution time: 26_810_000 picoseconds. + Weight::from_parts(27_190_000, 0) + .saturating_add(Weight::from_parts(0, 13387)) + .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: PolkadotXcm VersionNotifiers (r:4 w:2) - /// Proof Skipped: PolkadotXcm VersionNotifiers (max_values: None, max_size: None, mode: Measured) + /// Storage: `PolkadotXcm::VersionNotifiers` (r:5 w:2) + /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) fn migrate_version_notifiers() -> Weight { // Proof Size summary in bytes: - // Measured: `239` - // Estimated: `11129` - // Minimum execution time: 23_945_000 picoseconds. - Weight::from_parts(24_486_000, 0) - .saturating_add(Weight::from_parts(0, 11129)) - .saturating_add(T::DbWeight::get().reads(4)) + // Measured: `26` + // Estimated: `13391` + // Minimum execution time: 27_080_000 picoseconds. + Weight::from_parts(27_462_000, 0) + .saturating_add(Weight::from_parts(0, 13391)) + .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: PolkadotXcm VersionNotifyTargets (r:5 w:0) - /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn already_notified_target() -> Weight { // Proof Size summary in bytes: - // Measured: `246` - // Estimated: `13611` - // Minimum execution time: 25_658_000 picoseconds. - Weight::from_parts(26_199_000, 0) - .saturating_add(Weight::from_parts(0, 13611)) - .saturating_add(T::DbWeight::get().reads(5)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 25_000_000 picoseconds. + Weight::from_parts(25_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: PolkadotXcm VersionNotifyTargets (r:2 w:1) - /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) - /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem HostConfiguration (r:1 w:0) - /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) - /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn notify_current_targets() -> Weight { // Proof Size summary in bytes: - // Measured: `378` - // Estimated: `6318` - // Minimum execution time: 43_642_000 picoseconds. - Weight::from_parts(44_773_000, 0) - .saturating_add(Weight::from_parts(0, 6318)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 325_000_000 picoseconds. + Weight::from_parts(325_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: PolkadotXcm VersionNotifyTargets (r:3 w:0) - /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:4 w:0) + /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) fn notify_target_migration_fail() -> Weight { // Proof Size summary in bytes: - // Measured: `206` - // Estimated: `8621` - // Minimum execution time: 13_896_000 picoseconds. - Weight::from_parts(14_437_000, 0) - .saturating_add(Weight::from_parts(0, 8621)) - .saturating_add(T::DbWeight::get().reads(3)) + // Measured: `69` + // Estimated: `10959` + // Minimum execution time: 19_667_000 picoseconds. + Weight::from_parts(20_097_000, 0) + .saturating_add(Weight::from_parts(0, 10959)) + .saturating_add(T::DbWeight::get().reads(4)) } - /// Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2) - /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:5 w:2) + /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) fn migrate_version_notify_targets() -> Weight { // Proof Size summary in bytes: - // Measured: `246` - // Estimated: `11136` - // Minimum execution time: 24_736_000 picoseconds. - Weight::from_parts(25_347_000, 0) - .saturating_add(Weight::from_parts(0, 11136)) - .saturating_add(T::DbWeight::get().reads(4)) + // Measured: `33` + // Estimated: `13398` + // Minimum execution time: 26_430_000 picoseconds. + Weight::from_parts(26_980_000, 0) + .saturating_add(Weight::from_parts(0, 13398)) + .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2) - /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) - /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) - /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) - /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem HostConfiguration (r:1 w:0) - /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) - /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn migrate_and_notify_old_targets() -> Weight { // Proof Size summary in bytes: - // Measured: `454` - // Estimated: `11344` - // Minimum execution time: 53_370_000 picoseconds. - Weight::from_parts(54_552_000, 0) - .saturating_add(Weight::from_parts(0, 11344)) - .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(4)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 325_000_000 picoseconds. + Weight::from_parts(325_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1) + /// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::Queries` (r:0 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn new_query() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 3_717_000 picoseconds. + Weight::from_parts(3_967_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `PolkadotXcm::Queries` (r:1 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn take_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `7576` + // Estimated: `11041` + // Minimum execution time: 43_632_000 picoseconds. + Weight::from_parts(44_152_000, 0) + .saturating_add(Weight::from_parts(0, 11041)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - - fn transfer_assets() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn new_query() -> cumulus_primitives_core::Weight { - Weight::default() - } - - fn take_response() -> cumulus_primitives_core::Weight { - Weight::default() - } } diff --git a/scripts/export_parachain_files.sh b/scripts/export_parachain_files.sh index 74b8ebbce2..8fef73db32 100755 --- a/scripts/export_parachain_files.sh +++ b/scripts/export_parachain_files.sh @@ -25,5 +25,5 @@ if [[ $should_build == "true" ]]; then fi echo "Exporting State & Wasm" -$PWD/target/release/centrifuge-chain export-genesis-head --chain node/res/$chain_name-spec-raw.json > $chain_name-genesis-state +$PWD/target/release/centrifuge-chain export-genesis-state --chain node/res/$chain_name-spec-raw.json > $chain_name-genesis-state $PWD/target/release/centrifuge-chain export-genesis-wasm --chain node/res/$chain_name-spec-raw.json > $chain_name-genesis-wasm diff --git a/scripts/init.sh b/scripts/init.sh index 5f38851df3..e86b83ce7a 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -74,10 +74,10 @@ onboard-parachain) wasm_location="$onboard_dir/${parachain}-${para_id}.wasm" if [ "$docker_onboard" == "true" ]; then - genesis=$(docker run centrifugeio/centrifuge-chain:${cc_docker_image_tag} export-genesis-head --chain="${parachain}") + genesis=$(docker run centrifugeio/centrifuge-chain:${cc_docker_image_tag} export-genesis-state --chain="${parachain}") docker run centrifugeio/centrifuge-chain:${cc_docker_image_tag} export-genesis-wasm --chain="${parachain}" > $wasm_location else - genesis=$(./target/release/centrifuge-chain export-genesis-head --chain="${parachain}") + genesis=$(./target/release/centrifuge-chain export-genesis-state --chain="${parachain}") ./target/release/centrifuge-chain export-genesis-wasm --chain="${parachain}" > $wasm_location fi From 3b6a8c985b46e1f355b9e272dd9c1456ce8547df Mon Sep 17 00:00:00 2001 From: Frederik Gartenmeister Date: Thu, 13 Jun 2024 11:32:06 +0200 Subject: [PATCH 15/21] Feat: LP integration tests (#1720) * feat: wip build script * wip: intermediate * feat: update lp submodule * feat: update lp submodule * feat: intermedaite * feat: deploy first code * feat: add raw * feat: add raw * feat: first run for deploying on sol side * feat: add notes for tomorrow * feat: evm side setup * update remote lp * feat: try using local script * feat: update lp deps * fix: latest sol version does not have reference anymore. * feat: erc20 deploys * feat: set router * feat: register assets * feat: add currencies to local lp deployment * feat: test AddCurrency msg * chore: reorg * feat: addPool test * chore: refactor prep new tests * chore: refactor tests * wip: test add_tranche * fix: apply merge * docs: improve + show todos * chore: finish setup tests * fix: use correct evm currency addresses * fix: setup requirements * tests: finish allow, disallow investment currency * feat: new evm exposure * fix: add_currency and add_pool * fix: rm unssued * chore: clean up * feat: allow different verifier after process outbound * wip: adding redo failing test * feat: failure testable * feat: register evm contract * fix: lp deployment * chore: update submodule branch * refactor: sync evm setup order with solidity * deps: update submodule * wip: update submodule * wip: attempt different sourceAddress * Fix/lp integration tests member (#1779) * wip * feat: update member * feat: mint assets to investors at setup * tests: finish add_tranche * chore: add names for lp tranche id stable coins * tests: finish allow_investment_currency * tests: finish disallow_investment_currency * fix: add evm approve to investor setup * wip: increase invest order * tests: finish update_tranche_token_metadata * tests: finish update_tranche_token_price * tests: add transfer_tranche_tokens * tests: add transfer_tokens * chore: apply suggestions from code review * chore: remove increase invest test * fmt: taplo * wip: fix missing EVM build in target dir * wip attempt 2: add submodule update * wip 3: use du instead of ll debug * wip 4: graceful panic handler ci * wip 4 * wip 5 * wip 5 * wip 6 * wip 7 * wip * wip * wip * wip 10 * wip * wip * wip * wip * wip * wip * wip * wip * wip: disable scache * wip: use SCCACHE_RECACHE * wip: reenable sscache * wip: investment_collect * fix: issue with precompile account codes * fix: runtime generic precompile * wip: adding 3 pool with foreign usdc * wip: invest working, verifying collect * feat: invest and collect * feat: cancel investment * wip * feat: additional test * Add checks for submodules in GHA * commit-test (#1822) * commit-test * try with the home directory full * testing * supress cargo output * keep checking submodules * typo * typo 2 * remove echo * typo "s" * Add ./ to folders in ci run * better checks * better runtime folder logic * unbound variable * slow down logs * remove concurrency, add logs to output * completely removed concurrency * infinite loop * output the contents of target dir * log current dir and files * break the loop when cargo finishes * max depth of target output * check for release folder * remove the target output verbose * output cargo logs into a file * log current dir and files also in error msg * remove the idea of output file * try to get rust logs working * fix: error logs * disable verbose cargo test logs * fix: typo * add rust cwd * fix cwd for submodules dir * debug submodules dir * distinguish between error and not error * more lightweight error * debug cwd in evm.rs * add tmp build step * fix verbose logging * add foundry * add more printlns * reduce noise strict * revert debug changes * docs: improve LP_SOL_SOURCES error msg and rustdocs * fmt: taplo --------- Co-authored-by: William Freudenberger * fix: clippy 1 * fix: clippy 2 * fix: clippy 3 * ci: re-enable submodule pulling (#1863) * wip: try roundtrip transfer * feat: roundtrip tests * fix: add_tranche * feat: tt transfer to Centrifuge * chore: remove debug tests * chore: rm test that is now covered in lp/transfers * feat: move existing test to generic * fix: eth tx after merge main * fix: failing precompile test * feat: enable precompile for all runtimes * fix: transfers * fix: after merge main * fix: fmt with nightly * fix: import * fix: unneeded import * fix: env and block * fix: ethereum transact inte test * chore: review suggestion use parachain_state_mut * fix: part 1 build script * chore: mv naming for Luis * chore: make precompile associated type * fix: wrong imports of Precompiles from runtimes * chore: remove unneeded conversion H160 --------- Co-authored-by: William Freudenberger Co-authored-by: Guillermo Perez --- .github/workflows/sanity-checks.yml | 19 +- .gitmodules | 4 + Cargo.lock | 19 +- libs/types/src/domain_address.rs | 12 +- libs/types/src/tokens.rs | 6 +- libs/utils/src/lib.rs | 6 +- node/src/chain_spec.rs | 34 +- pallets/ethereum-transaction/src/lib.rs | 2 +- pallets/investments/src/tests.rs | 6 +- .../axelar-gateway-precompile/src/lib.rs | 6 + .../routers/src/lib.rs | 14 + .../routers/src/routers/axelar_evm.rs | 13 + pallets/liquidity-pools/src/lib.rs | 8 +- pallets/liquidity-pools/src/message.rs | 22 +- pallets/pool-system/src/pool_types.rs | 3 +- pallets/pool-system/src/tranches.rs | 9 +- pallets/swaps/src/lib.rs | 4 +- runtime/altair/src/lib.rs | 14 +- runtime/centrifuge/src/lib.rs | 14 +- runtime/common/Cargo.toml | 2 + runtime/common/src/evm/precompile.rs | 20 + runtime/common/src/lib.rs | 3 +- runtime/common/src/xcm.rs | 2 +- runtime/development/src/lib.rs | 15 +- runtime/integration-tests/Cargo.toml | 6 +- runtime/integration-tests/build.rs | 114 + .../src/generic/cases/ethereum_transaction.rs | 2 +- .../src/generic/cases/investments.rs | 10 +- .../src/generic/cases/liquidity_pools.rs | 547 +---- .../src/generic/cases/loans.rs | 12 +- .../src/generic/cases/lp/investments.rs | 747 +++++++ .../src/generic/cases/lp/mod.rs | 1956 +++++++++++++++++ .../src/generic/cases/lp/pool_management.rs | 606 +++++ .../src/generic/cases/lp/transfers.rs | 391 ++++ .../src/generic/cases/oracles.rs | 8 +- .../src/generic/cases/precompile.rs | 8 +- .../src/generic/cases/restricted_transfers.rs | 71 +- .../integration-tests/src/generic/config.rs | 21 +- runtime/integration-tests/src/generic/env.rs | 65 +- .../src/generic/envs/evm_env.rs | 218 ++ .../src/generic/envs/fudge_env.rs | 2 +- .../src/generic/envs/runtime_env.rs | 41 +- .../integration-tests/src/generic/impls.rs | 1 + runtime/integration-tests/src/generic/mod.rs | 2 + .../src/generic/utils/currency.rs | 27 +- .../src/generic/utils/democracy.rs | 2 +- .../src/generic/utils/evm.rs | 211 ++ .../src/generic/utils/genesis.rs | 45 +- .../src/generic/utils/mod.rs | 164 +- .../src/generic/utils/pool.rs | 142 ++ .../src/generic/utils/tokens.rs | 43 + .../integration-tests/src/utils/accounts.rs | 181 +- .../submodules/liquidity-pools | 1 + 53 files changed, 5070 insertions(+), 831 deletions(-) create mode 100644 .gitmodules create mode 100644 runtime/integration-tests/build.rs create mode 100644 runtime/integration-tests/src/generic/cases/lp/investments.rs create mode 100644 runtime/integration-tests/src/generic/cases/lp/mod.rs create mode 100644 runtime/integration-tests/src/generic/cases/lp/pool_management.rs create mode 100644 runtime/integration-tests/src/generic/cases/lp/transfers.rs create mode 100644 runtime/integration-tests/src/generic/envs/evm_env.rs create mode 100644 runtime/integration-tests/src/generic/utils/evm.rs create mode 100644 runtime/integration-tests/src/generic/utils/pool.rs create mode 100644 runtime/integration-tests/src/generic/utils/tokens.rs create mode 160000 runtime/integration-tests/submodules/liquidity-pools diff --git a/.github/workflows/sanity-checks.yml b/.github/workflows/sanity-checks.yml index 9eea1f6e69..bc6f41776e 100644 --- a/.github/workflows/sanity-checks.yml +++ b/.github/workflows/sanity-checks.yml @@ -5,19 +5,21 @@ concurrency: group: 'tests-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' cancel-in-progress: true permissions: - id-token: write - contents: read + id-token: write + contents: read jobs: test-n-lint: name: ${{ matrix.target }} runs-on: ubuntu-latest-8-cores strategy: matrix: - target: [test-general, test-integration, - lint-fmt, lint-clippy, cargo-build, docs-build, lint-taplo] + target: [ test-general, test-integration, + lint-fmt, lint-clippy, cargo-build, docs-build, lint-taplo ] steps: - name: Check out code uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b #4.1.4 + with: + submodules: 'recursive' - name: Prep build uses: ./.github/actions/prep-ubuntu @@ -27,6 +29,10 @@ jobs: GWIP: ${{ secrets.GWIP_SCCACHE }} GSA: ${{ secrets.GSA_SCCACHE }} + # Required for integration tests evm interaction + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + - name: Runing cargo ${{ matrix.target }} run: ./ci/run-check.sh env: @@ -38,10 +44,12 @@ jobs: runs-on: ubuntu-latest #-4-cores strategy: matrix: - runtime: [altair, centrifuge] + runtime: [ altair, centrifuge ] steps: - name: Check out code uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b #4.1.4 + with: + submodules: 'recursive' - name: Prep build uses: ./.github/actions/prep-ubuntu @@ -50,6 +58,7 @@ jobs: GWIP: ${{ secrets.GWIP_SCCACHE }} GSA: ${{ secrets.GSA_SCCACHE }} + - name: Runing cargo ${{ matrix.target }} run: ./ci/run-check.sh env: diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..fa90d42509 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "runtime/integration-tests/submodules/liquidity-pools"] + path = runtime/integration-tests/submodules/liquidity-pools + url = git@github.com:centrifuge/liquidity-pools.git + branch = centrifuge-chain/release-v1.0 diff --git a/Cargo.lock b/Cargo.lock index 19a2c77ca9..0649571452 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1360,9 +1360,9 @@ checksum = "fd6c0e7b807d60291f42f33f58480c0bfafe28ed08286446f45e463728cf9c1c" [[package]] name = "cc" -version = "1.0.98" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" +checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" dependencies = [ "jobserver", "libc", @@ -3504,18 +3504,18 @@ dependencies = [ [[package]] name = "enumflags2" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3278c9d5fb675e0a51dabcf4c0d355f692b064171535ba72361be1528a9d8e8d" +checksum = "d232db7f5956f3f14313dc2f87985c58bd2c695ce124c8cdd984e08e15ac133d" dependencies = [ "enumflags2_derive", ] [[package]] name = "enumflags2_derive" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" +checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2", "quote", @@ -3576,7 +3576,10 @@ checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" dependencies = [ "ethereum-types", "hex", + "once_cell", + "regex", "serde", + "serde_json", "sha3", "thiserror", "uint", @@ -11609,6 +11612,7 @@ dependencies = [ "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", "cumulus-primitives-core", + "fp-evm", "frame-benchmarking", "frame-support", "frame-system", @@ -11723,6 +11727,7 @@ dependencies = [ "development-runtime", "ethabi", "ethereum", + "fp-evm", "fp-self-contained", "frame-support", "frame-system", @@ -11785,6 +11790,7 @@ dependencies = [ "pallet-sudo", "pallet-swaps", "pallet-timestamp", + "pallet-token-mux", "pallet-transaction-payment", "pallet-transfer-allowlist", "pallet-treasury", @@ -11808,6 +11814,7 @@ dependencies = [ "sc-executor", "sc-service", "serde", + "serde_json", "sp-api", "sp-block-builder", "sp-consensus-aura", diff --git a/libs/types/src/domain_address.rs b/libs/types/src/domain_address.rs index d04cb34ffa..dc450b683a 100644 --- a/libs/types/src/domain_address.rs +++ b/libs/types/src/domain_address.rs @@ -85,6 +85,16 @@ pub enum DomainAddress { EVM(EVMChainId, [u8; 20]), } +impl DomainAddress { + pub fn evm(chain_id: EVMChainId, address: [u8; 20]) -> Self { + Self::EVM(chain_id, address) + } + + pub fn centrifuge(address: [u8; 32]) -> Self { + Self::Centrifuge(address) + } +} + impl From for Domain { fn from(x: DomainAddress) -> Self { match x { @@ -100,7 +110,7 @@ impl DomainAddress { pub fn address(&self) -> [u8; 32] { match self.clone() { Self::Centrifuge(x) => x, - Self::EVM(_, x) => vec_to_fixed_array(x.to_vec()), + Self::EVM(_, x) => vec_to_fixed_array(x), } } diff --git a/libs/types/src/tokens.rs b/libs/types/src/tokens.rs index 495716e280..1173d55835 100644 --- a/libs/types/src/tokens.rs +++ b/libs/types/src/tokens.rs @@ -175,18 +175,18 @@ pub struct GeneralCurrencyIndex { _phantom: PhantomData, } -impl TryInto> for CurrencyId +impl TryFrom for GeneralCurrencyIndex where Index: From, Prefix: Get<[u8; 12]>, { type Error = DispatchError; - fn try_into(self) -> Result, Self::Error> { + fn try_from(value: CurrencyId) -> Result, Self::Error> { let mut bytes = [0u8; 16]; bytes[..12].copy_from_slice(&Prefix::get()); - let currency_bytes: [u8; 4] = match &self { + let currency_bytes: [u8; 4] = match &value { CurrencyId::ForeignAsset(id32) => Ok(id32.to_be_bytes()), _ => Err(DispatchError::Token(TokenError::Unsupported)), }?; diff --git a/libs/utils/src/lib.rs b/libs/utils/src/lib.rs index fc57032ca1..dd447833bd 100644 --- a/libs/utils/src/lib.rs +++ b/libs/utils/src/lib.rs @@ -19,10 +19,10 @@ use sp_std::{cmp::min, vec::Vec}; /// Build a fixed-size array using as many elements from `src` as possible /// without overflowing and ensuring that the array is 0 padded in the case /// where `src.len()` is smaller than S. -pub fn vec_to_fixed_array(src: Vec) -> [u8; S] { +pub fn vec_to_fixed_array(src: impl AsRef<[u8]>) -> [u8; S] { let mut dest = [0; S]; - let len = min(src.len(), S); - dest[..len].copy_from_slice(&src.as_slice()[..len]); + let len = min(src.as_ref().len(), S); + dest[..len].copy_from_slice(&src.as_ref()[..len]); dest } diff --git a/node/src/chain_spec.rs b/node/src/chain_spec.rs index dd7945d0ea..9a7f3a5776 100644 --- a/node/src/chain_spec.rs +++ b/node/src/chain_spec.rs @@ -22,8 +22,6 @@ // module level. #![allow(clippy::derive_partial_eq_without_eq)] -use std::collections::BTreeMap; - use altair_runtime::constants::currency::{AIR, MILLI_AIR}; use cfg_primitives::{ currency_decimals, parachains, AccountId, AuraId, Balance, BlockNumber, CFG, MILLI_CFG, @@ -36,11 +34,11 @@ use cfg_types::{ use cfg_utils::vec_to_fixed_array; use cumulus_primitives_core::ParaId; use hex_literal::hex; -use runtime_common::{account_conversion::AccountConverter, evm::precompile::H160Addresses}; +use runtime_common::account_conversion::AccountConverter; use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup}; use sc_service::{ChainType, Properties}; use serde::{Deserialize, Serialize}; -use sp_core::{sr25519, Encode, Pair, Public, H160}; +use sp_core::{sr25519, Encode, Pair, Public}; use sp_runtime::{ traits::{IdentifyAccount, Verify}, FixedPointNumber, @@ -58,10 +56,7 @@ pub type CentrifugeChainSpec = pub type DevelopmentChainSpec = sc_service::GenericChainSpec; -use altair_runtime::AltairPrecompiles; -use centrifuge_runtime::CentrifugePrecompiles; use cfg_types::fixed_point::Rate; -use development_runtime::DevelopmentPrecompiles; /// Helper function to generate a crypto pair from seed pub fn get_from_seed(seed: &str) -> ::Public { @@ -357,7 +352,7 @@ fn centrifuge_genesis( "chainId": Into::::into(chain_id), }, "evm": { - "accounts": precompile_account_genesis::(), + "accounts": runtime_common::evm::precompile::utils::precompile_account_genesis::(), }, "polkadotXcm": { "safeXcmVersion": Some(SAFE_XCM_VERSION), @@ -451,7 +446,7 @@ fn altair_genesis( "chainId": Into::::into(chain_id), }, "evm": { - "accounts": precompile_account_genesis::(), + "accounts": runtime_common::evm::precompile::utils::precompile_account_genesis::(), }, "polkadotXcm": { "safeXcmVersion": Some(SAFE_XCM_VERSION), @@ -594,7 +589,7 @@ fn development_genesis( "chainId": Into::::into(chain_id), }, "evm": { - "accounts": precompile_account_genesis::(), + "accounts": runtime_common::evm::precompile::utils::precompile_account_genesis::(), }, "polkadotXcm": { "safeXcmVersion": Some(SAFE_XCM_VERSION), @@ -648,7 +643,7 @@ fn asset_registry_assets() -> Vec<(CurrencyId, Vec)> { Parachain(parachains::rococo::acala::ID), GeneralKey { length: parachains::rococo::acala::AUSD_KEY.to_vec().len() as u8, - data: vec_to_fixed_array(parachains::rococo::acala::AUSD_KEY.to_vec()), + data: vec_to_fixed_array(parachains::rococo::acala::AUSD_KEY), }, ], ))), @@ -724,20 +719,3 @@ fn asset_registry_assets() -> Vec<(CurrencyId, Vec)> { ), ] } - -fn precompile_account_genesis( -) -> BTreeMap { - PrecompileSet::h160_addresses() - .map(|addr| { - ( - addr, - fp_evm::GenesisAccount { - nonce: Default::default(), - balance: Default::default(), - storage: Default::default(), - code: runtime_common::evm::precompile::utils::REVERT_BYTECODE.to_vec(), - }, - ) - }) - .collect() -} diff --git a/pallets/ethereum-transaction/src/lib.rs b/pallets/ethereum-transaction/src/lib.rs index e97df5184e..e3e4622409 100644 --- a/pallets/ethereum-transaction/src/lib.rs +++ b/pallets/ethereum-transaction/src/lib.rs @@ -158,7 +158,7 @@ pub mod pallet { }), })?; - // NOTE: The Ethereuem side of things never returns a DispatchError + // NOTE: The Ethereum side of things never returns a DispatchError // if the execution failed. But we can check that manually by // querying the `Pending` storage of the pallet-ethereum. let pending = pallet_ethereum::Pending::::get(); diff --git a/pallets/investments/src/tests.rs b/pallets/investments/src/tests.rs index e0f2ca4dc6..771836b257 100644 --- a/pallets/investments/src/tests.rs +++ b/pallets/investments/src/tests.rs @@ -2510,7 +2510,8 @@ fn collecting_fully_works() { #[allow(non_snake_case)] let SINGLE_REDEEM_AMOUNT_C = 50 * CURRENCY; #[allow(non_snake_case)] - let TOTAL_REDEEM_AMOUNT = SINGLE_REDEEM_AMOUNT_A + SINGLE_REDEEM_AMOUNT_B + SINGLE_REDEEM_AMOUNT_C; + let TOTAL_REDEEM_AMOUNT = + SINGLE_REDEEM_AMOUNT_A + SINGLE_REDEEM_AMOUNT_B + SINGLE_REDEEM_AMOUNT_C; #[allow(non_snake_case)] let SINGLE_INVEST_AMOUNT_A = 50 * CURRENCY; #[allow(non_snake_case)] @@ -2518,7 +2519,8 @@ fn collecting_fully_works() { #[allow(non_snake_case)] let SINGLE_INVEST_AMOUNT_C = 50 * CURRENCY; #[allow(non_snake_case)] - let TOTAL_INVEST_AMOUNT = SINGLE_INVEST_AMOUNT_A + SINGLE_INVEST_AMOUNT_B + SINGLE_INVEST_AMOUNT_C; + let TOTAL_INVEST_AMOUNT = + SINGLE_INVEST_AMOUNT_A + SINGLE_INVEST_AMOUNT_B + SINGLE_INVEST_AMOUNT_C; #[allow(non_snake_case)] let FULL_FULFILL = FulfillmentWithPrice { of_amount: Perquintill::one(), diff --git a/pallets/liquidity-pools-gateway/axelar-gateway-precompile/src/lib.rs b/pallets/liquidity-pools-gateway/axelar-gateway-precompile/src/lib.rs index 7509aefa23..dcd1d3b134 100644 --- a/pallets/liquidity-pools-gateway/axelar-gateway-precompile/src/lib.rs +++ b/pallets/liquidity-pools-gateway/axelar-gateway-precompile/src/lib.rs @@ -57,6 +57,12 @@ pub struct SourceConverter { pub domain: Domain, } +impl SourceConverter { + pub fn new(domain: Domain) -> Self { + Self { domain } + } +} + impl SourceConverter { pub fn try_convert(&self, maybe_address: &[u8]) -> Option { match self.domain { diff --git a/pallets/liquidity-pools-gateway/routers/src/lib.rs b/pallets/liquidity-pools-gateway/routers/src/lib.rs index 7010571e18..4d8ed5f3cb 100644 --- a/pallets/liquidity-pools-gateway/routers/src/lib.rs +++ b/pallets/liquidity-pools-gateway/routers/src/lib.rs @@ -144,6 +144,20 @@ where pub _marker: PhantomData, } +impl EVMRouter +where + T: frame_system::Config + pallet_ethereum_transaction::Config + pallet_evm::Config, + OriginFor: + From + Into>>, +{ + pub fn new(evm_domain: EVMDomain) -> Self { + Self { + evm_domain, + _marker: Default::default(), + } + } +} + impl EVMRouter where T: frame_system::Config + pallet_ethereum_transaction::Config + pallet_evm::Config, diff --git a/pallets/liquidity-pools-gateway/routers/src/routers/axelar_evm.rs b/pallets/liquidity-pools-gateway/routers/src/routers/axelar_evm.rs index 865557b848..76af791461 100644 --- a/pallets/liquidity-pools-gateway/routers/src/routers/axelar_evm.rs +++ b/pallets/liquidity-pools-gateway/routers/src/routers/axelar_evm.rs @@ -57,6 +57,19 @@ where OriginFor: From + Into>>, { + pub fn new( + router: EVMRouter, + evm_chain: BoundedVec>, + liquidity_pools_contract_address: H160, + ) -> Self { + Self { + router, + evm_chain, + liquidity_pools_contract_address, + _marker: Default::default(), + } + } + /// Calls the init function on the EVM router. pub fn do_init(&self) -> DispatchResult { self.router.do_init() diff --git a/pallets/liquidity-pools/src/lib.rs b/pallets/liquidity-pools/src/lib.rs index 6235475f82..2d1a0dea54 100644 --- a/pallets/liquidity-pools/src/lib.rs +++ b/pallets/liquidity-pools/src/lib.rs @@ -411,8 +411,8 @@ pub mod pallet { let investment_id = Self::derive_invest_id(pool_id, tranche_id)?; let metadata = T::AssetRegistry::metadata(&investment_id.into()) .ok_or(Error::::TrancheMetadataNotFound)?; - let token_name = vec_to_fixed_array(metadata.name.into_inner()); - let token_symbol = vec_to_fixed_array(metadata.symbol.into_inner()); + let token_name = vec_to_fixed_array(metadata.name); + let token_symbol = vec_to_fixed_array(metadata.symbol); // Send the message to the domain T::OutboundQueue::submit( @@ -793,8 +793,8 @@ pub mod pallet { let investment_id = Self::derive_invest_id(pool_id, tranche_id)?; let metadata = T::AssetRegistry::metadata(&investment_id.into()) .ok_or(Error::::TrancheMetadataNotFound)?; - let token_name = vec_to_fixed_array(metadata.name.into_inner()); - let token_symbol = vec_to_fixed_array(metadata.symbol.into_inner()); + let token_name = vec_to_fixed_array(metadata.name); + let token_symbol = vec_to_fixed_array(metadata.symbol); T::OutboundQueue::submit( who, diff --git a/pallets/liquidity-pools/src/message.rs b/pallets/liquidity-pools/src/message.rs index 5accba09b3..d268876f02 100644 --- a/pallets/liquidity-pools/src/message.rs +++ b/pallets/liquidity-pools/src/message.rs @@ -1039,8 +1039,8 @@ mod tests { LiquidityPoolsMessage::AddTranche { pool_id: 1, tranche_id: default_tranche_id(), - token_name: vec_to_fixed_array("Some Name".to_string().into_bytes()), - token_symbol: vec_to_fixed_array("SYMBOL".to_string().into_bytes()), + token_name: vec_to_fixed_array(b"Some Name"), + token_symbol: vec_to_fixed_array( b"SYMBOL"), decimals: 15, restriction_set: 1, }, @@ -1081,7 +1081,7 @@ mod tests { LiquidityPoolsMessage::Transfer { currency: TOKEN_ID, sender: default_address_32(), - receiver: vec_to_fixed_array(default_address_20().to_vec()), + receiver: vec_to_fixed_array(default_address_20()), amount: AMOUNT, }, "070000000000000000000000000eb5ec7b45645645645645645645645645645645645645645645645645645645645645641231231231231231231231231231231231231231000000000000000000000000000000000052b7d2dcc80cd2e4000000" @@ -1093,7 +1093,7 @@ mod tests { test_encode_decode_identity( LiquidityPoolsMessage::Transfer { currency: TOKEN_ID, - sender: vec_to_fixed_array(default_address_20().to_vec()), + sender: vec_to_fixed_array(default_address_20()), receiver: default_address_32(), amount: AMOUNT, }, @@ -1124,7 +1124,7 @@ mod tests { LiquidityPoolsMessage::TransferTrancheTokens { pool_id: 1, tranche_id: default_tranche_id(), - sender: vec_to_fixed_array(default_address_20().to_vec()), + sender: vec_to_fixed_array(default_address_20()), domain: Domain::Centrifuge, receiver: default_address_32(), amount: AMOUNT, @@ -1247,7 +1247,7 @@ mod tests { LiquidityPoolsMessage::ExecutedDecreaseInvestOrder { pool_id: POOL_ID, tranche_id: default_tranche_id(), - investor: vec_to_fixed_array(default_address_20().to_vec()), + investor: vec_to_fixed_array(default_address_20()), currency: TOKEN_ID, currency_payout: AMOUNT / 2, remaining_invest_amount: AMOUNT / 4, @@ -1262,7 +1262,7 @@ mod tests { LiquidityPoolsMessage::ExecutedDecreaseRedeemOrder { pool_id: POOL_ID, tranche_id: default_tranche_id(), - investor: vec_to_fixed_array(default_address_20().to_vec()), + investor: vec_to_fixed_array(default_address_20()), currency: TOKEN_ID, tranche_tokens_payout: AMOUNT / 2, remaining_redeem_amount: AMOUNT / 4, @@ -1277,7 +1277,7 @@ mod tests { LiquidityPoolsMessage::ExecutedCollectInvest { pool_id: POOL_ID, tranche_id: default_tranche_id(), - investor: vec_to_fixed_array(default_address_20().to_vec()), + investor: vec_to_fixed_array(default_address_20()), currency: TOKEN_ID, currency_payout: AMOUNT, tranche_tokens_payout: AMOUNT / 2, @@ -1293,7 +1293,7 @@ mod tests { LiquidityPoolsMessage::ExecutedCollectRedeem { pool_id: POOL_ID, tranche_id: default_tranche_id(), - investor: vec_to_fixed_array(default_address_20().to_vec()), + investor: vec_to_fixed_array(default_address_20()), currency: TOKEN_ID, currency_payout: AMOUNT, tranche_tokens_payout: AMOUNT / 2, @@ -1329,8 +1329,8 @@ mod tests { LiquidityPoolsMessage::UpdateTrancheTokenMetadata { pool_id: 1, tranche_id: default_tranche_id(), - token_name: vec_to_fixed_array("Some Name".to_string().into_bytes()), - token_symbol: vec_to_fixed_array("SYMBOL".to_string().into_bytes()), + token_name: vec_to_fixed_array(b"Some Name"), + token_symbol: vec_to_fixed_array(b"SYMBOL"), }, "170000000000000001811acd5b3f17c06841c7e41e9e04cb1b536f6d65204e616d65000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000053594d424f4c0000000000000000000000000000000000000000000000000000", ) diff --git a/pallets/pool-system/src/pool_types.rs b/pallets/pool-system/src/pool_types.rs index c648fedef1..d2a5a4551c 100644 --- a/pallets/pool-system/src/pool_types.rs +++ b/pallets/pool-system/src/pool_types.rs @@ -208,7 +208,8 @@ impl< TrancheId, PoolId, MaxTranches, - > where + > +where Balance: FixedPointOperand + BaseArithmetic + Unsigned + From + sp_arithmetic::MultiplyRational, CurrencyId: Copy, diff --git a/pallets/pool-system/src/tranches.rs b/pallets/pool-system/src/tranches.rs index 2cd337bf0b..afa0a5ebbf 100644 --- a/pallets/pool-system/src/tranches.rs +++ b/pallets/pool-system/src/tranches.rs @@ -2909,10 +2909,11 @@ pub mod test { mod rebalance { use super::*; - const TOTAL_ASSETS: Balance = DEBT_RES - + RESERVE_RES + DEBT_NONRES_1 - + RESERVE_NONRES_1 - + DEBT_NONRES_2 + RESERVE_NONRES_2; + const TOTAL_ASSETS: Balance = + DEBT_RES + + RESERVE_RES + DEBT_NONRES_1 + + RESERVE_NONRES_1 + + DEBT_NONRES_2 + RESERVE_NONRES_2; const RATIO_NONRES_1: Balance = DEBT_NONRES_1 + RESERVE_NONRES_1; const RATIO_NONRES_2: Balance = DEBT_NONRES_2 + RESERVE_NONRES_2; const DEFAULT_NAV: Balance = 1_234_567_890; diff --git a/pallets/swaps/src/lib.rs b/pallets/swaps/src/lib.rs index fbd52e27a2..e823048261 100644 --- a/pallets/swaps/src/lib.rs +++ b/pallets/swaps/src/lib.rs @@ -81,14 +81,14 @@ pub mod pallet { /// /// NOTE: The storage is killed when the swap order no longer exists #[pallet::storage] - pub(super) type OrderIdToSwapId = + pub type OrderIdToSwapId = StorageMap<_, Blake2_128Concat, T::OrderId, (T::AccountId, T::SwapId)>; /// Maps an `AccountId` and `SwapId` to its corresponding `OrderId` /// /// NOTE: The storage is killed when the swap order no longer exists #[pallet::storage] - pub(super) type SwapIdToOrderId = + pub type SwapIdToOrderId = StorageMap<_, Blake2_128Concat, (T::AccountId, T::SwapId), T::OrderId>; #[pallet::error] diff --git a/runtime/altair/src/lib.rs b/runtime/altair/src/lib.rs index 891917613e..64983606ee 100644 --- a/runtime/altair/src/lib.rs +++ b/runtime/altair/src/lib.rs @@ -78,8 +78,8 @@ use pallet_anchors::AnchorData; use pallet_collective::{EnsureMember, EnsureProportionMoreThan}; use pallet_ethereum::{Call::transact, PostLogContent}; use pallet_evm::{ - Account as EVMAccount, EnsureAddressRoot, EnsureAddressTruncated, FeeCalculator, - GasWeightMapping, Runner, + Account as EVMAccount, EnsureAddressNever, EnsureAddressRoot, FeeCalculator, GasWeightMapping, + Runner, }; use pallet_investments::OrderType; use pallet_liquidity_pools::hooks::{ @@ -103,7 +103,7 @@ use runtime_common::{ account_conversion::{AccountConverter, RuntimeAccountConverter}, asset_registry, evm::{ - precompile::Precompiles, BaseFeeThreshold, FindAuthorTruncated, GAS_LIMIT_POV_SIZE_RATIO, + self, BaseFeeThreshold, FindAuthorTruncated, GAS_LIMIT_POV_SIZE_RATIO, GAS_LIMIT_STORAGE_GROWTH_RATIO, WEIGHT_PER_GAS, }, fees::{DealWithFees, FeeToTreasury, WeightToFee}, @@ -1866,11 +1866,11 @@ impl pallet_transfer_allowlist::Config for Runtime { type WeightInfo = weights::pallet_transfer_allowlist::WeightInfo; } -pub type AltairPrecompiles = Precompiles; +pub type Precompiles = evm::precompile::Precompiles; parameter_types! { pub BlockGasLimit: U256 = U256::from(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT.ref_time() / WEIGHT_PER_GAS); - pub PrecompilesValue: AltairPrecompiles = Precompiles::<_, _>::new(); + pub PrecompilesValue: Precompiles = Precompiles::new(); pub WeightPerGas: Weight = Weight::from_parts(WEIGHT_PER_GAS, 0); pub const TokenSymbol: &'static str = "AIR"; } @@ -1889,7 +1889,7 @@ impl pallet_evm::Config for Runtime { type GasWeightMapping = pallet_evm::FixedGasWeightMapping; type OnChargeTransaction = (); type OnCreate = (); - type PrecompilesType = AltairPrecompiles; + type PrecompilesType = Precompiles; type PrecompilesValue = PrecompilesValue; type Runner = pallet_evm::runner::stack::Runner; type RuntimeEvent = RuntimeEvent; @@ -1897,7 +1897,7 @@ impl pallet_evm::Config for Runtime { type Timestamp = Timestamp; type WeightInfo = (); type WeightPerGas = WeightPerGas; - type WithdrawOrigin = EnsureAddressTruncated; + type WithdrawOrigin = EnsureAddressNever; } impl pallet_evm_chain_id::Config for Runtime {} diff --git a/runtime/centrifuge/src/lib.rs b/runtime/centrifuge/src/lib.rs index 269cb93138..0d9855ff58 100644 --- a/runtime/centrifuge/src/lib.rs +++ b/runtime/centrifuge/src/lib.rs @@ -79,8 +79,8 @@ use pallet_anchors::AnchorData; use pallet_collective::{EnsureMember, EnsureProportionAtLeast, EnsureProportionMoreThan}; use pallet_ethereum::{Call::transact, PostLogContent, Transaction as EthTransaction}; use pallet_evm::{ - Account as EVMAccount, EnsureAddressRoot, EnsureAddressTruncated, FeeCalculator, - GasWeightMapping, Runner, + Account as EVMAccount, EnsureAddressNever, EnsureAddressRoot, FeeCalculator, GasWeightMapping, + Runner, }; use pallet_investments::OrderType; use pallet_liquidity_pools::hooks::{ @@ -106,7 +106,7 @@ use runtime_common::{ account_conversion::{AccountConverter, RuntimeAccountConverter}, asset_registry, evm::{ - precompile::Precompiles, BaseFeeThreshold, FindAuthorTruncated, GAS_LIMIT_POV_SIZE_RATIO, + self, BaseFeeThreshold, FindAuthorTruncated, GAS_LIMIT_POV_SIZE_RATIO, GAS_LIMIT_STORAGE_GROWTH_RATIO, WEIGHT_PER_GAS, }, fees::{DealWithFees, FeeToTreasury, WeightToFee}, @@ -1980,11 +1980,11 @@ impl pallet_remarks::Config for Runtime { type WeightInfo = weights::pallet_remarks::WeightInfo; } -pub type CentrifugePrecompiles = Precompiles; +pub type Precompiles = evm::precompile::Precompiles; parameter_types! { pub BlockGasLimit: U256 = U256::from(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT.ref_time() / WEIGHT_PER_GAS); - pub PrecompilesValue: CentrifugePrecompiles = Precompiles::<_, _>::new(); + pub PrecompilesValue: Precompiles = Precompiles::new(); pub WeightPerGas: Weight = Weight::from_parts(WEIGHT_PER_GAS, 0); pub const TokenSymbol: &'static str = "CFG"; } @@ -2003,7 +2003,7 @@ impl pallet_evm::Config for Runtime { type GasWeightMapping = pallet_evm::FixedGasWeightMapping; type OnChargeTransaction = (); type OnCreate = (); - type PrecompilesType = CentrifugePrecompiles; + type PrecompilesType = Precompiles; type PrecompilesValue = PrecompilesValue; type Runner = pallet_evm::runner::stack::Runner; type RuntimeEvent = RuntimeEvent; @@ -2011,7 +2011,7 @@ impl pallet_evm::Config for Runtime { type Timestamp = Timestamp; type WeightInfo = (); type WeightPerGas = WeightPerGas; - type WithdrawOrigin = EnsureAddressTruncated; + type WithdrawOrigin = EnsureAddressNever; } impl pallet_evm_chain_id::Config for Runtime {} diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index bdac1c6db0..f48a96c906 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -47,6 +47,8 @@ precompile-utils = { workspace = true } xcm-primitives = { workspace = true } +fp-evm = { workspace = true } + # Local cfg-primitives = { workspace = true } cfg-traits = { workspace = true } diff --git a/runtime/common/src/evm/precompile.rs b/runtime/common/src/evm/precompile.rs index 632380f237..df6df7617e 100644 --- a/runtime/common/src/evm/precompile.rs +++ b/runtime/common/src/evm/precompile.rs @@ -94,6 +94,9 @@ impl H160Addresses for PrecompileSetBuilder { } pub mod utils { + use sp_core::H160; + use sp_std::collections::btree_map::BTreeMap; + use super::H160Addresses; // From Moonbeam: @@ -122,4 +125,21 @@ pub mod utils { } (reads, writes) } + + pub fn precompile_account_genesis( + ) -> BTreeMap { + PrecompileSet::h160_addresses() + .map(|addr| { + ( + addr, + fp_evm::GenesisAccount { + nonce: Default::default(), + balance: Default::default(), + storage: Default::default(), + code: REVERT_BYTECODE.to_vec(), + }, + ) + }) + .collect() + } } diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 1802d8d951..56aae05d43 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -250,7 +250,8 @@ pub mod asset_registry { impl< Origin: Into, Origin>> + From>, DefaultEnsureOrigin: EnsureOrigin, - > EnsureOriginWithArg> for AuthorityOrigin + > EnsureOriginWithArg> + for AuthorityOrigin { type Success = (); diff --git a/runtime/common/src/xcm.rs b/runtime/common/src/xcm.rs index e4e0a8dce8..56ab50a56d 100644 --- a/runtime/common/src/xcm.rs +++ b/runtime/common/src/xcm.rs @@ -67,7 +67,7 @@ impl< pub fn general_key(data: &[u8]) -> staging_xcm::latest::Junction { GeneralKey { length: data.len().min(32) as u8, - data: cfg_utils::vec_to_fixed_array(data.to_vec()), + data: cfg_utils::vec_to_fixed_array(data), } } diff --git a/runtime/development/src/lib.rs b/runtime/development/src/lib.rs index 804c44209b..9ee4508765 100644 --- a/runtime/development/src/lib.rs +++ b/runtime/development/src/lib.rs @@ -80,7 +80,8 @@ use pallet_anchors::AnchorData; use pallet_collective::EnsureMember; use pallet_ethereum::{Call::transact, PostLogContent, Transaction as EthTransaction}; use pallet_evm::{ - Account as EVMAccount, EnsureAddressTruncated, FeeCalculator, GasWeightMapping, Runner, + Account as EVMAccount, EnsureAddressNever, EnsureAddressRoot, FeeCalculator, GasWeightMapping, + Runner, }; use pallet_investments::OrderType; use pallet_liquidity_pools::hooks::{ @@ -107,7 +108,7 @@ use runtime_common::{ asset_registry, changes::FastDelay, evm::{ - precompile::Precompiles, BaseFeeThreshold, FindAuthorTruncated, GAS_LIMIT_POV_SIZE_RATIO, + self, BaseFeeThreshold, FindAuthorTruncated, GAS_LIMIT_POV_SIZE_RATIO, GAS_LIMIT_STORAGE_GROWTH_RATIO, WEIGHT_PER_GAS, }, fees::{DealWithFees, FeeToTreasury, WeightToFee}, @@ -1956,11 +1957,11 @@ parameter_types! { pub type XcmWeigher = staging_xcm_builder::FixedWeightBounds; -pub type DevelopmentPrecompiles = Precompiles; +pub type Precompiles = evm::precompile::Precompiles; parameter_types! { pub BlockGasLimit: U256 = U256::from(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT.ref_time() / WEIGHT_PER_GAS); - pub PrecompilesValue: DevelopmentPrecompiles = Precompiles::<_, _>::new(); + pub PrecompilesValue: Precompiles = Precompiles::new(); pub WeightPerGas: Weight = Weight::from_parts(WEIGHT_PER_GAS, 0); pub const TokenSymbol: &'static str = "DCFG"; } @@ -1969,7 +1970,7 @@ impl pallet_evm::Config for Runtime { type AddressMapping = RuntimeAccountConverter; type BlockGasLimit = BlockGasLimit; type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping; - type CallOrigin = EnsureAddressTruncated; + type CallOrigin = EnsureAddressRoot; type ChainId = EVMChainId; type Currency = Balances; type FeeCalculator = BaseFee; @@ -1979,7 +1980,7 @@ impl pallet_evm::Config for Runtime { type GasWeightMapping = pallet_evm::FixedGasWeightMapping; type OnChargeTransaction = (); type OnCreate = (); - type PrecompilesType = DevelopmentPrecompiles; + type PrecompilesType = Precompiles; type PrecompilesValue = PrecompilesValue; type Runner = pallet_evm::runner::stack::Runner; type RuntimeEvent = RuntimeEvent; @@ -1987,7 +1988,7 @@ impl pallet_evm::Config for Runtime { type Timestamp = Timestamp; type WeightInfo = (); type WeightPerGas = WeightPerGas; - type WithdrawOrigin = EnsureAddressTruncated; + type WithdrawOrigin = EnsureAddressNever; } impl pallet_evm_chain_id::Config for Runtime {} diff --git a/runtime/integration-tests/Cargo.toml b/runtime/integration-tests/Cargo.toml index a10cd5ca18..47d561f010 100644 --- a/runtime/integration-tests/Cargo.toml +++ b/runtime/integration-tests/Cargo.toml @@ -7,9 +7,10 @@ license.workspace = true homepage.workspace = true repository.workspace = true documentation.workspace = true +build = "build.rs" [dependencies] -ethabi = { workspace = true, features = ["std"] } +ethabi = { workspace = true, features = ["std", "full-serde"] } ethereum = { workspace = true, features = ["std"] } fudge = { workspace = true } fudge-core = { workspace = true } @@ -18,6 +19,7 @@ hex-literal = { workspace = true } lazy_static = { workspace = true } parity-scale-codec = { workspace = true } serde = { workspace = true } +serde_json = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true } tracing-subscriber = { workspace = true } @@ -66,6 +68,7 @@ staging-xcm-executor = { workspace = true, features = ["std"] } orml-traits = { workspace = true, features = ["std"] } +fp-evm = { workspace = true, features = ["std"] } fp-self-contained = { workspace = true, features = ["std"] } # Locals @@ -136,6 +139,7 @@ pallet-session = { workspace = true, features = ["std"] } pallet-sudo = { workspace = true, features = ["std"] } pallet-swaps = { workspace = true, features = ["std"] } pallet-timestamp = { workspace = true, features = ["std"] } +pallet-token-mux = { workspace = true, features = ["std"] } pallet-transaction-payment = { workspace = true, features = ["std"] } pallet-transfer-allowlist = { workspace = true, features = ["std"] } pallet-treasury = { workspace = true, features = ["std"] } diff --git a/runtime/integration-tests/build.rs b/runtime/integration-tests/build.rs new file mode 100644 index 0000000000..ca1ae85d68 --- /dev/null +++ b/runtime/integration-tests/build.rs @@ -0,0 +1,114 @@ +// Copyright 2021 Centrifuge Foundation (centrifuge.io). +// +// This file is part of the Centrifuge chain project. +// Centrifuge is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version (see http://www.gnu.org/licenses). +// Centrifuge is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +use std::{env, fs, path::PathBuf, process::Command}; + +const LP_SOL_SOURCES: &str = "LP_SOL_SOURCES"; + +fn main() { + let paths = fs::read_dir("./submodules/") + .expect("Submodules directory must exist for integration-tests"); + let out_dir = env::var("OUT_DIR").expect("Cargo sets OUT_DIR environment variable. qed."); + + /* + match Command::new("git") + .args(&["pull", "--all", "--recurse-submodules=yes"]) + .output() + { + Ok(o) if o.status.success() => {} + Ok(o) => { + println!( + "cargo:warning=Git fetch failed with: \n - status: {}\n -stderr: {}", + o.status, + String::from_utf8(o.stderr).expect("stderr is utf-8 encoded. qed.") + ); + } + Err(err) => { + println!("cargo:warning=Failed to execute git command: {}", err); + } + } + */ + + let mut verified_dir = Vec::new(); + for path in paths { + if let Ok(dir_entry) = path.as_ref() { + if dir_entry + .metadata() + .map(|meta| meta.is_dir()) + .unwrap_or(false) + { + verified_dir.push( + fs::canonicalize(dir_entry.path()).expect("Failed to find absolute path."), + ); + } + } + } + + for path in verified_dir { + env::set_current_dir(&path).unwrap(); + let mut out_dir_build = PathBuf::from(out_dir.clone()); + + let parent = path + .components() + .last() + .expect("Repository itself has components. qed") + .as_os_str() + .to_str() + .expect("OsStr is utf-8. qed"); + + out_dir_build.push(parent); + let out_dir_build = out_dir_build + .as_os_str() + .to_str() + .expect("OsStr is utf-8. qed"); + + match Command::new("forge") + .args(["build", "--out", out_dir_build]) + .output() + { + Ok(o) if o.status.success() => { + let source = match parent { + "liquidity-pools" => { + println!( + "cargo::warning=Build liquidity-pools Solidity contracts. Stored at {} ", + out_dir_build + ); + + LP_SOL_SOURCES + } + _ => { + println!( + "cargo::warning=Unknown solidity source build. Name: {}", + parent + ); + println!( + "cargo::warning=No environment variable for sources set. Artifacts stored under: {}", + out_dir_build + ); + continue; + } + }; + + println!("cargo:rustc-env={}={}", source, out_dir_build); + } + Ok(o) => { + println!( + "cargo::warning=forge build failed with: \n - status: {}\n -stderr: {}", + o.status, + String::from_utf8(o.stderr).expect("stderr is utf-8 encoded. qed.") + ); + } + Err(err) => { + println!("cargo::warning=Failed to execute git command: {}", err); + } + } + } +} diff --git a/runtime/integration-tests/src/generic/cases/ethereum_transaction.rs b/runtime/integration-tests/src/generic/cases/ethereum_transaction.rs index a008a1533c..bdf4c43bbe 100644 --- a/runtime/integration-tests/src/generic/cases/ethereum_transaction.rs +++ b/runtime/integration-tests/src/generic/cases/ethereum_transaction.rs @@ -25,7 +25,7 @@ use crate::generic::{ // } pub const TEST_CONTRACT_CODE: &str = "608060405234801561001057600080fd5b50610113806100206000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c8063c2985578146037578063febb0f7e146057575b600080fd5b603d605f565b604051808215151515815260200191505060405180910390f35b605d6068565b005b60006001905090565b600060db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260098152602001807f6572726f725f6d7367000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b56fea2646970667358221220fde68a3968e0e99b16fabf9b2997a78218b32214031f8e07e2c502daf603a69e64736f6c63430006060033"; -#[test_runtimes([development])] +#[test_runtimes(all)] fn call() { RuntimeEnv::::default().parachain_state_mut(|| { // Addresses must be high enough to not map to the precompile space. diff --git a/runtime/integration-tests/src/generic/cases/investments.rs b/runtime/integration-tests/src/generic/cases/investments.rs index f229bde9f0..644f386145 100644 --- a/runtime/integration-tests/src/generic/cases/investments.rs +++ b/runtime/integration-tests/src/generic/cases/investments.rs @@ -20,7 +20,7 @@ use crate::{ self, currency::{cfg, usd6, CurrencyInfo, Usd6}, genesis::{self, Genesis}, - POOL_MIN_EPOCH_TIME, + pool::POOL_MIN_EPOCH_TIME, }, }, utils::accounts::Keyring, @@ -51,12 +51,12 @@ mod common { env.parachain_state_mut(|| { // Create a pool utils::give_balance::(POOL_ADMIN.id(), T::PoolDeposit::get()); - utils::create_empty_pool::(POOL_ADMIN.id(), POOL_A, Usd6.id()); + utils::pool::create_empty::(POOL_ADMIN.id(), POOL_A, Usd6.id()); // Grant permissions let tranche_id = T::Api::tranche_id(POOL_A, 0).unwrap(); let tranche_investor = PoolRole::TrancheInvestor(tranche_id, Seconds::MAX); - utils::give_pool_role::(INVESTOR.id(), POOL_A, tranche_investor); + utils::pool::give_role::(INVESTOR.id(), POOL_A, tranche_investor); }); env @@ -98,7 +98,7 @@ fn investment_portfolio_single_tranche() { // Execute epoch to move pending to claimable pool currency env.pass(Blocks::BySeconds(POOL_MIN_EPOCH_TIME)); env.parachain_state_mut(|| { - utils::close_pool_epoch::(POOL_ADMIN.id(), POOL_A); + utils::pool::close_epoch::(POOL_ADMIN.id(), POOL_A); }); investment_portfolio = env.parachain_state_mut(|| T::Api::investment_portfolio(INVESTOR.id())); assert_eq!( @@ -142,7 +142,7 @@ fn investment_portfolio_single_tranche() { // Execute epoch to move pending tranche tokens to claimable pool currency env.pass(Blocks::BySeconds(POOL_MIN_EPOCH_TIME)); env.parachain_state_mut(|| { - utils::close_pool_epoch::(POOL_ADMIN.id(), POOL_A); + utils::pool::close_epoch::(POOL_ADMIN.id(), POOL_A); }); investment_portfolio = env.parachain_state_mut(|| T::Api::investment_portfolio(INVESTOR.id())); assert_eq!( diff --git a/runtime/integration-tests/src/generic/cases/liquidity_pools.rs b/runtime/integration-tests/src/generic/cases/liquidity_pools.rs index 5e36ed13c4..860c1468e4 100644 --- a/runtime/integration-tests/src/generic/cases/liquidity_pools.rs +++ b/runtime/integration-tests/src/generic/cases/liquidity_pools.rs @@ -71,10 +71,7 @@ use crate::{ config::Runtime, env::{Blocks, Env}, envs::fudge_env::{handle::FudgeHandle, FudgeEnv, FudgeRelayRuntime, FudgeSupport}, - utils::{ - democracy::execute_via_democracy, evm::mint_balance_into_derived_account, genesis, - genesis::Genesis, xcm::setup_xcm, - }, + utils::{democracy::execute_via_democracy, genesis, genesis::Genesis, xcm::setup_xcm}, }, utils::accounts::Keyring, }; @@ -275,7 +272,9 @@ mod development { token_name: BoundedVec::< u8, ::StringLimit, - >::try_from("A highly advanced tranche".as_bytes().to_vec()) + >::try_from( + "A highly advanced tranche".as_bytes().to_vec() + ) .expect("Can create BoundedVec for token name"), token_symbol: BoundedVec::< u8, @@ -566,7 +565,7 @@ mod development { DEFAULT_VALIDITY, )), ) { - crate::generic::utils::give_pool_role::( + crate::generic::utils::pool::give_role::( investor.clone(), pool_id, PoolRole::TrancheInvestor(default_tranche_id::(pool_id), DEFAULT_VALIDITY), @@ -662,7 +661,7 @@ mod development { ); // Make investor the MembersListAdmin of this Pool - crate::generic::utils::give_pool_role::( + crate::generic::utils::pool::give_role::( investor.clone(), pool_id, PoolRole::TrancheInvestor(default_tranche_id::(pool_id), DEFAULT_VALIDITY), @@ -976,7 +975,7 @@ mod development { ); // Whitelist destination as TrancheInvestor of this Pool - crate::generic::utils::give_pool_role::( + crate::generic::utils::pool::give_role::( AccountConverter::convert(new_member.clone()), pool_id, PoolRole::TrancheInvestor(default_tranche_id::(pool_id), DEFAULT_VALIDITY), @@ -4167,326 +4166,6 @@ mod development { }); } - #[test_runtimes([development])] - fn transfer_non_tranche_tokens_to_local() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let amount = DEFAULT_BALANCE_GLMR / 2; - let currency_id = AUSD_CURRENCY_ID; - let receiver: AccountId = Keyring::Bob.into(); - - // Mock incoming decrease message - let msg = LiquidityPoolMessage::Transfer { - currency: general_currency_index::(currency_id), - // sender is irrelevant for other -> local - sender: Keyring::Alice.into(), - receiver: receiver.clone().into(), - amount, - }; - - assert_eq!(orml_tokens::Pallet::::total_issuance(currency_id), 0); - - // Finally, verify that we can now transfer the tranche to the destination - // address - assert_ok!(pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - msg - )); - - // Verify that the correct amount was minted - assert_eq!( - orml_tokens::Pallet::::total_issuance(currency_id), - amount - ); - assert_eq!( - orml_tokens::Pallet::::free_balance(currency_id, &receiver), - amount - ); - - // Verify empty transfers throw - assert_noop!( - pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - LiquidityPoolMessage::Transfer { - currency: general_currency_index::(currency_id), - sender: Keyring::Alice.into(), - receiver: receiver.into(), - amount: 0, - }, - ), - pallet_liquidity_pools::Error::::InvalidTransferAmount - ); - }); - } - - #[test_runtimes([development])] - fn transfer_tranche_tokens_from_local() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - let amount = 100_000; - let dest_address: DomainAddress = DomainAddress::EVM(1284, [99; 20]); - let receiver = Keyring::Bob; - - // Create the pool - create_ausd_pool::(pool_id); - - let tranche_tokens: CurrencyId = cfg_types::tokens::TrancheCurrency::generate( - pool_id, - default_tranche_id::(pool_id), - ) - .into(); - - // Verify that we first need the destination address to be whitelisted - assert_noop!( - pallet_liquidity_pools::Pallet::::transfer_tranche_tokens( - RawOrigin::Signed(Keyring::Alice.into()).into(), - pool_id, - default_tranche_id::(pool_id), - dest_address.clone(), - amount, - ), - pallet_liquidity_pools::Error::::UnauthorizedTransfer - ); - - // Make receiver the MembersListAdmin of this Pool - assert_ok!(pallet_permissions::Pallet::::add( - ::RuntimeOrigin::root(), - Role::PoolRole(PoolRole::PoolAdmin), - receiver.into(), - PermissionScope::Pool(pool_id), - Role::PoolRole(PoolRole::InvestorAdmin), - )); - - // Whitelist destination as TrancheInvestor of this Pool - let valid_until = u64::MAX; - - crate::generic::utils::give_pool_role::( - AccountConverter::convert(dest_address.clone()), - pool_id, - PoolRole::TrancheInvestor(default_tranche_id::(pool_id), valid_until), - ); - - // Call the pallet_liquidity_pools::Pallet::::update_member which ensures the - // destination address is whitelisted. - assert_ok!(pallet_liquidity_pools::Pallet::::update_member( - RawOrigin::Signed(receiver.into()).into(), - pool_id, - default_tranche_id::(pool_id), - dest_address.clone(), - valid_until, - )); - - // Give receiver enough Tranche balance to be able to transfer it - assert_ok!(orml_tokens::Pallet::::deposit( - tranche_tokens, - &receiver.into(), - amount - )); - - // Finally, verify that we can now transfer the tranche to the destination - // address - assert_ok!( - pallet_liquidity_pools::Pallet::::transfer_tranche_tokens( - RawOrigin::Signed(receiver.into()).into(), - pool_id, - default_tranche_id::(pool_id), - dest_address.clone(), - amount, - ) - ); - - // The account to which the tranche should have been transferred - // to on Centrifuge for bookkeeping purposes. - let domain_account: AccountId = Domain::convert(dest_address.domain()); - - // Verify that the correct amount of the Tranche token was transferred - // to the dest domain account on Centrifuge. - assert_eq!( - orml_tokens::Pallet::::free_balance(tranche_tokens, &domain_account), - amount - ); - assert!( - orml_tokens::Pallet::::free_balance(tranche_tokens, &receiver.into()) - .is_zero() - ); - }); - } - - #[test_runtimes([development])] - fn transfer_tranche_tokens_to_local() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - // Create new pool - let pool_id = POOL_ID; - create_ausd_pool::(pool_id); - - let amount = 100_000_000; - let receiver: AccountId = Keyring::Bob.into(); - let sender: DomainAddress = DomainAddress::EVM(1284, [99; 20]); - let sending_domain_locator = - Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()); - let tranche_id = default_tranche_id::(pool_id); - let tranche_tokens: CurrencyId = - cfg_types::tokens::TrancheCurrency::generate(pool_id, tranche_id).into(); - let valid_until = u64::MAX; - - // Fund `DomainLocator` account of origination domain tranche tokens are - // transferred from this account instead of minting - assert_ok!(orml_tokens::Pallet::::mint_into( - tranche_tokens, - &sending_domain_locator, - amount - )); - - // Mock incoming decrease message - let msg = LiquidityPoolMessage::TransferTrancheTokens { - pool_id, - tranche_id, - sender: sender.address(), - domain: Domain::Centrifuge, - receiver: receiver.clone().into(), - amount, - }; - - // Verify that we first need the receiver to be whitelisted - assert_noop!( - pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - msg.clone() - ), - pallet_liquidity_pools::Error::::UnauthorizedTransfer - ); - - // Make receiver the MembersListAdmin of this Pool - assert_ok!(pallet_permissions::Pallet::::add( - ::RuntimeOrigin::root(), - Role::PoolRole(PoolRole::PoolAdmin), - receiver.clone(), - PermissionScope::Pool(pool_id), - Role::PoolRole(PoolRole::InvestorAdmin), - )); - - // Whitelist destination as TrancheInvestor of this Pool - crate::generic::utils::give_pool_role::( - receiver.clone(), - pool_id, - PoolRole::TrancheInvestor(default_tranche_id::(pool_id), valid_until), - ); - - // Finally, verify that we can now transfer the tranche to the destination - // address - assert_ok!(pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - msg - )); - - // Verify that the correct amount of the Tranche token was transferred - // to the dest domain account on Centrifuge. - assert_eq!( - orml_tokens::Pallet::::free_balance(tranche_tokens, &receiver), - amount - ); - assert!(orml_tokens::Pallet::::free_balance( - tranche_tokens, - &sending_domain_locator - ) - .is_zero()); - }); - } - - /// Try to transfer tranches for non-existing pools or invalid tranche - /// ids for existing pools. - #[test_runtimes([development])] - fn transferring_invalid_tranche_tokens_should_fail() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let dest_address: DomainAddress = DomainAddress::EVM(1284, [99; 20]); - - let valid_pool_id: u64 = 42; - create_ausd_pool::(valid_pool_id); - let valid_tranche_id = default_tranche_id::(valid_pool_id); - let valid_until = u64::MAX; - let transfer_amount = 42; - let invalid_pool_id = valid_pool_id + 1; - let invalid_tranche_id = valid_tranche_id.map(|i| i.saturating_add(1)); - assert!(pallet_pool_system::Pallet::::pool(invalid_pool_id).is_none()); - - // Make Keyring::Bob the MembersListAdmin of both pools - crate::generic::utils::give_pool_role::( - Keyring::Bob.into(), - valid_pool_id, - PoolRole::InvestorAdmin, - ); - crate::generic::utils::give_pool_role::( - Keyring::Bob.into(), - invalid_pool_id, - PoolRole::InvestorAdmin, - ); - - // Give Keyring::Bob investor role for (valid_pool_id, invalid_tranche_id) and - // (invalid_pool_id, valid_tranche_id) - crate::generic::utils::give_pool_role::( - AccountConverter::convert(dest_address.clone()), - invalid_pool_id, - PoolRole::TrancheInvestor(valid_tranche_id, valid_until), - ); - crate::generic::utils::give_pool_role::( - AccountConverter::convert(dest_address.clone()), - valid_pool_id, - PoolRole::TrancheInvestor(invalid_tranche_id, valid_until), - ); - assert_noop!( - pallet_liquidity_pools::Pallet::::transfer_tranche_tokens( - RawOrigin::Signed(Keyring::Bob.into()).into(), - invalid_pool_id, - valid_tranche_id, - dest_address.clone(), - transfer_amount - ), - pallet_liquidity_pools::Error::::PoolNotFound - ); - assert_noop!( - pallet_liquidity_pools::Pallet::::transfer_tranche_tokens( - RawOrigin::Signed(Keyring::Bob.into()).into(), - valid_pool_id, - invalid_tranche_id, - dest_address, - transfer_amount - ), - pallet_liquidity_pools::Error::::TrancheNotFound - ); - }); - } - fn transfer_cfg_to_sibling(env: &mut FudgeEnv) { let alice_initial_balance = cfg(1_000); let transfer_amount = cfg(5); @@ -4750,7 +4429,7 @@ mod development { ); }); - let sender = Keyring::Alice.to_account_id(); + let sender = Keyring::Alice.id(); let gateway_sender = env.parachain_state(|| { ::Sender::get() }); @@ -4762,8 +4441,8 @@ mod development { let msg = LiquidityPoolMessage::Transfer { currency: 0, - sender: Keyring::Alice.to_account_id().into(), - receiver: Keyring::Bob.to_account_id().into(), + sender: Keyring::Alice.id().into(), + receiver: Keyring::Bob.id().into(), amount: 1_000u128, }; @@ -4800,11 +4479,14 @@ mod development { assert_ok!(env.parachain_state_mut(|| { // Note how both the target address and the gateway sender need to have some // balance. - mint_balance_into_derived_account::( + crate::generic::utils::evm::mint_balance_into_derived_account::( axelar_contract_address, cfg(1_000_000_000), ); - mint_balance_into_derived_account::(gateway_sender_h160, cfg(1_000_000)); + crate::generic::utils::evm::mint_balance_into_derived_account::( + gateway_sender_h160, + cfg(1_000_000), + ); as OutboundQueue>::submit( sender.clone(), @@ -4941,7 +4623,9 @@ mod development { axelar_target_chain: BoundedVec::< u8, ConstU32, - >::try_from("ethereum".as_bytes().to_vec()) + >::try_from( + "ethereum".as_bytes().to_vec() + ) .unwrap(), axelar_target_contract: H160::from_low_u64_be(111), _marker: Default::default(), @@ -5751,7 +5435,7 @@ mod altair { env.sibling_state_mut(|| { assert_ok!(pallet_balances::Pallet::::force_set_balance( ::RuntimeOrigin::root(), - Keyring::Alice.to_account_id().into(), + Keyring::Alice.id().into(), transfer_amount * 2, )); @@ -6060,7 +5744,7 @@ mod altair { PalletInstance(PoolPalletIndex::get()), GeneralKey { length: tranche_id.len() as u8, - data: vec_to_fixed_array(tranche_id.to_vec()), + data: vec_to_fixed_array(tranche_id), }, ], ); @@ -6724,7 +6408,7 @@ mod centrifuge { .add(genesis::balances::(cfg(TRANSFER_AMOUNT + 10))) .add(orml_tokens::GenesisConfig:: { balances: vec![( - Keyring::Alice.to_account_id(), + Keyring::Alice.id(), USDC, T::ExistentialDeposit::get() + usdc(TRANSFER_AMOUNT), )], @@ -6741,16 +6425,14 @@ mod centrifuge { pallet_transfer_allowlist::Pallet::::add_transfer_allowance( RawOrigin::Signed(Keyring::Alice.into()).into(), FilterCurrency::All, - RestrictedTransferLocation::Local(Keyring::Bob.to_account_id()) + RestrictedTransferLocation::Local(Keyring::Bob.id()) ) ); ( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.to_account_id()), - pallet_balances::Pallet::::free_balance(&Keyring::Bob.to_account_id()), - pallet_balances::Pallet::::free_balance( - &Keyring::Charlie.to_account_id(), - ), + pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()), + pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()), + pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()), ) }); @@ -6769,11 +6451,11 @@ mod centrifuge { // Restrict also CFG local env.parachain_state(|| { let after_transfer_alice = - pallet_balances::Pallet::::free_balance(&Keyring::Alice.to_account_id()); + pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()); let after_transfer_bob = - pallet_balances::Pallet::::free_balance(&Keyring::Bob.to_account_id()); + pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()); let after_transfer_charlie = - pallet_balances::Pallet::::free_balance(&Keyring::Charlie.to_account_id()); + pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()); assert_eq!( after_transfer_alice, @@ -6791,7 +6473,7 @@ mod centrifuge { .add(genesis::balances::(cfg(TRANSFER_AMOUNT + 10))) .add(orml_tokens::GenesisConfig:: { balances: vec![( - Keyring::Alice.to_account_id(), + Keyring::Alice.id(), USDC, T::ExistentialDeposit::get() + usdc(TRANSFER_AMOUNT), )], @@ -6805,7 +6487,7 @@ mod centrifuge { pallet_transfer_allowlist::Pallet::::add_transfer_allowance( RawOrigin::Signed(Keyring::Alice.into()).into(), FilterCurrency::All, - RestrictedTransferLocation::Local(Keyring::Bob.to_account_id()) + RestrictedTransferLocation::Local(Keyring::Bob.id()) ) ); }); @@ -6815,11 +6497,11 @@ mod centrifuge { register_usdc::(); let pre_transfer_alice = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Alice.to_account_id()); + orml_tokens::Pallet::::free_balance(USDC, &Keyring::Alice.id()); let pre_transfer_bob = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Bob.to_account_id()); + orml_tokens::Pallet::::free_balance(USDC, &Keyring::Bob.id()); let pre_transfer_charlie = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Charlie.to_account_id()); + orml_tokens::Pallet::::free_balance(USDC, &Keyring::Charlie.id()); assert_noop!( pallet_restricted_tokens::Pallet::::transfer( @@ -6832,9 +6514,9 @@ mod centrifuge { ); let after_transfer_alice = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Alice.to_account_id()); + orml_tokens::Pallet::::free_balance(USDC, &Keyring::Alice.id()); let after_transfer_charlie = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Charlie.to_account_id()); + orml_tokens::Pallet::::free_balance(USDC, &Keyring::Charlie.id()); assert_eq!(after_transfer_alice, pre_transfer_alice); assert_eq!(after_transfer_charlie, pre_transfer_charlie); @@ -6847,11 +6529,11 @@ mod centrifuge { ),); let after_transfer_alice = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Alice.to_account_id()); + orml_tokens::Pallet::::free_balance(USDC, &Keyring::Alice.id()); let after_transfer_bob = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Bob.to_account_id()); + orml_tokens::Pallet::::free_balance(USDC, &Keyring::Bob.id()); let after_transfer_charlie = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Charlie.to_account_id()); + orml_tokens::Pallet::::free_balance(USDC, &Keyring::Charlie.id()); assert_eq!( after_transfer_alice, @@ -6867,11 +6549,11 @@ mod centrifuge { register_cfg::(2031); let pre_transfer_alice = - pallet_balances::Pallet::::free_balance(&Keyring::Alice.to_account_id()); + pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()); let pre_transfer_bob = - pallet_balances::Pallet::::free_balance(&Keyring::Bob.to_account_id()); + pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()); let pre_transfer_charlie = - pallet_balances::Pallet::::free_balance(&Keyring::Charlie.to_account_id()); + pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()); assert_noop!( pallet_restricted_tokens::Pallet::::transfer( @@ -6884,9 +6566,9 @@ mod centrifuge { ); let after_transfer_alice = - pallet_balances::Pallet::::free_balance(&Keyring::Alice.to_account_id()); + pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()); let after_transfer_charlie = - pallet_balances::Pallet::::free_balance(&Keyring::Charlie.to_account_id()); + pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()); assert_eq!(after_transfer_alice, pre_transfer_alice); assert_eq!(after_transfer_charlie, pre_transfer_charlie); @@ -6899,11 +6581,11 @@ mod centrifuge { ),); let after_transfer_alice = - pallet_balances::Pallet::::free_balance(&Keyring::Alice.to_account_id()); + pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()); let after_transfer_bob = - pallet_balances::Pallet::::free_balance(&Keyring::Bob.to_account_id()); + pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()); let after_transfer_charlie = - pallet_balances::Pallet::::free_balance(&Keyring::Charlie.to_account_id()); + pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()); assert_eq!( after_transfer_alice, @@ -6921,7 +6603,7 @@ mod centrifuge { .add(genesis::balances::(cfg(10))) .add(orml_tokens::GenesisConfig:: { balances: vec![( - Keyring::Alice.to_account_id(), + Keyring::Alice.id(), LP_ETH_USDC, T::ExistentialDeposit::get() + lp_eth_usdc(TRANSFER_AMOUNT), )], @@ -6932,23 +6614,17 @@ mod centrifuge { env.parachain_state_mut(|| { register_lp_eth_usdc::(); - let pre_transfer_alice = orml_tokens::Pallet::::free_balance( - LP_ETH_USDC, - &Keyring::Alice.to_account_id(), - ); - let pre_transfer_bob = orml_tokens::Pallet::::free_balance( - LP_ETH_USDC, - &Keyring::Bob.to_account_id(), - ); - let pre_transfer_charlie = orml_tokens::Pallet::::free_balance( - LP_ETH_USDC, - &Keyring::Charlie.to_account_id(), - ); + let pre_transfer_alice = + orml_tokens::Pallet::::free_balance(LP_ETH_USDC, &Keyring::Alice.id()); + let pre_transfer_bob = + orml_tokens::Pallet::::free_balance(LP_ETH_USDC, &Keyring::Bob.id()); + let pre_transfer_charlie = + orml_tokens::Pallet::::free_balance(LP_ETH_USDC, &Keyring::Charlie.id()); add_allowance::( Keyring::Alice, LP_ETH_USDC, - RestrictedTransferLocation::Local(Keyring::Bob.to_account_id()), + RestrictedTransferLocation::Local(Keyring::Bob.id()), ); assert_noop!( @@ -6961,14 +6637,10 @@ mod centrifuge { pallet_restricted_tokens::Error::::PreConditionsNotMet ); - let after_transfer_alice = orml_tokens::Pallet::::free_balance( - LP_ETH_USDC, - &Keyring::Alice.to_account_id(), - ); - let after_transfer_charlie = orml_tokens::Pallet::::free_balance( - LP_ETH_USDC, - &Keyring::Charlie.to_account_id(), - ); + let after_transfer_alice = + orml_tokens::Pallet::::free_balance(LP_ETH_USDC, &Keyring::Alice.id()); + let after_transfer_charlie = + orml_tokens::Pallet::::free_balance(LP_ETH_USDC, &Keyring::Charlie.id()); assert_eq!(after_transfer_alice, pre_transfer_alice); assert_eq!(after_transfer_charlie, pre_transfer_charlie); @@ -6980,18 +6652,12 @@ mod centrifuge { lp_eth_usdc(TRANSFER_AMOUNT) ),); - let after_transfer_alice = orml_tokens::Pallet::::free_balance( - LP_ETH_USDC, - &Keyring::Alice.to_account_id(), - ); - let after_transfer_bob = orml_tokens::Pallet::::free_balance( - LP_ETH_USDC, - &Keyring::Bob.to_account_id(), - ); - let after_transfer_charlie = orml_tokens::Pallet::::free_balance( - LP_ETH_USDC, - &Keyring::Charlie.to_account_id(), - ); + let after_transfer_alice = + orml_tokens::Pallet::::free_balance(LP_ETH_USDC, &Keyring::Alice.id()); + let after_transfer_bob = + orml_tokens::Pallet::::free_balance(LP_ETH_USDC, &Keyring::Bob.id()); + let after_transfer_charlie = + orml_tokens::Pallet::::free_balance(LP_ETH_USDC, &Keyring::Charlie.id()); assert_eq!( after_transfer_alice, @@ -7012,7 +6678,7 @@ mod centrifuge { .add(genesis::balances::(cfg(10))) .add(orml_tokens::GenesisConfig:: { balances: vec![( - Keyring::Alice.to_account_id(), + Keyring::Alice.id(), LP_ETH_USDC, T::ExistentialDeposit::get() + lp_eth_usdc(TRANSFER_AMOUNT), )], @@ -7064,9 +6730,8 @@ mod centrifuge { ); let receiver = H160::from_slice( - &>::as_ref( - &Keyring::Charlie.to_account_id(), - )[0..20], + &>::as_ref(&Keyring::Charlie.id()) + [0..20], ); let domain_address = DomainAddress::EVM(1, receiver.into()); @@ -7110,7 +6775,7 @@ mod centrifuge { .add(genesis::balances::(cfg(10))) .add(orml_tokens::GenesisConfig:: { balances: vec![( - Keyring::Alice.to_account_id(), + Keyring::Alice.id(), USDC, T::ExistentialDeposit::get() + usdc(TRANSFER_AMOUNT), )], @@ -7122,16 +6787,16 @@ mod centrifuge { register_usdc::(); let pre_transfer_alice = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Alice.to_account_id()); + orml_tokens::Pallet::::free_balance(USDC, &Keyring::Alice.id()); let pre_transfer_bob = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Bob.to_account_id()); + orml_tokens::Pallet::::free_balance(USDC, &Keyring::Bob.id()); let pre_transfer_charlie = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Charlie.to_account_id()); + orml_tokens::Pallet::::free_balance(USDC, &Keyring::Charlie.id()); add_allowance::( Keyring::Alice, USDC, - RestrictedTransferLocation::Local(Keyring::Bob.to_account_id()), + RestrictedTransferLocation::Local(Keyring::Bob.id()), ); assert_noop!( @@ -7145,9 +6810,9 @@ mod centrifuge { ); let after_transfer_alice = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Alice.to_account_id()); + orml_tokens::Pallet::::free_balance(USDC, &Keyring::Alice.id()); let after_transfer_charlie = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Charlie.to_account_id()); + orml_tokens::Pallet::::free_balance(USDC, &Keyring::Charlie.id()); assert_eq!(after_transfer_alice, pre_transfer_alice); assert_eq!(after_transfer_charlie, pre_transfer_charlie); @@ -7160,11 +6825,11 @@ mod centrifuge { ),); let after_transfer_alice = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Alice.to_account_id()); + orml_tokens::Pallet::::free_balance(USDC, &Keyring::Alice.id()); let after_transfer_bob = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Bob.to_account_id()); + orml_tokens::Pallet::::free_balance(USDC, &Keyring::Bob.id()); let after_transfer_charlie = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Charlie.to_account_id()); + orml_tokens::Pallet::::free_balance(USDC, &Keyring::Charlie.id()); assert_eq!( after_transfer_alice, @@ -7309,7 +6974,7 @@ mod centrifuge { .add(genesis::balances::(cfg(10))) .add(orml_tokens::GenesisConfig:: { balances: vec![( - Keyring::Alice.to_account_id(), + Keyring::Alice.id(), DOT_ASSET_ID, T::ExistentialDeposit::get() + dot(TRANSFER_AMOUNT), )], @@ -7320,23 +6985,17 @@ mod centrifuge { env.parachain_state_mut(|| { register_dot::(); - let pre_transfer_alice = orml_tokens::Pallet::::free_balance( - DOT_ASSET_ID, - &Keyring::Alice.to_account_id(), - ); - let pre_transfer_bob = orml_tokens::Pallet::::free_balance( - DOT_ASSET_ID, - &Keyring::Bob.to_account_id(), - ); - let pre_transfer_charlie = orml_tokens::Pallet::::free_balance( - DOT_ASSET_ID, - &Keyring::Charlie.to_account_id(), - ); + let pre_transfer_alice = + orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Alice.id()); + let pre_transfer_bob = + orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Bob.id()); + let pre_transfer_charlie = + orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Charlie.id()); add_allowance::( Keyring::Alice, DOT_ASSET_ID, - RestrictedTransferLocation::Local(Keyring::Bob.to_account_id()), + RestrictedTransferLocation::Local(Keyring::Bob.id()), ); assert_noop!( @@ -7349,14 +7008,10 @@ mod centrifuge { pallet_restricted_tokens::Error::::PreConditionsNotMet ); - let after_transfer_alice = orml_tokens::Pallet::::free_balance( - DOT_ASSET_ID, - &Keyring::Alice.to_account_id(), - ); - let after_transfer_charlie = orml_tokens::Pallet::::free_balance( - DOT_ASSET_ID, - &Keyring::Charlie.to_account_id(), - ); + let after_transfer_alice = + orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Alice.id()); + let after_transfer_charlie = + orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Charlie.id()); assert_eq!(after_transfer_alice, pre_transfer_alice); assert_eq!(after_transfer_charlie, pre_transfer_charlie); @@ -7368,18 +7023,12 @@ mod centrifuge { dot(TRANSFER_AMOUNT) ),); - let after_transfer_alice = orml_tokens::Pallet::::free_balance( - DOT_ASSET_ID, - &Keyring::Alice.to_account_id(), - ); - let after_transfer_bob = orml_tokens::Pallet::::free_balance( - DOT_ASSET_ID, - &Keyring::Bob.to_account_id(), - ); - let after_transfer_charlie = orml_tokens::Pallet::::free_balance( - DOT_ASSET_ID, - &Keyring::Charlie.to_account_id(), - ); + let after_transfer_alice = + orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Alice.id()); + let after_transfer_bob = + orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Bob.id()); + let after_transfer_charlie = + orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Charlie.id()); assert_eq!( after_transfer_alice, @@ -7864,7 +7513,7 @@ mod centrifuge { env.sibling_state_mut(|| { assert_ok!(pallet_balances::Pallet::::force_set_balance( ::RuntimeOrigin::root(), - Keyring::Alice.to_account_id().into(), + Keyring::Alice.id().into(), transfer_amount * 2, )); @@ -8070,7 +7719,7 @@ mod all { PalletInstance(42), GeneralKey { length: tranche_id.len() as u8, - data: vec_to_fixed_array(tranche_id.to_vec()), + data: vec_to_fixed_array(tranche_id), }, ], ); @@ -8118,7 +7767,7 @@ mod all { PalletInstance(42), GeneralKey { length: tranche_id.len() as u8, - data: vec_to_fixed_array(tranche_id.to_vec()), + data: vec_to_fixed_array(tranche_id), }, ], ); diff --git a/runtime/integration-tests/src/generic/cases/loans.rs b/runtime/integration-tests/src/generic/cases/loans.rs index dc995d7b6e..657724a01e 100644 --- a/runtime/integration-tests/src/generic/cases/loans.rs +++ b/runtime/integration-tests/src/generic/cases/loans.rs @@ -42,7 +42,7 @@ use crate::{ self, currency::{self, cfg, usd6, CurrencyInfo, Usd6}, genesis::{self, Genesis}, - POOL_MIN_EPOCH_TIME, + pool::POOL_MIN_EPOCH_TIME, }, }, utils::accounts::Keyring, @@ -84,19 +84,19 @@ mod common { env.parachain_state_mut(|| { // Creating a pool utils::give_balance::(POOL_ADMIN.id(), T::PoolDeposit::get()); - utils::create_empty_pool::(POOL_ADMIN.id(), POOL_A, Usd6.id()); + utils::pool::create_empty::(POOL_ADMIN.id(), POOL_A, Usd6.id()); // Setting borrower - utils::give_pool_role::(BORROWER.id(), POOL_A, PoolRole::Borrower); + utils::pool::give_role::(BORROWER.id(), POOL_A, PoolRole::Borrower); utils::give_nft::(BORROWER.id(), NFT_A); // Setting a loan admin - utils::give_pool_role::(LOAN_ADMIN.id(), POOL_A, PoolRole::LoanAdmin); + utils::pool::give_role::(LOAN_ADMIN.id(), POOL_A, PoolRole::LoanAdmin); // Funding a pool let tranche_id = T::Api::tranche_id(POOL_A, 0).unwrap(); let tranche_investor = PoolRole::TrancheInvestor(tranche_id, Seconds::MAX); - utils::give_pool_role::(INVESTOR.id(), POOL_A, tranche_investor); + utils::pool::give_role::(INVESTOR.id(), POOL_A, tranche_investor); utils::give_tokens::(INVESTOR.id(), Usd6.id(), EXPECTED_POOL_BALANCE); utils::invest::(INVESTOR.id(), POOL_A, tranche_id, EXPECTED_POOL_BALANCE); }); @@ -105,7 +105,7 @@ mod common { env.parachain_state_mut(|| { // New epoch with the investor funds available - utils::close_pool_epoch::(POOL_ADMIN.id(), POOL_A); + utils::pool::close_epoch::(POOL_ADMIN.id(), POOL_A); }); env diff --git a/runtime/integration-tests/src/generic/cases/lp/investments.rs b/runtime/integration-tests/src/generic/cases/lp/investments.rs new file mode 100644 index 0000000000..773524a346 --- /dev/null +++ b/runtime/integration-tests/src/generic/cases/lp/investments.rs @@ -0,0 +1,747 @@ +// Copyright 2021 Centrifuge Foundation (centrifuge.io). +// +// This file is part of the Centrifuge chain project. +// Centrifuge is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version (see http://www.gnu.org/licenses). +// Centrifuge is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +use cfg_primitives::{Balance, OrderId}; +use ethabi::{Token, Uint}; +use pallet_investments::OrderOf; +use sp_core::U256; +use sp_runtime::traits::Zero; + +use crate::{ + generic::{ + cases::lp::{ + self, names, setup_full, + utils::{pool_c_tranche_1_id, Decoder}, + DECIMALS_6, POOL_C, + }, + config::Runtime, + env::{Blocks, Env, EnvEvmExtension, EvmEnv}, + }, + utils::accounts::Keyring, +}; + +const DEFAULT_INVESTMENT_AMOUNT: Balance = 100 * DECIMALS_6; + +mod utils { + use cfg_primitives::{AccountId, Balance}; + use cfg_traits::{investments::TrancheCurrency, HasLocalAssetRepresentation}; + use ethabi::Token; + use pallet_foreign_investments::Action; + use pallet_liquidity_pools::{GeneralCurrencyIndexOf, GeneralCurrencyIndexType}; + use sp_core::U256; + + use crate::{ + generic::{ + cases::lp::{investments::DEFAULT_INVESTMENT_AMOUNT, names, utils::Decoder}, + config::Runtime, + env::EvmEnv, + utils::{collect_investments, pool::close_epoch}, + }, + utils::accounts::Keyring, + }; + + pub fn index_lp(evm: &mut impl EvmEnv, name: &str) -> GeneralCurrencyIndexType { + Decoder::::decode(&evm.view( + Keyring::Alice, + names::POOL_MANAGER, + "currencyAddressToId", + Some(&[Token::Address(evm.deployed(name).address)]), + )) + } + + pub fn currency_index( + currency_id: ::CurrencyId, + ) -> GeneralCurrencyIndexType { + GeneralCurrencyIndexOf::::try_from(currency_id) + .unwrap() + .index + } + + pub fn investment_id( + pool: T::PoolId, + tranche: T::TrancheId, + ) -> ::TrancheCurrency { + ::TrancheCurrency::generate(pool, tranche) + } + + // TODO: CHANGE EVM TO BE ENVIRONMENTAL AND MAKE TRAIT NON SELF BUT RATHER GET + // THAT ENVIRONMENTAL! + pub fn invest(evm: &mut impl EvmEnv, who: Keyring, lp_pool: &str) { + evm.call( + who, + U256::zero(), + lp_pool, + "requestDeposit", + Some(&[ + Token::Uint(DEFAULT_INVESTMENT_AMOUNT.into()), + Token::Address(who.into()), + Token::Address(who.into()), + Token::Bytes(Default::default()), + ]), + ) + .unwrap(); + } + + pub fn cancel(evm: &mut impl EvmEnv, who: Keyring, lp_pool: &str) { + evm.call(who, U256::zero(), lp_pool, "cancelDepositRequest", None) + .unwrap(); + } + + pub fn decrease( + evm: &mut impl EvmEnv, + who: Keyring, + lp_pool: &str, + amount: Balance, + ) { + evm.call( + who, + U256::zero(), + lp_pool, + "decreaseDepositRequest", + Some(&[Token::Uint(amount.into())]), + ) + .unwrap(); + } + + pub fn close_and_collect( + investor: AccountId, + pool: ::PoolId, + tranche: ::TrancheId, + ) { + close_epoch::(Keyring::Admin.id(), pool); + // NOTE: We are collecting for the remote accounts only here. + collect_investments::(investor, pool, tranche); + } + + pub fn fulfill_swap( + investor: AccountId, + pool: ::PoolId, + tranche: ::TrancheId, + action: Action, + amount: Option<::BalanceOut>, + ) { + let order = pallet_order_book::Orders::::get( + pallet_swaps::SwapIdToOrderId::::get(( + investor, + (investment_id::(pool, tranche), action), + )) + .expect("Nothing to match"), + ) + .unwrap(); + + let from = &order.currency_out; + let to = &order.currency_in; + let needs_token_mux = match ( + HasLocalAssetRepresentation::>::is_local_representation_of(to, from).unwrap(), + HasLocalAssetRepresentation::>::is_local_representation_of(from, to).unwrap(), + ) { + (true, true) => unreachable!("Currencies should never be local of locals."), + (false, false) => false, + (true, false) => true, + (false, true) => true, + }; + + if needs_token_mux { + pallet_token_mux::Pallet::::match_swap( + Keyring::Alice.as_origin::(), + order.order_id, + amount.unwrap_or(order.amount_out), + ) + .unwrap(); + } else { + // TODO: Need to move tokens to Centrifuge first IIRC + // (i.e. FRAX, DAI, USDC) and then match. Best would be + // to move them during start-up, swap some USDC against + // LocalUSDC so that Alice holds it all. + } + } +} + +mod with_pool_currency { + use super::{utils, *}; + use crate::generic::cases::lp::utils as lp_utils; + + #[test_runtimes(all)] + fn currency_invest() { + let mut env = setup_full::(); + env.state_mut(|evm| { + utils::invest(evm, Keyring::TrancheInvestor(1), names::POOL_C_T_1_USDC); + }); + + env.state(|evm| { + assert_eq!( + pallet_investments::InvestOrders::::get( + lp::utils::remote_account_of::(Keyring::TrancheInvestor(1)), + utils::investment_id::(POOL_C, pool_c_tranche_1_id::()) + ), + Some(OrderOf::::new( + DEFAULT_INVESTMENT_AMOUNT, + OrderId::zero() + )) + ); + + assert_eq!( + Decoder::::decode(&evm.view( + Keyring::TrancheInvestor(1), + names::POOL_C_T_1_USDC, + "pendingDepositRequest", + Some(&[ + Token::Uint(Uint::zero()), + Token::Address(Keyring::TrancheInvestor(1).into()), + ]), + )), + DEFAULT_INVESTMENT_AMOUNT + ); + }); + } + + #[test_runtimes(all)] + fn currency_collect() { + let mut env = setup_full::(); + env.state_mut(|evm| { + utils::invest(evm, Keyring::TrancheInvestor(1), names::POOL_C_T_1_USDC); + }); + // Needed to get passed min_epoch_time + env.pass(Blocks::ByNumber(1)); + env.state_mut(|_evm| { + utils::close_and_collect::( + lp::utils::remote_account_of::(Keyring::TrancheInvestor(1)), + POOL_C, + pool_c_tranche_1_id::(), + ); + + lp_utils::process_outbound::(lp_utils::verify_outbound_success::); + }); + + env.state_mut(|evm| { + assert_eq!( + pallet_investments::InvestOrders::::get( + lp::utils::remote_account_of::(Keyring::TrancheInvestor(1)), + utils::investment_id::(POOL_C, pool_c_tranche_1_id::()) + ), + None + ); + + evm.call( + Keyring::TrancheInvestor(1), + U256::zero(), + names::POOL_C_T_1_USDC, + "deposit", + Some(&[ + Token::Uint(Decoder::::decode(&evm.view( + Keyring::TrancheInvestor(1), + names::POOL_C_T_1_USDC, + "maxDeposit", + Some(&[Token::Address(Keyring::TrancheInvestor(1).into())]), + ))), + Token::Address(Keyring::TrancheInvestor(1).into()), + ]), + ) + .unwrap(); + + assert_eq!( + Decoder::::decode(&evm.view( + Keyring::TrancheInvestor(1), + names::POOL_C_T_1, + "balanceOf", + Some(&[Token::Address(Keyring::TrancheInvestor(1).into())]), + )), + // Same amount as price is 1. + DEFAULT_INVESTMENT_AMOUNT + ); + + assert_eq!( + Decoder::::decode(&evm.view( + Keyring::TrancheInvestor(1), + names::POOL_C_T_1_USDC, + "maxDeposit", + Some(&[Token::Address(Keyring::TrancheInvestor(1).into())]), + )), + 0 + ); + }); + } + + #[test_runtimes(all)] + fn invest_cancel_full() { + let mut env = setup_full::(); + env.state_mut(|evm| { + utils::invest(evm, Keyring::TrancheInvestor(1), names::POOL_C_T_1_USDC); + }); + + env.state(|evm| { + assert_eq!( + pallet_investments::InvestOrders::::get( + lp::utils::remote_account_of::(Keyring::TrancheInvestor(1)), + utils::investment_id::(POOL_C, pool_c_tranche_1_id::()) + ), + Some(OrderOf::::new( + DEFAULT_INVESTMENT_AMOUNT, + OrderId::zero() + )) + ); + + assert_eq!( + Decoder::::decode(&evm.view( + Keyring::TrancheInvestor(1), + names::POOL_C_T_1_USDC, + "pendingDepositRequest", + Some(&[ + Token::Uint(Uint::zero()), + Token::Address(Keyring::TrancheInvestor(1).into()), + ]), + )), + DEFAULT_INVESTMENT_AMOUNT + ); + }); + + env.state_mut(|evm| { + utils::cancel(evm, Keyring::TrancheInvestor(1), names::POOL_C_T_1_USDC); + + assert_eq!( + pallet_investments::InvestOrders::::get( + lp::utils::remote_account_of::(Keyring::TrancheInvestor(1)), + utils::investment_id::(POOL_C, pool_c_tranche_1_id::()) + ), + None + ); + + lp_utils::process_outbound::(lp_utils::verify_outbound_success::); + + assert_eq!( + Decoder::::decode(&evm.view( + Keyring::TrancheInvestor(1), + names::POOL_C_T_1_USDC, + "pendingDepositRequest", + Some(&[ + Token::Uint(Uint::zero()), + Token::Address(Keyring::TrancheInvestor(1).into()), + ]), + )), + 0 + ); + }); + } +} + +mod with_foreign_currency { + use cfg_types::fixed_point::Quantity; + use cfg_utils::vec_to_fixed_array; + use pallet_foreign_investments::Action; + use pallet_liquidity_pools::MessageOf; + use sp_runtime::{ + traits::{EnsureFixedPointNumber, EnsureSub, One}, + FixedPointNumber, + }; + + use super::{utils, *}; + use crate::generic::cases::lp::{ + investments::utils::close_and_collect, utils as lp_utils, utils::pool_a_tranche_1_id, + POOL_A, + }; + + #[test_runtimes(all)] + fn invest_cancel_full_before_swap() { + let mut env = setup_full::(); + env.state_mut(|evm| { + utils::invest(evm, Keyring::TrancheInvestor(1), names::POOL_A_T_1_USDC); + }); + + env.state(|evm| { + assert_eq!( + pallet_investments::InvestOrders::::get( + lp::utils::remote_account_of::(Keyring::TrancheInvestor(1)), + utils::investment_id::(POOL_A, pool_c_tranche_1_id::()) + ), + None, + ); + + assert_eq!( + Decoder::::decode(&evm.view( + Keyring::TrancheInvestor(1), + names::POOL_A_T_1_USDC, + "pendingDepositRequest", + Some(&[ + Token::Uint(Uint::zero()), + Token::Address(Keyring::TrancheInvestor(1).into()), + ]), + )), + DEFAULT_INVESTMENT_AMOUNT + ); + }); + + env.state_mut(|evm| { + utils::cancel(evm, Keyring::TrancheInvestor(1), names::POOL_A_T_1_USDC); + + assert_eq!( + pallet_investments::InvestOrders::::get( + lp::utils::remote_account_of::(Keyring::TrancheInvestor(1)), + utils::investment_id::(POOL_A, pool_c_tranche_1_id::()) + ), + None + ); + + lp_utils::process_outbound::(lp_utils::verify_outbound_success::); + + assert_eq!( + Decoder::::decode(&evm.view( + Keyring::TrancheInvestor(1), + names::POOL_A_T_1_USDC, + "pendingDepositRequest", + Some(&[ + Token::Uint(Uint::zero()), + Token::Address(Keyring::TrancheInvestor(1).into()), + ]), + )), + 0 + ); + }); + } + + #[test_runtimes(all)] + fn invest_cancel_full_after_swap() { + let mut env = setup_full::(); + env.state_mut(|evm| { + utils::invest(evm, Keyring::TrancheInvestor(1), names::POOL_A_T_1_USDC); + utils::fulfill_swap::( + lp::utils::remote_account_of::(Keyring::TrancheInvestor(1)), + POOL_A, + pool_a_tranche_1_id::(), + Action::Investment, + None, + ); + }); + + env.state(|evm| { + assert_eq!( + pallet_investments::InvestOrders::::get( + lp::utils::remote_account_of::(Keyring::TrancheInvestor(1)), + utils::investment_id::(POOL_A, pool_a_tranche_1_id::()) + ), + Some(OrderOf::::new( + DEFAULT_INVESTMENT_AMOUNT, + OrderId::zero() + )) + ); + + assert_eq!( + Decoder::::decode(&evm.view( + Keyring::TrancheInvestor(1), + names::POOL_A_T_1_USDC, + "pendingDepositRequest", + Some(&[ + Token::Uint(Uint::zero()), + Token::Address(Keyring::TrancheInvestor(1).into()), + ]), + )), + DEFAULT_INVESTMENT_AMOUNT + ); + }); + + env.state_mut(|evm| { + utils::cancel(evm, Keyring::TrancheInvestor(1), names::POOL_A_T_1_USDC); + + assert_eq!( + pallet_investments::InvestOrders::::get( + lp::utils::remote_account_of::(Keyring::TrancheInvestor(1)), + utils::investment_id::(POOL_A, pool_a_tranche_1_id::()) + ), + None + ); + + utils::fulfill_swap::( + lp::utils::remote_account_of::(Keyring::TrancheInvestor(1)), + POOL_A, + pool_a_tranche_1_id::(), + Action::Investment, + None, + ); + + lp_utils::process_outbound::(|msg| { + assert_eq!( + msg, + MessageOf::::ExecutedDecreaseInvestOrder { + pool_id: POOL_A, + tranche_id: pool_a_tranche_1_id::(), + investor: vec_to_fixed_array(lp::utils::remote_account_of::( + Keyring::TrancheInvestor(1) + )), + currency: utils::index_lp(evm, names::USDC), + currency_payout: DEFAULT_INVESTMENT_AMOUNT, + remaining_invest_amount: 0, + } + ) + }); + + assert_eq!( + Decoder::::decode(&evm.view( + Keyring::TrancheInvestor(1), + names::POOL_A_T_1_USDC, + "pendingDepositRequest", + Some(&[ + Token::Uint(Uint::zero()), + Token::Address(Keyring::TrancheInvestor(1).into()), + ]), + )), + 0 + ); + }); + } + + #[test_runtimes(all)] + fn invest_cancel_full_after_swap_partially() { + let mut env = setup_full::(); + let part = Quantity::checked_from_rational(1, 2).unwrap(); + let partial_amount = part.ensure_mul_int(DEFAULT_INVESTMENT_AMOUNT).unwrap(); + + env.state_mut(|evm| { + utils::invest(evm, Keyring::TrancheInvestor(1), names::POOL_A_T_1_USDC); + utils::fulfill_swap::( + lp::utils::remote_account_of::(Keyring::TrancheInvestor(1)), + POOL_A, + pool_a_tranche_1_id::(), + Action::Investment, + Some(partial_amount), + ); + }); + + env.state(|evm| { + assert_eq!( + pallet_investments::InvestOrders::::get( + lp::utils::remote_account_of::(Keyring::TrancheInvestor(1)), + utils::investment_id::(POOL_A, pool_a_tranche_1_id::()) + ), + Some(OrderOf::::new(partial_amount, OrderId::zero())) + ); + + assert_eq!( + Decoder::::decode(&evm.view( + Keyring::TrancheInvestor(1), + names::POOL_A_T_1_USDC, + "pendingDepositRequest", + Some(&[ + Token::Uint(Uint::zero()), + Token::Address(Keyring::TrancheInvestor(1).into()), + ]), + )), + DEFAULT_INVESTMENT_AMOUNT + ); + }); + + env.state_mut(|evm| { + utils::cancel(evm, Keyring::TrancheInvestor(1), names::POOL_A_T_1_USDC); + + assert_eq!( + pallet_investments::InvestOrders::::get( + lp::utils::remote_account_of::(Keyring::TrancheInvestor(1)), + utils::investment_id::(POOL_A, pool_a_tranche_1_id::()) + ), + None + ); + + assert_eq!( + Decoder::::decode(&evm.view( + Keyring::TrancheInvestor(1), + names::POOL_A_T_1_USDC, + "pendingDepositRequest", + Some(&[ + Token::Uint(Uint::zero()), + Token::Address(Keyring::TrancheInvestor(1).into()), + ]), + )), + DEFAULT_INVESTMENT_AMOUNT + ); + + utils::fulfill_swap::( + lp::utils::remote_account_of::(Keyring::TrancheInvestor(1)), + POOL_A, + pool_a_tranche_1_id::(), + Action::Investment, + None, + ); + + lp_utils::process_outbound::(|msg| { + assert_eq!( + msg, + MessageOf::::ExecutedDecreaseInvestOrder { + pool_id: POOL_A, + tranche_id: pool_a_tranche_1_id::(), + investor: vec_to_fixed_array(lp::utils::remote_account_of::( + Keyring::TrancheInvestor(1) + )), + currency: utils::index_lp(evm, names::USDC), + currency_payout: DEFAULT_INVESTMENT_AMOUNT, + remaining_invest_amount: 0, + } + ) + }); + + assert_eq!( + Decoder::::decode(&evm.view( + Keyring::TrancheInvestor(1), + names::POOL_A_T_1_USDC, + "pendingDepositRequest", + Some(&[ + Token::Uint(Uint::zero()), + Token::Address(Keyring::TrancheInvestor(1).into()), + ]), + )), + 0 + ); + }); + } + + #[test_runtimes(all)] + fn invest_cancel_full_after_swap_partially_inter_epoch_close() { + let mut env = setup_full::(); + let part = Quantity::checked_from_rational(1, 3).unwrap(); + let other_part = Quantity::one().ensure_sub(part).unwrap(); + let partial_amount = part.ensure_mul_int(DEFAULT_INVESTMENT_AMOUNT).unwrap(); + let remaining_amount = other_part + .ensure_mul_int(DEFAULT_INVESTMENT_AMOUNT) + .unwrap(); + + env.state_mut(|evm| { + utils::invest(evm, Keyring::TrancheInvestor(1), names::POOL_A_T_1_USDC); + utils::fulfill_swap::( + lp::utils::remote_account_of::(Keyring::TrancheInvestor(1)), + POOL_A, + pool_a_tranche_1_id::(), + Action::Investment, + Some(partial_amount), + ); + }); + + env.state(|evm| { + assert_eq!( + pallet_investments::InvestOrders::::get( + lp::utils::remote_account_of::(Keyring::TrancheInvestor(1)), + utils::investment_id::(POOL_A, pool_a_tranche_1_id::()) + ), + Some(OrderOf::::new(partial_amount, OrderId::zero())) + ); + + assert_eq!( + Decoder::::decode(&evm.view( + Keyring::TrancheInvestor(1), + names::POOL_A_T_1_USDC, + "pendingDepositRequest", + Some(&[ + Token::Uint(Uint::zero()), + Token::Address(Keyring::TrancheInvestor(1).into()), + ]), + )), + DEFAULT_INVESTMENT_AMOUNT + ); + }); + + env.pass(Blocks::ByNumber(1)); + + env.state_mut(|evm| { + close_and_collect::( + lp::utils::remote_account_of::(Keyring::TrancheInvestor(1)), + POOL_A, + pool_a_tranche_1_id::(), + ); + + assert_eq!( + pallet_investments::InvestOrders::::get( + lp::utils::remote_account_of::(Keyring::TrancheInvestor(1)), + utils::investment_id::(POOL_A, pool_a_tranche_1_id::()) + ), + None + ); + + lp_utils::process_outbound::(|msg| { + assert_eq!( + msg, + MessageOf::::ExecutedCollectInvest { + pool_id: POOL_A, + tranche_id: pool_a_tranche_1_id::(), + investor: vec_to_fixed_array(lp::utils::remote_account_of::( + Keyring::TrancheInvestor(1) + )), + currency: utils::index_lp(evm, names::USDC), + currency_payout: partial_amount, + tranche_tokens_payout: partial_amount, + remaining_invest_amount: remaining_amount, + } + ) + }); + + assert_eq!( + Decoder::::decode(&evm.view( + Keyring::TrancheInvestor(1), + names::POOL_A_T_1_USDC, + "pendingDepositRequest", + Some(&[ + Token::Uint(Uint::zero()), + Token::Address(Keyring::TrancheInvestor(1).into()), + ]), + )), + remaining_amount + ); + + utils::cancel(evm, Keyring::TrancheInvestor(1), names::POOL_A_T_1_USDC); + + assert_eq!( + pallet_investments::InvestOrders::::get( + lp::utils::remote_account_of::(Keyring::TrancheInvestor(1)), + utils::investment_id::(POOL_A, pool_a_tranche_1_id::()) + ), + None + ); + + assert_eq!( + Decoder::::decode(&evm.view( + Keyring::TrancheInvestor(1), + names::POOL_A_T_1_USDC, + "pendingDepositRequest", + Some(&[ + Token::Uint(Uint::zero()), + Token::Address(Keyring::TrancheInvestor(1).into()), + ]), + )), + remaining_amount + ); + + lp_utils::process_outbound::(|msg| { + assert_eq!( + msg, + MessageOf::::ExecutedDecreaseInvestOrder { + pool_id: POOL_A, + tranche_id: pool_a_tranche_1_id::(), + investor: vec_to_fixed_array(lp::utils::remote_account_of::( + Keyring::TrancheInvestor(1) + )), + currency: utils::index_lp(evm, names::USDC), + currency_payout: remaining_amount, + remaining_invest_amount: 0, + } + ) + }); + + assert_eq!( + Decoder::::decode(&evm.view( + Keyring::TrancheInvestor(1), + names::POOL_A_T_1_USDC, + "pendingDepositRequest", + Some(&[ + Token::Uint(Uint::zero()), + Token::Address(Keyring::TrancheInvestor(1).into()), + ]), + )), + 0 + ); + }); + } +} diff --git a/runtime/integration-tests/src/generic/cases/lp/mod.rs b/runtime/integration-tests/src/generic/cases/lp/mod.rs new file mode 100644 index 0000000000..d10a514f0b --- /dev/null +++ b/runtime/integration-tests/src/generic/cases/lp/mod.rs @@ -0,0 +1,1956 @@ +// Copyright 2021 Centrifuge Foundation (centrifuge.io). +// +// This file is part of the Centrifuge chain project. +// Centrifuge is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version (see http://www.gnu.org/licenses). +// Centrifuge is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +use axelar_gateway_precompile::SourceConverter; +use cfg_primitives::{Balance, PoolId, CFG, SECONDS_PER_HOUR, SECONDS_PER_YEAR}; +use cfg_traits::Seconds; +use cfg_types::{ + domain_address::{Domain, DomainAddress}, + permissions::PoolRole, + tokens::{CrossChainTransferability, CurrencyId, CustomMetadata, LocalAssetId}, +}; +use ethabi::{ + ethereum_types::{H160, U256}, + FixedBytes, Token, Uint, +}; +use frame_support::{ + assert_ok, dispatch::RawOrigin, pallet_prelude::ConstU32, traits::OriginTrait, BoundedVec, +}; +use frame_system::pallet_prelude::OriginFor; +use hex_literal::hex; +use liquidity_pools_gateway_routers::{ + AxelarEVMRouter, DomainRouter, EVMDomain, EVMRouter, FeeValues, MAX_AXELAR_EVM_CHAIN_SIZE, +}; +use pallet_evm::FeeCalculator; +use runtime_common::account_conversion::AccountConverter; +use sp_core::Get; +use sp_runtime::traits::{BlakeTwo256, Hash}; + +use crate::{ + generic::{ + cases::lp::utils::{ + pool_a_tranche_1_id, pool_b_tranche_1_id, pool_b_tranche_2_id, Decoder, + }, + config::Runtime, + env::{Blocks, Env, EnvEvmExtension, EvmEnv}, + envs::runtime_env::RuntimeEnv, + utils::{ + currency::{register_currency, CurrencyInfo}, + genesis, + genesis::Genesis, + give_balance, + oracle::set_order_book_feeder, + tokens::evm_balances, + }, + }, + utils::accounts::{default_investors, Keyring}, +}; + +pub mod investments; +pub mod pool_management; +pub mod transfers; + +pub mod utils { + use std::{cmp::min, fmt::Debug}; + + use cfg_primitives::{Balance, TrancheId}; + use cfg_types::domain_address::DomainAddress; + use ethabi::ethereum_types::{H160, H256, U256}; + use fp_evm::CallInfo; + use frame_support::traits::{OriginTrait, PalletInfo}; + use frame_system::pallet_prelude::OriginFor; + use pallet_evm::ExecutionInfo; + use sp_core::{ByteArray, Get}; + use sp_runtime::{ + traits::{Convert, EnsureAdd}, + DispatchError, + }; + use staging_xcm::{ + v4::{ + Junction::{AccountKey20, GlobalConsensus, PalletInstance}, + NetworkId, + }, + VersionedLocation, + }; + + use crate::{ + generic::{ + cases::lp::{EVM_DOMAIN_CHAIN_ID, POOL_A, POOL_B, POOL_C}, + config::Runtime, + utils::{evm::receipt_ok, last_event, pool::get_tranche_ids}, + }, + utils::accounts::Keyring, + }; + + pub fn remote_account_of( + keyring: Keyring, + ) -> ::AccountId { + ::DomainAddressToAccountId::convert( + DomainAddress::evm(EVM_DOMAIN_CHAIN_ID, keyring.into()), + ) + } + + pub const REVERT_ERR: Result = + Err(DispatchError::Other("EVM call failed: Revert")); + + pub fn lp_asset_location(address: H160) -> VersionedLocation { + [ + PalletInstance( + ::PalletInfo::index::>() + .unwrap() + .try_into() + .unwrap(), + ), + GlobalConsensus(NetworkId::Ethereum { + chain_id: EVM_DOMAIN_CHAIN_ID, + }), + AccountKey20 { + key: address.into(), + network: None, + } + ].into() + } + + pub fn pool_a_tranche_1_id() -> TrancheId { + *get_tranche_ids::(POOL_A) + .get(0) + .expect("Pool A has one non-residuary tranche") + } + pub fn pool_b_tranche_1_id() -> TrancheId { + *get_tranche_ids::(POOL_B) + .get(0) + .expect("Pool B has two non-residuary tranches") + } + pub fn pool_b_tranche_2_id() -> TrancheId { + *get_tranche_ids::(POOL_B) + .get(1) + .expect("Pool B has two non-residuary tranches") + } + + pub fn pool_c_tranche_1_id() -> TrancheId { + *get_tranche_ids::(POOL_C) + .get(0) + .expect("Pool B has two non-residuary tranches") + } + + pub fn verify_outbound_failure_on_lp(to: H160) { + let (_tx, status, receipt) = pallet_ethereum::Pending::::get() + .last() + .expect("Queue triggered evm tx.") + .clone(); + + // The sender is the sender account on the gateway + assert_eq!( + status.from.0, + ::Sender::get().as_slice()[0..20] + ); + assert_eq!(status.to.unwrap().0, to.0); + assert!(!receipt_ok(receipt)); + assert!(matches!( + last_event::>(), + pallet_liquidity_pools_gateway::Event::::OutboundMessageExecutionFailure { .. } + )); + } + + pub fn verify_outbound_success( + _: ::Message, + ) { + assert!(matches!( + last_event::>(), + pallet_liquidity_pools_gateway::Event::::OutboundMessageExecutionSuccess { .. } + )); + } + + pub fn process_outbound( + mut verifier: impl FnMut(::Message), + ) { + let msgs = pallet_liquidity_pools_gateway::OutboundMessageQueue::::iter() + .map(|(nonce, (_, _, msg))| (nonce, msg)) + .collect::>(); + + // The function should panic if there is nothing to be processed. + assert!(msgs.len() > 0); + + msgs.into_iter().for_each(|(nonce, msg)| { + pallet_liquidity_pools_gateway::Pallet::::process_outbound_message( + OriginFor::::signed(Keyring::Alice.into()), + nonce, + ) + .unwrap(); + + verifier(msg); + }); + } + + pub fn to_fixed_array(src: &[u8]) -> [u8; S] { + let mut dest = [0; S]; + let len = min(src.len(), S); + dest[..len].copy_from_slice(&src[..len]); + + dest + } + + pub fn as_h160_32bytes(who: Keyring) -> [u8; 32] { + let mut address = [0u8; 32]; + address[..20].copy_from_slice(H160::from(who).as_bytes()); + address + } + + trait Input { + fn input(&self) -> &[u8]; + } + + impl Input for Vec { + fn input(&self) -> &[u8] { + self.as_slice() + } + } + + impl Input for Result, E> { + fn input(&self) -> &[u8] { + match self { + Ok(arr) => arr.as_slice(), + Err(e) => panic!("Input received error: {:?}", e), + } + } + } + + impl Input for Result>, E> { + fn input(&self) -> &[u8] { + match self { + Ok(arr) => arr.value.as_slice(), + Err(e) => panic!("Input received error: {:?}", e), + } + } + } + + pub trait Decoder { + fn decode(&self) -> T; + } + + impl Decoder for T { + fn decode(&self) -> H160 { + assert_eq!(self.input().len(), 32usize); + + H160::from(to_fixed_array(&self.input()[12..])) + } + } + + impl Decoder for T { + fn decode(&self) -> H256 { + assert_eq!(self.input().len(), 32usize); + + H256::from(to_fixed_array(self.input())) + } + } + + impl Decoder for T { + fn decode(&self) -> bool { + assert!(self.input().len() == 32); + + // In EVM the last byte of the U256 is set to 1 if true else to false + self.input()[31] == 1u8 + } + } + + impl Decoder for T { + fn decode(&self) -> Balance { + assert_eq!(self.input().len(), 32usize); + + Balance::from_be_bytes(to_fixed_array(&self.input()[16..])) + } + } + + impl Decoder for T { + fn decode(&self) -> U256 { + match self.input().len() { + 1 => U256::from(u8::from_be_bytes(to_fixed_array(&self.input()))), + 2 => U256::from(u16::from_be_bytes(to_fixed_array(&self.input()))), + 4 => U256::from(u32::from_be_bytes(to_fixed_array(&self.input()))), + 8 => U256::from(u64::from_be_bytes(to_fixed_array(&self.input()))), + 16 => U256::from(u128::from_be_bytes(to_fixed_array(&self.input()))), + 32 => U256::from_big_endian(to_fixed_array::<32>(&self.input()).as_slice()), + _ => { + panic!("Invalid slice length for u256 derivation") + } + } + } + } + + impl Decoder<(u128, u64)> for T { + fn decode(&self) -> (u128, u64) { + assert!(self.input().len() >= 32); + + let left = &self.input()[..32]; + let right = &self.input()[32..]; + + let unsigned128 = match left.len() { + 1 => u128::from(u8::from_be_bytes(to_fixed_array(&left))), + 2 => u128::from(u16::from_be_bytes(to_fixed_array(&left))), + 4 => u128::from(u32::from_be_bytes(to_fixed_array(&left))), + 8 => u128::from(u64::from_be_bytes(to_fixed_array(&left))), + 16 => u128::from(u128::from_be_bytes(to_fixed_array(&left))), + 32 => { + let x = u128::from_be_bytes(to_fixed_array::<16>(&left[..16])); + let y = u128::from_be_bytes(to_fixed_array::<16>(&left[16..])); + x.ensure_add(y) + .expect("Price is initialized as u128 on EVM side") + } + _ => { + panic!("Invalid slice length for u128 derivation"); + } + }; + + let unsigned64 = match right.len() { + 1 => u64::from(u8::from_be_bytes(to_fixed_array(&right))), + 2 => u64::from(u16::from_be_bytes(to_fixed_array(&right))), + 4 => u64::from(u32::from_be_bytes(to_fixed_array(&right))), + 8 => u64::from_be_bytes(to_fixed_array(&right)), + // EVM stores in 32 byte slots with left-padding + 16 => u64::from_be_bytes(to_fixed_array::<8>(&right[28..])), + 32 => u64::from_be_bytes(to_fixed_array::<8>(&right[24..])), + _ => { + panic!("Invalid slice length for u64 derivation"); + } + }; + + (unsigned128, unsigned64) + } + } + + impl Decoder for T { + fn decode(&self) -> u8 { + assert_eq!(self.input().len(), 32usize); + + self.input()[31] + } + } +} + +/// A single tranched pool. +/// Pool currency: LocalUsdc +pub const POOL_A: PoolId = 1; + +/// A two tranched pool. +/// Pool currency: LocalUsdc +pub const POOL_B: PoolId = 2; + +/// A single tranched pool. +/// Pool currency: Usdc from other domain +pub const POOL_C: PoolId = 3; + +pub const DEFAULT_BALANCE: Balance = 1_000_000; +const DECIMALS_6: Balance = 1_000_000; +const DECIMALS_18: Balance = 1_000_000_000_000_000_000; +const LOCAL_ASSET_ID: LocalAssetId = LocalAssetId(1); +const INVESTOR_VALIDIDITY: Seconds = Seconds::MAX; + +pub mod contracts { + pub const POOL_MANAGER: &str = "PoolManager"; +} + +pub mod names { + pub const POOL_MANAGER: &str = "pool_manager"; + pub const USDC: &str = "usdc"; + pub const FRAX: &str = "frax"; + pub const DAI: &str = "dai"; + pub const POOL_A_T_1: &str = "lp_pool_a_tranche_1"; + pub const RM_POOL_A_T_1: &str = "rm_lp_pool_a_tranche_1"; + pub const POOL_A_T_1_DAI: &str = "lp_pool_a_tranche_1_dai"; + pub const POOL_A_T_1_FRAX: &str = "lp_pool_a_tranche_1_frax"; + pub const POOL_A_T_1_USDC: &str = "lp_pool_a_tranche_1_usdc"; + + pub const POOL_B_T_1: &str = "lp_pool_b_tranche_1"; + pub const RM_POOL_B_T_1: &str = "rm_lp_pool_b_tranche_1"; + pub const POOL_B_T_1_DAI: &str = "lp_pool_b_tranche_1_dai"; + pub const POOL_B_T_1_FRAX: &str = "lp_pool_b_tranche_1_frax"; + pub const POOL_B_T_1_USDC: &str = "lp_pool_b_tranche_1_usdc"; + + pub const POOL_B_T_2: &str = "lp_pool_b_tranche_2"; + pub const RM_POOL_B_T_2: &str = "rm_lp_pool_b_tranche_2"; + pub const POOL_B_T_2_DAI: &str = "lp_pool_b_tranche_2_dai"; + pub const POOL_B_T_2_FRAX: &str = "lp_pool_b_tranche_2_frax"; + pub const POOL_B_T_2_USDC: &str = "lp_pool_b_tranche_2_usdc"; + pub const POOL_C_T_1: &str = "lp_pool_c_tranche_1"; + pub const RM_POOL_C_T_1: &str = "rm_lp_pool_c_tranche_1"; + pub const POOL_C_T_1_USDC: &str = "lp_pool_b_tranche_1_usdc"; + pub const POOL_C_T_1_FRAX: &str = "lp_pool_b_tranche_1_frax"; + pub const POOL_C_T_1_DAI: &str = "lp_pool_b_tranche_1_dai"; +} + +#[allow(non_camel_case_types)] +pub struct USDC; +impl CurrencyInfo for USDC { + fn custom(&self) -> CustomMetadata { + CustomMetadata { + pool_currency: true, + transferability: CrossChainTransferability::LiquidityPools, + permissioned: false, + mintable: false, + local_representation: Some(LOCAL_ASSET_ID), + } + } + + fn ed(&self) -> Balance { + 10_000 + } + + fn symbol(&self) -> &'static str { + "USDC" + } + + fn id(&self) -> CurrencyId { + CurrencyId::ForeignAsset(100_001) + } + + fn decimals(&self) -> u32 { + 6 + } +} + +#[allow(non_camel_case_types)] +pub struct DAI; +impl CurrencyInfo for DAI { + fn custom(&self) -> CustomMetadata { + CustomMetadata { + pool_currency: true, + transferability: CrossChainTransferability::LiquidityPools, + permissioned: false, + mintable: false, + local_representation: None, + } + } + + fn symbol(&self) -> &'static str { + "DAI" + } + + fn id(&self) -> CurrencyId { + CurrencyId::ForeignAsset(100_002) + } + + fn ed(&self) -> Balance { + 100_000_000_000_000 + } + + fn decimals(&self) -> u32 { + 18 + } +} + +#[allow(non_camel_case_types)] +pub struct FRAX; +impl CurrencyInfo for FRAX { + fn custom(&self) -> CustomMetadata { + CustomMetadata { + pool_currency: true, + transferability: CrossChainTransferability::LiquidityPools, + permissioned: false, + mintable: false, + local_representation: None, + } + } + + fn symbol(&self) -> &'static str { + "FRAX" + } + + fn id(&self) -> CurrencyId { + CurrencyId::ForeignAsset(100_003) + } + + fn ed(&self) -> Balance { + 100_000_000_000_000 + } + + fn decimals(&self) -> u32 { + 18 + } +} + +#[allow(non_camel_case_types)] +pub struct LocalUSDC; +impl CurrencyInfo for LocalUSDC { + fn custom(&self) -> CustomMetadata { + CustomMetadata { + pool_currency: true, + transferability: CrossChainTransferability::None, + permissioned: false, + mintable: false, + local_representation: None, + } + } + + fn symbol(&self) -> &'static str { + "LocalUSDC" + } + + fn id(&self) -> CurrencyId { + CurrencyId::LocalAsset(LOCAL_ASSET_ID) + } + + fn ed(&self) -> Balance { + 10_000 + } + + fn decimals(&self) -> u32 { + 6 + } +} + +/// The faked router address on the EVM side. Needed for the precompile to +/// verify the origin of messages. +/// +/// NOTE: This is NOT the real address of the +/// router, but the one we are faking on the EVM side. Hence, it is fix +/// coded here in the same way it is fixed code on the EVM testing router. +pub const EVM_LP_INSTANCE: [u8; 20] = hex!("1111111111111111111111111111111111111111"); + +/// The faked domain name the LP messages are coming from and going to. +pub const EVM_DOMAIN_STR: &str = "TestDomain"; + +/// The test domain ChainId for the tests. +pub const EVM_DOMAIN_CHAIN_ID: u64 = 1; + +pub const EVM_DOMAIN: Domain = Domain::EVM(EVM_DOMAIN_CHAIN_ID); + +pub fn setup_full() -> impl EnvEvmExtension { + setup::(|evm| { + setup_currencies(evm); + setup_pools(evm); + setup_tranches(evm); + setup_investment_currencies(evm); + setup_deploy_lps(evm); + setup_investors(evm) + }) +} + +/// Default setup required for EVM <> CFG communication +pub fn setup as EnvEvmExtension>::EvmEnv)>( + additional: F, +) -> impl EnvEvmExtension { + let mut env = RuntimeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(DEFAULT_BALANCE * CFG)) + .storage(), + ); + env.state_mut(|evm| { + evm_balances::(DEFAULT_BALANCE * CFG); + set_order_book_feeder::(T::RuntimeOriginExt::root()); + + evm.load_contracts(); + + // Fund gateway sender + give_balance::( + ::Sender::get(), + DEFAULT_BALANCE * CFG, + ); + + // Register general local pool-currency + register_currency::(LocalUSDC, |_| {}); + + /* TODO: Use that but index needed contracts afterwards + env.deploy("LocalRouterScript", "lp_deploy", Keyring::Alice, None); + env.call_mut(Keyring::Alice, Default::default(), "lp_deploy", "run", None) + .unwrap(); + */ + + // ------------------ EVM Side ----------------------- // + // The flow is based in the following code from the Solidity and needs to be + // adapted if this deployment script changes in the future + // * https://github.com/centrifuge/liquidity-pools/blob/e2c3ac92d1cea991e7e0d5f57be8658a46cbf1fe/script/Axelar.s.sol#L17-L31 + // + // PART: Deploy InvestmentManager + // * https://github.com/centrifuge/liquidity-pools/blob/e2c3ac92d1cea991e7e0d5f57be8658a46cbf1fe/script/Deployer.sol#L45-L69 + evm.deploy( + "Escrow", + "escrow", + Keyring::Alice, + Some(&[Token::Address(Keyring::Alice.into())]), + ); + evm.deploy("UserEscrow", "user_escrow", Keyring::Alice, None); + evm.deploy( + "Root", + "root", + Keyring::Alice, + Some(&[ + Token::Address(evm.deployed("escrow").address()), + Token::Uint(U256::from(48 * SECONDS_PER_HOUR)), + Token::Address(Keyring::Alice.into()), + ]), + ); + evm.deploy( + "LiquidityPoolFactory", + "lp_pool_factory", + Keyring::Alice, + Some(&[Token::Address(evm.deployed("root").address())]), + ); + evm.deploy( + "RestrictionManagerFactory", + "restriction_manager_factory", + Keyring::Alice, + Some(&[Token::Address(evm.deployed("root").address())]), + ); + evm.deploy( + "TrancheTokenFactory", + "tranche_token_factory", + Keyring::Alice, + Some(&[ + Token::Address(evm.deployed("root").address()), + Token::Address(Keyring::Alice.into()), + ]), + ); + evm.deploy( + "InvestmentManager", + "investment_manager", + Keyring::Alice, + Some(&[ + Token::Address(evm.deployed("escrow").address()), + Token::Address(evm.deployed("user_escrow").address()), + ]), + ); + evm.deploy( + contracts::POOL_MANAGER, + names::POOL_MANAGER, + Keyring::Alice, + Some(&[ + Token::Address(evm.deployed("escrow").address()), + Token::Address(evm.deployed("lp_pool_factory").address()), + Token::Address(evm.deployed("restriction_manager_factory").address()), + Token::Address(evm.deployed("tranche_token_factory").address()), + ]), + ); + evm.call( + Keyring::Alice, + Default::default(), + "lp_pool_factory", + "rely", + Some(&[Token::Address(evm.deployed("pool_manager").address())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "tranche_token_factory", + "rely", + Some(&[Token::Address(evm.deployed("pool_manager").address())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "restriction_manager_factory", + "rely", + Some(&[Token::Address(evm.deployed("pool_manager").address())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "lp_pool_factory", + "rely", + Some(&[Token::Address(evm.deployed("root").address())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "tranche_token_factory", + "rely", + Some(&[Token::Address(evm.deployed("root").address())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "restriction_manager_factory", + "rely", + Some(&[Token::Address(evm.deployed("root").address())]), + ) + .unwrap(); + + // PART: Deploy router (using the testing LocalRouter here) + // * https://github.com/centrifuge/liquidity-pools/blob/e2c3ac92d1cea991e7e0d5f57be8658a46cbf1fe/script/Axelar.s.sol#L24 + evm.deploy("LocalRouter", "router", Keyring::Alice, None); + + // PART: Wire router + file gateway + // * https://github.com/centrifuge/liquidity-pools/blob/e2c3ac92d1cea991e7e0d5f57be8658a46cbf1fe/script/Deployer.sol#L71-L98 + evm.deploy( + "PauseAdmin", + "pause_admin", + Keyring::Alice, + Some(&[Token::Address(evm.deployed("root").address())]), + ); + evm.deploy( + "DelayedAdmin", + "delay_admin", + Keyring::Alice, + Some(&[ + Token::Address(evm.deployed("root").address()), + Token::Address(evm.deployed("pause_admin").address()), + ]), + ); + // Enable once https://github.com/foundry-rs/foundry/issues/7032 is resolved + evm.deploy( + "Gateway", + "gateway", + Keyring::Alice, + Some(&[ + Token::Address(evm.deployed("root").address()), + Token::Address(evm.deployed("investment_manager").address()), + Token::Address(evm.deployed("pool_manager").address()), + Token::Address(evm.deployed("router").address()), + ]), + ); + // Wire admins + evm.call( + Keyring::Alice, + Default::default(), + "pause_admin", + "rely", + Some(&[Token::Address(evm.deployed("delay_admin").address())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "root", + "rely", + Some(&[Token::Address(evm.deployed("pause_admin").address())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "root", + "rely", + Some(&[Token::Address(evm.deployed("delay_admin").address())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "root", + "rely", + Some(&[Token::Address(evm.deployed("gateway").address())]), + ) + .unwrap(); + // Wire gateway + evm.call( + Keyring::Alice, + Default::default(), + "pool_manager", + "file", + Some(&[ + Token::FixedBytes("investmentManager".as_bytes().to_vec()), + Token::Address(evm.deployed("investment_manager").address()), + ]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "investment_manager", + "file", + Some(&[ + Token::FixedBytes("poolManager".as_bytes().to_vec()), + Token::Address(evm.deployed("pool_manager").address()), + ]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "investment_manager", + "file", + Some(&[ + Token::FixedBytes("gateway".as_bytes().to_vec()), + Token::Address(evm.deployed("gateway").address()), + ]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "pool_manager", + "file", + Some(&[ + Token::FixedBytes("gateway".as_bytes().to_vec()), + Token::Address(evm.deployed("gateway").address()), + ]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "investment_manager", + "rely", + Some(&[Token::Address(evm.deployed("root").address())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "investment_manager", + "rely", + Some(&[Token::Address(evm.deployed("pool_manager").address())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "pool_manager", + "rely", + Some(&[Token::Address(evm.deployed("root").address())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "gateway", + "rely", + Some(&[Token::Address(evm.deployed("root").address())]), + ) + .unwrap(); + /* NOTE: This rely is NOT needed as the LocalRouter is not permissioned + evm.call( + Keyring::Alice, + Default::default(), + "router", + "rely", + Some(&[Token::Address(evm.deployed("root").address())]), + ) + .unwrap(); + */ + evm.call( + Keyring::Alice, + Default::default(), + "escrow", + "rely", + Some(&[Token::Address(evm.deployed("root").address())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "escrow", + "rely", + Some(&[Token::Address(evm.deployed("investment_manager").address())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "user_escrow", + "rely", + Some(&[Token::Address(evm.deployed("root").address())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "user_escrow", + "rely", + Some(&[Token::Address(evm.deployed("investment_manager").address())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "escrow", + "rely", + Some(&[Token::Address(evm.deployed("pool_manager").address())]), + ) + .unwrap(); + + // PART: File LocalRouter + evm.call( + Keyring::Alice, + Default::default(), + "router", + "file", + Some(&[ + Token::FixedBytes("gateway".as_bytes().to_vec()), + Token::Address(evm.deployed("gateway").address()), + ]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "router", + "file", + Some(&[ + Token::FixedBytes("sourceChain".as_bytes().to_vec()), + Token::String(EVM_DOMAIN_STR.to_string()), + ]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "router", + "file", + Some(&[ + Token::FixedBytes("sourceAddress".as_bytes().to_vec()), + // FIXME: Use EVM_LP_INSTANCE + Token::String("0x1111111111111111111111111111111111111111".into()), + // Token::String(evm.deployed("router").address().to_string()), + ]), + ) + .unwrap(); + + // PART: Give admin access - Keyring::Admin in our case + // * https://github.com/centrifuge/liquidity-pools/blob/e2c3ac92d1cea991e7e0d5f57be8658a46cbf1fe/script/Deployer.sol#L100-L106 + evm.call( + Keyring::Alice, + Default::default(), + "delay_admin", + "rely", + Some(&[Token::Address(Keyring::Admin.into())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "pause_admin", + "addPauser", + Some(&[Token::Address(Keyring::Admin.into())]), + ) + .unwrap(); + + // PART: Remove deployer access + // * https://github.com/centrifuge/liquidity-pools/blob/e2c3ac92d1cea991e7e0d5f57be8658a46cbf1fe/script/Deployer.sol#L108-L121 + /* NOTE: This rely is NOT needed as the LocalRouter is not permissioned + evm.call( + Keyring::Alice, + Default::default(), + "router", + "deny", + Some(&[Token::Address(Keyring::Alice.into())]), + ) + .unwrap(); + */ + evm.call( + Keyring::Alice, + Default::default(), + "lp_pool_factory", + "deny", + Some(&[Token::Address(Keyring::Alice.into())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "tranche_token_factory", + "deny", + Some(&[Token::Address(Keyring::Alice.into())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "restriction_manager_factory", + "deny", + Some(&[Token::Address(Keyring::Alice.into())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "root", + "deny", + Some(&[Token::Address(Keyring::Alice.into())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "investment_manager", + "deny", + Some(&[Token::Address(Keyring::Alice.into())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "pool_manager", + "deny", + Some(&[Token::Address(Keyring::Alice.into())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "escrow", + "deny", + Some(&[Token::Address(Keyring::Alice.into())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "user_escrow", + "deny", + Some(&[Token::Address(Keyring::Alice.into())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "gateway", + "deny", + Some(&[Token::Address(Keyring::Alice.into())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "pause_admin", + "deny", + Some(&[Token::Address(Keyring::Alice.into())]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + "delay_admin", + "deny", + Some(&[Token::Address(Keyring::Alice.into())]), + ) + .unwrap(); + + // ------------------ Substrate Side ----------------------- // + // Create router + let (base_fee, _) = ::FeeCalculator::min_gas_price(); + + let evm_domain = EVMDomain { + target_contract_address: evm.deployed("router").address(), + target_contract_hash: BlakeTwo256::hash_of(&evm.deployed("router").deployed_bytecode), + fee_values: FeeValues { + value: sp_core::U256::zero(), + // FIXME: Diverges from prod (500_000) + gas_limit: sp_core::U256::from(500_000_000), + gas_price: sp_core::U256::from(base_fee), + }, + }; + + let axelar_evm_router = AxelarEVMRouter::::new( + EVMRouter::new(evm_domain), + BoundedVec::>::try_from( + EVM_DOMAIN_STR.as_bytes().to_vec(), + ) + .unwrap(), + evm.deployed("router").address(), + ); + + assert_ok!( + pallet_liquidity_pools_gateway::Pallet::::set_domain_router( + RawOrigin::Root.into(), + Domain::EVM(EVM_DOMAIN_CHAIN_ID), + DomainRouter::::AxelarEVM(axelar_evm_router), + ) + ); + + assert_ok!(pallet_liquidity_pools_gateway::Pallet::::add_instance( + RawOrigin::Root.into(), + DomainAddress::evm(EVM_DOMAIN_CHAIN_ID, EVM_LP_INSTANCE) + )); + + assert_ok!(axelar_gateway_precompile::Pallet::::set_gateway( + RawOrigin::Root.into(), + evm.deployed("router").address() + )); + + assert_ok!(axelar_gateway_precompile::Pallet::::set_converter( + RawOrigin::Root.into(), + BlakeTwo256::hash(EVM_DOMAIN_STR.as_bytes()), + SourceConverter::new(EVM_DOMAIN), + )); + + additional(evm); + }); + + env.pass(Blocks::ByNumber(1)); + env +} + +/// Enables USDC, DAI and FRAX as investment currencies for both pools A nand B. +pub fn setup_investment_currencies(_evm: &mut impl EvmEnv) { + for currency in [DAI.id(), FRAX.id(), USDC.id()] { + for pool in [POOL_A, POOL_B, POOL_C] { + assert_ok!( + pallet_liquidity_pools::Pallet::::allow_investment_currency( + OriginFor::::signed(Keyring::Admin.into()), + pool, + currency, + ), + ); + } + } + utils::process_outbound::(utils::verify_outbound_success::) +} + +/// Deploys both Liquidity Pools for USDC, DAI and FRAX by calling +/// `DeployLiquidityPool` for each possible triplet of pool, tranche and +/// investment currency id. +/// +/// NOTE: EVM Side +pub fn setup_deploy_lps(evm: &mut impl EvmEnv) { + let lp_name = |pool, tranche, currency| -> &str { + match (pool, tranche, currency) { + (POOL_A, tranche, "usdc") if tranche == utils::pool_a_tranche_1_id::() => { + names::POOL_A_T_1_USDC + } + (POOL_B, tranche, "usdc") if tranche == utils::pool_b_tranche_1_id::() => { + names::POOL_B_T_1_USDC + } + (POOL_B, tranche, "usdc") if tranche == utils::pool_b_tranche_2_id::() => { + names::POOL_B_T_2_USDC + } + (POOL_C, tranche, "usdc") if tranche == utils::pool_c_tranche_1_id::() => { + names::POOL_C_T_1_USDC + } + + (POOL_A, tranche, "frax") if tranche == utils::pool_a_tranche_1_id::() => { + names::POOL_A_T_1_FRAX + } + (POOL_B, tranche, "frax") if tranche == utils::pool_b_tranche_1_id::() => { + names::POOL_B_T_1_FRAX + } + (POOL_B, tranche, "frax") if tranche == utils::pool_b_tranche_2_id::() => { + names::POOL_B_T_2_FRAX + } + (POOL_C, tranche, "frax") if tranche == utils::pool_c_tranche_1_id::() => { + names::POOL_C_T_1_FRAX + } + + (POOL_A, tranche, "dai") if tranche == utils::pool_a_tranche_1_id::() => { + names::POOL_A_T_1_DAI + } + (POOL_B, tranche, "dai") if tranche == utils::pool_b_tranche_1_id::() => { + names::POOL_B_T_1_DAI + } + (POOL_B, tranche, "dai") if tranche == utils::pool_b_tranche_2_id::() => { + names::POOL_B_T_2_DAI + } + (POOL_C, tranche, "dai") if tranche == utils::pool_c_tranche_1_id::() => { + names::POOL_C_T_1_DAI + } + + (_, _, _) => { + unimplemented!("pool, tranche, currency combination does not have a name.") + } + } + }; + + for (pool, tranche_id) in [ + (POOL_A, utils::pool_a_tranche_1_id::()), + (POOL_B, utils::pool_b_tranche_1_id::()), + (POOL_B, utils::pool_b_tranche_2_id::()), + (POOL_C, utils::pool_c_tranche_1_id::()), + ] { + for currency in ["usdc", "frax", "dai"] { + evm.call( + Keyring::Alice, + Default::default(), + "pool_manager", + "deployLiquidityPool", + Some(&[ + Token::Uint(Uint::from(pool)), + Token::FixedBytes(FixedBytes::from(tranche_id)), + Token::Address(evm.deployed(currency).address()), + ]), + ) + .unwrap(); + + evm.register( + lp_name(pool, tranche_id, currency), + "LiquidityPool", + Decoder::::decode( + &evm.view( + Keyring::Alice, + "pool_manager", + "getLiquidityPool", + Some(&[ + Token::Uint(Uint::from(pool)), + Token::FixedBytes(FixedBytes::from(tranche_id)), + Token::Address(evm.deployed(currency).address()), + ]), + ) + .unwrap() + .value, + ), + ); + } + } +} + +/// Initiates tranches on EVM via `DeployTranche` contract and then sends +/// `add_tranche(pool, tranche_id)` messages for a total of three tranches of +/// pool A and B. +pub fn setup_tranches(evm: &mut impl EvmEnv) { + // AddTranche 1 of A + let tranche_id = { + let tranche_id = utils::pool_a_tranche_1_id::(); + assert_ok!(pallet_liquidity_pools::Pallet::::add_tranche( + OriginFor::::signed(Keyring::Admin.into()), + POOL_A, + tranche_id, + Domain::EVM(EVM_DOMAIN_CHAIN_ID) + )); + + utils::process_outbound::(utils::verify_outbound_success::); + + tranche_id + }; + evm.call( + Keyring::Alice, + Default::default(), + "pool_manager", + "deployTranche", + Some(&[ + Token::Uint(Uint::from(POOL_A)), + Token::FixedBytes(FixedBytes::from(tranche_id)), + ]), + ) + .unwrap(); + evm.register( + names::POOL_A_T_1, + "TrancheToken", + Decoder::::decode( + &evm.view( + Keyring::Alice, + "pool_manager", + "getTrancheToken", + Some(&[ + Token::Uint(POOL_A.into()), + Token::FixedBytes(tranche_id.to_vec()), + ]), + ) + .unwrap() + .value, + ), + ); + evm.register( + names::RM_POOL_A_T_1, + "RestrictionManager", + Decoder::::decode( + &evm.view( + Keyring::Alice, + names::POOL_A_T_1, + "restrictionManager", + None, + ) + .unwrap() + .value, + ), + ); + + // AddTranche 1 of B + let tranche_id = { + let tranche_id = utils::pool_b_tranche_1_id::(); + assert_ok!(pallet_liquidity_pools::Pallet::::add_tranche( + OriginFor::::signed(Keyring::Admin.into()), + POOL_B, + tranche_id, + Domain::EVM(EVM_DOMAIN_CHAIN_ID) + )); + + utils::process_outbound::(utils::verify_outbound_success::); + + tranche_id + }; + evm.call( + Keyring::Alice, + Default::default(), + "pool_manager", + "deployTranche", + Some(&[ + Token::Uint(Uint::from(POOL_B)), + Token::FixedBytes(FixedBytes::from(tranche_id)), + ]), + ) + .unwrap(); + evm.register( + names::POOL_B_T_1, + "TrancheToken", + Decoder::::decode( + &evm.view( + Keyring::Alice, + "pool_manager", + "getTrancheToken", + Some(&[ + Token::Uint(POOL_B.into()), + Token::FixedBytes(tranche_id.to_vec()), + ]), + ) + .unwrap() + .value, + ), + ); + evm.register( + names::RM_POOL_B_T_1, + "RestrictionManager", + Decoder::::decode( + &evm.view( + Keyring::Alice, + names::POOL_B_T_1, + "restrictionManager", + None, + ) + .unwrap() + .value, + ), + ); + + // AddTranche 2 of B + let tranche_id = { + let tranche_id = utils::pool_b_tranche_2_id::(); + assert_ok!(pallet_liquidity_pools::Pallet::::add_tranche( + OriginFor::::signed(Keyring::Admin.into()), + POOL_B, + utils::pool_b_tranche_2_id::(), + Domain::EVM(EVM_DOMAIN_CHAIN_ID) + )); + + utils::process_outbound::(utils::verify_outbound_success::); + + tranche_id + }; + evm.call( + Keyring::Alice, + Default::default(), + "pool_manager", + "deployTranche", + Some(&[ + Token::Uint(Uint::from(POOL_B)), + Token::FixedBytes(FixedBytes::from(tranche_id)), + ]), + ) + .unwrap(); + evm.register( + names::POOL_B_T_2, + "TrancheToken", + Decoder::::decode( + &evm.view( + Keyring::Alice, + "pool_manager", + "getTrancheToken", + Some(&[ + Token::Uint(POOL_B.into()), + Token::FixedBytes(tranche_id.to_vec()), + ]), + ) + .unwrap() + .value, + ), + ); + evm.register( + names::RM_POOL_B_T_2, + "RestrictionManager", + Decoder::::decode( + &evm.view( + Keyring::Alice, + names::POOL_B_T_2, + "restrictionManager", + None, + ) + .unwrap() + .value, + ), + ); + + // AddTranche 1 of C + let tranche_id = { + let tranche_id = utils::pool_c_tranche_1_id::(); + assert_ok!(pallet_liquidity_pools::Pallet::::add_tranche( + OriginFor::::signed(Keyring::Admin.into()), + POOL_C, + tranche_id, + Domain::EVM(EVM_DOMAIN_CHAIN_ID) + )); + + utils::process_outbound::(utils::verify_outbound_success::); + + tranche_id + }; + evm.call( + Keyring::Alice, + Default::default(), + "pool_manager", + "deployTranche", + Some(&[ + Token::Uint(Uint::from(POOL_C)), + Token::FixedBytes(FixedBytes::from(tranche_id)), + ]), + ) + .unwrap(); + evm.register( + names::POOL_C_T_1, + "TrancheToken", + Decoder::::decode( + &evm.view( + Keyring::Alice, + "pool_manager", + "getTrancheToken", + Some(&[ + Token::Uint(POOL_C.into()), + Token::FixedBytes(tranche_id.to_vec()), + ]), + ) + .unwrap() + .value, + ), + ); + evm.register( + names::RM_POOL_C_T_1, + "RestrictionManager", + Decoder::::decode( + &evm.view( + Keyring::Alice, + names::POOL_C_T_1, + "restrictionManager", + None, + ) + .unwrap() + .value, + ), + ); +} + +/// Create two pools A, B and send `add_pool` message to EVM +/// * Pool A with 1 tranche +/// * Pool B with 2 tranches +pub fn setup_pools(_evm: &mut impl EvmEnv) { + crate::generic::utils::pool::create_one_tranched::( + Keyring::Admin.into(), + POOL_A, + LocalUSDC.id(), + ); + + assert_ok!(pallet_liquidity_pools::Pallet::::add_pool( + OriginFor::::signed(Keyring::Admin.into()), + POOL_A, + Domain::EVM(EVM_DOMAIN_CHAIN_ID) + )); + + utils::process_outbound::(utils::verify_outbound_success::); + + crate::generic::utils::pool::create_two_tranched::( + Keyring::Admin.into(), + POOL_B, + LocalUSDC.id(), + ); + + assert_ok!(pallet_liquidity_pools::Pallet::::add_pool( + OriginFor::::signed(Keyring::Admin.into()), + POOL_B, + Domain::EVM(EVM_DOMAIN_CHAIN_ID) + )); + + crate::generic::utils::pool::create_one_tranched::(Keyring::Admin.into(), POOL_C, USDC.id()); + + assert_ok!(pallet_liquidity_pools::Pallet::::add_pool( + OriginFor::::signed(Keyring::Admin.into()), + POOL_C, + Domain::EVM(EVM_DOMAIN_CHAIN_ID) + )); + + utils::process_outbound::(utils::verify_outbound_success::); +} + +/// Create 3x ERC-20 currencies as Stablecoins on EVM, register them on +/// Centrifuge Chain and trigger `AddCurrency` from Centrifuge Chain to EVM +pub fn setup_currencies(evm: &mut impl EvmEnv) { + // EVM: Create currencies + // NOTE: Called by Keyring::Admin, as admin controls all in this setup + evm.deploy( + "ERC20", + names::USDC, + Keyring::Admin, + Some(&[Token::Uint(Uint::from(6))]), + ); + evm.call( + Keyring::Admin, + Default::default(), + names::USDC, + "file", + Some(&[ + Token::FixedBytes("name".as_bytes().to_vec()), + Token::String("USD Coin".to_string()), + ]), + ) + .unwrap(); + evm.call( + Keyring::Admin, + Default::default(), + names::USDC, + "file", + Some(&[ + Token::FixedBytes("symbol".as_bytes().to_vec()), + Token::String("USDC".to_string()), + ]), + ) + .unwrap(); + evm.call( + Keyring::Admin, + Default::default(), + names::USDC, + "mint", + Some(&[ + Token::Address(Keyring::Alice.into()), + Token::Uint(U256::from(DEFAULT_BALANCE * DECIMALS_6)), + ]), + ) + .unwrap(); + evm.call( + Keyring::Admin, + Default::default(), + names::USDC, + "mint", + Some(&[ + Token::Address(Keyring::Bob.into()), + Token::Uint(U256::from(DEFAULT_BALANCE * DECIMALS_6)), + ]), + ) + .unwrap(); + evm.call( + Keyring::Admin, + Default::default(), + names::USDC, + "mint", + Some(&[ + Token::Address(Keyring::Charlie.into()), + Token::Uint(U256::from(DEFAULT_BALANCE * DECIMALS_6)), + ]), + ) + .unwrap(); + + evm.deploy( + "ERC20", + "frax", + Keyring::Admin, + Some(&[Token::Uint(Uint::from(18))]), + ); + evm.call( + Keyring::Admin, + Default::default(), + "frax", + "file", + Some(&[ + Token::FixedBytes("name".as_bytes().to_vec()), + Token::String("Frax Coin".to_string()), + ]), + ) + .unwrap(); + evm.call( + Keyring::Admin, + Default::default(), + "frax", + "file", + Some(&[ + Token::FixedBytes("symbol".as_bytes().to_vec()), + Token::String("FRAX".to_string()), + ]), + ) + .unwrap(); + evm.call( + Keyring::Admin, + Default::default(), + "frax", + "mint", + Some(&[ + Token::Address(Keyring::Alice.into()), + Token::Uint(U256::from(DEFAULT_BALANCE * DECIMALS_6)), + ]), + ) + .unwrap(); + evm.call( + Keyring::Admin, + Default::default(), + "frax", + "mint", + Some(&[ + Token::Address(Keyring::Bob.into()), + Token::Uint(U256::from(DEFAULT_BALANCE * DECIMALS_6)), + ]), + ) + .unwrap(); + evm.call( + Keyring::Admin, + Default::default(), + "frax", + "mint", + Some(&[ + Token::Address(Keyring::Charlie.into()), + Token::Uint(U256::from(DEFAULT_BALANCE * DECIMALS_6)), + ]), + ) + .unwrap(); + + evm.deploy( + "ERC20", + "dai", + Keyring::Admin, + Some(&[Token::Uint(Uint::from(18))]), + ); + evm.call( + Keyring::Admin, + Default::default(), + "dai", + "file", + Some(&[ + Token::FixedBytes("name".as_bytes().to_vec()), + Token::String("Dai Coin".to_string()), + ]), + ) + .unwrap(); + evm.call( + Keyring::Admin, + Default::default(), + "dai", + "file", + Some(&[ + Token::FixedBytes("symbol".as_bytes().to_vec()), + Token::String("DAI".to_string()), + ]), + ) + .unwrap(); + evm.call( + Keyring::Admin, + Default::default(), + "dai", + "mint", + Some(&[ + Token::Address(Keyring::Alice.into()), + Token::Uint(U256::from(DEFAULT_BALANCE * DECIMALS_6)), + ]), + ) + .unwrap(); + evm.call( + Keyring::Admin, + Default::default(), + "dai", + "mint", + Some(&[ + Token::Address(Keyring::Bob.into()), + Token::Uint(U256::from(DEFAULT_BALANCE * DECIMALS_6)), + ]), + ) + .unwrap(); + evm.call( + Keyring::Admin, + Default::default(), + "dai", + "mint", + Some(&[ + Token::Address(Keyring::Charlie.into()), + Token::Uint(U256::from(DEFAULT_BALANCE * DECIMALS_6)), + ]), + ) + .unwrap(); + + // Centrifuge Chain: Register currencies and trigger `AddCurrency` + register_currency::(USDC, |meta| { + meta.location = Some(utils::lp_asset_location::( + evm.deployed("usdc").address(), + )); + }); + + register_currency::(DAI, |meta| { + meta.location = Some(utils::lp_asset_location::(evm.deployed("dai").address())); + }); + + register_currency::(FRAX, |meta| { + meta.location = Some(utils::lp_asset_location::( + evm.deployed("frax").address(), + )); + }); + + assert_ok!(pallet_liquidity_pools::Pallet::::add_currency( + OriginFor::::signed(Keyring::Alice.into()), + USDC.id() + )); + assert_ok!(pallet_liquidity_pools::Pallet::::add_currency( + OriginFor::::signed(Keyring::Alice.into()), + DAI.id() + )); + assert_ok!(pallet_liquidity_pools::Pallet::::add_currency( + OriginFor::::signed(Keyring::Alice.into()), + FRAX.id() + )); + + utils::process_outbound::(utils::verify_outbound_success::); +} + +/// Sets up investors for all tranches in Pool A and B on +/// Centrifuge Chain as well as EVM. Also mints default balance on both sides. +pub fn setup_investors(evm: &mut impl EvmEnv) { + default_investors().into_iter().for_each(|investor| { + // Allow investor to locally invest + crate::generic::utils::pool::give_role::( + investor.into(), + POOL_A, + PoolRole::TrancheInvestor(pool_a_tranche_1_id::(), SECONDS_PER_YEAR), + ); + // Centrifuge Chain setup: Add permissions and dispatch LP message + crate::generic::utils::pool::give_role::( + AccountConverter::convert_evm_address(EVM_DOMAIN_CHAIN_ID, investor.into()), + POOL_A, + PoolRole::TrancheInvestor(pool_a_tranche_1_id::(), SECONDS_PER_YEAR), + ); + assert_ok!(pallet_liquidity_pools::Pallet::::update_member( + investor.as_origin(), + POOL_A, + pool_a_tranche_1_id::(), + DomainAddress::evm(EVM_DOMAIN_CHAIN_ID, investor.into()), + SECONDS_PER_YEAR, + )); + + // Allow investor to locally invest + crate::generic::utils::pool::give_role::( + investor.into(), + POOL_B, + PoolRole::TrancheInvestor(pool_b_tranche_1_id::(), SECONDS_PER_YEAR), + ); + crate::generic::utils::pool::give_role::( + AccountConverter::convert_evm_address(EVM_DOMAIN_CHAIN_ID, investor.into()), + POOL_B, + PoolRole::TrancheInvestor(pool_b_tranche_1_id::(), SECONDS_PER_YEAR), + ); + assert_ok!(pallet_liquidity_pools::Pallet::::update_member( + investor.as_origin(), + POOL_B, + pool_b_tranche_1_id::(), + DomainAddress::evm(EVM_DOMAIN_CHAIN_ID, investor.into()), + SECONDS_PER_YEAR, + )); + + // Allow investor to locally invest + crate::generic::utils::pool::give_role::( + investor.into(), + POOL_B, + PoolRole::TrancheInvestor(pool_b_tranche_2_id::(), SECONDS_PER_YEAR), + ); + crate::generic::utils::pool::give_role::( + AccountConverter::convert_evm_address(EVM_DOMAIN_CHAIN_ID, investor.into()), + POOL_B, + PoolRole::TrancheInvestor(pool_b_tranche_2_id::(), SECONDS_PER_YEAR), + ); + assert_ok!(pallet_liquidity_pools::Pallet::::update_member( + investor.as_origin(), + POOL_B, + pool_b_tranche_2_id::(), + DomainAddress::evm(EVM_DOMAIN_CHAIN_ID, investor.into()), + SECONDS_PER_YEAR, + )); + + // Allow investor to locally invest + crate::generic::utils::pool::give_role::( + investor.into(), + POOL_C, + PoolRole::TrancheInvestor(utils::pool_c_tranche_1_id::(), SECONDS_PER_YEAR), + ); + crate::generic::utils::pool::give_role::( + AccountConverter::convert_evm_address(EVM_DOMAIN_CHAIN_ID, investor.into()), + POOL_C, + PoolRole::TrancheInvestor(utils::pool_c_tranche_1_id::(), SECONDS_PER_YEAR), + ); + assert_ok!(pallet_liquidity_pools::Pallet::::update_member( + investor.as_origin(), + POOL_C, + utils::pool_c_tranche_1_id::(), + DomainAddress::evm(EVM_DOMAIN_CHAIN_ID, investor.into()), + SECONDS_PER_YEAR, + )); + + // Fund investor on EVM side + evm.call( + Keyring::Admin, + Default::default(), + "usdc", + "mint", + Some(&[ + Token::Address(investor.into()), + Token::Uint(U256::from(DEFAULT_BALANCE * DECIMALS_6)), + ]), + ) + .unwrap(); + evm.call( + Keyring::Admin, + Default::default(), + "frax", + "mint", + Some(&[ + Token::Address(investor.into()), + Token::Uint(U256::from(DEFAULT_BALANCE * DECIMALS_6)), + ]), + ) + .unwrap(); + evm.call( + Keyring::Admin, + Default::default(), + "dai", + "mint", + Some(&[ + Token::Address(investor.into()), + Token::Uint(U256::from(DEFAULT_BALANCE * DECIMALS_6)), + ]), + ) + .unwrap(); + + // Approve stable transfers on EVM side + + // Pool A - Tranche 1 + evm.call( + investor, + Default::default(), + "usdc", + "approve", + Some(&[ + Token::Address(evm.deployed(names::POOL_A_T_1_USDC).address()), + Token::Uint(U256::from(DEFAULT_BALANCE * DECIMALS_6)), + ]), + ) + .unwrap(); + evm.call( + investor, + Default::default(), + "dai", + "approve", + Some(&[ + Token::Address(evm.deployed(names::POOL_A_T_1_DAI).address()), + Token::Uint(U256::from(DEFAULT_BALANCE * DECIMALS_6)), + ]), + ) + .unwrap(); + evm.call( + investor, + Default::default(), + "frax", + "approve", + Some(&[ + Token::Address(evm.deployed(names::POOL_A_T_1_FRAX).address()), + Token::Uint(U256::from(DEFAULT_BALANCE * DECIMALS_6)), + ]), + ) + .unwrap(); + + // Pool B - Tranche 1 + evm.call( + investor, + Default::default(), + "usdc", + "approve", + Some(&[ + Token::Address(evm.deployed(names::POOL_B_T_1_USDC).address()), + Token::Uint(U256::from(DEFAULT_BALANCE * DECIMALS_6)), + ]), + ) + .unwrap(); + evm.call( + investor, + Default::default(), + "dai", + "approve", + Some(&[ + Token::Address(evm.deployed(names::POOL_B_T_1_DAI).address()), + Token::Uint(U256::from(DEFAULT_BALANCE * DECIMALS_6)), + ]), + ) + .unwrap(); + evm.call( + investor, + Default::default(), + "frax", + "approve", + Some(&[ + Token::Address(evm.deployed(names::POOL_B_T_1_FRAX).address()), + Token::Uint(U256::from(DEFAULT_BALANCE * DECIMALS_6)), + ]), + ) + .unwrap(); + + // Pool B - Tranche 2 + evm.call( + investor, + Default::default(), + "usdc", + "approve", + Some(&[ + Token::Address(evm.deployed(names::POOL_B_T_2_USDC).address()), + Token::Uint(U256::from(DEFAULT_BALANCE * DECIMALS_6)), + ]), + ) + .unwrap(); + evm.call( + investor, + Default::default(), + "dai", + "approve", + Some(&[ + Token::Address(evm.deployed(names::POOL_B_T_2_DAI).address()), + Token::Uint(U256::from(DEFAULT_BALANCE * DECIMALS_6)), + ]), + ) + .unwrap(); + evm.call( + investor, + Default::default(), + "frax", + "approve", + Some(&[ + Token::Address(evm.deployed(names::POOL_B_T_2_FRAX).address()), + Token::Uint(U256::from(DEFAULT_BALANCE * DECIMALS_6)), + ]), + ) + .unwrap(); + + // Pool C - Tranche 1 + evm.call( + investor, + Default::default(), + "usdc", + "approve", + Some(&[ + Token::Address(evm.deployed(names::POOL_C_T_1_USDC).address()), + Token::Uint(U256::from(DEFAULT_BALANCE * DECIMALS_6)), + ]), + ) + .unwrap(); + evm.call( + investor, + Default::default(), + "dai", + "approve", + Some(&[ + Token::Address(evm.deployed(names::POOL_C_T_1_DAI).address()), + Token::Uint(U256::from(DEFAULT_BALANCE * DECIMALS_6)), + ]), + ) + .unwrap(); + evm.call( + investor, + Default::default(), + "frax", + "approve", + Some(&[ + Token::Address(evm.deployed(names::POOL_C_T_1_FRAX).address()), + Token::Uint(U256::from(DEFAULT_BALANCE * DECIMALS_6)), + ]), + ) + .unwrap(); + }); + + utils::process_outbound::(utils::verify_outbound_success::); +} diff --git a/runtime/integration-tests/src/generic/cases/lp/pool_management.rs b/runtime/integration-tests/src/generic/cases/lp/pool_management.rs new file mode 100644 index 0000000000..e4ec810d97 --- /dev/null +++ b/runtime/integration-tests/src/generic/cases/lp/pool_management.rs @@ -0,0 +1,606 @@ +// Copyright 2021 Centrifuge Foundation (centrifuge.io). +// +// This file is part of the Centrifuge chain project. +// Centrifuge is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version (see http://www.gnu.org/licenses). +// Centrifuge is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +use cfg_primitives::{Balance, PoolId, SECONDS_PER_YEAR}; +use cfg_traits::{PoolMetadata, TimeAsSecs, TrancheTokenPrice}; +use cfg_types::{ + domain_address::{Domain, DomainAddress}, + permissions::PoolRole, + tokens::{CrossChainTransferability, CurrencyId, CustomMetadata}, +}; +use ethabi::{ethereum_types::H160, Token, Uint}; +use frame_support::{assert_noop, assert_ok, traits::OriginTrait}; +use frame_system::pallet_prelude::OriginFor; +use pallet_liquidity_pools::GeneralCurrencyIndexOf; +use runtime_common::account_conversion::AccountConverter; +use sp_runtime::FixedPointNumber; + +use crate::{ + generic::{ + cases::lp::{ + names, utils, + utils::{pool_a_tranche_1_id, Decoder}, + LocalUSDC, EVM_DOMAIN_CHAIN_ID, POOL_A, USDC, + }, + config::Runtime, + env::{EnvEvmExtension, EvmEnv}, + utils::currency::{register_currency, CurrencyInfo}, + }, + utils::accounts::Keyring, +}; + +#[test_runtimes(all)] +fn add_currency() { + let mut env = super::setup::(|_| {}); + + #[allow(non_camel_case_types)] + pub struct TestCurrency; + impl CurrencyInfo for TestCurrency { + fn custom(&self) -> CustomMetadata { + CustomMetadata { + pool_currency: true, + transferability: CrossChainTransferability::LiquidityPools, + permissioned: false, + mintable: false, + local_representation: None, + } + } + + fn id(&self) -> CurrencyId { + CurrencyId::ForeignAsset(200_001) + } + } + + env.state_mut(|evm| { + evm.deploy( + "ERC20", + "test_erc20", + Keyring::Admin, + Some(&[Token::Uint(Uint::from(TestCurrency.decimals()))]), + ); + + register_currency::(TestCurrency, |meta| { + meta.location = Some(utils::lp_asset_location::( + evm.deployed("test_erc20").address(), + )); + }); + + assert_ok!(pallet_liquidity_pools::Pallet::::add_currency( + OriginFor::::signed(Keyring::Alice.into()), + TestCurrency.id() + )); + + utils::process_outbound::(utils::verify_outbound_success::) + }); + + let index = GeneralCurrencyIndexOf::::try_from(TestCurrency.id()).unwrap(); + + env.state_mut(|evm| { + // Verify the test currencies are correctly added to the pool manager + assert_eq!( + Decoder::::decode( + &evm.view( + Keyring::Alice, + "pool_manager", + "currencyIdToAddress", + Some(&[Token::Uint(Uint::from(index.index))]) + ) + .unwrap() + .value + ), + evm.deployed("test_erc20").address() + ); + + assert_eq!( + Decoder::::decode( + &evm.view( + Keyring::Alice, + "pool_manager", + "currencyAddressToId", + Some(&[Token::Address(evm.deployed("test_erc20").address())]), + ) + .unwrap() + .value + ), + index.index + ); + }); + + env.state_mut(|evm| { + assert_ok!(pallet_liquidity_pools::Pallet::::add_currency( + OriginFor::::signed(Keyring::Alice.into()), + TestCurrency.id() + )); + + utils::process_outbound::(|_| { + utils::verify_outbound_failure_on_lp::(evm.deployed("router").address()) + }); + }); +} + +#[test_runtimes(all)] +fn add_pool() { + let mut env = super::setup::(|_| {}); + const POOL: PoolId = 1; + + env.state_mut(|evm| { + crate::generic::utils::pool::create_one_tranched::( + Keyring::Admin.into(), + POOL, + LocalUSDC.id(), + ); + + assert_ok!(pallet_liquidity_pools::Pallet::::add_pool( + OriginFor::::signed(Keyring::Admin.into()), + POOL, + Domain::EVM(EVM_DOMAIN_CHAIN_ID) + )); + + utils::process_outbound::(utils::verify_outbound_success::); + + let creation_time = as TimeAsSecs>::now(); + + // Compare the pool.created_at field that is returned + let evm_pool_time = Decoder::::decode( + &evm.view( + Keyring::Alice, + "pool_manager", + "pools", + Some(&[Token::Uint(Uint::from(POOL))]), + ) + .unwrap() + .value, + ); + assert_eq!(evm_pool_time, Uint::from(creation_time)); + }); + + env.state_mut(|evm| { + assert_ok!(pallet_liquidity_pools::Pallet::::add_pool( + T::RuntimeOriginExt::signed(Keyring::Admin.into()), + POOL, + Domain::EVM(EVM_DOMAIN_CHAIN_ID) + )); + + utils::process_outbound::(|_| { + utils::verify_outbound_failure_on_lp::(evm.deployed("router").address()) + }); + }); +} + +#[test_runtimes(all)] +fn add_tranche() { + let mut env = super::setup::(|evm| { + super::setup_currencies(evm); + super::setup_pools(evm); + }); + + env.state(|evm| { + assert_eq!( + evm.call( + Keyring::Alice, + Default::default(), + "pool_manager", + "deployTranche", + Some(&[ + Token::Uint(Uint::from(POOL_A)), + Token::FixedBytes(pool_a_tranche_1_id::().to_vec()), + ]), + ), + utils::REVERT_ERR + ); + }); + + env.state_mut(|_| { + assert_ok!(pallet_liquidity_pools::Pallet::::add_tranche( + OriginFor::::signed(Keyring::Admin.into()), + POOL_A, + pool_a_tranche_1_id::(), + Domain::EVM(EVM_DOMAIN_CHAIN_ID) + )); + + utils::process_outbound::(utils::verify_outbound_success::); + }); + + env.state_mut(|evm| { + // Tranche id does not exist before adding and deploying tranche + assert_eq!( + Decoder::::decode( + &evm.view( + Keyring::Alice, + "pool_manager", + "getTrancheToken", + Some(&[ + Token::Uint(Uint::from(POOL_A)), + Token::FixedBytes(pool_a_tranche_1_id::().to_vec()), + ]), + ) + .unwrap() + .value, + ), + [0u8; 20].into() + ); + + assert_ok!(evm.call( + Keyring::Alice, + Default::default(), + "pool_manager", + "deployTranche", + Some(&[ + Token::Uint(Uint::from(POOL_A)), + Token::FixedBytes(pool_a_tranche_1_id::().to_vec()), + ]), + )); + assert_ne!( + Decoder::::decode( + &evm.view( + Keyring::Alice, + "pool_manager", + "getTrancheToken", + Some(&[ + Token::Uint(Uint::from(POOL_A)), + Token::FixedBytes(pool_a_tranche_1_id::().to_vec()), + ]), + ) + .unwrap() + .value, + ), + [0u8; 20].into() + ); + }); +} + +#[test_runtimes(all)] +fn allow_investment_currency() { + let mut env = super::setup::(|evm| { + super::setup_currencies(evm); + super::setup_pools(evm); + super::setup_tranches(evm); + }); + + env.state(|evm| { + assert!(!Decoder::::decode( + &evm.view( + Keyring::Alice, + "pool_manager", + "isAllowedAsInvestmentCurrency", + Some(&[ + Token::Uint(Uint::from(POOL_A)), + Token::Address(evm.deployed("usdc").address()), + ]), + ) + .unwrap() + .value, + )); + }); + + env.state_mut(|_evm| { + assert_ok!( + pallet_liquidity_pools::Pallet::::allow_investment_currency( + OriginFor::::signed(Keyring::Admin.into()), + POOL_A, + USDC.id(), + ), + ); + utils::process_outbound::(utils::verify_outbound_success::); + }); + + env.state(|evm| { + assert!(Decoder::::decode( + &evm.view( + Keyring::Alice, + "pool_manager", + "isAllowedAsInvestmentCurrency", + Some(&[ + Token::Uint(Uint::from(POOL_A)), + Token::Address(evm.deployed("usdc").address()), + ]), + ) + .unwrap() + .value, + )); + }); +} + +#[test_runtimes(all)] +fn disallow_investment_currency() { + let mut env = super::setup::(|evm| { + super::setup_currencies(evm); + super::setup_pools(evm); + super::setup_tranches(evm); + super::setup_investment_currencies(evm); + }); + + env.state(|evm| { + assert!(Decoder::::decode( + &evm.view( + Keyring::Alice, + "pool_manager", + "isAllowedAsInvestmentCurrency", + Some(&[ + Token::Uint(Uint::from(POOL_A)), + Token::Address(evm.deployed("usdc").address()), + ]), + ) + .unwrap() + .value, + )); + }); + + env.state_mut(|_evm| { + assert_ok!( + pallet_liquidity_pools::Pallet::::disallow_investment_currency( + OriginFor::::signed(Keyring::Admin.into()), + POOL_A, + USDC.id() + ), + ); + utils::process_outbound::(utils::verify_outbound_success::); + }); + + env.state(|evm| { + assert!(!Decoder::::decode( + &evm.view( + Keyring::Alice, + "pool_manager", + "isAllowedAsInvestmentCurrency", + Some(&[ + Token::Uint(Uint::from(POOL_A)), + Token::Address(evm.deployed("usdc").address()), + ]), + ) + .unwrap() + .value, + )); + }); +} + +#[test_runtimes(all)] +fn update_member() { + let mut env = super::setup::(|evm| { + super::setup_currencies(evm); + super::setup_pools(evm); + super::setup_tranches(evm); + super::setup_investment_currencies(evm); + super::setup_deploy_lps(evm); + }); + + env.state(|evm| { + assert!(!Decoder::::decode( + &evm.view( + Keyring::Alice, + names::RM_POOL_A_T_1, + "hasMember", + Some(&[Token::Address(Keyring::Bob.into())]), + ) + .unwrap() + .value + )); + }); + + env.state_mut(|_| { + crate::generic::utils::pool::give_role::( + AccountConverter::convert_evm_address(EVM_DOMAIN_CHAIN_ID, Keyring::Bob.into()), + POOL_A, + PoolRole::TrancheInvestor(pool_a_tranche_1_id::(), SECONDS_PER_YEAR), + ); + + // Address given MUST match derived allowlisted address for that domain + assert_noop!( + pallet_liquidity_pools::Pallet::::update_member( + Keyring::Bob.as_origin(), + POOL_A, + pool_a_tranche_1_id::(), + DomainAddress::evm(EVM_DOMAIN_CHAIN_ID, Keyring::Alice.into()), + SECONDS_PER_YEAR, + ), + pallet_liquidity_pools::Error::::InvestorDomainAddressNotAMember + ); + + assert_ok!(pallet_liquidity_pools::Pallet::::update_member( + Keyring::Bob.as_origin(), + POOL_A, + pool_a_tranche_1_id::(), + DomainAddress::evm(EVM_DOMAIN_CHAIN_ID, Keyring::Bob.into()), + SECONDS_PER_YEAR, + )); + + utils::process_outbound::(utils::verify_outbound_success::); + }); + + env.state(|evm| { + assert!(Decoder::::decode( + &evm.view( + Keyring::Alice, + names::RM_POOL_A_T_1, + "hasMember", + Some(&[Token::Address(Keyring::Bob.into())]), + ) + .unwrap() + .value + )); + + assert!(!Decoder::::decode( + &evm.view( + Keyring::Alice, + names::RM_POOL_A_T_1, + "hasMember", + Some(&[Token::Address(Keyring::Alice.into())]), + ) + .unwrap() + .value + )); + }); +} + +#[test_runtimes(all)] +fn update_tranche_token_metadata() { + let mut env = super::setup::(|evm| { + super::setup_currencies(evm); + super::setup_pools(evm); + super::setup_tranches(evm); + }); + + let decimals_new = 42; + let name_new = b"NEW_NAME".to_vec(); + let symbol_new = b"NEW_SYMBOL".to_vec(); + + let (decimals_old, name_evm, symbol_evm) = env.state(|evm| { + let meta = orml_asset_registry::module::Metadata::::get(CurrencyId::Tranche( + POOL_A, + pool_a_tranche_1_id::(), + )) + .unwrap(); + assert!(meta.name.is_empty()); + assert!(meta.symbol.is_empty()); + + let decimals = Decoder::::decode( + &evm.view(Keyring::Alice, names::POOL_A_T_1, "decimals", Some(&[])) + .unwrap() + .value, + ); + + // name and decimals are of EVM type String + let name = &evm + .view(Keyring::Alice, names::POOL_A_T_1, "name", Some(&[])) + .unwrap() + .value; + let symbol = &evm + .view(Keyring::Alice, names::POOL_A_T_1, "symbol", Some(&[])) + .unwrap() + .value; + assert_eq!(u32::from(decimals), meta.decimals); + + (meta.decimals, name.clone(), symbol.clone()) + }); + + env.state_mut(|_evm| { + assert_ok!( + pallet_pool_registry::Pallet::::update_tranche_token_metadata( + POOL_A, + pool_a_tranche_1_id::().into(), + Some(decimals_new.clone()), + Some(name_new.clone()), + Some(symbol_new.clone()), + None, + None, + None + ), + ); + + assert_ok!( + pallet_liquidity_pools::Pallet::::update_tranche_token_metadata( + OriginFor::::signed(Keyring::Alice.into()), + POOL_A, + pool_a_tranche_1_id::(), + Domain::EVM(EVM_DOMAIN_CHAIN_ID) + ) + ); + utils::process_outbound::(utils::verify_outbound_success::); + }); + + env.state(|evm| { + // Decimals cannot be changed + let decimals = u32::from(Decoder::::decode( + &evm.view(Keyring::Alice, names::POOL_A_T_1, "decimals", Some(&[])) + .unwrap() + .value, + )); + assert_ne!(decimals, decimals_new); + assert_eq!(decimals, decimals_old); + + // name and decimals are of EVM type String + let name = &evm + .view(Keyring::Alice, names::POOL_A_T_1, "name", Some(&[])) + .unwrap() + .value; + let symbol = &evm + .view(Keyring::Alice, names::POOL_A_T_1, "symbol", Some(&[])) + .unwrap() + .value; + + assert_ne!(*name, name_evm); + assert_ne!(*symbol, symbol_evm); + + // contained in slice [64..71] + assert!(name.windows(name_new.len()).any(|w| w == name_new)); + assert!(symbol.windows(symbol_new.len()).any(|w| w == symbol_new)); + }); +} + +#[test_runtimes(all)] +fn update_tranche_token_price() { + let mut env = super::setup::(|evm| { + super::setup_currencies(evm); + super::setup_pools(evm); + super::setup_tranches(evm); + }); + + // Neither price nor computed exists yet + env.state(|evm| { + let (price_evm, computed_evm) = Decoder::<(u128, u64)>::decode( + &evm.view( + Keyring::Alice, + "pool_manager", + "getTrancheTokenPrice", + Some(&[ + Token::Uint(Uint::from(POOL_A)), + Token::FixedBytes(pool_a_tranche_1_id::().to_vec()), + Token::Address(evm.deployed("usdc").address()), + ]), + ) + .unwrap() + .value, + ); + + assert_eq!(price_evm, 0); + assert_eq!(computed_evm, 0); + }); + + let pre_price_cfg = env.state_mut(|_evm| { + let price = as TrancheTokenPrice< + ::AccountId, + CurrencyId, + >>::get(POOL_A, pool_a_tranche_1_id::()) + .unwrap(); + + assert_ok!(pallet_liquidity_pools::Pallet::::update_token_price( + OriginFor::::signed(Keyring::Alice.into()), + POOL_A, + pool_a_tranche_1_id::(), + USDC.id(), + Domain::EVM(EVM_DOMAIN_CHAIN_ID) + )); + utils::process_outbound::(utils::verify_outbound_success::); + + price + }); + + env.state(|evm| { + let (price_evm, computed_at_evm) = Decoder::<(u128, u64)>::decode( + &evm.view( + Keyring::Alice, + "pool_manager", + "getTrancheTokenPrice", + Some(&[ + Token::Uint(Uint::from(POOL_A)), + Token::FixedBytes(pool_a_tranche_1_id::().to_vec()), + Token::Address(evm.deployed("usdc").address()), + ]), + ) + .unwrap() + .value, + ); + + assert_eq!(pre_price_cfg.last_updated, computed_at_evm); + assert_eq!(price_evm, pre_price_cfg.price.into_inner()); + }); +} diff --git a/runtime/integration-tests/src/generic/cases/lp/transfers.rs b/runtime/integration-tests/src/generic/cases/lp/transfers.rs new file mode 100644 index 0000000000..af772f9f56 --- /dev/null +++ b/runtime/integration-tests/src/generic/cases/lp/transfers.rs @@ -0,0 +1,391 @@ +// Copyright 2021 Centrifuge Foundation (centrifuge.io). +// +// This file is part of the Centrifuge chain project. +// Centrifuge is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version (see http://www.gnu.org/licenses). +// Centrifuge is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +use cfg_primitives::{Balance, PoolId}; +use cfg_traits::Seconds; +use cfg_types::{ + domain_address::{Domain, DomainAddress}, + permissions::PoolRole, + tokens::CurrencyId, +}; +use ethabi::{ethereum_types::U256, Token}; +use frame_support::{assert_noop, traits::OriginTrait}; +use frame_system::pallet_prelude::OriginFor; +use pallet_liquidity_pools::Message; +use sp_core::ByteArray; +use sp_runtime::traits::Convert; + +use crate::{ + generic::{ + cases::lp::{ + self, names, + utils::{as_h160_32bytes, pool_a_tranche_1_id, Decoder}, + LocalUSDC, DECIMALS_6, DEFAULT_BALANCE, EVM_DOMAIN_CHAIN_ID, POOL_A, USDC, + }, + config::Runtime, + env::{Blocks, Env, EnvEvmExtension, EvmEnv}, + utils::{currency::CurrencyInfo, give_tokens, invest_and_collect}, + }, + utils::accounts::Keyring, +}; + +// The default amount of invested stable coins +const AMOUNT: Balance = DEFAULT_BALANCE * DECIMALS_6; + +mod utils { + use super::*; + + pub fn prepare_hold_tt_domain(env: &mut impl EnvEvmExtension) { + env.state_mut(|evm| { + assert_eq!( + Decoder::::decode(&evm.view( + Keyring::Alice, + names::POOL_A_T_1, + "balanceOf", + Some(&[Token::Address(Keyring::TrancheInvestor(1).into())]), + )), + 0 + ); + }); + + // Invest, close epoch and collect tranche tokens with 1-to-1 conversion + env.pass(Blocks::ByNumber(2)); + env.state_mut(|_evm| { + give_tokens::(Keyring::TrancheInvestor(1).id(), LocalUSDC.id(), AMOUNT); + invest_and_collect::( + Keyring::TrancheInvestor(1).into(), + Keyring::Admin, + POOL_A, + pool_a_tranche_1_id::(), + AMOUNT, + ); + assert_eq!( + orml_tokens::Accounts::::get( + Keyring::TrancheInvestor(1).id(), + CurrencyId::Tranche(POOL_A, pool_a_tranche_1_id::()), + ) + .free, + AMOUNT + ); + }); + + env.state_mut(|_evm| { + pallet_liquidity_pools::Pallet::::transfer_tranche_tokens( + OriginFor::::signed(Keyring::TrancheInvestor(1).into()), + POOL_A, + pool_a_tranche_1_id::(), + DomainAddress::evm(EVM_DOMAIN_CHAIN_ID, Keyring::TrancheInvestor(1).into()), + AMOUNT, + ) + .unwrap(); + lp::utils::process_outbound::(lp::utils::verify_outbound_success::); + }); + + env.state(|evm| { + assert_eq!( + Decoder::::decode(&evm.view( + Keyring::Alice, + names::POOL_A_T_1, + "balanceOf", + Some(&[Token::Address(Keyring::TrancheInvestor(1).into())]), + )), + AMOUNT + ); + }); + } + + pub fn prepare_hold_usdc_local(env: &mut impl EnvEvmExtension) { + env.state_mut(|evm| { + evm.call( + Keyring::Alice, + Default::default(), + names::USDC, + "approve", + Some(&[ + Token::Address(evm.deployed(names::POOL_MANAGER).address()), + Token::Uint(U256::from(AMOUNT)), + ]), + ) + .unwrap(); + evm.call( + Keyring::Alice, + Default::default(), + names::POOL_MANAGER, + "transfer", + Some(&[ + Token::Address(evm.deployed(names::USDC).address()), + Token::FixedBytes(Keyring::Ferdie.id().to_raw_vec()), + Token::Uint(U256::from(AMOUNT)), + ]), + ) + .unwrap(); + + assert_eq!( + orml_tokens::Accounts::::get(Keyring::Ferdie.id(), USDC.id()).free, + AMOUNT + ); + }); + } +} + +#[test_runtimes(all)] +fn transfer_tokens_from_local() { + let mut env = super::setup_full::(); + utils::prepare_hold_usdc_local::(&mut env); + + env.state_mut(|_evm| { + let call = pallet_liquidity_pools::Pallet::::transfer( + OriginFor::::signed(Keyring::Ferdie.into()), + USDC.id(), + DomainAddress::evm(EVM_DOMAIN_CHAIN_ID, Keyring::Ferdie.into()), + AMOUNT, + ); + call.unwrap(); + lp::utils::process_outbound::(lp::utils::verify_outbound_success::); + }); + + env.state(|evm| { + assert_eq!( + Decoder::::decode(&evm.view( + Keyring::Alice, + "usdc", + "balanceOf", + Some(&[Token::Address(Keyring::Ferdie.into())]), + )), + AMOUNT + ); + }); +} + +#[test_runtimes(all)] +fn transfer_tranche_tokens_from_local() { + let mut env = super::setup_full::(); + + env.state_mut(|evm| { + assert_eq!( + Decoder::::decode( + &evm.view( + Keyring::Alice, + names::POOL_A_T_1, + "balanceOf", + Some(&[Token::Address(Keyring::TrancheInvestor(1).into())]), + ) + .unwrap() + .value, + ), + 0 + ); + }); + + // Invest, close epoch and collect tranche tokens with 1-to-1 conversion + env.pass(Blocks::ByNumber(2)); + env.state_mut(|_evm| { + give_tokens::(Keyring::TrancheInvestor(1).id(), LocalUSDC.id(), AMOUNT); + invest_and_collect::( + Keyring::TrancheInvestor(1).into(), + Keyring::Admin, + POOL_A, + pool_a_tranche_1_id::(), + AMOUNT, + ); + }); + + env.state_mut(|_evm| { + pallet_liquidity_pools::Pallet::::transfer_tranche_tokens( + OriginFor::::signed(Keyring::TrancheInvestor(1).into()), + POOL_A, + pool_a_tranche_1_id::(), + DomainAddress::evm(EVM_DOMAIN_CHAIN_ID, Keyring::TrancheInvestor(1).into()), + AMOUNT, + ) + .unwrap(); + lp::utils::process_outbound::(lp::utils::verify_outbound_success::); + }); + + env.state(|evm| { + assert_eq!( + Decoder::::decode( + &evm.view( + Keyring::Alice, + names::POOL_A_T_1, + "balanceOf", + Some(&[Token::Address(Keyring::TrancheInvestor(1).into())]), + ) + .unwrap() + .value, + ), + AMOUNT + ); + }); +} + +#[test_runtimes(all)] +fn transfer_tranche_tokens_domain_to_local_to_domain() { + let mut env = super::setup_full::(); + utils::prepare_hold_tt_domain::(&mut env); + + env.state_mut(|evm| { + evm.call( + Keyring::TrancheInvestor(1), + Default::default(), + names::POOL_A_T_1, + "approve", + Some(&[ + Token::Address(evm.deployed(names::POOL_MANAGER).address()), + Token::Uint(U256::from(AMOUNT)), + ]), + ) + .unwrap(); + evm.call( + Keyring::TrancheInvestor(1), + sp_core::U256::zero(), + names::POOL_MANAGER, + "transferTrancheTokensToEVM", + Some(&[ + Token::Uint(POOL_A.into()), + Token::FixedBytes(pool_a_tranche_1_id::().into()), + Token::Uint(EVM_DOMAIN_CHAIN_ID.into()), + Token::Address(Keyring::TrancheInvestor(2).into()), + Token::Uint(AMOUNT.into()), + ]), + ) + .unwrap(); + }); + + env.state_mut(|_evm| { + lp::utils::process_outbound::(|msg| { + assert_eq!( + msg, + Message::TransferTrancheTokens { + pool_id: POOL_A, + tranche_id: pool_a_tranche_1_id::(), + sender: + ::DomainAddressToAccountId::convert( + DomainAddress::evm( + EVM_DOMAIN_CHAIN_ID, + Keyring::TrancheInvestor(2).into() + ) + ) + .into(), + domain: Domain::EVM(EVM_DOMAIN_CHAIN_ID), + receiver: as_h160_32bytes(Keyring::TrancheInvestor(2)), + amount: AMOUNT, + } + ); + }); + }); + + env.state(|evm| { + assert_eq!( + Decoder::::decode( + &evm.view( + Keyring::Alice, + names::POOL_A_T_1, + "balanceOf", + Some(&[Token::Address(Keyring::TrancheInvestor(2).into())]), + ) + .unwrap() + .value, + ), + AMOUNT + ); + }); +} + +#[test_runtimes(all)] +fn transfer_tranche_tokens_domain_to_local() { + let mut env = super::setup_full::(); + utils::prepare_hold_tt_domain::(&mut env); + + env.state_mut(|evm| { + evm.call( + Keyring::TrancheInvestor(1), + Default::default(), + names::POOL_A_T_1, + "approve", + Some(&[ + Token::Address(evm.deployed(names::POOL_MANAGER).address()), + Token::Uint(U256::from(AMOUNT)), + ]), + ) + .unwrap(); + evm.call( + Keyring::TrancheInvestor(1), + sp_core::U256::zero(), + names::POOL_MANAGER, + "transferTrancheTokensToCentrifuge", + Some(&[ + Token::Uint(POOL_A.into()), + Token::FixedBytes(pool_a_tranche_1_id::().into()), + Token::FixedBytes(Keyring::TrancheInvestor(2).id().to_raw_vec()), + Token::Uint(AMOUNT.into()), + ]), + ) + .unwrap(); + }); + + env.state(|_evm| { + assert_eq!( + orml_tokens::Accounts::::get( + Keyring::TrancheInvestor(2).id(), + CurrencyId::Tranche(POOL_A, pool_a_tranche_1_id::()), + ) + .free, + AMOUNT + ); + }); +} + +#[test_runtimes(all)] +fn transferring_invalid_tranche_tokens_should_fail() { + const INVALID_POOL_ID: PoolId = 100; + const INVALID_TRANCHE_ID: [u8; 16] = [0; 16]; + let mut env = super::setup_full::(); + + env.state_mut(|_| { + crate::generic::utils::pool::give_role::( + lp::utils::remote_account_of::(Keyring::TrancheInvestor(1)), + POOL_A, + PoolRole::TrancheInvestor(INVALID_TRANCHE_ID, Seconds::MAX), + ); + crate::generic::utils::pool::give_role::( + lp::utils::remote_account_of::(Keyring::TrancheInvestor(1)), + INVALID_POOL_ID, + PoolRole::TrancheInvestor(INVALID_TRANCHE_ID, Seconds::MAX), + ); + }); + + let destination = DomainAddress::EVM(EVM_DOMAIN_CHAIN_ID, Keyring::TrancheInvestor(1).into()); + env.state(|_evm| { + assert_noop!( + pallet_liquidity_pools::Pallet::::transfer_tranche_tokens( + OriginFor::::signed(Keyring::TrancheInvestor(1).into()), + INVALID_POOL_ID, + INVALID_TRANCHE_ID, + destination.clone(), + AMOUNT + ), + pallet_liquidity_pools::Error::::PoolNotFound + ); + + assert_noop!( + pallet_liquidity_pools::Pallet::::transfer_tranche_tokens( + OriginFor::::signed(Keyring::TrancheInvestor(1).into()), + POOL_A, + INVALID_TRANCHE_ID, + destination, + AMOUNT + ), + pallet_liquidity_pools::Error::::TrancheNotFound + ); + }); +} diff --git a/runtime/integration-tests/src/generic/cases/oracles.rs b/runtime/integration-tests/src/generic/cases/oracles.rs index 14124b582c..d194c50ea8 100644 --- a/runtime/integration-tests/src/generic/cases/oracles.rs +++ b/runtime/integration-tests/src/generic/cases/oracles.rs @@ -27,7 +27,7 @@ mod ratio_provider { config::Runtime, env::Env, envs::runtime_env::RuntimeEnv, - utils::currency::{register_currency, CurrencyInfo, CONST_DEFAULT_CUSTOM}, + utils::currency::{register_currency, CurrencyInfo}, }; pub struct OtherLocal; @@ -40,7 +40,7 @@ mod ratio_provider { CustomMetadata { pool_currency: true, transferability: CrossChainTransferability::None, - ..CONST_DEFAULT_CUSTOM + ..Default::default() } } } @@ -55,7 +55,7 @@ mod ratio_provider { CustomMetadata { pool_currency: true, transferability: CrossChainTransferability::None, - ..CONST_DEFAULT_CUSTOM + ..Default::default() } } } @@ -71,7 +71,7 @@ mod ratio_provider { pool_currency: true, transferability: CrossChainTransferability::LiquidityPools, local_representation: Some(LocalAssetId(1)), - ..CONST_DEFAULT_CUSTOM + ..Default::default() } } } diff --git a/runtime/integration-tests/src/generic/cases/precompile.rs b/runtime/integration-tests/src/generic/cases/precompile.rs index d2e3d05df5..e438ec8149 100644 --- a/runtime/integration-tests/src/generic/cases/precompile.rs +++ b/runtime/integration-tests/src/generic/cases/precompile.rs @@ -20,13 +20,13 @@ use crate::generic::{ env::Env, envs::runtime_env::RuntimeEnv, utils::{ - self, currency::{usd18, CurrencyInfo, Usd18}, + evm, genesis::{self, Genesis}, }, }; -#[test_runtimes([development])] +#[test_runtimes(all)] fn axelar_precompile_execute() { RuntimeEnv::::from_parachain_storage( Genesis::default() @@ -48,7 +48,7 @@ fn axelar_precompile_execute() { let derived_sender_account = T::AddressMapping::into_account_id(sender_address); let derived_receiver_account = T::AddressMapping::into_account_id(receiver_address); - utils::evm::mint_balance_into_derived_account::(sender_address, 1 * CFG); + evm::mint_balance_into_derived_account::(sender_address, 1 * CFG); let general_currency_id = pallet_liquidity_pools::Pallet::::try_get_general_index(Usd18.id()).unwrap(); @@ -116,7 +116,7 @@ fn axelar_precompile_execute() { .expect("cannot encode input for test contract function"); assert_ok!(pallet_evm::Pallet::::call( - RawOrigin::Signed(derived_sender_account.clone()).into(), + RawOrigin::Root.into(), sender_address, lp_axelar_gateway, eth_function_encoded.to_vec(), diff --git a/runtime/integration-tests/src/generic/cases/restricted_transfers.rs b/runtime/integration-tests/src/generic/cases/restricted_transfers.rs index ee539b0465..ab1af8deb7 100644 --- a/runtime/integration-tests/src/generic/cases/restricted_transfers.rs +++ b/runtime/integration-tests/src/generic/cases/restricted_transfers.rs @@ -51,7 +51,7 @@ mod cfg { pallet_transfer_allowlist::Pallet::::add_transfer_allowance( RawOrigin::Signed(Keyring::Alice.into()).into(), filter, - RestrictedTransferLocation::Local(Keyring::Bob.to_account_id()) + RestrictedTransferLocation::Local(Keyring::Bob.id()) ) ); @@ -75,11 +75,9 @@ mod cfg { env.parachain_state(|| { // NOTE: The para-id is not relevant here ( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.to_account_id()), - pallet_balances::Pallet::::free_balance(&Keyring::Bob.to_account_id()), - pallet_balances::Pallet::::free_balance( - &Keyring::Charlie.to_account_id(), - ), + pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()), + pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()), + pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()), ) }); @@ -89,11 +87,11 @@ mod cfg { env.parachain_state(|| { let after_transfer_alice = - pallet_balances::Pallet::::free_balance(&Keyring::Alice.to_account_id()); + pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()); let after_transfer_bob = - pallet_balances::Pallet::::free_balance(&Keyring::Bob.to_account_id()); + pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()); let after_transfer_charlie = - pallet_balances::Pallet::::free_balance(&Keyring::Charlie.to_account_id()); + pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()); assert_eq!(after_transfer_alice, pre_transfer_alice - fee); assert_eq!(after_transfer_bob, pre_transfer_bob); @@ -109,11 +107,9 @@ mod cfg { env.parachain_state(|| { // NOTE: The para-id is not relevant here ( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.to_account_id()), - pallet_balances::Pallet::::free_balance(&Keyring::Bob.to_account_id()), - pallet_balances::Pallet::::free_balance( - &Keyring::Charlie.to_account_id(), - ), + pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()), + pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()), + pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()), ) }); @@ -123,11 +119,11 @@ mod cfg { env.parachain_state(|| { let after_transfer_alice = - pallet_balances::Pallet::::free_balance(&Keyring::Alice.to_account_id()); + pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()); let after_transfer_bob = - pallet_balances::Pallet::::free_balance(&Keyring::Bob.to_account_id()); + pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()); let after_transfer_charlie = - pallet_balances::Pallet::::free_balance(&Keyring::Charlie.to_account_id()); + pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()); assert_eq!(after_transfer_alice, pre_transfer_alice - fee); assert_eq!(after_transfer_bob, pre_transfer_bob); @@ -145,11 +141,9 @@ mod cfg { env.parachain_state(|| { // NOTE: The para-id is not relevant here ( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.to_account_id()), - pallet_balances::Pallet::::free_balance(&Keyring::Bob.to_account_id()), - pallet_balances::Pallet::::free_balance( - &Keyring::Charlie.to_account_id(), - ), + pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()), + pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()), + pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()), ) }); @@ -160,11 +154,11 @@ mod cfg { env.parachain_state(|| { let after_transfer_alice = - pallet_balances::Pallet::::free_balance(&Keyring::Alice.to_account_id()); + pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()); let after_transfer_bob = - pallet_balances::Pallet::::free_balance(&Keyring::Bob.to_account_id()); + pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()); let after_transfer_charlie = - pallet_balances::Pallet::::free_balance(&Keyring::Charlie.to_account_id()); + pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()); assert_eq!( after_transfer_alice, @@ -183,11 +177,9 @@ mod cfg { env.parachain_state(|| { // NOTE: The para-id is not relevant here ( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.to_account_id()), - pallet_balances::Pallet::::free_balance(&Keyring::Bob.to_account_id()), - pallet_balances::Pallet::::free_balance( - &Keyring::Charlie.to_account_id(), - ), + pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()), + pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()), + pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()), ) }); @@ -197,11 +189,11 @@ mod cfg { env.parachain_state(|| { let after_transfer_alice = - pallet_balances::Pallet::::free_balance(&Keyring::Alice.to_account_id()); + pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()); let after_transfer_bob = - pallet_balances::Pallet::::free_balance(&Keyring::Bob.to_account_id()); + pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()); let after_transfer_charlie = - pallet_balances::Pallet::::free_balance(&Keyring::Charlie.to_account_id()); + pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()); assert_eq!( after_transfer_alice, @@ -239,9 +231,9 @@ mod cfg { env.parachain_state(|| { // NOTE: The para-id is not relevant here ( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.to_account_id()), - pallet_balances::Pallet::::free_balance(&Keyring::Bob.to_account_id()), - pallet_balances::Pallet::::free_balance(&Keyring::Charlie.to_account_id()), + pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()), + pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()), + pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()), ) }); @@ -249,11 +241,10 @@ mod cfg { env.parachain_state(|| { let after_transfer_alice = - pallet_balances::Pallet::::free_balance(&Keyring::Alice.to_account_id()); - let after_transfer_bob = - pallet_balances::Pallet::::free_balance(&Keyring::Bob.to_account_id()); + pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()); + let after_transfer_bob = pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()); let after_transfer_charlie = - pallet_balances::Pallet::::free_balance(&Keyring::Charlie.to_account_id()); + pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()); assert_eq!( after_transfer_alice, diff --git a/runtime/integration-tests/src/generic/config.rs b/runtime/integration-tests/src/generic/config.rs index df368a9015..cbb6c00aae 100644 --- a/runtime/integration-tests/src/generic/config.rs +++ b/runtime/integration-tests/src/generic/config.rs @@ -14,6 +14,7 @@ use cfg_types::{ permissions::{PermissionScope, Role}, tokens::{AssetStringLimit, CurrencyId, CustomMetadata, FilterCurrency, TrancheCurrency}, }; +use fp_evm::PrecompileSet; use fp_self_contained::{SelfContainedCall, UncheckedExtrinsic}; use frame_support::{ dispatch::{DispatchInfo, GetDispatchInfo, PostDispatchInfo, RawOrigin}, @@ -26,6 +27,7 @@ use pallet_transaction_payment::CurrencyAdapter; use parity_scale_codec::Codec; use runtime_common::{ apis, + evm::precompile::H160Addresses, fees::{DealWithFees, WeightToFee}, instances, oracle::Feeder, @@ -66,20 +68,23 @@ pub trait Runtime: CurrencyId = CurrencyId, Balance = Balance, PoolId = PoolId, + Rate = Rate, TrancheId = TrancheId, BalanceRatio = Quantity, MaxTranches = Self::MaxTranchesExt, + TrancheCurrency = TrancheCurrency, > + pallet_balances::Config + pallet_pool_registry::Config< CurrencyId = CurrencyId, PoolId = PoolId, + InterestRate = Rate, Balance = Balance, MaxTranches = Self::MaxTranchesExt, ModifyPool = pallet_pool_system::Pallet, ModifyWriteOffPolicy = pallet_loans::Pallet, > + pallet_permissions::Config> + pallet_investments::Config< - InvestmentId = TrancheCurrency, + InvestmentId = ::TrancheCurrency, Amount = Balance, BalanceRatio = Ratio, > + pallet_loans::Config< @@ -173,12 +178,21 @@ pub trait Runtime: FixedI128, SingleCurrencyMovement, >, + > + pallet_evm::Config< + Runner = pallet_evm::runner::stack::Runner, + Currency = pallet_balances::Pallet, > + pallet_block_rewards::Config< Rate = Rate, CurrencyId = CurrencyId, Balance = Balance, Rewards = pallet_rewards::Pallet, > + axelar_gateway_precompile::Config + + pallet_token_mux::Config< + BalanceIn = Balance, + BalanceOut = Balance, + CurrencyId = CurrencyId, + OrderId = OrderId, + > { /// Value to differentiate the runtime in tests. const KIND: RuntimeKind; @@ -232,6 +246,7 @@ pub trait Runtime: + TryInto> + TryInto> + TryInto + + TryInto> + TryInto> + TryInto> + TryInto> @@ -252,6 +267,8 @@ pub trait Runtime: + From> + From> + From> + + From + + From> + From> + From> + From; @@ -323,5 +340,7 @@ pub trait Runtime: type SessionKeysExt: OpaqueKeys + Member + Parameter + MaybeSerializeDeserialize; + type PrecompilesTypeExt: PrecompileSet + H160Addresses; + fn initialize_session_keys(public_id: Public) -> Self::SessionKeysExt; } diff --git a/runtime/integration-tests/src/generic/env.rs b/runtime/integration-tests/src/generic/env.rs index 153d61c658..c6e58ed7f2 100644 --- a/runtime/integration-tests/src/generic/env.rs +++ b/runtime/integration-tests/src/generic/env.rs @@ -1,6 +1,9 @@ use cfg_primitives::{Address, Balance, BlockNumber, Nonce}; use cfg_traits::{IntoSeconds, Seconds}; +use ethabi::{Log, Token}; +use pallet_evm::CallInfo; use parity_scale_codec::Encode; +use sp_core::{H160, U256}; use sp_runtime::{ generic::{Era, SignedPayload}, traits::{Block, Extrinsic}, @@ -8,7 +11,13 @@ use sp_runtime::{ }; use sp_std::ops::Range; -use crate::{generic::config::Runtime, utils::accounts::Keyring}; +use crate::{ + generic::{ + config::Runtime, + utils::evm::{ContractInfo, DeployedContractInfo}, + }, + utils::accounts::Keyring, +}; /// Used by Env::pass() to determine how many blocks should be passed #[derive(Clone)] @@ -166,6 +175,58 @@ pub trait Env: Default { fn __priv_build_block(&mut self, i: BlockNumber); } +pub trait EnvEvmExtension: Env { + type EvmEnv: EvmEnv; + + /// Allows to mutate the parachain storage state through the closure. + fn state_mut(&mut self, f: impl FnOnce(&mut Self::EvmEnv) -> R) -> R; + + /// Allows to read the parachain storage state through the closure. + fn state(&self, f: impl FnOnce(&Self::EvmEnv) -> R) -> R; +} + +pub trait EvmEnv { + fn find_events(&self, contract: impl Into, event: impl Into) -> Vec; + + fn load_contracts(&mut self) -> &mut Self; + + fn deployed(&self, name: impl Into) -> DeployedContractInfo; + + fn register( + &mut self, + name: impl Into, + contract: impl Into, + address: H160, + ) -> &mut Self; + + fn contract(&self, name: impl Into) -> ContractInfo; + + fn deploy( + &mut self, + what: impl Into + Clone, + name: impl Into, + who: Keyring, + args: Option<&[Token]>, + ) -> &mut Self; + + fn call( + &self, + caller: Keyring, + value: U256, + contract: impl Into, + function: impl Into, + args: Option<&[Token]>, + ) -> Result; + + fn view( + &self, + caller: Keyring, + contract: impl Into, + function: impl Into, + args: Option<&[Token]>, + ) -> Result; +} + pub mod utils { use super::*; @@ -193,7 +254,7 @@ pub mod utils { let signature = MultiSignature::Sr25519(raw_payload.using_encoded(|payload| who.sign(payload))); - let multi_address = (Address::Id(who.to_account_id()), signature, signed_extra); + let multi_address = (Address::Id(who.id()), signature, signed_extra); ::Extrinsic::new(runtime_call, Some(multi_address)).unwrap() } diff --git a/runtime/integration-tests/src/generic/envs/evm_env.rs b/runtime/integration-tests/src/generic/envs/evm_env.rs new file mode 100644 index 0000000000..cdcf52cc59 --- /dev/null +++ b/runtime/integration-tests/src/generic/envs/evm_env.rs @@ -0,0 +1,218 @@ +use std::{collections::HashMap, marker::PhantomData}; + +use ethabi::{ethereum_types, Log, RawLog, Token}; +use pallet_evm::{CallInfo, ExitReason, FeeCalculator, Runner}; +use sp_core::{H160, U256}; +use sp_runtime::DispatchError; + +use crate::{ + generic::{ + config::Runtime, + env, + utils::{ + evm, + evm::{ContractInfo, DeployedContractInfo}, + ESSENTIAL, + }, + }, + utils::accounts::Keyring, +}; + +const GAS_LIMIT: u64 = 105_000_000; +const VALIDATE: bool = false; +const TRANSACTIONAL: bool = true; + +pub struct EvmEnv { + sol_contracts: Option>, + deployed_contracts: HashMap, + _phantom: PhantomData, +} + +impl Default for EvmEnv { + fn default() -> Self { + EvmEnv { + sol_contracts: None, + deployed_contracts: HashMap::new(), + _phantom: Default::default(), + } + } +} + +impl env::EvmEnv for EvmEnv { + fn find_events(&self, contract: impl Into, event: impl Into) -> Vec { + let contract = self.contract(contract).contract; + let event = contract + .event(Into::::into(event).as_ref()) + .unwrap(); + + pallet_ethereum::Pending::::get() + .into_iter() + .flat_map(|(_, status, _)| status.logs) + .collect::>() + .into_iter() + .filter_map(|log| { + event + .parse_log(RawLog { + topics: log + .topics + .into_iter() + .map(|h| ethereum_types::H256::from(h.0)) + .collect(), + data: log.data, + }) + .ok() + }) + .collect() + } + + fn load_contracts(&mut self) -> &mut Self { + self.sol_contracts = Some(evm::fetch_contracts()); + self + } + + fn deployed(&self, name: impl Into) -> DeployedContractInfo { + self.deployed_contracts + .get(&name.into()) + .expect("Not deployed") + .clone() + } + + fn register( + &mut self, + name: impl Into, + contract: impl Into, + address: H160, + ) -> &mut Self { + let contract = self.contract(contract); + let runtime_code = pallet_evm::AccountCodes::::get(address); + + assert_ne!(address, H160::zero()); + + self.deployed_contracts.insert( + name.into(), + DeployedContractInfo::new( + contract.contract, + runtime_code, + ethabi::ethereum_types::H160::from(address.0), + ), + ); + self + } + + fn contract(&self, name: impl Into) -> ContractInfo { + self.sol_contracts + .as_ref() + .expect("Need to load_contracts first") + .get(&name.into()) + .expect("Unknown contract") + .clone() + } + + fn deploy( + &mut self, + what: impl Into + Clone, + name: impl Into, + who: Keyring, + args: Option<&[Token]>, + ) -> &mut Self { + let info = Self::contract(&self, what.clone()); + + let init = match (info.contract.constructor(), args) { + (None, None) => info.bytecode.to_vec(), + (Some(constructor), Some(args)) => constructor + .encode_input(info.bytecode.to_vec(), args) + .expect("Could not encode constructor and arguments."), + (Some(constructor), None) => constructor + .encode_input(info.bytecode.to_vec(), &[]) + .expect("Could not encode constructor and argument."), + (None, Some(_)) => panic!("Contract has no constructor."), + }; + + let create_info = { + let (base_fee, _) = ::FeeCalculator::min_gas_price(); + + ::Runner::create( + who.into(), + init, + 0u8.into(), + GAS_LIMIT, + Some(base_fee), + None, + None, + Vec::new(), + // NOTE: Taken from pallet-evm implementation + VALIDATE, + // NOTE: Taken from pallet-evm implementation + TRANSACTIONAL, + None, + None, + ::config(), + ) + .expect(ESSENTIAL) + }; + + self.register(name, what, create_info.value) + } + + fn call( + &self, + caller: Keyring, + value: U256, + contract: impl Into, + function: impl Into, + args: Option<&[Token]>, + ) -> Result { + let contract_info = self + .deployed_contracts + .get(&contract.into()) + .expect("Contract not deployed") + .clone(); + let input = contract_info + .contract + .functions_by_name(function.into().as_ref()) + .expect(ESSENTIAL) + .iter() + .filter_map(|f| f.encode_input(args.unwrap_or_default()).ok()) + .last() + .expect("No matching function Signature found."); + + let (base_fee, _) = ::FeeCalculator::min_gas_price(); + + let res = ::Runner::call( + caller.into(), + contract_info.address(), + input, + value, + GAS_LIMIT, + Some(base_fee), + None, + None, + Vec::new(), + // NOTE: Taken from pallet-evm implementation + VALIDATE, + // NOTE: Taken from pallet-evm implementation + TRANSACTIONAL, + None, + None, + ::config(), + ) + .map_err(|re| re.error)?; + + match res.exit_reason { + ExitReason::Succeed(_) => Ok(res), + ExitReason::Fatal(_) => Err(DispatchError::Other("EVM call failed: Fatal")), + ExitReason::Error(_) => Err(DispatchError::Other("EVM call failed: Error")), + ExitReason::Revert(_) => Err(DispatchError::Other("EVM call failed: Revert")), + } + } + + fn view( + &self, + caller: Keyring, + contract: impl Into, + function: impl Into, + args: Option<&[Token]>, + ) -> Result { + self.call(caller, U256::zero(), contract, function, args) + } +} diff --git a/runtime/integration-tests/src/generic/envs/fudge_env.rs b/runtime/integration-tests/src/generic/envs/fudge_env.rs index ffae30929b..214b3037a5 100644 --- a/runtime/integration-tests/src/generic/envs/fudge_env.rs +++ b/runtime/integration-tests/src/generic/envs/fudge_env.rs @@ -159,7 +159,7 @@ mod tests { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() .add(pallet_balances::GenesisConfig:: { - balances: vec![(Keyring::Alice.to_account_id(), 1 * CFG)], + balances: vec![(Keyring::Alice.id(), 1 * CFG)], }) .storage(), ); diff --git a/runtime/integration-tests/src/generic/envs/runtime_env.rs b/runtime/integration-tests/src/generic/envs/runtime_env.rs index 1eb704939a..3a339b8eb2 100644 --- a/runtime/integration-tests/src/generic/envs/runtime_env.rs +++ b/runtime/integration-tests/src/generic/envs/runtime_env.rs @@ -8,6 +8,7 @@ use frame_support::{ dispatch::GetDispatchInfo, inherent::{InherentData, ProvideInherent}, storage::{transactional, TransactionOutcome}, + traits::BuildGenesisConfig, }; use frame_system::LastRuntimeUpgradeInfo; use parity_scale_codec::Encode; @@ -25,7 +26,8 @@ use sp_timestamp::Timestamp; use crate::{ generic::{ config::Runtime, - env::{utils, Env}, + env::{utils, Env, EnvEvmExtension}, + envs::evm_env::EvmEnv, }, utils::accounts::Keyring, }; @@ -36,6 +38,7 @@ pub struct RuntimeEnv { parachain_ext: Rc>, sibling_ext: Rc>, pending_extrinsics: Vec<(Keyring, T::RuntimeCallExt)>, + evm: Rc>>, _config: PhantomData, } @@ -45,6 +48,22 @@ impl Default for RuntimeEnv { } } +impl EnvEvmExtension for RuntimeEnv { + type EvmEnv = EvmEnv; + + fn state_mut(&mut self, f: impl FnOnce(&mut Self::EvmEnv) -> R) -> R { + self.parachain_ext + .borrow_mut() + .execute_with(|| f(&mut *self.evm.borrow_mut())) + } + + fn state(&self, f: impl FnOnce(&Self::EvmEnv) -> R) -> R { + self.parachain_ext + .borrow_mut() + .execute_with(|| f(&*self.evm.borrow())) + } +} + impl Env for RuntimeEnv { fn from_parachain_storage(parachain_storage: Storage) -> Self { Self::from_storage(Default::default(), parachain_storage, Default::default()) @@ -59,6 +78,7 @@ impl Env for RuntimeEnv { parachain_ext: Self::build_externality(parachain_storage), sibling_ext: Self::build_externality(sibling_storage), pending_extrinsics: Vec::default(), + evm: Rc::new(RefCell::new(EvmEnv::default())), _config: PhantomData, } } @@ -72,7 +92,7 @@ impl Env for RuntimeEnv { let info = self.parachain_state(|| call.get_dispatch_info()); let extrinsic = self.parachain_state(|| { - let nonce = frame_system::Pallet::::account(who.to_account_id()).nonce; + let nonce = frame_system::Pallet::::account(who.id()).nonce; utils::create_extrinsic::(who, call, nonce) }); let len = extrinsic.encoded_size(); @@ -171,6 +191,15 @@ impl RuntimeEnv { let mut ext = sp_io::TestExternalities::new(storage); ext.execute_with(|| { + // Precompiles need to have code-set + pallet_evm::GenesisConfig:: { + accounts: runtime_common::evm::precompile::utils::precompile_account_genesis::< + T::PrecompilesTypeExt, + >(), + _marker: PhantomData::default(), + } + .build(); + // NOTE: Setting the current on-chain runtime version to the latest one, to // prevent running migrations frame_system::LastRuntimeUpgrade::::put(LastRuntimeUpgradeInfo::from( @@ -193,7 +222,7 @@ impl RuntimeEnv { for (who, call) in pending_extrinsics { let extrinsic = self.parachain_state(|| { - let nonce = frame_system::Pallet::::account(who.to_account_id()).nonce; + let nonce = frame_system::Pallet::::account(who.id()).nonce; utils::create_extrinsic::(who, call, nonce) }); @@ -201,7 +230,7 @@ impl RuntimeEnv { } } - fn prepare_block(i: BlockNumber) { + pub fn prepare_block(i: BlockNumber) { let slot = Slot::from(i as u64); let digest = Digest { logs: vec![DigestItem::PreRuntime(AURA_ENGINE_ID, slot.encode())], @@ -286,7 +315,7 @@ mod tests { let mut env = RuntimeEnv::::from_parachain_storage( Genesis::default() .add(pallet_balances::GenesisConfig:: { - balances: vec![(Keyring::Alice.to_account_id(), 1 * CFG)], + balances: vec![(Keyring::Alice.id(), 1 * CFG)], }) .storage(), ); @@ -309,7 +338,7 @@ mod tests { let mut env = RuntimeEnv::::from_parachain_storage( Genesis::default() .add(pallet_balances::GenesisConfig:: { - balances: vec![(Keyring::Alice.to_account_id(), 1 * CFG)], + balances: vec![(Keyring::Alice.id(), 1 * CFG)], }) .storage(), ); diff --git a/runtime/integration-tests/src/generic/impls.rs b/runtime/integration-tests/src/generic/impls.rs index 777f81cceb..764c40ee27 100644 --- a/runtime/integration-tests/src/generic/impls.rs +++ b/runtime/integration-tests/src/generic/impls.rs @@ -16,6 +16,7 @@ macro_rules! impl_runtime { type Api = Self; type BlockExt = $runtime_path::Block; type MaxTranchesExt = $runtime_path::MaxTranches; + type PrecompilesTypeExt = $runtime_path::Precompiles; type RuntimeCallExt = $runtime_path::RuntimeCall; type RuntimeEventExt = $runtime_path::RuntimeEvent; type RuntimeOriginExt = $runtime_path::RuntimeOrigin; diff --git a/runtime/integration-tests/src/generic/mod.rs b/runtime/integration-tests/src/generic/mod.rs index 7a484368ed..9d0f96e633 100644 --- a/runtime/integration-tests/src/generic/mod.rs +++ b/runtime/integration-tests/src/generic/mod.rs @@ -1,5 +1,6 @@ pub mod env; pub mod envs { + pub mod evm_env; pub mod fudge_env; pub mod runtime_env; } @@ -16,6 +17,7 @@ mod cases { mod investments; mod liquidity_pools; mod loans; + mod lp; mod oracles; mod precompile; mod proxy; diff --git a/runtime/integration-tests/src/generic/utils/currency.rs b/runtime/integration-tests/src/generic/utils/currency.rs index 5715ae3171..6d8b029e43 100644 --- a/runtime/integration-tests/src/generic/utils/currency.rs +++ b/runtime/integration-tests/src/generic/utils/currency.rs @@ -1,8 +1,8 @@ //! PLEASE be as much generic as possible because no domain or use cases are //! considered at this level. -use cfg_primitives::{conversion, Balance, CFG}; -use cfg_types::tokens::{AssetMetadata, CrossChainTransferability, CurrencyId, CustomMetadata}; +use cfg_primitives::{conversion, liquidity_pools::GeneralCurrencyPrefix, Balance, CFG}; +use cfg_types::tokens::{AssetMetadata, CurrencyId, CustomMetadata, GeneralCurrencyIndex}; use frame_support::{assert_ok, traits::OriginTrait}; use sp_runtime::FixedPointNumber; @@ -35,7 +35,9 @@ pub trait CurrencyInfo { None } - fn custom(&self) -> CustomMetadata; + fn custom(&self) -> CustomMetadata { + CustomMetadata::default() + } fn ed(&self) -> Balance { 0 @@ -51,16 +53,11 @@ pub trait CurrencyInfo { additional: self.custom(), } } -} -/// Matches default() but for const support -pub const CONST_DEFAULT_CUSTOM: CustomMetadata = CustomMetadata { - transferability: CrossChainTransferability::None, - mintable: false, - permissioned: false, - pool_currency: false, - local_representation: None, -}; + fn general_currency_index(&self) -> Option> { + TryFrom::try_from(*&self.id()).ok() + } +} pub fn price_to_currency>( price: N, @@ -86,7 +83,7 @@ impl CurrencyInfo for Usd6 { fn custom(&self) -> CustomMetadata { CustomMetadata { pool_currency: true, - ..CONST_DEFAULT_CUSTOM + ..Default::default() } } } @@ -112,7 +109,7 @@ impl CurrencyInfo for Usd12 { fn custom(&self) -> CustomMetadata { CustomMetadata { pool_currency: true, - ..CONST_DEFAULT_CUSTOM + ..Default::default() } } } @@ -138,7 +135,7 @@ impl CurrencyInfo for Usd18 { fn custom(&self) -> CustomMetadata { CustomMetadata { pool_currency: true, - ..CONST_DEFAULT_CUSTOM + ..Default::default() } } } diff --git a/runtime/integration-tests/src/generic/utils/democracy.rs b/runtime/integration-tests/src/generic/utils/democracy.rs index a5c234ada7..0edc63b782 100644 --- a/runtime/integration-tests/src/generic/utils/democracy.rs +++ b/runtime/integration-tests/src/generic/utils/democracy.rs @@ -141,7 +141,7 @@ fn execute_democracy_vote( env.pass(Blocks::UntilEvent { event: pallet_democracy::Event::::Voted { - voter: acc.to_account_id(), + voter: acc.id(), ref_index: referendum_index, vote: acc_vote, } diff --git a/runtime/integration-tests/src/generic/utils/evm.rs b/runtime/integration-tests/src/generic/utils/evm.rs new file mode 100644 index 0000000000..3a8e50a7e7 --- /dev/null +++ b/runtime/integration-tests/src/generic/utils/evm.rs @@ -0,0 +1,211 @@ +use std::{ + collections::HashMap, + fs, + path::{Path, PathBuf}, +}; + +use cfg_utils::vec_to_fixed_array; +use ethabi::{ethereum_types::H160, Contract}; +use ethereum::ReceiptV3; +use frame_support::traits::{fungible::Mutate, OriginTrait}; +use pallet_evm::FeeCalculator; +use runtime_common::account_conversion::AccountConverter; +use sp_runtime::traits::Get; + +use crate::generic::{config::Runtime, utils::ESSENTIAL}; + +/// Liquidity-Pool solidity artifacts generated by build-script. +/// All needed contracts can be loaded from here. +/// +/// This panics if the solidity contracts were not built properly. This can +/// happen if the submodule was not pulled or the forge cli has not been +/// installed locally. +pub const LP_SOL_SOURCES: &str = env!("LP_SOL_SOURCES", "Build script failed to populate environment variable LP_SOL_SOURCES pointing to missing solidity source files in the 'target/*/build/integration-tests*/out' directory required for EVM integration tests.\n\nPlease check if you have pulled the 'liquidity-pools' submodule via `git pull --recurse-submodules` and if you have installed the forge cli, e.g. check `forge -V`."); + +#[derive(Clone, Debug, PartialEq)] +pub struct DeployedContractInfo { + pub contract: Contract, + pub deployed_bytecode: Vec, + pub address: H160, +} + +impl DeployedContractInfo { + pub fn new(contract: Contract, deployed_bytecode: Vec, address: H160) -> Self { + Self { + address, + contract, + deployed_bytecode, + } + } + + pub fn address(&self) -> H160 { + H160::from(self.address) + } +} + +#[derive(Clone, Debug, PartialEq)] +pub struct ContractInfo { + pub contract: Contract, + pub bytecode: Vec, + pub deployed_bytecode: Vec, +} + +impl ContractInfo { + pub fn new(contract: Contract, bytecode: Vec, deployed_bytecode: Vec) -> Self { + Self { + contract, + bytecode, + deployed_bytecode, + } + } +} + +fn traversal(path: impl AsRef, files: &mut Vec) { + for path in fs::read_dir(path).expect("Submodules directory must exist for integration-tests") { + if let Ok(dir_entry) = path.as_ref() { + if dir_entry + .metadata() + .map(|meta| meta.is_dir()) + .unwrap_or(false) + { + traversal( + fs::canonicalize(dir_entry.path()).expect("Failed to find absolute path."), + files, + ) + } else if dir_entry + .metadata() + .map(|meta| meta.is_file()) + .unwrap_or(false) + { + files.push(dir_entry.path()) + } + } + } +} + +pub fn fetch_contracts() -> HashMap { + let mut contracts = HashMap::new(); + let mut files = Vec::new(); + traversal(LP_SOL_SOURCES, &mut files); + files.iter().for_each(|path| { + let file_name = path + .file_name() + .expect("Only files here. qed.") + .to_str() + .expect(".sol files are valid unicode. qed") + .split(".") + .collect::>(); + + let contract_name = file_name + .first() + .expect("Files are all x.json.qed") + .to_string(); + + let contract_json: serde_json::Value = + serde_json::from_reader(fs::File::open(path).expect(ESSENTIAL)).expect(ESSENTIAL); + let abi = contract_json.get("abi").expect(ESSENTIAL); + let _ = Contract::load(&mut serde_json::to_string(abi).expect(ESSENTIAL).as_bytes()) + .map_err(|e| { + println!( + "Error: Failed loading contract {}. Error: {}", + contract_name, e + ) + }) + .map(|contract| { + // NOTE: We do not care of the code is invalid for now. + let _ = hex::decode( + contract_json + .get("bytecode") + .expect(ESSENTIAL) + .get("object") + .expect(ESSENTIAL) + .as_str() + .expect(ESSENTIAL) + .trim_start_matches("0x"), + ) + .map_err(|e| { + println!( + "Error: Failed decoding contract code {}. Error: {}", + contract_name, e, + ) + }) + .and_then(|code| { + // NOTE: We do not care of the code is invalid for now. + let deployed = hex::decode( + contract_json + .get("deployedBytecode") + .expect(ESSENTIAL) + .get("object") + .expect(ESSENTIAL) + .as_str() + .expect(ESSENTIAL) + .trim_start_matches("0x"), + ) + .map_err(|e| { + println!( + "Error: Failed decoding deployed contract code {}. Error: {}", + contract_name, e, + ) + })?; + + Ok((code, deployed)) + }) + .map(|(code, deployed)| { + // NOTE: There are some overlapping contract names in the LP codebase atm, but + // non that we care about for now. If we do care, we need to have some + // prefix or sort here. + // + // For now: Use latest contract. + contracts.insert(contract_name, ContractInfo::new(contract, code, deployed)); + }); + }); + }); + + contracts +} + +pub fn receipt_ok(receipt: ReceiptV3) -> bool { + let inner = match receipt { + ReceiptV3::Legacy(inner) | ReceiptV3::EIP1559(inner) | ReceiptV3::EIP2930(inner) => inner, + }; + + inner.status_code == 1 +} + +pub fn mint_balance_into_derived_account(address: impl AsRef<[u8]>, balance: u128) { + let chain_id = pallet_evm_chain_id::Pallet::::get(); + let derived_account = + AccountConverter::convert_evm_address(chain_id, vec_to_fixed_array(address)); + pallet_balances::Pallet::::mint_into(&derived_account.into(), balance) + .expect("Minting into derived EVM accounf failed."); +} + +pub fn deploy_contract(address: impl AsRef<[u8]> + Clone, code: Vec) -> H160 { + let transaction_create_cost = ::config().gas_transaction_create; + let (base_fee, _) = ::FeeCalculator::min_gas_price(); + + pallet_evm::Pallet::::create( + T::RuntimeOriginExt::root(), + H160::from(vec_to_fixed_array(address)), + code, + sp_core::U256::from(0), + transaction_create_cost * 10, + sp_core::U256::from(base_fee + 10), + None, + None, + Vec::new(), + ) + .unwrap(); + + match frame_system::Pallet::::events() + .pop() + .expect("Event is deposited lastly there if create does not fail.") + .event + .try_into() + .map_err(|_| ()) + .expect("Last event is coming from pallet-evm") + { + pallet_evm::Event::::Created { address } => H160::from(address.0), + _ => panic!("Last event is Created event. qed"), + } +} diff --git a/runtime/integration-tests/src/generic/utils/genesis.rs b/runtime/integration-tests/src/generic/utils/genesis.rs index 4f6e306f7d..6a656b872a 100644 --- a/runtime/integration-tests/src/generic/utils/genesis.rs +++ b/runtime/integration-tests/src/generic/utils/genesis.rs @@ -29,28 +29,35 @@ impl Genesis { } pub fn balances(balance: Balance) -> impl BuildStorage { - pallet_balances::GenesisConfig:: { - balances: default_accounts() + let mut accounts = Vec::new(); + accounts.extend(default_accounts().into_iter().map(|k| (k.id(), balance))); + accounts.extend( + default_accounts() .into_iter() - .map(|keyring| (keyring.id(), balance)) - .collect(), - } + .map(|k| (k.id_ed25519(), balance)), + ); + + pallet_balances::GenesisConfig:: { balances: accounts } } pub fn tokens(values: Vec<(CurrencyId, Balance)>) -> impl BuildStorage { - orml_tokens::GenesisConfig:: { - balances: default_accounts() + let mut accounts = Vec::new(); + accounts.extend(default_accounts().into_iter().flat_map(|keyring| { + values + .clone() .into_iter() - .map(|keyring| { - values - .clone() - .into_iter() - .map(|(curency_id, balance)| (keyring.id(), curency_id, balance)) - .collect::>() - }) - .flatten() - .collect(), - } + .map(|(curency_id, balance)| (keyring.id(), curency_id, balance)) + .collect::>() + })); + accounts.extend(default_accounts().into_iter().flat_map(|keyring| { + values + .clone() + .into_iter() + .map(|(curency_id, balance)| (keyring.id_ed25519(), curency_id, balance)) + .collect::>() + })); + + orml_tokens::GenesisConfig:: { balances: accounts } } pub fn assets(currency_ids: Vec>) -> impl BuildStorage { @@ -66,7 +73,7 @@ pub fn assets(currency_ids: Vec>) -> impl Buil pub fn council_members(members: Vec) -> impl BuildStorage { pallet_collective::GenesisConfig:: { phantom: Default::default(), - members: members.into_iter().map(|acc| acc.id()).collect(), + members: members.into_iter().map(|acc| acc.id().into()).collect(), } } @@ -82,7 +89,7 @@ pub fn session_keys() -> impl BuildStorage { pallet_session::GenesisConfig:: { keys: default_accounts() .into_iter() - .map(|acc| (acc.id(), acc.id(), T::initialize_session_keys(acc.public()))) + .map(|acc| (acc.id(), acc.id(), T::initialize_session_keys(acc.into()))) .collect(), } } diff --git a/runtime/integration-tests/src/generic/utils/mod.rs b/runtime/integration-tests/src/generic/utils/mod.rs index 9434463aca..992b4916ec 100644 --- a/runtime/integration-tests/src/generic/utils/mod.rs +++ b/runtime/integration-tests/src/generic/utils/mod.rs @@ -10,7 +10,10 @@ pub mod currency; pub mod democracy; +pub mod evm; pub mod genesis; +pub mod pool; +pub mod tokens; pub mod xcm; use cfg_primitives::{AccountId, Balance, CollectionId, ItemId, PoolId, TrancheId}; @@ -18,25 +21,20 @@ use cfg_traits::{investments::TrancheCurrency as _, Seconds, TimeAsSecs}; use cfg_types::{ fixed_point::Ratio, oracles::OracleKey, - permissions::{PermissionScope, PoolRole, Role}, - pools::TrancheMetadata, tokens::{CurrencyId, TrancheCurrency}, }; -use frame_support::{traits::fungible::Mutate, BoundedVec}; use frame_system::RawOrigin; -use pallet_evm::FeeCalculator; use pallet_oracle_collection::types::CollectionInfo; -use pallet_pool_system::tranches::{TrancheInput, TrancheType}; -use runtime_common::{account_conversion::AccountConverter, oracle::Feeder}; -use sp_core::{H160, U256}; -use sp_runtime::{ - traits::{Get, One, StaticLookup}, - Perquintill, -}; +use runtime_common::oracle::Feeder; +use sp_runtime::traits::StaticLookup; -use crate::generic::config::{Runtime, RuntimeKind}; +use crate::{ + generic::{config::Runtime, utils::pool::close_epoch}, + utils::accounts::Keyring, +}; -pub const POOL_MIN_EPOCH_TIME: Seconds = 24; +pub const ESSENTIAL: &str = + "Essential part of the test codebase failed. Assumed infallible under sane circumstances"; pub fn now_secs() -> Seconds { as TimeAsSecs>::now() @@ -53,6 +51,19 @@ where .flatten() } +pub fn last_event() -> E +where + T::RuntimeEventExt: TryInto, +{ + frame_system::Pallet::::events() + .pop() + .unwrap() + .event + .try_into() + .ok() + .unwrap() +} + pub fn give_nft(dest: AccountId, (collection_id, item_id): (CollectionId, ItemId)) { pallet_uniques::Pallet::::force_create( RawOrigin::Root.into(), @@ -93,68 +104,6 @@ pub fn give_tokens(dest: AccountId, currency_id: CurrencyId, amount: .unwrap(); } -pub fn give_pool_role(dest: AccountId, pool_id: PoolId, role: PoolRole) { - pallet_permissions::Pallet::::add( - RawOrigin::Root.into(), - Role::PoolRole(role), - dest, - PermissionScope::Pool(pool_id), - Role::PoolRole(role), - ) - .unwrap(); -} - -pub fn create_empty_pool(admin: AccountId, pool_id: PoolId, currency_id: CurrencyId) { - pallet_pool_registry::Pallet::::register( - match T::KIND { - RuntimeKind::Development => RawOrigin::Signed(admin.clone()).into(), - _ => RawOrigin::Root.into(), - }, - admin, - pool_id, - vec![ - TrancheInput { - tranche_type: TrancheType::Residual, - seniority: None, - metadata: TrancheMetadata { - token_name: BoundedVec::default(), - token_symbol: BoundedVec::default(), - }, - }, - TrancheInput { - tranche_type: TrancheType::NonResidual { - interest_rate_per_sec: One::one(), - min_risk_buffer: Perquintill::from_percent(0), - }, - seniority: None, - metadata: TrancheMetadata { - token_name: BoundedVec::default(), - token_symbol: BoundedVec::default(), - }, - }, - ], - currency_id, - Balance::MAX, - None, - BoundedVec::default(), - vec![], - ) - .unwrap(); - - // In order to later close the epoch fastly, - // we mofify here that requirement to significalty reduce the testing time. - // The only way to do it is breaking the integration tests rules mutating - // this state directly. - pallet_pool_system::Pool::::mutate(pool_id, |pool| { - pool.as_mut().unwrap().parameters.min_epoch_time = POOL_MIN_EPOCH_TIME; - }); -} - -pub fn close_pool_epoch(admin: AccountId, pool_id: PoolId) { - pallet_pool_system::Pallet::::close_epoch(RawOrigin::Signed(admin.clone()).into(), pool_id) - .unwrap(); -} - pub fn invest( investor: AccountId, pool_id: PoolId, @@ -207,6 +156,18 @@ pub fn collect_redemptions( .unwrap(); } +pub fn invest_and_collect( + investor: AccountId, + admin: Keyring, + pool_id: PoolId, + tranche_id: TrancheId, + amount: Balance, +) { + invest::(investor.clone(), pool_id, tranche_id, amount); + close_epoch::(admin.into(), pool_id); + collect_investments::(investor, pool_id, tranche_id); +} + pub fn last_change_id() -> T::Hash { find_event::(|e| match e { pallet_pool_system::Event::::ProposedChange { change_id, .. } => Some(change_id), @@ -216,8 +177,18 @@ pub fn last_change_id() -> T::Hash { } pub mod oracle { + use frame_support::traits::OriginTrait; + use super::*; + pub fn set_order_book_feeder(origin: T::RuntimeOriginExt) { + pallet_order_book::Pallet::::set_market_feeder( + T::RuntimeOriginExt::root(), + Feeder(origin.into_caller()), + ) + .unwrap() + } + pub fn feed_from_root(key: OracleKey, value: Ratio) { pallet_oracle_feed::Pallet::::feed(RawOrigin::Root.into(), key, value).unwrap(); } @@ -255,46 +226,3 @@ pub mod oracle { .unwrap(); } } - -pub mod evm { - use super::*; - - pub fn mint_balance_into_derived_account( - address: H160, - balance: Balance, - ) -> Balance { - let chain_id = pallet_evm_chain_id::Pallet::::get(); - let derived_account = - AccountConverter::convert_evm_address(chain_id, address.to_fixed_bytes()); - - pallet_balances::Pallet::::mint_into(&derived_account.into(), balance).unwrap() - } - - pub fn deploy_contract(address: H160, code: Vec) -> H160 { - let chain_id = pallet_evm_chain_id::Pallet::::get(); - let derived_address = - AccountConverter::convert_evm_address(chain_id, address.to_fixed_bytes()); - - let transaction_create_cost = T::config().gas_transaction_create; - let (base_fee, _) = T::FeeCalculator::min_gas_price(); - - pallet_evm::Pallet::::create( - RawOrigin::from(Some(derived_address)).into(), - address, - code, - U256::from(0), - transaction_create_cost * 10, - U256::from(base_fee + 10), - None, - None, - Vec::new(), - ) - .unwrap(); - - // returns the contract address - pallet_evm::AccountCodes::::iter() - .find(|(_address, code)| code.len() > 0) - .unwrap() - .0 - } -} diff --git a/runtime/integration-tests/src/generic/utils/pool.rs b/runtime/integration-tests/src/generic/utils/pool.rs new file mode 100644 index 0000000000..f22f10fe8d --- /dev/null +++ b/runtime/integration-tests/src/generic/utils/pool.rs @@ -0,0 +1,142 @@ +// Copyright 2023 Centrifuge Foundation (centrifuge.io). +// +// This file is part of the Centrifuge chain project. +// Centrifuge is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version (see http://www.gnu.org/licenses). +// Centrifuge is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +use cfg_primitives::{AccountId, Balance, PoolId, TrancheId}; +use cfg_traits::Seconds; +use cfg_types::{ + fixed_point::Rate, + permissions::{PermissionScope, PoolRole, Role}, + pools::TrancheMetadata, + tokens::CurrencyId, +}; +use frame_support::{dispatch::RawOrigin, BoundedVec}; +use pallet_pool_system::tranches::{TrancheInput, TrancheType}; +use sp_runtime::{ + traits::{CheckedAdd, One}, + FixedPointNumber, FixedPointOperand, Perquintill, +}; + +use crate::generic::config::{Runtime, RuntimeKind}; + +pub const POOL_MIN_EPOCH_TIME: Seconds = 24; + +pub fn currency(pool_id: T::PoolId) -> T::CurrencyId { + pallet_pool_system::Pool::::get(pool_id) + .expect("Pool does not exist") + .currency +} + +pub fn give_role(dest: AccountId, pool_id: PoolId, role: PoolRole) { + pallet_permissions::Pallet::::add( + RawOrigin::Root.into(), + Role::PoolRole(role), + dest, + PermissionScope::Pool(pool_id), + Role::PoolRole(role), + ) + .unwrap(); +} + +pub fn create_empty(admin: AccountId, pool_id: PoolId, currency_id: CurrencyId) { + create::( + admin, + pool_id, + currency_id, + [(Rate::one(), Perquintill::zero())], + ) +} + +pub fn interest_rate(percent: P) -> Rate { + Rate::one() + .checked_add(&Rate::checked_from_rational(percent, 100).unwrap()) + .unwrap() +} + +pub fn create_two_tranched(admin: AccountId, pool_id: PoolId, currency_id: CurrencyId) { + create::( + admin, + pool_id, + currency_id, + [(interest_rate(5), Perquintill::zero())], + ) +} + +pub fn create_one_tranched(admin: AccountId, pool_id: PoolId, currency_id: CurrencyId) { + create::(admin, pool_id, currency_id, []) +} + +pub fn create( + admin: AccountId, + pool_id: PoolId, + currency_id: CurrencyId, + non_residual_tranches: impl IntoIterator, +) { + let mut tranches = vec![TrancheInput:: { + tranche_type: TrancheType::Residual, + seniority: None, + metadata: TrancheMetadata { + token_name: BoundedVec::default(), + token_symbol: BoundedVec::default(), + }, + }]; + + tranches.extend(non_residual_tranches.into_iter().map( + |(interest_rate_per_sec, min_risk_buffer)| TrancheInput { + tranche_type: TrancheType::NonResidual { + interest_rate_per_sec, + min_risk_buffer, + }, + seniority: None, + metadata: TrancheMetadata { + token_name: BoundedVec::default(), + token_symbol: BoundedVec::default(), + }, + }, + )); + + pallet_pool_registry::Pallet::::register( + match T::KIND { + RuntimeKind::Development => RawOrigin::Signed(admin.clone()).into(), + _ => RawOrigin::Root.into(), + }, + admin, + pool_id, + tranches, + currency_id, + Balance::MAX, + None, + BoundedVec::default(), + vec![], + ) + .unwrap(); + + // In order to later close the epoch fastly, + // we mofify here that requirement to significalty reduce the testing time. + // The only way to do it is breaking the integration tests rules mutating + // this state directly. + pallet_pool_system::Pool::::mutate(pool_id, |pool| { + pool.as_mut().unwrap().parameters.min_epoch_time = POOL_MIN_EPOCH_TIME; + }); +} + +pub fn close_epoch(admin: AccountId, pool_id: PoolId) { + pallet_pool_system::Pallet::::close_epoch(RawOrigin::Signed(admin.clone()).into(), pool_id) + .unwrap(); +} + +pub fn get_tranche_ids(pool_id: PoolId) -> Vec { + pallet_pool_system::Pool::::get(pool_id) + .unwrap() + .tranches + .ids + .into_inner() +} diff --git a/runtime/integration-tests/src/generic/utils/tokens.rs b/runtime/integration-tests/src/generic/utils/tokens.rs new file mode 100644 index 0000000000..8ea7ab93d2 --- /dev/null +++ b/runtime/integration-tests/src/generic/utils/tokens.rs @@ -0,0 +1,43 @@ +// Copyright 2021 Centrifuge Foundation (centrifuge.io). +// +// This file is part of the Centrifuge chain project. +// Centrifuge is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version (see http://www.gnu.org/licenses). +// Centrifuge is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +//! Time balances and tokens +use cfg_primitives::Balance; +use cfg_types::tokens::CurrencyId; +use frame_support::traits::{fungible::Mutate as _, fungibles::Mutate as _}; + +use crate::{generic::config::Runtime, utils::accounts::default_accounts}; + +pub fn evm_balances(balance: Balance) { + let mut accounts = Vec::new(); + accounts.extend( + default_accounts() + .into_iter() + .map(|k| pallet_balances::Pallet::::mint_into(&k.id_ecdsa::(), balance)), + ); +} + +pub fn evm_tokens(values: Vec<(CurrencyId, Balance)>) { + default_accounts().into_iter().for_each(|keyring| { + values + .clone() + .into_iter() + .for_each(|(curency_id, balance)| { + let _ = orml_tokens::Pallet::::mint_into( + curency_id, + &keyring.id_ecdsa::(), + balance, + ) + .expect("Failed minting tokens into EVM default wallets"); + }); + }); +} diff --git a/runtime/integration-tests/src/utils/accounts.rs b/runtime/integration-tests/src/utils/accounts.rs index 0b38d5f9de..46f28d84b8 100644 --- a/runtime/integration-tests/src/utils/accounts.rs +++ b/runtime/integration-tests/src/utils/accounts.rs @@ -10,10 +10,11 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -use sp_core::{ - sr25519::{Pair, Public, Signature}, - Pair as PairT, -}; +// NOTE: Taken mostly from paritytech-substrate + +use ethabi::ethereum_types::{H160, H256}; +use frame_support::traits::OriginTrait; +use sp_core::{ecdsa, ed25519, sr25519, Hasher, Pair as PairT}; use sp_runtime::AccountId32; /// Set of test accounts. @@ -31,38 +32,66 @@ pub enum Keyring { } impl Keyring { - pub fn to_account_id(self) -> AccountId32 { - self.public().0.into() + pub fn id(self) -> AccountId32 { + let pair: sr25519::Pair = self.into(); + pair.public().into() } - /// Shorter alias for `to_account_id()` - pub fn id(self) -> AccountId32 { - self.to_account_id() + pub fn id_ed25519(self) -> AccountId32 { + let pair: ed25519::Pair = self.into(); + pair.public().into() } - pub fn sign(self, msg: &[u8]) -> Signature { - Pair::from(self).sign(msg) + /// NOTE: Needs to be executed in an externalities environment + pub fn id_ecdsa(self) -> AccountId32 { + runtime_common::account_conversion::AccountConverter::into_account_id::(self.into()) } - pub fn pair(self) -> Pair { - let path = match self { - Keyring::Admin => "Admin".to_owned(), - Keyring::TrancheInvestor(tranche_index) => format!("Tranche{tranche_index}"), - Keyring::Alice => "Alice".to_owned(), - Keyring::Bob => "Bob".to_owned(), - Keyring::Charlie => "Charlie".to_owned(), - Keyring::Dave => "Dave".to_owned(), - Keyring::Eve => "Eve".to_owned(), - Keyring::Ferdie => "Ferdie".to_owned(), - Keyring::Custom(derivation_path) => derivation_path.to_owned(), - }; + pub fn as_multi(self) -> sp_runtime::MultiSigner { + let pair: sr25519::Pair = self.into(); + pair.public().into() + } - Pair::from_string(&format!("//{}", path.as_str()), None) - .expect("static values are known good; qed") + pub fn as_multi_ed25519(self) -> sp_runtime::MultiSigner { + let pair: ed25519::Pair = self.into(); + pair.public().into() } - pub fn public(self) -> Public { - self.pair().public() + pub fn as_multi_ecdsa(self) -> sp_runtime::MultiSigner { + let pair: ecdsa::Pair = self.into(); + pair.public().into() + } + + pub fn sign(self, msg: &[u8]) -> sr25519::Signature { + let pair: sr25519::Pair = self.into(); + pair.sign(msg) + } + + pub fn sign_ed25519(self, msg: &[u8]) -> ed25519::Signature { + let pair: ed25519::Pair = self.into(); + pair.sign(msg) + } + + pub fn sign_ecdsa(self, msg: &[u8]) -> ecdsa::Signature { + let pair: ecdsa::Pair = self.into(); + pair.sign(msg) + } + + pub fn as_origin>(self) -> T { + OriginTrait::signed(self.id()) + } + + pub fn as_origin_ed25519>(self) -> T { + OriginTrait::signed(self.id_ed25519()) + } + + pub fn as_origin_ecdsa< + R: pallet_evm_chain_id::Config, + T: OriginTrait, + >( + self, + ) -> T { + OriginTrait::signed(self.id_ecdsa::()) } pub fn to_seed(self) -> String { @@ -79,21 +108,34 @@ impl Keyring { }; format!("//{}", path.as_str()) } +} - /// Create a crypto `Pair` from a numeric value. - pub fn numeric(idx: usize) -> Pair { - Pair::from_string(&format!("//{}", idx), None).expect("numeric values are known good; qed") +impl From for AccountId32 { + fn from(value: Keyring) -> Self { + value.id() } +} - /// Get account id of a `numeric` account. - pub fn numeric_id(idx: usize) -> AccountId32 { - (*Self::numeric(idx).public().as_array_ref()).into() +impl From for [u8; 32] { + fn from(value: Keyring) -> Self { + value.id().into() } } -impl From for sp_runtime::MultiSigner { - fn from(x: Keyring) -> Self { - sp_runtime::MultiSigner::Sr25519(x.into()) +impl From for H160 { + fn from(value: Keyring) -> Self { + H160::from(H256::from( + sp_core::KeccakHasher::hash(&Into::::into(value).public().as_ref()).0, + )) + } +} + +impl From for [u8; 20] { + fn from(value: Keyring) -> Self { + sp_core::H160::from(sp_core::H256::from(sp_core::KeccakHasher::hash( + &Into::::into(value).public().as_ref(), + ))) + .0 } } @@ -103,9 +145,44 @@ impl From for sp_runtime::MultiAddress { } } +impl From for sr25519::Public { + fn from(k: Keyring) -> Self { + Into::::into(k).public() + } +} + +impl From for sr25519::Pair { + fn from(k: Keyring) -> Self { + sr25519::Pair::from_string(&k.to_seed(), None).expect("static values are known good; qed") + } +} + +impl From for ed25519::Public { + fn from(k: Keyring) -> Self { + Into::::into(k).public() + } +} + +impl From for ed25519::Pair { + fn from(k: Keyring) -> Self { + ed25519::Pair::from_string(&k.to_seed(), None).expect("static values are known good; qed") + } +} + +impl From for ecdsa::Public { + fn from(k: Keyring) -> Self { + Into::::into(k).public() + } +} + +impl From for ecdsa::Pair { + fn from(k: Keyring) -> Self { + ecdsa::Pair::from_string(&k.to_seed(), None).expect("static values are known good; qed") + } +} + #[derive(Debug)] pub struct ParseKeyringError; - impl std::fmt::Display for ParseKeyringError { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "ParseKeyringError") @@ -149,30 +226,6 @@ pub fn default_investors() -> Vec { (0..=50).map(Keyring::TrancheInvestor).collect() } -impl From for AccountId32 { - fn from(k: Keyring) -> Self { - k.to_account_id() - } -} - -impl From for Public { - fn from(k: Keyring) -> Self { - k.pair().public() - } -} - -impl From for Pair { - fn from(k: Keyring) -> Self { - k.pair() - } -} - -impl From for [u8; 32] { - fn from(k: Keyring) -> Self { - k.pair().public().0 - } -} - #[cfg(test)] mod tests { use sp_core::{sr25519::Pair, Pair as PairT}; @@ -184,17 +237,17 @@ mod tests { assert!(Pair::verify( &Keyring::Alice.sign(b"I am Alice!"), b"I am Alice!", - &Keyring::Alice.public(), + &Keyring::Alice.into(), )); assert!(!Pair::verify( &Keyring::Alice.sign(b"I am Alice!"), b"I am Bob!", - &Keyring::Alice.public(), + &Keyring::Alice.into(), )); assert!(!Pair::verify( &Keyring::Alice.sign(b"I am Alice!"), b"I am Alice!", - &Keyring::Bob.public(), + &Keyring::Bob.into(), )); } } diff --git a/runtime/integration-tests/submodules/liquidity-pools b/runtime/integration-tests/submodules/liquidity-pools new file mode 160000 index 0000000000..987cd7d0d5 --- /dev/null +++ b/runtime/integration-tests/submodules/liquidity-pools @@ -0,0 +1 @@ +Subproject commit 987cd7d0d586e21b881dd47b0caabbbde591acb8 From 4363f8bc3afd0ed04ff562587ef069de3fb7eb4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Enrique=20Mu=C3=B1oz=20Mart=C3=ADn?= Date: Mon, 17 Jun 2024 14:24:35 +0200 Subject: [PATCH 16/21] discard non solidity folders (#1876) --- runtime/integration-tests/src/generic/utils/evm.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/runtime/integration-tests/src/generic/utils/evm.rs b/runtime/integration-tests/src/generic/utils/evm.rs index 3a8e50a7e7..9b486e4fec 100644 --- a/runtime/integration-tests/src/generic/utils/evm.rs +++ b/runtime/integration-tests/src/generic/utils/evm.rs @@ -60,6 +60,16 @@ impl ContractInfo { } } +fn is_sol_directory(dir_entry: &std::fs::DirEntry) -> bool { + dir_entry + .path() + .parent() + .expect(ESSENTIAL) + .extension() + .map(|s| s.to_str().expect(ESSENTIAL)) + == Some("sol") +} + fn traversal(path: impl AsRef, files: &mut Vec) { for path in fs::read_dir(path).expect("Submodules directory must exist for integration-tests") { if let Ok(dir_entry) = path.as_ref() { @@ -77,7 +87,9 @@ fn traversal(path: impl AsRef, files: &mut Vec) { .map(|meta| meta.is_file()) .unwrap_or(false) { - files.push(dir_entry.path()) + if is_sol_directory(dir_entry) { + files.push(dir_entry.path()) + } } } } From f750138930ecef02d2c9442f9743b5105ce81618 Mon Sep 17 00:00:00 2001 From: Frederik Gartenmeister Date: Fri, 21 Jun 2024 15:00:00 +0200 Subject: [PATCH 17/21] Chore: Make min epoch time in dev smaller (#1872) * fix: make dev have smaller epoch time * fix: adapt to have no bounds --- runtime/development/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/development/src/lib.rs b/runtime/development/src/lib.rs index 9ee4508765..cc8d52cc88 100644 --- a/runtime/development/src/lib.rs +++ b/runtime/development/src/lib.rs @@ -1099,11 +1099,11 @@ parameter_types! { }; // Defaults for pool parameters - pub const DefaultMinEpochTime: u64 = 5 * SECONDS_PER_MINUTE; // 5 minutes + pub const DefaultMinEpochTime: u64 = 0; // No minimum epoch time pub const DefaultMaxNAVAge: u64 = 1 * SECONDS_PER_MINUTE; // 1 minute // Runtime-defined constraints for pool parameters - pub const MinEpochTimeLowerBound: u64 = 1; // at least 1 second (i.e. do not allow multiple epochs closed in 1 block) + pub const MinEpochTimeLowerBound: u64 = 0; // Allow closing an epoch in the same block as the creation of a pool and also multiple per block if wanted pub const MinEpochTimeUpperBound: u64 = 30 * SECONDS_PER_DAY; // 1 month pub const MaxNAVAgeUpperBound: u64 = SECONDS_PER_HOUR; // 1 hour From 737278c3e5ac42568460e9164d78bbdfa0d60754 Mon Sep 17 00:00:00 2001 From: Cosmin Damian <17934949+cdamian@users.noreply.github.com> Date: Mon, 24 Jun 2024 11:48:28 +0200 Subject: [PATCH 18/21] pallets: Add Anchors V2 pallet (#1878) * pallets: Add Anchors V2 pallet * taplo: Fix * pallet: Fix imports * pallet: Use benchmarking v2, drop AnchorOf * pallet: Drop associated types for document id and version * pallet: Fix and add more tests * docs: Add Anchors V2 pallet to README. * runtime: Add nonce type, fix weight impl. * pallet: Move import * pallet: Remove AnchorIdNonce * fmt: Fix * runtime: Add missing feature, remove extra import --- Cargo.lock | 17 + Cargo.toml | 2 + README.md | 2 + pallets/anchors-v2/Cargo.toml | 52 +++ pallets/anchors-v2/src/benchmarking.rs | 91 +++++ pallets/anchors-v2/src/lib.rs | 232 +++++++++++++ pallets/anchors-v2/src/mock.rs | 62 ++++ pallets/anchors-v2/src/tests.rs | 312 ++++++++++++++++++ pallets/anchors-v2/src/weights.rs | 34 ++ pallets/pool-system/src/mock.rs | 1 - pallets/pool-system/src/pool_types.rs | 3 +- pallets/pool-system/src/tranches.rs | 1 - runtime/common/src/lib.rs | 26 +- runtime/development/Cargo.toml | 4 + runtime/development/src/lib.rs | 17 + runtime/development/src/weights/mod.rs | 1 + .../src/weights/pallet_anchors_v2.rs | 51 +++ .../src/generic/cases/liquidity_pools.rs | 21 +- 18 files changed, 900 insertions(+), 29 deletions(-) create mode 100644 pallets/anchors-v2/Cargo.toml create mode 100644 pallets/anchors-v2/src/benchmarking.rs create mode 100644 pallets/anchors-v2/src/lib.rs create mode 100644 pallets/anchors-v2/src/mock.rs create mode 100644 pallets/anchors-v2/src/tests.rs create mode 100644 pallets/anchors-v2/src/weights.rs create mode 100644 runtime/development/src/weights/pallet_anchors_v2.rs diff --git a/Cargo.lock b/Cargo.lock index 0649571452..18559e03f9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3129,6 +3129,7 @@ dependencies = [ "orml-xcm-support", "orml-xtokens", "pallet-anchors", + "pallet-anchors-v2", "pallet-aura", "pallet-authorship", "pallet-balances", @@ -7382,6 +7383,22 @@ dependencies = [ "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] +[[package]] +name = "pallet-anchors-v2" +version = "1.0.0" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-balances", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", +] + [[package]] name = "pallet-asset-conversion" version = "10.0.0" diff --git a/Cargo.toml b/Cargo.toml index 72ca487ae2..abc49e02e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,7 @@ members = [ "libs/types", "libs/utils", "pallets/anchors", + "pallets/anchors-v2", "pallets/bridge", "pallets/block-rewards", "pallets/collator-allowlist", @@ -219,6 +220,7 @@ substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-s axelar-gateway-precompile = { path = "pallets/liquidity-pools-gateway/axelar-gateway-precompile", default-features = false } liquidity-pools-gateway-routers = { path = "pallets/liquidity-pools-gateway/routers", default-features = false } pallet-anchors = { path = "pallets/anchors", default-features = false } +pallet-anchors-v2 = { path = "pallets/anchors-v2", default-features = false } pallet-block-rewards = { path = "pallets/block-rewards", default-features = false } pallet-bridge = { path = "pallets/bridge", default-features = false } pallet-collator-allowlist = { path = "pallets/collator-allowlist", default-features = false } diff --git a/README.md b/README.md index 66258e0772..93e4959484 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,8 @@ Centrifuge is the infrastructure that facilitates the decentralized financing of On top of the [Substrate FRAME](https://docs.substrate.io/reference/frame-pallets/) framework, Centrifuge Chain is composed of custom pallets which can be found inside the `pallets` folder. The following list gives a brief overview, and links to the corresponding documentation: - [**anchors**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/anchors) ([docs](https://reference.centrifuge.io/pallet_anchors/index.html)): Storing hashes of documents on-chain. The documents are stored in the Private Off-chain Data (POD) node network. +- +- [**anchors-v2**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/anchors-v2) ([docs](https://reference.centrifuge.io/pallet_anchors_v2/index.html)): Second version of the pallet used to store document hashes on-chain. - [**block-rewards**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/block-rewards) ([docs](https://reference.centrifuge.io/pallet_block_rewards/index.html)): Provides means of configuring and distributing block rewards to collators as well as the annual treasury inflation. diff --git a/pallets/anchors-v2/Cargo.toml b/pallets/anchors-v2/Cargo.toml new file mode 100644 index 0000000000..c259105cb3 --- /dev/null +++ b/pallets/anchors-v2/Cargo.toml @@ -0,0 +1,52 @@ +[package] +name = "pallet-anchors-v2" +description = "Anchors V2 pallet for runtime" +version = "1.0.0" +authors.workspace = true +edition.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true +documentation.workspace = true + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] + +[dependencies] +parity-scale-codec = { workspace = true } +scale-info = { workspace = true } + +frame-benchmarking = { workspace = true, optional = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +sp-core = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } + +[dev-dependencies] +pallet-balances = { workspace = true, default-features = true } +sp-core = { workspace = true, default-features = true } +sp-io = { workspace = true, default-features = true } + +[features] +default = ["std"] +std = [ + "parity-scale-codec/std", + "scale-info/std", + "frame-support/std", + "frame-system/std", + "sp-runtime/std", + "sp-std/std", + "frame-benchmarking/std", +] +runtime-benchmarks = [ + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", +] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", + "sp-runtime/try-runtime", +] diff --git a/pallets/anchors-v2/src/benchmarking.rs b/pallets/anchors-v2/src/benchmarking.rs new file mode 100644 index 0000000000..af9eea12ff --- /dev/null +++ b/pallets/anchors-v2/src/benchmarking.rs @@ -0,0 +1,91 @@ +// Copyright 2021 Centrifuge Foundation (centrifuge.io). +// This file is part of Centrifuge chain project. + +// Centrifuge is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version (see http://www.gnu.org/licenses). + +// Centrifuge is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +use frame_benchmarking::{account, impl_benchmark_test_suite, v2::*}; +use frame_support::traits::Currency; +use frame_system::RawOrigin; +use parity_scale_codec::EncodeLike; +use sp_core::H256; + +use super::*; + +#[benchmarks( + where + T: Config, + T::AccountId: EncodeLike<::AccountId>, +)] +mod benchmarks { + use super::*; + + #[benchmark] + fn set_anchor() -> Result<(), BenchmarkError> { + let caller: T::AccountId = account("acc_0", 0, 0); + + let document_id = 123; + let document_version = 456; + let hash = H256::from_low_u64_be(1); + + let _ = T::Currency::deposit_creating( + &caller.clone().into(), + T::Currency::minimum_balance() + T::DefaultAnchorDeposit::get(), + ); + + #[extrinsic_call] + set_anchor( + RawOrigin::Signed(caller), + document_id, + document_version, + hash, + ); + + Ok(()) + } + + #[benchmark] + fn remove_anchor() -> Result<(), BenchmarkError> { + let caller: T::AccountId = account("acc_0", 0, 0); + + let document_id = 123; + let document_version = 456; + let hash = H256::from_low_u64_be(1); + let deposit = AnchorDeposit::::get(); + + let anchor = Anchor:: { + account_id: caller.clone(), + document_id, + document_version, + hash, + deposit, + }; + + Anchors::::insert((document_id, document_version), anchor); + PersonalAnchors::::insert(caller.clone(), (document_id, document_version), ()); + + #[extrinsic_call] + remove_anchor(RawOrigin::Signed(caller), document_id, document_version); + + Ok(()) + } + + #[benchmark] + fn set_deposit_value() -> Result<(), BenchmarkError> { + let deposit = 2 * T::DefaultAnchorDeposit::get(); + + #[extrinsic_call] + set_deposit_value(RawOrigin::Root, deposit); + + Ok(()) + } + + impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Runtime); +} diff --git a/pallets/anchors-v2/src/lib.rs b/pallets/anchors-v2/src/lib.rs new file mode 100644 index 0000000000..d1fe005044 --- /dev/null +++ b/pallets/anchors-v2/src/lib.rs @@ -0,0 +1,232 @@ +// Copyright 2021 Centrifuge Foundation (centrifuge.io). +// This file is part of Centrifuge chain project. + +// Centrifuge is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version (see http://www.gnu.org/licenses). + +// Centrifuge is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +#![cfg_attr(not(feature = "std"), no_std)] + +use frame_support::{pallet_prelude::*, traits::ReservableCurrency}; +use frame_system::pallet_prelude::*; +pub use pallet::*; +use scale_info::TypeInfo; +pub use weights::*; + +#[cfg(feature = "runtime-benchmarks")] +mod benchmarking; +#[cfg(test)] +mod mock; +#[cfg(test)] +mod tests; + +pub mod weights; + +/// Document ID type. +pub type DocumentId = u128; + +/// Document version type. +pub type DocumentVersion = u64; + +#[derive(Encode, Decode, Clone, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[scale_info(skip_type_params(T))] +pub struct Anchor { + account_id: T::AccountId, + document_id: DocumentId, + document_version: DocumentVersion, + hash: T::Hash, + deposit: T::Balance, +} + +#[frame_support::pallet] +pub mod pallet { + use super::*; + + #[pallet::config] + pub trait Config: frame_system::Config { + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + + type Balance: frame_support::traits::tokens::Balance; + + type Currency: ReservableCurrency; + + /// Default deposit that will be taken when adding an anchor. + type DefaultAnchorDeposit: Get; + + /// Origin used when setting a deposit. + type AdminOrigin: EnsureOrigin; + + /// Weight information. + type WeightInfo: WeightInfo; + } + + #[pallet::pallet] + pub struct Pallet(_); + + /// Storage for document anchors. + #[pallet::storage] + #[pallet::getter(fn get_anchor)] + pub type Anchors = + StorageMap<_, Blake2_256, (DocumentId, DocumentVersion), Anchor>; + + /// Storage for document anchors specific to an account. + #[pallet::storage] + #[pallet::getter(fn get_personal_anchor)] + pub type PersonalAnchors = StorageDoubleMap< + _, + Blake2_256, + T::AccountId, + Blake2_256, + (DocumentId, DocumentVersion), + (), + >; + + /// Stores the current deposit that will be taken when storing an anchor. + #[pallet::storage] + #[pallet::getter(fn get_anchor_deposit)] + pub type AnchorDeposit = + StorageValue<_, T::Balance, ValueQuery, T::DefaultAnchorDeposit>; + + #[pallet::event] + #[pallet::generate_deposit(pub (super) fn deposit_event)] + pub enum Event { + /// An anchor was added. + AnchorAdded { + account_id: T::AccountId, + document_id: u128, + document_version: u64, + hash: T::Hash, + deposit: T::Balance, + }, + /// An anchor was removed. + AnchorRemoved { + account_id: T::AccountId, + document_id: u128, + document_version: u64, + hash: T::Hash, + deposit: T::Balance, + }, + /// A deposit was set. + DepositSet { new_deposit: T::Balance }, + } + + #[pallet::error] + pub enum Error { + /// The anchor already exists. + AnchorAlreadyExists, + + /// The personal anchor already exists. + PersonalAnchorAlreadyExists, + + /// The anchor was not found in storage. + AnchorNotFound, + + /// The personal anchor was not found in storage. + PersonalAnchorNotFound, + } + + #[pallet::call] + impl Pallet { + /// Sets an anchor for a document ID and version. + #[pallet::weight(T::WeightInfo::set_anchor())] + #[pallet::call_index(0)] + pub fn set_anchor( + origin: OriginFor, + document_id: u128, + document_version: u64, + hash: T::Hash, + ) -> DispatchResult { + let account_id = ensure_signed(origin)?; + + // Only one anchor should be stored for a particular document ID and version. + ensure!( + Anchors::::get((document_id, document_version)).is_none(), + Error::::AnchorAlreadyExists + ); + ensure!( + PersonalAnchors::::get(account_id.clone(), (document_id, document_version)) + .is_none(), + Error::::PersonalAnchorAlreadyExists + ); + + let deposit = AnchorDeposit::::get(); + + T::Currency::reserve(&account_id, deposit)?; + + let anchor = Anchor:: { + account_id: account_id.clone(), + document_id, + document_version, + hash, + deposit, + }; + + Anchors::::insert((document_id, document_version), anchor); + + PersonalAnchors::::insert(account_id.clone(), (document_id, document_version), ()); + + Self::deposit_event(Event::AnchorAdded { + account_id, + document_id, + document_version, + hash, + deposit, + }); + + Ok(()) + } + + /// Removes an anchor for a document ID and version. + #[pallet::weight(T::WeightInfo::remove_anchor())] + #[pallet::call_index(1)] + pub fn remove_anchor( + origin: OriginFor, + document_id: u128, + document_version: u64, + ) -> DispatchResult { + let account_id = ensure_signed(origin)?; + + ensure!( + PersonalAnchors::::get(account_id.clone(), (document_id, document_version)) + .is_some(), + Error::::PersonalAnchorNotFound + ); + + let anchor = Anchors::::get((document_id, document_version)) + .ok_or(Error::::AnchorNotFound)?; + + T::Currency::unreserve(&account_id, anchor.deposit); + + Anchors::::remove((document_id, document_version)); + PersonalAnchors::::remove(account_id.clone(), (document_id, document_version)); + + Self::deposit_event(Event::AnchorRemoved { + account_id, + document_id, + document_version, + hash: anchor.hash, + deposit: anchor.deposit, + }); + + Ok(()) + } + + /// Set a new anchor deposit. + #[pallet::weight(T::WeightInfo::set_deposit_value())] + #[pallet::call_index(2)] + pub fn set_deposit_value(origin: OriginFor, new_deposit: T::Balance) -> DispatchResult { + T::AdminOrigin::ensure_origin(origin)?; + + >::set(new_deposit); + + Self::deposit_event(Event::DepositSet { new_deposit }); + + Ok(()) + } + } +} diff --git a/pallets/anchors-v2/src/mock.rs b/pallets/anchors-v2/src/mock.rs new file mode 100644 index 0000000000..c23fbc0428 --- /dev/null +++ b/pallets/anchors-v2/src/mock.rs @@ -0,0 +1,62 @@ +// Copyright 2021 Centrifuge Foundation (centrifuge.io). +// This file is part of Centrifuge chain project. + +// Centrifuge is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version (see http://www.gnu.org/licenses). + +// Centrifuge is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +use frame_support::{derive_impl, parameter_types}; +use frame_system::EnsureRoot; +use sp_runtime::traits::ConstU128; + +use crate::{self as pallet_anchors_v2, Config}; + +pub type Balance = u128; + +pub const CURRENCY: Balance = 1_000_000_000_000_000_000; + +frame_support::construct_runtime!( + pub enum Runtime { + System: frame_system, + AnchorsV2: pallet_anchors_v2, + Balances: pallet_balances, + } +); + +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] +impl frame_system::Config for Runtime { + type AccountData = pallet_balances::AccountData; + type Block = frame_system::mocking::MockBlock; +} + +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] +impl pallet_balances::Config for Runtime { + type AccountStore = System; + type Balance = Balance; + type DustRemoval = (); + type ExistentialDeposit = ConstU128<1>; + type RuntimeHoldReason = (); +} + +parameter_types! { + pub const DefaultAnchorDeposit: Balance = 100 * CURRENCY; +} + +impl Config for Runtime { + type AdminOrigin = EnsureRoot; + type Balance = Balance; + type Currency = Balances; + type DefaultAnchorDeposit = DefaultAnchorDeposit; + type RuntimeEvent = RuntimeEvent; + type WeightInfo = (); +} + +pub fn new_test_ext() -> sp_io::TestExternalities { + System::externalities() +} diff --git a/pallets/anchors-v2/src/tests.rs b/pallets/anchors-v2/src/tests.rs new file mode 100644 index 0000000000..23c03c736a --- /dev/null +++ b/pallets/anchors-v2/src/tests.rs @@ -0,0 +1,312 @@ +// Copyright 2021 Centrifuge Foundation (centrifuge.io). +// This file is part of Centrifuge chain project. + +// Centrifuge is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version (see http://www.gnu.org/licenses). + +// Centrifuge is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +use frame_support::{assert_err, assert_ok, dispatch::RawOrigin}; +use pallet_balances::Error::InsufficientBalance; +use sp_runtime::{testing::H256, DispatchError::BadOrigin}; + +use super::*; +use crate::mock::{RuntimeEvent as MockEvent, *}; + +mod set_anchor { + use super::*; + + #[test] + fn success() { + new_test_ext().execute_with(|| { + let origin: u64 = 1; + let document_id = 123; + let document_version = 456; + let hash = H256::random(); + let deposit = AnchorDeposit::::get(); + + let anchor = Anchor:: { + account_id: origin, + document_id, + document_version, + hash, + deposit, + }; + + Balances::force_set_balance(RuntimeOrigin::root(), origin, deposit * 2).unwrap(); + + assert_ok!(AnchorsV2::set_anchor( + RuntimeOrigin::signed(origin), + document_id, + document_version, + hash, + )); + + assert_eq!( + Anchors::::get((document_id, document_version)), + Some(anchor.clone()), + "anchor should be in storage" + ); + assert_eq!( + PersonalAnchors::::get(origin, (document_id, document_version)), + Some(()), + "personal anchor should be in storage" + ); + + event_exists(Event::::AnchorAdded { + account_id: origin, + document_id, + document_version, + hash, + deposit, + }); + + assert_eq!( + Balances::reserved_balance(&origin), + deposit, + "correct amount should be reserved" + ); + }); + } + + #[test] + fn unsigned_origin() { + new_test_ext().execute_with(|| { + let document_id = 123; + let document_version = 456; + let hash = H256::random(); + + assert_err!( + AnchorsV2::set_anchor(RawOrigin::None.into(), document_id, document_version, hash,), + BadOrigin + ); + }); + } + + #[test] + fn anchor_present() { + new_test_ext().execute_with(|| { + let origin: u64 = 1; + let document_id = 123; + let document_version = 456; + let hash = H256::random(); + let deposit = AnchorDeposit::::get(); + + let anchor = Anchor:: { + account_id: origin, + document_id, + document_version, + hash, + deposit, + }; + + Anchors::::insert((document_id, document_version), anchor); + + assert_err!( + AnchorsV2::set_anchor( + RuntimeOrigin::signed(origin), + document_id, + document_version, + hash, + ), + Error::::AnchorAlreadyExists + ); + }); + } + + #[test] + fn personal_anchor_present() { + new_test_ext().execute_with(|| { + let origin: u64 = 1; + let document_id = 123; + let document_version = 456; + let hash = H256::random(); + + PersonalAnchors::::insert(origin, (document_id, document_version), ()); + + assert_err!( + AnchorsV2::set_anchor( + RuntimeOrigin::signed(origin), + document_id, + document_version, + hash, + ), + Error::::PersonalAnchorAlreadyExists + ); + }); + } + + #[test] + fn insufficient_balance() { + new_test_ext().execute_with(|| { + let origin: u64 = 1; + let document_id = 123; + let document_version = 456; + let hash = H256::random(); + + assert_err!( + AnchorsV2::set_anchor( + RuntimeOrigin::signed(origin), + document_id, + document_version, + hash, + ), + InsufficientBalance:: + ); + }); + } +} + +mod remove_anchor { + use super::*; + + #[test] + fn success() { + new_test_ext().execute_with(|| { + let origin: u64 = 1; + let document_id = 123; + let document_version = 456; + let hash = H256::random(); + let deposit = AnchorDeposit::::get(); + + let anchor = Anchor:: { + account_id: origin, + document_id, + document_version, + hash, + deposit, + }; + + Anchors::::insert((document_id, document_version), anchor); + PersonalAnchors::::insert(origin, (document_id, document_version), ()); + + Balances::force_set_balance(RuntimeOrigin::root(), origin, deposit * 2).unwrap(); + assert_ok!(Balances::reserve(&origin, deposit)); + + assert_ok!(AnchorsV2::remove_anchor( + RuntimeOrigin::signed(origin), + document_id, + document_version, + )); + + assert!(Anchors::::get((document_id, document_version)).is_none()); + assert!( + PersonalAnchors::::get(origin, (document_id, document_version)).is_none() + ); + + event_exists(Event::::AnchorRemoved { + account_id: origin, + document_id, + document_version, + hash, + deposit, + }); + + assert_eq!(Balances::reserved_balance(&origin), 0); + }); + } + + #[test] + fn unsigned_origin() { + new_test_ext().execute_with(|| { + let document_id = 123; + let document_version = 456; + + assert_err!( + AnchorsV2::remove_anchor(RawOrigin::None.into(), document_id, document_version), + BadOrigin + ); + }); + } + + #[test] + fn personal_anchor_not_found() { + new_test_ext().execute_with(|| { + let origin: u64 = 1; + let document_id = 123; + let document_version = 456; + + assert_err!( + AnchorsV2::remove_anchor( + RuntimeOrigin::signed(origin), + document_id, + document_version, + ), + Error::::PersonalAnchorNotFound + ); + }); + } + + #[test] + fn anchor_not_found() { + new_test_ext().execute_with(|| { + let origin: u64 = 1; + let document_id = 123; + let document_version = 456; + + PersonalAnchors::::insert(origin, (document_id, document_version), ()); + + assert_err!( + AnchorsV2::remove_anchor( + RuntimeOrigin::signed(origin), + document_id, + document_version, + ), + Error::::AnchorNotFound + ); + }); + } +} + +mod set_deposit { + use super::*; + + #[test] + fn success() { + new_test_ext().execute_with(|| { + let deposit = AnchorDeposit::::get(); + let new_deposit = deposit * 2; + + assert_ok!(AnchorsV2::set_deposit_value( + RuntimeOrigin::root(), + new_deposit + )); + assert_eq!(AnchorDeposit::::get(), new_deposit); + + event_exists(Event::::DepositSet { new_deposit }); + }) + } + + #[test] + fn bad_origin() { + new_test_ext().execute_with(|| { + let new_deposit = 123; + assert_err!( + AnchorsV2::set_deposit_value(RuntimeOrigin::signed(1), new_deposit), + BadOrigin + ); + }) + } +} + +fn event_exists>(e: E) { + let actual: Vec = frame_system::Pallet::::events() + .iter() + .map(|e| e.event.clone()) + .collect(); + + let e: MockEvent = e.into(); + let mut exists = false; + for evt in actual { + if evt == e { + exists = true; + break; + } + } + assert!(exists); +} diff --git a/pallets/anchors-v2/src/weights.rs b/pallets/anchors-v2/src/weights.rs new file mode 100644 index 0000000000..796a57e9fb --- /dev/null +++ b/pallets/anchors-v2/src/weights.rs @@ -0,0 +1,34 @@ +// Copyright 2021 Centrifuge Foundation (centrifuge.io). +// This file is part of Centrifuge chain project. + +// Centrifuge is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version (see http://www.gnu.org/licenses). + +// Centrifuge is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +use frame_support::weights::Weight; + +pub trait WeightInfo { + fn set_anchor() -> Weight; + fn remove_anchor() -> Weight; + fn set_deposit_value() -> Weight; +} + +impl WeightInfo for () { + fn set_anchor() -> Weight { + Weight::zero() + } + + fn remove_anchor() -> Weight { + Weight::zero() + } + + fn set_deposit_value() -> Weight { + Weight::zero() + } +} diff --git a/pallets/pool-system/src/mock.rs b/pallets/pool-system/src/mock.rs index da4ec270df..a385b59856 100644 --- a/pallets/pool-system/src/mock.rs +++ b/pallets/pool-system/src/mock.rs @@ -393,7 +393,6 @@ impl EnsureOriginWithArg for All { #[cfg(feature = "runtime-benchmarks")] fn try_successful_origin(_: &PoolId) -> Result { - use frame_support::dispatch::RawOrigin; Ok(RawOrigin::Root.into()) } } diff --git a/pallets/pool-system/src/pool_types.rs b/pallets/pool-system/src/pool_types.rs index d2a5a4551c..0594d15ab2 100644 --- a/pallets/pool-system/src/pool_types.rs +++ b/pallets/pool-system/src/pool_types.rs @@ -12,6 +12,7 @@ use cfg_traits::Seconds; use cfg_types::{epoch::EpochState, pools::TrancheMetadata}; +pub use changes::PoolChangeProposal; use frame_support::{ dispatch::DispatchResult, pallet_prelude::{DispatchError, RuntimeDebug}, @@ -419,5 +420,3 @@ pub mod changes { pub change: ChangeProposal, } } - -pub use changes::PoolChangeProposal; diff --git a/pallets/pool-system/src/tranches.rs b/pallets/pool-system/src/tranches.rs index afa0a5ebbf..9b7011ca13 100644 --- a/pallets/pool-system/src/tranches.rs +++ b/pallets/pool-system/src/tranches.rs @@ -1724,7 +1724,6 @@ pub mod test { } mod tranche { - use super::*; #[test] diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 56aae05d43..29dd4bd01c 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -15,19 +15,6 @@ #![cfg_attr(not(feature = "std"), no_std)] -pub mod account_conversion; -pub mod apis; -pub mod changes; -pub mod evm; -pub mod fees; -pub mod gateway; -pub mod migrations; -pub mod oracle; -pub mod pool; -pub mod remarks; -pub mod transfer_filter; -pub mod xcm; - use cfg_primitives::Balance; use cfg_types::{ fee_keys::FeeKey, @@ -44,6 +31,19 @@ use sp_runtime::{ }; use sp_std::marker::PhantomData; +pub mod account_conversion; +pub mod apis; +pub mod changes; +pub mod evm; +pub mod fees; +pub mod gateway; +pub mod migrations; +pub mod oracle; +pub mod pool; +pub mod remarks; +pub mod transfer_filter; +pub mod xcm; + pub mod instances { /// The rewards associated to block rewards pub type BlockRewards = pallet_rewards::Instance1; diff --git a/runtime/development/Cargo.toml b/runtime/development/Cargo.toml index 440ee5309c..e5c4c4989e 100644 --- a/runtime/development/Cargo.toml +++ b/runtime/development/Cargo.toml @@ -81,6 +81,7 @@ orml-tokens = { workspace = true } orml-xcm = { workspace = true } orml-xtokens = { workspace = true } pallet-anchors = { workspace = true } +pallet-anchors-v2 = { workspace = true } pallet-aura = { workspace = true } pallet-authorship = { workspace = true } pallet-balances = { workspace = true } @@ -206,6 +207,7 @@ std = [ "orml-xcm/std", "orml-xtokens/std", "pallet-anchors/std", + "pallet-anchors-v2/std", "pallet-aura/std", "pallet-authorship/std", "pallet-balances/std", @@ -294,6 +296,7 @@ runtime-benchmarks = [ "orml-tokens/runtime-benchmarks", "orml-xtokens/runtime-benchmarks", "pallet-anchors/runtime-benchmarks", + "pallet-anchors-v2/runtime-benchmarks", "pallet-balances/runtime-benchmarks", "pallet-block-rewards/runtime-benchmarks", "pallet-bridge/runtime-benchmarks", @@ -374,6 +377,7 @@ try-runtime = [ "orml-xcm/try-runtime", "orml-xtokens/try-runtime", "pallet-anchors/try-runtime", + "pallet-anchors-v2/try-runtime", "pallet-aura/try-runtime", "pallet-authorship/try-runtime", "pallet-balances/try-runtime", diff --git a/runtime/development/src/lib.rs b/runtime/development/src/lib.rs index cc8d52cc88..00bddcbde6 100644 --- a/runtime/development/src/lib.rs +++ b/runtime/development/src/lib.rs @@ -1643,6 +1643,19 @@ impl pallet_keystore::pallet::Config for Runtime { type WeightInfo = weights::pallet_keystore::WeightInfo; } +parameter_types! { + pub const DefaultAnchorDeposit: Balance = 100 * CFG; +} + +impl pallet_anchors_v2::pallet::Config for Runtime { + type AdminOrigin = EnsureRootOr; + type Balance = Balance; + type Currency = Balances; + type DefaultAnchorDeposit = DefaultAnchorDeposit; + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_anchors_v2::WeightInfo; +} + parameter_types! { pub const MaxOutstandingCollects: u32 = 10; } @@ -2128,6 +2141,9 @@ construct_runtime!( OraclePriceFeed: pallet_oracle_feed::{Pallet, Call, Storage, Event} = 118, OraclePriceCollection: pallet_oracle_collection::{Pallet, Call, Storage, Event} = 119, + // our pallets part 2 + AnchorsV2: pallet_anchors_v2::{Pallet, Call, Storage, Event} = 130, + // XCM XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 120, PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Config, Event, Origin} = 121, @@ -2831,6 +2847,7 @@ mod benches { [pallet_preimage, Preimage] [pallet_fees, Fees] [pallet_anchors, Anchor] + [pallet_anchors_v2, AnchorsV2] [pallet_block_rewards, BlockRewards] [pallet_collator_allowlist, CollatorAllowlist] [pallet_collator_selection, CollatorSelection] diff --git a/runtime/development/src/weights/mod.rs b/runtime/development/src/weights/mod.rs index 659c89486d..857944649e 100644 --- a/runtime/development/src/weights/mod.rs +++ b/runtime/development/src/weights/mod.rs @@ -12,6 +12,7 @@ pub mod cumulus_pallet_xcmp_queue; pub mod frame_system; pub mod pallet_anchors; +pub mod pallet_anchors_v2; pub mod pallet_balances; pub mod pallet_block_rewards; pub mod pallet_collator_allowlist; diff --git a/runtime/development/src/weights/pallet_anchors_v2.rs b/runtime/development/src/weights/pallet_anchors_v2.rs new file mode 100644 index 0000000000..78afe2dd5e --- /dev/null +++ b/runtime/development/src/weights/pallet_anchors_v2.rs @@ -0,0 +1,51 @@ + +//! Autogenerated weights for `pallet_anchors_v2` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("centrifuge-local")`, DB CACHE: 1024 + +// Executed Command: +// target/release/centrifuge-chain +// benchmark +// pallet +// --chain=centrifuge-local +// --steps=50 +// --repeat=20 +// --pallet=pallet_anchors_v2 +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=/tmp/runtime/centrifuge/src/weights/pallet_keystore.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_anchors_v2`. +pub struct WeightInfo(PhantomData); +impl pallet_anchors_v2::WeightInfo for WeightInfo { + fn set_anchor() -> Weight { + Weight::from_parts(7_645_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + + fn remove_anchor() -> Weight { + Weight::from_parts(7_645_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + + fn set_deposit_value() -> Weight { + Weight::from_parts(7_645_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/runtime/integration-tests/src/generic/cases/liquidity_pools.rs b/runtime/integration-tests/src/generic/cases/liquidity_pools.rs index 860c1468e4..9383cede21 100644 --- a/runtime/integration-tests/src/generic/cases/liquidity_pools.rs +++ b/runtime/integration-tests/src/generic/cases/liquidity_pools.rs @@ -65,6 +65,7 @@ use staging_xcm::{ }, VersionedAsset, VersionedAssets, VersionedLocation, }; +use utils::*; use crate::{ generic::{ @@ -211,9 +212,9 @@ pub mod utils { } } -use utils::*; - mod development { + use utils::*; + use super::*; pub const GLMR_CURRENCY_ID: CurrencyId = CurrencyId::ForeignAsset(4); @@ -798,8 +799,6 @@ mod development { } } - use utils::*; - mod add_allow_upgrade { use cfg_types::tokens::LiquidityPoolsWrappedToken; @@ -4528,6 +4527,8 @@ mod development { } mod ethereum_xcm { + use utils::*; + use super::*; mod utils { @@ -4667,8 +4668,6 @@ mod development { } } - use utils::*; - const TEST_DOMAIN: Domain = Domain::EVM(1); #[test_runtimes([development])] @@ -4873,11 +4872,12 @@ mod development { mod altair { use altair_runtime::{xcm::CurrencyIdConvert, PoolPalletIndex}; - - pub const KSM_ASSET_ID: CurrencyId = CurrencyId::ForeignAsset(1000); + use utils::*; use super::*; + pub const KSM_ASSET_ID: CurrencyId = CurrencyId::ForeignAsset(1000); + mod utils { use super::*; @@ -4949,8 +4949,6 @@ mod altair { } } - use utils::*; - mod transfers { use super::*; @@ -5845,6 +5843,7 @@ mod altair { mod centrifuge { use centrifuge_runtime::xcm::CurrencyIdConvert; + use utils::*; use super::*; @@ -6120,8 +6119,6 @@ mod centrifuge { } } - use utils::*; - mod asset_registry { use super::*; From ee8fc693eb127e14e38b3bd53d1a964d2df3f5cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Enrique=20Mu=C3=B1oz=20Mart=C3=ADn?= Date: Mon, 24 Jun 2024 20:24:28 +0200 Subject: [PATCH 19/21] IT: Simplify liquidity_pool test module (#1869) * basic xtransfer tests * parachain transfer tested * fix tests * transfer relay tests * polish and minor cleans * fixes * assets tests * currency conversion tests * fix cargo fmt * fix tests * reduce xcm restricted_transfer tests * rename file * restricted ethereum tests simplified and moved to restricted * cleaning warnings * removed re-added tranche tokens tests * remove fudge from proxy tests * minor cleans * fix warnings * decouple PARA_ID and SIBLING_ID from FudgeHandle * revert liquidity-pool changes * William suggestions --- libs/primitives/src/lib.rs | 7 +- libs/types/src/tokens.rs | 17 + runtime/altair/src/xcm.rs | 22 +- runtime/centrifuge/src/xcm.rs | 22 +- runtime/common/src/xcm.rs | 14 +- runtime/development/src/xcm.rs | 21 +- .../src/generic/cases/assets.rs | 54 + .../src/generic/cases/currency_conversions.rs | 100 + .../src/generic/cases/investments.rs | 2 +- .../src/generic/cases/liquidity_pools.rs | 10869 ++++++---------- .../src/generic/cases/loans.rs | 2 +- .../src/generic/cases/lp/mod.rs | 7 +- .../src/generic/cases/lp/transfers.rs | 6 +- .../src/generic/cases/precompile.rs | 2 +- .../src/generic/cases/proxy.rs | 215 +- .../src/generic/cases/restricted_transfers.rs | 459 +- .../src/generic/cases/xcm_transfers.rs | 236 + .../src/generic/envs/fudge_env.rs | 4 +- .../src/generic/envs/fudge_env/handle.rs | 7 +- .../integration-tests/src/generic/impls.rs | 19 +- runtime/integration-tests/src/generic/mod.rs | 3 + .../src/generic/utils/currency.rs | 68 +- .../src/generic/utils/genesis.rs | 86 +- .../src/generic/utils/xcm.rs | 122 +- runtime/integration-tests/src/utils/mod.rs | 70 + 25 files changed, 4838 insertions(+), 7596 deletions(-) create mode 100644 runtime/integration-tests/src/generic/cases/assets.rs create mode 100644 runtime/integration-tests/src/generic/cases/currency_conversions.rs create mode 100644 runtime/integration-tests/src/generic/cases/xcm_transfers.rs diff --git a/libs/primitives/src/lib.rs b/libs/primitives/src/lib.rs index 4bc2b25e6d..cf1ad99966 100644 --- a/libs/primitives/src/lib.rs +++ b/libs/primitives/src/lib.rs @@ -283,6 +283,9 @@ pub mod constants { /// The maximum number of pool fees per pool fee bucket pub const MAX_POOL_FEES_PER_BUCKET: u32 = 100; + + /// Identification of the native token of the chain. Used in XCM locations. + pub const NATIVE_KEY: &[u8] = &[0, 1]; } /// Listing of parachains we integrate with. @@ -301,7 +304,7 @@ pub mod parachains { pub mod altair { pub const ID: u32 = 2088; - pub const AIR_KEY: &[u8] = &[0, 1]; + pub const AIR_KEY: &[u8] = crate::NATIVE_KEY; } } @@ -313,7 +316,7 @@ pub mod parachains { pub mod centrifuge { pub const ID: u32 = 2031; - pub const CFG_KEY: &[u8] = &[0, 1]; + pub const CFG_KEY: &[u8] = crate::NATIVE_KEY; } } diff --git a/libs/types/src/tokens.rs b/libs/types/src/tokens.rs index 1173d55835..77c2737b2a 100644 --- a/libs/types/src/tokens.rs +++ b/libs/types/src/tokens.rs @@ -364,6 +364,23 @@ impl CrossChainTransferability { pub fn includes_liquidity_pools(self) -> bool { matches!(self, Self::LiquidityPools) } + + /// Fees will be charged using `FixedRateOfFungible`. + #[cfg(feature = "std")] + pub fn xcm_default() -> Self { + Self::Xcm(XcmMetadata { + fee_per_second: None, + }) + } + + /// Fees will be charged using `AssetRegistryTrader`. + /// If value is 0, no fees will be charged. + #[cfg(feature = "std")] + pub fn xcm_with_fees(value: Balance) -> Self { + Self::Xcm(XcmMetadata { + fee_per_second: Some(value), + }) + } } /// Liquidity Pools-wrapped tokens diff --git a/runtime/altair/src/xcm.rs b/runtime/altair/src/xcm.rs index ab0c2e231b..379a0606e2 100644 --- a/runtime/altair/src/xcm.rs +++ b/runtime/altair/src/xcm.rs @@ -10,10 +10,7 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -use cfg_primitives::{ - parachains, - types::{EnsureRootOr, HalfOfCouncil}, -}; +use cfg_primitives::types::{EnsureRootOr, HalfOfCouncil}; use cfg_types::tokens::CurrencyId; use frame_support::{ parameter_types, @@ -27,10 +24,9 @@ use pallet_xcm::XcmPassthrough; use runtime_common::{ transfer_filter::PreXcmTransfer, xcm::{ - general_key, AccountIdToLocation, Barrier, FixedConversionRateProvider, + AccountIdToLocation, Barrier, CanonicalNativePerSecond, FixedConversionRateProvider, LocalOriginToLocation, ToTreasury, }, - xcm_fees::native_per_second, }; use sp_core::ConstU32; use staging_xcm::{ @@ -88,25 +84,13 @@ impl staging_xcm_executor::Config for XcmConfig { /// else the xcm executor won't know how to charge fees for a transfer of said /// token. pub type Trader = ( - FixedRateOfFungible>, + FixedRateOfFungible>, AssetRegistryTrader< FixedRateAssetRegistryTrader>, ToTreasury, >, ); -parameter_types! { - // Canonical location: https://github.com/paritytech/polkadot/pull/4470 - pub CanonicalAirPerSecond: (AssetId, u128, u128) = ( - Location::new( - 0, - general_key(parachains::kusama::altair::AIR_KEY) - ).into(), - native_per_second(), - 0, - ); -} - /// Means for transacting the fungibles assets of this parachain. pub type FungiblesTransactor = FungiblesAdapter< // Use this fungibles implementation diff --git a/runtime/centrifuge/src/xcm.rs b/runtime/centrifuge/src/xcm.rs index cd1da395a4..ef74d41fe1 100644 --- a/runtime/centrifuge/src/xcm.rs +++ b/runtime/centrifuge/src/xcm.rs @@ -10,10 +10,7 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -use cfg_primitives::{ - parachains, - types::{EnsureRootOr, HalfOfCouncil}, -}; +use cfg_primitives::types::{EnsureRootOr, HalfOfCouncil}; use cfg_traits::TryConvert; use cfg_types::{tokens::CurrencyId, EVMChainId}; use frame_support::{ @@ -28,10 +25,9 @@ use pallet_xcm::XcmPassthrough; use runtime_common::{ transfer_filter::PreXcmTransfer, xcm::{ - general_key, AccountIdToLocation, Barrier, FixedConversionRateProvider, + AccountIdToLocation, Barrier, CanonicalNativePerSecond, FixedConversionRateProvider, LocalOriginToLocation, LpInstanceRelayer, ToTreasury, }, - xcm_fees::native_per_second, }; use sp_core::ConstU32; use staging_xcm::{ @@ -89,25 +85,13 @@ impl staging_xcm_executor::Config for XcmConfig { /// else the xcm executor won't know how to charge fees for a transfer of said /// token. pub type Trader = ( - FixedRateOfFungible>, + FixedRateOfFungible>, AssetRegistryTrader< FixedRateAssetRegistryTrader>, ToTreasury, >, ); -parameter_types! { - // Canonical location: https://github.com/paritytech/polkadot/pull/4470 - pub CanonicalCfgPerSecond: (AssetId, u128, u128) = ( - Location::new( - 0, - general_key(parachains::polkadot::centrifuge::CFG_KEY), - ).into(), - native_per_second(), - 0, - ); -} - /// Means for transacting the fungibles assets of this parachain. pub type FungiblesTransactor = FungiblesAdapter< // Use this fungibles implementation diff --git a/runtime/common/src/xcm.rs b/runtime/common/src/xcm.rs index 56ab50a56d..dbba874d87 100644 --- a/runtime/common/src/xcm.rs +++ b/runtime/common/src/xcm.rs @@ -36,7 +36,7 @@ use staging_xcm_builder::{ TakeWeightCredit, }; -use crate::xcm_fees::default_per_second; +use crate::xcm_fees::{default_per_second, native_per_second}; /// Our FixedConversionRateProvider, used to charge XCM-related fees for /// tokens registered in the asset registry that were not already handled by @@ -71,6 +71,18 @@ pub fn general_key(data: &[u8]) -> staging_xcm::latest::Junction { } } +frame_support::parameter_types! { + // Canonical location: https://github.com/paritytech/polkadot/pull/4470 + pub CanonicalNativePerSecond: (AssetId, u128, u128) = ( + Location::new( + 0, + general_key(cfg_primitives::NATIVE_KEY), + ).into(), + native_per_second(), + 0, + ); +} + /// How we convert an `[AccountId]` into an XCM Location pub struct AccountIdToLocation; impl> Convert for AccountIdToLocation { diff --git a/runtime/development/src/xcm.rs b/runtime/development/src/xcm.rs index b9efe50bed..ac260246f0 100644 --- a/runtime/development/src/xcm.rs +++ b/runtime/development/src/xcm.rs @@ -9,10 +9,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -use cfg_primitives::{ - parachains, - types::{EnsureRootOr, HalfOfCouncil}, -}; +use cfg_primitives::types::{EnsureRootOr, HalfOfCouncil}; use cfg_traits::TryConvert; use cfg_types::{tokens::CurrencyId, EVMChainId}; use frame_support::{ @@ -27,10 +24,9 @@ use pallet_xcm::XcmPassthrough; use runtime_common::{ transfer_filter::PreXcmTransfer, xcm::{ - general_key, AccountIdToLocation, Barrier, FixedConversionRateProvider, + AccountIdToLocation, Barrier, CanonicalNativePerSecond, FixedConversionRateProvider, LocalOriginToLocation, LpInstanceRelayer, ToTreasury, }, - xcm_fees::native_per_second, }; use sp_core::ConstU32; use staging_xcm::{ @@ -95,19 +91,6 @@ pub type Trader = ( >, ); -parameter_types! { - // Canonical location: https://github.com/paritytech/polkadot/pull/4470 - pub CanonicalNativePerSecond: (AssetId, u128, u128) = ( - Location::new( - 0, - general_key(parachains::kusama::altair::AIR_KEY), - ).into(), - native_per_second(), - 0, - ); - -} - /// Means for transacting the fungibles assets of this parachain. pub type FungiblesTransactor = FungiblesAdapter< // Use this fungibles implementation diff --git a/runtime/integration-tests/src/generic/cases/assets.rs b/runtime/integration-tests/src/generic/cases/assets.rs new file mode 100644 index 0000000000..56cf7e24bd --- /dev/null +++ b/runtime/integration-tests/src/generic/cases/assets.rs @@ -0,0 +1,54 @@ +use cfg_types::tokens::CurrencyId; +use frame_support::{assert_noop, assert_ok, dispatch::RawOrigin}; +use sp_runtime::{DispatchError, DispatchError::BadOrigin}; + +use crate::{ + generic::{ + config::Runtime, env::Env, envs::runtime_env::RuntimeEnv, utils::currency::default_metadata, + }, + utils::orml_asset_registry, +}; + +#[test_runtimes(all)] +fn authority_configured() { + let mut env = RuntimeEnv::::default(); + + env.parachain_state_mut(|| { + assert_ok!(orml_asset_registry::Pallet::::register_asset( + RawOrigin::Root.into(), + default_metadata(), + Some(CurrencyId::Native) + )); + + assert_ok!(orml_asset_registry::Pallet::::register_asset( + RawOrigin::Root.into(), + default_metadata(), + Some(CurrencyId::ForeignAsset(42)) + )); + + assert_noop!( + orml_asset_registry::Pallet::::register_asset( + RawOrigin::Root.into(), + default_metadata(), + Some(CurrencyId::Tranche(42, [1; 16])) + ), + BadOrigin + ); + }); +} + +#[test_runtimes(all)] +fn processor_configured() { + let mut env = RuntimeEnv::::default(); + + env.parachain_state_mut(|| { + assert_noop!( + orml_asset_registry::Pallet::::register_asset( + RawOrigin::Root.into(), + default_metadata(), + None + ), + DispatchError::Other("asset-registry: AssetId is required") + ); + }); +} diff --git a/runtime/integration-tests/src/generic/cases/currency_conversions.rs b/runtime/integration-tests/src/generic/cases/currency_conversions.rs new file mode 100644 index 0000000000..a690165203 --- /dev/null +++ b/runtime/integration-tests/src/generic/cases/currency_conversions.rs @@ -0,0 +1,100 @@ +use cfg_types::tokens::CurrencyId; +use orml_traits::asset_registry::AssetMetadata; +use runtime_common::xcm::CurrencyIdConvert; +use sp_runtime::traits::Convert; +use staging_xcm::{ + v4::{Junction::*, Junctions::Here, Location}, + VersionedLocation, +}; + +use crate::generic::{ + config::Runtime, + env::Env, + envs::runtime_env::RuntimeEnv, + utils::{ + currency::{default_metadata, CurrencyInfo, CustomCurrency}, + genesis::{self, Genesis}, + xcm::transferable_custom, + }, +}; + +const PARA_ID: u32 = 1000; + +#[test_runtimes(all)] +fn convert_transferable_asset() { + // The way the native currency is represented relative to its runtime + let location_inner = Location::new(0, Here); + + // The canonical way the native currency is represented out in the wild + let location_canonical = Location::new(1, Parachain(PARA_ID)); + + let curr = CustomCurrency( + CurrencyId::ForeignAsset(1), + AssetMetadata { + decimals: 18, + location: Some(VersionedLocation::V4(location_canonical.clone())), + additional: transferable_custom(), + ..default_metadata() + }, + ); + + let env = RuntimeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::parachain_id::(PARA_ID)) + .add(genesis::assets::([(curr.id(), curr.metadata())])) + .storage(), + ); + + env.parachain_state(|| { + assert_eq!( + CurrencyIdConvert::::convert(location_inner), + Some(curr.id()), + ); + + assert_eq!( + CurrencyIdConvert::::convert(curr.id()), + Some(location_canonical) + ) + }); +} + +#[test_runtimes(all)] +fn cannot_convert_nontransferable_asset() { + let curr = CustomCurrency( + CurrencyId::ForeignAsset(1), + AssetMetadata { + decimals: 18, + location: Some(VersionedLocation::V4(Location::new(1, Parachain(PARA_ID)))), + additional: Default::default(), // <- Not configured for transfers + ..default_metadata() + }, + ); + + let env = RuntimeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::parachain_id::(PARA_ID)) + .add(genesis::assets::([(curr.id(), curr.metadata())])) + .storage(), + ); + + env.parachain_state(|| { + assert_eq!( + CurrencyIdConvert::::convert(Location::new(0, Here)), + Some(curr.id()), + ); + + assert_eq!(CurrencyIdConvert::::convert(curr.id()), None); + }); +} + +#[test_runtimes(all)] +fn convert_unknown_location() { + let env = RuntimeEnv::::default(); + + env.parachain_state(|| { + assert_eq!( + CurrencyIdConvert::::convert(Location::new(0, Here)), + None, + ); + }); +} diff --git a/runtime/integration-tests/src/generic/cases/investments.rs b/runtime/integration-tests/src/generic/cases/investments.rs index 644f386145..3f2869ff3e 100644 --- a/runtime/integration-tests/src/generic/cases/investments.rs +++ b/runtime/integration-tests/src/generic/cases/investments.rs @@ -43,7 +43,7 @@ mod common { .add(genesis::balances::( T::ExistentialDeposit::get() + FOR_FEES, )) - .add(genesis::assets::(vec![Box::new(Usd6)])) + .add(genesis::assets::(vec![(Usd6.id(), &Usd6.metadata())])) .add(genesis::tokens::(vec![(Usd6.id(), Usd6.ed())])) .storage(), ); diff --git a/runtime/integration-tests/src/generic/cases/liquidity_pools.rs b/runtime/integration-tests/src/generic/cases/liquidity_pools.rs index 9383cede21..19985385f8 100644 --- a/runtime/integration-tests/src/generic/cases/liquidity_pools.rs +++ b/runtime/integration-tests/src/generic/cases/liquidity_pools.rs @@ -10,14 +10,11 @@ use cfg_types::{ domain_address::{Domain, DomainAddress}, fixed_point::{Quantity, Ratio}, investments::{InvestCollection, InvestmentAccount, RedeemCollection}, - locations::RestrictedTransferLocation, orders::FulfillmentWithPrice, permissions::{PermissionScope, PoolRole, Role}, pools::TrancheMetadata, tokens::{AssetMetadata, CrossChainTransferability, CurrencyId, CustomMetadata}, - xcm::XcmMetadata, }; -use cfg_utils::vec_to_fixed_array; use frame_support::{ assert_noop, assert_ok, dispatch::RawOrigin, @@ -35,54 +32,34 @@ use pallet_investments::CollectOutcome; use pallet_liquidity_pools::Message; use pallet_liquidity_pools_gateway::{Call as LiquidityPoolsGatewayCall, GatewayOrigin}; use pallet_pool_system::tranches::{TrancheInput, TrancheLoc, TrancheType}; -use parity_scale_codec::Encode; use polkadot_core_primitives::BlakeTwo256; -use polkadot_parachain_primitives::primitives::{Id, ValidationCode}; -use polkadot_runtime_parachains::{ - paras, - paras::{ParaGenesisArgs, ParaKind}, -}; use runtime_common::{ - account_conversion::AccountConverter, - foreign_investments::IdentityPoolCurrencyConverter, + account_conversion::AccountConverter, foreign_investments::IdentityPoolCurrencyConverter, xcm::general_key, - xcm_fees::{default_per_second, ksm_per_second}, }; use sp_core::{Get, H160, U256}; use sp_runtime::{ - traits::{ - AccountIdConversion, BadOrigin, ConstU32, Convert as C1, Convert as C2, EnsureAdd, Hash, - One, StaticLookup, Zero, - }, - BoundedVec, BuildStorage, DispatchError, FixedPointNumber, Perquintill, SaturatedConversion, - WeakBoundedVec, + traits::{AccountIdConversion, BadOrigin, ConstU32, Convert, EnsureAdd, Hash, One, Zero}, + BoundedVec, DispatchError, FixedPointNumber, Perquintill, SaturatedConversion, }; use staging_xcm::{ - prelude::XCM_VERSION, - v4::{ - Asset, AssetId, Assets, Fungibility, Junction, Junction::*, Junctions, Junctions::*, - Location, NetworkId, WeightLimit, - }, - VersionedAsset, VersionedAssets, VersionedLocation, + v4::{Junction, Junction::*, Location, NetworkId}, + VersionedLocation, }; -use utils::*; use crate::{ generic::{ config::Runtime, env::{Blocks, Env}, - envs::fudge_env::{handle::FudgeHandle, FudgeEnv, FudgeRelayRuntime, FudgeSupport}, - utils::{democracy::execute_via_democracy, genesis, genesis::Genesis, xcm::setup_xcm}, + envs::fudge_env::{handle::SIBLING_ID, FudgeEnv, FudgeSupport}, + utils::{ + democracy::execute_via_democracy, genesis, genesis::Genesis, + xcm::enable_para_to_sibling_communication, + }, }, - utils::accounts::Keyring, + utils::{accounts::Keyring, orml_asset_registry}, }; -mod orml_asset_registry { - // orml_asset_registry has remove the reexport of all pallet stuff, - // we reexport it again here - pub use orml_asset_registry::module::*; -} - /// The AUSD asset id pub const AUSD_CURRENCY_ID: CurrencyId = CurrencyId::ForeignAsset(3); /// The USDT asset id @@ -91,50 +68,35 @@ pub const USDT_CURRENCY_ID: CurrencyId = CurrencyId::ForeignAsset(1); pub const AUSD_ED: Balance = 1_000_000_000; pub const USDT_ED: Balance = 10_000; -pub mod utils { - use super::*; - - pub fn parachain_account(id: u32) -> AccountId { - polkadot_parachain_primitives::primitives::Sibling::from(id).into_account_truncating() - } - - pub fn xcm_metadata(transferability: CrossChainTransferability) -> Option { - match transferability { - CrossChainTransferability::Xcm(x) => Some(x), - _ => None, - } - } - - pub fn setup_usdc_xcm(env: &mut FudgeEnv) { - env.parachain_state_mut(|| { - // Set the XCM version used when sending XCM messages to USDC parachain. - assert_ok!(pallet_xcm::Pallet::::force_xcm_version( - ::RuntimeOrigin::root(), - Box::new(Location::new(1, Junction::Parachain(1000))), - XCM_VERSION, - )); - }); - - env.relay_state_mut(|| { - assert_ok!(polkadot_runtime_parachains::hrmp::Pallet::< - FudgeRelayRuntime, - >::force_open_hrmp_channel( - as frame_system::Config>::RuntimeOrigin::root(), - Id::from(T::FudgeHandle::PARA_ID), - Id::from(1000), - 10, - 1024, - )); +pub const GLMR_CURRENCY_ID: CurrencyId = CurrencyId::ForeignAsset(4); +pub const GLMR_ED: Balance = 1_000_000; +pub const DEFAULT_BALANCE_GLMR: Balance = 10_000_000_000_000_000_000; +pub const POOL_ADMIN: Keyring = Keyring::Bob; +pub const POOL_ID: PoolId = 42; +pub const MOONBEAM_EVM_CHAIN_ID: u64 = 1284; +pub const DEFAULT_EVM_ADDRESS_MOONBEAM: [u8; 20] = [99; 20]; +pub const DEFAULT_VALIDITY: Seconds = 2555583502; +pub const DOMAIN_MOONBEAM: Domain = Domain::EVM(MOONBEAM_EVM_CHAIN_ID); +pub const DEFAULT_DOMAIN_ADDRESS_MOONBEAM: DomainAddress = + DomainAddress::EVM(MOONBEAM_EVM_CHAIN_ID, DEFAULT_EVM_ADDRESS_MOONBEAM); +pub const DEFAULT_OTHER_DOMAIN_ADDRESS: DomainAddress = + DomainAddress::EVM(MOONBEAM_EVM_CHAIN_ID, [0; 20]); + +pub type LiquidityPoolMessage = Message; + +mod utils { + use cfg_types::oracles::OracleKey; + use frame_support::weights::Weight; + use runtime_common::oracle::Feeder; - assert_ok!(polkadot_runtime_parachains::hrmp::Pallet::< - FudgeRelayRuntime, - >::force_process_hrmp_open( - as frame_system::Config>::RuntimeOrigin::root(), - 2, - )); - }); + use super::*; - env.pass(Blocks::ByNumber(1)); + /// Creates a new pool for the given id with + /// * BOB as admin and depositor + /// * Two tranches + /// * AUSD as pool currency with max reserve 10k. + pub fn create_ausd_pool(pool_id: u64) { + create_currency_pool::(pool_id, AUSD_CURRENCY_ID, decimals(currency_decimals::AUSD)) } pub fn register_ausd() { @@ -146,7 +108,7 @@ pub mod utils { location: Some(VersionedLocation::V4(Location::new( 1, [ - Parachain(T::FudgeHandle::SIBLING_ID), + Parachain(SIBLING_ID), general_key(parachains::kusama::karura::AUSD_KEY), ], ))), @@ -164,38 +126,14 @@ pub mod utils { )); } - pub fn ausd(amount: Balance) -> Balance { - amount * decimals(currency_decimals::AUSD) - } - - pub fn ausd_fee() -> Balance { - fee(currency_decimals::AUSD) - } - pub fn cfg(amount: Balance) -> Balance { amount * decimals(currency_decimals::NATIVE) } - pub fn cfg_fee() -> Balance { - fee(currency_decimals::NATIVE) - } - pub fn decimals(decimals: u32) -> Balance { 10u128.saturating_pow(decimals) } - pub fn fee(decimals: u32) -> Balance { - calc_fee(default_per_second(decimals)) - } - - pub fn calc_fee(fee_per_second: Balance) -> Balance { - // We divide the fee to align its unit and multiply by 4 as that seems to be the - // unit of time the tests take. - // NOTE: it is possible that in different machines this value may differ. We - // shall see. - fee_per_second.div_euclid(10_000) * 8 - } - pub fn set_domain_router_call( domain: Domain, router: DomainRouter, @@ -210,63 +148,26 @@ pub mod utils { pub fn remove_instance_call(instance: DomainAddress) -> T::RuntimeCallExt { LiquidityPoolsGatewayCall::remove_instance { instance }.into() } -} - -mod development { - use utils::*; - - use super::*; - - pub const GLMR_CURRENCY_ID: CurrencyId = CurrencyId::ForeignAsset(4); - pub const GLMR_ED: Balance = 1_000_000; - pub const DEFAULT_BALANCE_GLMR: Balance = 10_000_000_000_000_000_000; - pub const POOL_ADMIN: Keyring = Keyring::Bob; - pub const POOL_ID: PoolId = 42; - pub const MOONBEAM_EVM_CHAIN_ID: u64 = 1284; - pub const DEFAULT_EVM_ADDRESS_MOONBEAM: [u8; 20] = [99; 20]; - pub const DEFAULT_VALIDITY: Seconds = 2555583502; - pub const DOMAIN_MOONBEAM: Domain = Domain::EVM(MOONBEAM_EVM_CHAIN_ID); - pub const DEFAULT_DOMAIN_ADDRESS_MOONBEAM: DomainAddress = - DomainAddress::EVM(MOONBEAM_EVM_CHAIN_ID, DEFAULT_EVM_ADDRESS_MOONBEAM); - pub const DEFAULT_OTHER_DOMAIN_ADDRESS: DomainAddress = - DomainAddress::EVM(MOONBEAM_EVM_CHAIN_ID, [0; 20]); - - pub type LiquidityPoolMessage = Message; - - mod utils { - use cfg_types::oracles::OracleKey; - use frame_support::weights::Weight; - use runtime_common::oracle::Feeder; - - use super::*; - /// Creates a new pool for the given id with - /// * BOB as admin and depositor - /// * Two tranches - /// * AUSD as pool currency with max reserve 10k. - pub fn create_ausd_pool(pool_id: u64) { - create_currency_pool::(pool_id, AUSD_CURRENCY_ID, decimals(currency_decimals::AUSD)) - } - - /// Creates a new pool for for the given id with the provided currency. - /// * BOB as admin and depositor - /// * Two tranches - /// * The given `currency` as pool currency with of - /// `currency_decimals`. - pub fn create_currency_pool( - pool_id: u64, - currency_id: CurrencyId, - currency_decimals: Balance, - ) { - assert_ok!(pallet_pool_system::Pallet::::create( - POOL_ADMIN.into(), - POOL_ADMIN.into(), - pool_id, - vec![ - TrancheInput { - tranche_type: TrancheType::Residual, - seniority: None, - metadata: TrancheMetadata { + /// Creates a new pool for for the given id with the provided currency. + /// * BOB as admin and depositor + /// * Two tranches + /// * The given `currency` as pool currency with of `currency_decimals`. + pub fn create_currency_pool( + pool_id: u64, + currency_id: CurrencyId, + currency_decimals: Balance, + ) { + assert_ok!(pallet_pool_system::Pallet::::create( + POOL_ADMIN.into(), + POOL_ADMIN.into(), + pool_id, + vec![ + TrancheInput { + tranche_type: TrancheType::Residual, + seniority: None, + metadata: + TrancheMetadata { // NOTE: For now, we have to set these metadata fields of the first // tranche to be convertible to the 32-byte size expected by the // liquidity pools AddTranche message. @@ -283,376 +184,269 @@ mod development { >::try_from("TrNcH".as_bytes().to_vec()) .expect("Can create BoundedVec for token symbol"), } + }, + TrancheInput { + tranche_type: TrancheType::NonResidual { + interest_rate_per_sec: One::one(), + min_risk_buffer: Perquintill::from_percent(10), }, - TrancheInput { - tranche_type: TrancheType::NonResidual { - interest_rate_per_sec: One::one(), - min_risk_buffer: Perquintill::from_percent(10), - }, - seniority: None, - metadata: TrancheMetadata { - token_name: BoundedVec::default(), - token_symbol: BoundedVec::default(), - } + seniority: None, + metadata: TrancheMetadata { + token_name: BoundedVec::default(), + token_symbol: BoundedVec::default(), } - ], - currency_id, - currency_decimals, - // No pool fees per default - vec![] - )); - } + } + ], + currency_id, + currency_decimals, + // No pool fees per default + vec![] + )); + } - pub fn register_glmr() { - let meta: AssetMetadata = AssetMetadata { - decimals: 18, - name: BoundedVec::default(), - symbol: BoundedVec::default(), - existential_deposit: GLMR_ED, - location: Some(VersionedLocation::V4(Location::new( - 1, - [Parachain(T::FudgeHandle::SIBLING_ID), general_key(&[0, 1])], - ))), - additional: CustomMetadata { - transferability: CrossChainTransferability::Xcm(Default::default()), - ..CustomMetadata::default() - }, - }; + pub fn register_glmr() { + let meta: AssetMetadata = AssetMetadata { + decimals: 18, + name: BoundedVec::default(), + symbol: BoundedVec::default(), + existential_deposit: GLMR_ED, + location: Some(VersionedLocation::V4(Location::new( + 1, + [Parachain(SIBLING_ID), general_key(&[0, 1])], + ))), + additional: CustomMetadata { + transferability: CrossChainTransferability::Xcm(Default::default()), + ..CustomMetadata::default() + }, + }; - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta, - Some(GLMR_CURRENCY_ID) - )); - } + assert_ok!(orml_asset_registry::Pallet::::register_asset( + ::RuntimeOrigin::root(), + meta, + Some(GLMR_CURRENCY_ID) + )); + } - pub fn set_test_domain_router( - evm_chain_id: u64, - xcm_domain_location: VersionedLocation, - currency_id: CurrencyId, - ) { - let ethereum_xcm_router = EthereumXCMRouter:: { - router: XCMRouter { - xcm_domain: XcmDomain { - location: Box::new(xcm_domain_location), - ethereum_xcm_transact_call_index: BoundedVec::truncate_from(vec![38, 0]), - contract_address: H160::from(DEFAULT_EVM_ADDRESS_MOONBEAM), - max_gas_limit: 500_000, - transact_required_weight_at_most: Weight::from_parts( - 12530000000, - DEFAULT_PROOF_SIZE.saturating_div(2), - ), - overall_weight: Weight::from_parts(15530000000, DEFAULT_PROOF_SIZE), - fee_currency: currency_id, - // 0.2 token - fee_amount: 200000000000000000, - }, - _marker: Default::default(), + pub fn set_test_domain_router( + evm_chain_id: u64, + xcm_domain_location: VersionedLocation, + currency_id: CurrencyId, + ) { + let ethereum_xcm_router = EthereumXCMRouter:: { + router: XCMRouter { + xcm_domain: XcmDomain { + location: Box::new(xcm_domain_location), + ethereum_xcm_transact_call_index: BoundedVec::truncate_from(vec![38, 0]), + contract_address: H160::from(DEFAULT_EVM_ADDRESS_MOONBEAM), + max_gas_limit: 500_000, + transact_required_weight_at_most: Weight::from_parts( + 12530000000, + DEFAULT_PROOF_SIZE.saturating_div(2), + ), + overall_weight: Weight::from_parts(15530000000, DEFAULT_PROOF_SIZE), + fee_currency: currency_id, + // 0.2 token + fee_amount: 200000000000000000, }, _marker: Default::default(), - }; - - let domain_router = DomainRouter::EthereumXCM(ethereum_xcm_router); - let domain = Domain::EVM(evm_chain_id); - - assert_ok!( - pallet_liquidity_pools_gateway::Pallet::::set_domain_router( - ::RuntimeOrigin::root(), - domain, - domain_router, - ) - ); - } - - pub fn default_tranche_id(pool_id: u64) -> TrancheId { - let pool_details = - pallet_pool_system::pallet::Pool::::get(pool_id).expect("Pool should exist"); - pool_details - .tranches - .tranche_id(TrancheLoc::Index(0)) - .expect("Tranche at index 0 exists") - } - - /// Returns a `VersionedLocation` that can be converted into - /// `LiquidityPoolsWrappedToken` which is required for cross chain asset - /// registration and transfer. - pub fn liquidity_pools_transferable_multilocation( - chain_id: u64, - address: [u8; 20], - ) -> VersionedLocation { - VersionedLocation::V4(Location::new( - 0, - [ - PalletInstance( - ::PalletInfo::index::< - pallet_liquidity_pools::Pallet, - >() - .expect("LiquidityPools should have pallet index") - .saturated_into(), - ), - GlobalConsensus(NetworkId::Ethereum { chain_id }), - AccountKey20 { - network: None, - key: address, - }, - ], - )) - } + }, + _marker: Default::default(), + }; - /// Enables `LiquidityPoolsTransferable` in the custom asset metadata - /// for the given currency_id. - /// - /// NOTE: Sets the location to the `MOONBEAM_EVM_CHAIN_ID` with dummy - /// address as the location is required for LiquidityPoolsWrappedToken - /// conversions. - pub fn enable_liquidity_pool_transferability( - currency_id: CurrencyId, - ) { - let metadata = orml_asset_registry::Metadata::::get(currency_id) - .expect("Currency should be registered"); - let location = Some(Some(liquidity_pools_transferable_multilocation::( - MOONBEAM_EVM_CHAIN_ID, - // Value of evm_address is irrelevant here - [1u8; 20], - ))); + let domain_router = DomainRouter::EthereumXCM(ethereum_xcm_router); + let domain = Domain::EVM(evm_chain_id); - assert_ok!(orml_asset_registry::Pallet::::update_asset( + assert_ok!( + pallet_liquidity_pools_gateway::Pallet::::set_domain_router( ::RuntimeOrigin::root(), - currency_id, - None, - None, - None, - None, - location, - Some(CustomMetadata { - // Changed: Allow liquidity_pools transferability - transferability: CrossChainTransferability::LiquidityPools, - ..metadata.additional - }) - )); - } - - pub fn setup_test(env: &mut FudgeEnv) { - setup_xcm(env); - - env.parachain_state_mut(|| { - register_ausd::(); - register_glmr::(); - - assert_ok!(orml_tokens::Pallet::::set_balance( - ::RuntimeOrigin::root(), - ::Sender::get().into(), - GLMR_CURRENCY_ID, - DEFAULT_BALANCE_GLMR, - 0, - )); - - set_test_domain_router::( - MOONBEAM_EVM_CHAIN_ID, - Location::new(1, Junction::Parachain(T::FudgeHandle::SIBLING_ID)).into(), - GLMR_CURRENCY_ID, - ); - }); - } - - /// Returns the derived general currency index. - /// - /// Throws if the provided currency_id is not - /// `CurrencyId::ForeignAsset(id)`. - pub fn general_currency_index(currency_id: CurrencyId) -> u128 { - pallet_liquidity_pools::Pallet::::try_get_general_index(currency_id) - .expect("ForeignAsset should convert into u128") - } + domain, + domain_router, + ) + ); + } - /// Returns the investment_id of the given pool and tranche ids. - pub fn investment_id( - pool_id: u64, - tranche_id: TrancheId, - ) -> cfg_types::tokens::TrancheCurrency { - ::TrancheCurrency::generate(pool_id, tranche_id) - } + pub fn default_tranche_id(pool_id: u64) -> TrancheId { + let pool_details = + pallet_pool_system::pallet::Pool::::get(pool_id).expect("Pool should exist"); + pool_details + .tranches + .tranche_id(TrancheLoc::Index(0)) + .expect("Tranche at index 0 exists") + } - pub fn default_investment_id( - ) -> cfg_types::tokens::TrancheCurrency { - ::TrancheCurrency::generate( - POOL_ID, - default_tranche_id::(POOL_ID), - ) - } + /// Returns a `VersionedLocation` that can be converted into + /// `LiquidityPoolsWrappedToken` which is required for cross chain asset + /// registration and transfer. + pub fn liquidity_pools_transferable_multilocation( + chain_id: u64, + address: [u8; 20], + ) -> VersionedLocation { + VersionedLocation::V4(Location::new( + 0, + [ + PalletInstance( + ::PalletInfo::index::< + pallet_liquidity_pools::Pallet, + >() + .expect("LiquidityPools should have pallet index") + .saturated_into(), + ), + GlobalConsensus(NetworkId::Ethereum { chain_id }), + AccountKey20 { + network: None, + key: address, + }, + ], + )) + } - pub fn default_order_id(investor: &AccountId) -> OrderId { - let default_swap_id = ( - default_investment_id::(), - pallet_foreign_investments::Action::Investment, - ); - pallet_swaps::Pallet::::order_id(&investor, default_swap_id) - .expect("Swap order exists; qed") - } + /// Enables `LiquidityPoolsTransferable` in the custom asset metadata + /// for the given currency_id. + /// + /// NOTE: Sets the location to the `MOONBEAM_EVM_CHAIN_ID` with dummy + /// address as the location is required for LiquidityPoolsWrappedToken + /// conversions. + pub fn enable_liquidity_pool_transferability( + currency_id: CurrencyId, + ) { + let metadata = orml_asset_registry::Metadata::::get(currency_id) + .expect("Currency should be registered"); + let location = Some(Some(liquidity_pools_transferable_multilocation::( + MOONBEAM_EVM_CHAIN_ID, + // Value of evm_address is irrelevant here + [1u8; 20], + ))); + + assert_ok!(orml_asset_registry::Pallet::::update_asset( + ::RuntimeOrigin::root(), + currency_id, + None, + None, + None, + None, + location, + Some(CustomMetadata { + // Changed: Allow liquidity_pools transferability + transferability: CrossChainTransferability::LiquidityPools, + ..metadata.additional + }) + )); + } - /// Returns the default investment account derived from the - /// `DEFAULT_POOL_ID` and its default tranche. - pub fn default_investment_account() -> AccountId { - InvestmentAccount { - investment_id: default_investment_id::(), - } - .into_account_truncating() - } + pub fn setup_test(env: &mut FudgeEnv) { + env.parachain_state_mut(|| { + register_ausd::(); + register_glmr::(); - pub fn fulfill_swap_into_pool( - pool_id: u64, - swap_order_id: u64, - amount_pool: Balance, - amount_foreign: Balance, - trader: AccountId, - ) { - let pool_currency: CurrencyId = pallet_pool_system::Pallet::::currency_for(pool_id) - .expect("Pool existence checked already"); - assert_ok!(orml_tokens::Pallet::::mint_into( - pool_currency, - &trader, - amount_pool - )); - assert_ok!(pallet_order_book::Pallet::::fill_order( - RawOrigin::Signed(trader.clone()).into(), - swap_order_id, - amount_foreign + assert_ok!(orml_tokens::Pallet::::set_balance( + ::RuntimeOrigin::root(), + ::Sender::get().into(), + GLMR_CURRENCY_ID, + DEFAULT_BALANCE_GLMR, + 0, )); - } - /// Sets up required permissions for the investor and executes an - /// initial investment via LiquidityPools by executing - /// `IncreaseInvestOrder`. - /// - /// Assumes `setup_pre_requirements` and - /// `investments::create_currency_pool` to have been called - /// beforehand - pub fn do_initial_increase_investment( - pool_id: u64, - amount: Balance, - investor: AccountId, - currency_id: CurrencyId, - ) { - let pool_currency: CurrencyId = pallet_pool_system::Pallet::::currency_for(pool_id) - .expect("Pool existence checked already"); - - // Mock incoming increase invest message - let msg = LiquidityPoolMessage::IncreaseInvestOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(currency_id), - amount, - }; + set_test_domain_router::( + MOONBEAM_EVM_CHAIN_ID, + Location::new(1, Junction::Parachain(SIBLING_ID)).into(), + GLMR_CURRENCY_ID, + ); + }); + } - // Should fail if investor does not have investor role yet - // However, failure is async for foreign currencies as part of updating the - // investment after the swap was fulfilled - if currency_id == pool_currency { - assert_noop!( - pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - msg.clone() - ), - DispatchError::Other("Account does not have the TrancheInvestor permission.") - ); - } + /// Returns the derived general currency index. + /// + /// Throws if the provided currency_id is not + /// `CurrencyId::ForeignAsset(id)`. + pub fn general_currency_index(currency_id: CurrencyId) -> u128 { + pallet_liquidity_pools::Pallet::::try_get_general_index(currency_id) + .expect("ForeignAsset should convert into u128") + } - // Make investor the MembersListAdmin of this Pool - if !pallet_permissions::Pallet::::has( - PermissionScope::Pool(pool_id), - investor.clone(), - Role::PoolRole(PoolRole::TrancheInvestor( - default_tranche_id::(pool_id), - DEFAULT_VALIDITY, - )), - ) { - crate::generic::utils::pool::give_role::( - investor.clone(), - pool_id, - PoolRole::TrancheInvestor(default_tranche_id::(pool_id), DEFAULT_VALIDITY), - ); - } + /// Returns the investment_id of the given pool and tranche ids. + pub fn investment_id( + pool_id: u64, + tranche_id: TrancheId, + ) -> cfg_types::tokens::TrancheCurrency { + ::TrancheCurrency::generate(pool_id, tranche_id) + } - let amount_before = - orml_tokens::Pallet::::balance(currency_id, &default_investment_account::()); - let final_amount = amount_before - .ensure_add(amount) - .expect("Should not overflow when incrementing amount"); + pub fn default_investment_id() -> cfg_types::tokens::TrancheCurrency + { + ::TrancheCurrency::generate( + POOL_ID, + default_tranche_id::(POOL_ID), + ) + } - // Execute byte message - assert_ok!(pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - msg - )); + pub fn default_order_id(investor: &AccountId) -> OrderId { + let default_swap_id = ( + default_investment_id::(), + pallet_foreign_investments::Action::Investment, + ); + pallet_swaps::Pallet::::order_id(&investor, default_swap_id) + .expect("Swap order exists; qed") + } - if currency_id == pool_currency { - // Verify investment was transferred into investment account - assert_eq!( - orml_tokens::Pallet::::balance( - currency_id, - &default_investment_account::() - ), - final_amount - ); - assert!(frame_system::Pallet::::events().iter().any(|e| { - e.event - == pallet_investments::Event::::InvestOrderUpdated { - investment_id: default_investment_id::(), - submitted_at: 0, - who: investor.clone(), - amount: final_amount, - } - .into() - })); - } + /// Returns the default investment account derived from the + /// `DEFAULT_POOL_ID` and its default tranche. + pub fn default_investment_account() -> AccountId { + InvestmentAccount { + investment_id: default_investment_id::(), } + .into_account_truncating() + } - /// Sets up required permissions for the investor and executes an - /// initial redemption via LiquidityPools by executing - /// `IncreaseRedeemOrder`. - /// - /// Assumes `setup_pre_requirements` and - /// `investments::create_currency_pool` to have been called - /// beforehand. - /// - /// NOTE: Mints exactly the redeeming amount of tranche tokens. - pub fn do_initial_increase_redemption( - pool_id: u64, - amount: Balance, - investor: AccountId, - currency_id: CurrencyId, - ) { - // Fund `DomainLocator` account of origination domain as redeemed tranche tokens - // are transferred from this account instead of minting - assert_ok!(orml_tokens::Pallet::::mint_into( - default_investment_id::().into(), - &Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()), - amount - )); - - // Verify redemption has not been made yet - assert_eq!( - orml_tokens::Pallet::::balance( - default_investment_id::().into(), - &default_investment_account::(), - ), - 0 - ); - assert_eq!( - orml_tokens::Pallet::::balance(default_investment_id::().into(), &investor), - 0 - ); + pub fn fulfill_swap_into_pool( + pool_id: u64, + swap_order_id: u64, + amount_pool: Balance, + amount_foreign: Balance, + trader: AccountId, + ) { + let pool_currency: CurrencyId = pallet_pool_system::Pallet::::currency_for(pool_id) + .expect("Pool existence checked already"); + assert_ok!(orml_tokens::Pallet::::mint_into( + pool_currency, + &trader, + amount_pool + )); + assert_ok!(pallet_order_book::Pallet::::fill_order( + RawOrigin::Signed(trader.clone()).into(), + swap_order_id, + amount_foreign + )); + } - // Mock incoming increase invest message - let msg = LiquidityPoolMessage::IncreaseRedeemOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(currency_id), - amount, - }; + /// Sets up required permissions for the investor and executes an + /// initial investment via LiquidityPools by executing + /// `IncreaseInvestOrder`. + /// + /// Assumes `setup_pre_requirements` and + /// `investments::create_currency_pool` to have been called + /// beforehand + pub fn do_initial_increase_investment( + pool_id: u64, + amount: Balance, + investor: AccountId, + currency_id: CurrencyId, + ) { + let pool_currency: CurrencyId = pallet_pool_system::Pallet::::currency_for(pool_id) + .expect("Pool existence checked already"); + + // Mock incoming increase invest message + let msg = LiquidityPoolMessage::IncreaseInvestOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(currency_id), + amount, + }; - // Should fail if investor does not have investor role yet + // Should fail if investor does not have investor role yet + // However, failure is async for foreign currencies as part of updating the + // investment after the swap was fulfilled + if currency_id == pool_currency { assert_noop!( pallet_liquidity_pools::Pallet::::submit( DEFAULT_DOMAIN_ADDRESS_MOONBEAM, @@ -660,7140 +454,4029 @@ mod development { ), DispatchError::Other("Account does not have the TrancheInvestor permission.") ); + } - // Make investor the MembersListAdmin of this Pool + // Make investor the MembersListAdmin of this Pool + if !pallet_permissions::Pallet::::has( + PermissionScope::Pool(pool_id), + investor.clone(), + Role::PoolRole(PoolRole::TrancheInvestor( + default_tranche_id::(pool_id), + DEFAULT_VALIDITY, + )), + ) { crate::generic::utils::pool::give_role::( investor.clone(), pool_id, PoolRole::TrancheInvestor(default_tranche_id::(pool_id), DEFAULT_VALIDITY), ); + } - assert_ok!(pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - msg - )); + let amount_before = + orml_tokens::Pallet::::balance(currency_id, &default_investment_account::()); + let final_amount = amount_before + .ensure_add(amount) + .expect("Should not overflow when incrementing amount"); - // Verify redemption was transferred into investment account - assert_eq!( - orml_tokens::Pallet::::balance( - default_investment_id::().into(), - &default_investment_account::(), - ), - amount - ); - assert_eq!( - orml_tokens::Pallet::::balance(default_investment_id::().into(), &investor), - 0 - ); - assert_eq!( - orml_tokens::Pallet::::balance( - default_investment_id::().into(), - &AccountConverter::convert(DEFAULT_OTHER_DOMAIN_ADDRESS) - ), - 0 - ); - assert_eq!( - frame_system::Pallet::::events() - .iter() - .last() - .unwrap() - .event, - pallet_investments::Event::::RedeemOrderUpdated { - investment_id: default_investment_id::(), - submitted_at: 0, - who: investor, - amount - } - .into() - ); + // Execute byte message + assert_ok!(pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + msg + )); - // Verify order id is 0 + if currency_id == pool_currency { + // Verify investment was transferred into investment account assert_eq!( - pallet_investments::Pallet::::redeem_order_id(investment_id::( - pool_id, - default_tranche_id::(pool_id) - )), - 0 + orml_tokens::Pallet::::balance(currency_id, &default_investment_account::()), + final_amount ); + assert!(frame_system::Pallet::::events().iter().any(|e| { + e.event + == pallet_investments::Event::::InvestOrderUpdated { + investment_id: default_investment_id::(), + submitted_at: 0, + who: investor.clone(), + amount: final_amount, + } + .into() + })); } + } - /// Register USDT in the asset registry and enable LiquidityPools cross - /// chain transferability. - /// - /// NOTE: Assumes to be executed within an externalities environment. - fn register_usdt() { - let meta: AssetMetadata = AssetMetadata { - decimals: 6, - name: BoundedVec::default(), - symbol: BoundedVec::default(), - existential_deposit: USDT_ED, - location: Some(VersionedLocation::V4(Location::new( - 1, - [Parachain(1000), PalletInstance(50), GeneralIndex(1984)], - ))), - additional: CustomMetadata { - transferability: CrossChainTransferability::LiquidityPools, - pool_currency: true, - ..CustomMetadata::default() - }, - }; + /// Sets up required permissions for the investor and executes an + /// initial redemption via LiquidityPools by executing + /// `IncreaseRedeemOrder`. + /// + /// Assumes `setup_pre_requirements` and + /// `investments::create_currency_pool` to have been called + /// beforehand. + /// + /// NOTE: Mints exactly the redeeming amount of tranche tokens. + pub fn do_initial_increase_redemption( + pool_id: u64, + amount: Balance, + investor: AccountId, + currency_id: CurrencyId, + ) { + // Fund `DomainLocator` account of origination domain as redeemed tranche tokens + // are transferred from this account instead of minting + assert_ok!(orml_tokens::Pallet::::mint_into( + default_investment_id::().into(), + &Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()), + amount + )); - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta, - Some(USDT_CURRENCY_ID) - )); - } + // Verify redemption has not been made yet + assert_eq!( + orml_tokens::Pallet::::balance( + default_investment_id::().into(), + &default_investment_account::(), + ), + 0 + ); + assert_eq!( + orml_tokens::Pallet::::balance(default_investment_id::().into(), &investor), + 0 + ); + + // Mock incoming increase invest message + let msg = LiquidityPoolMessage::IncreaseRedeemOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(currency_id), + amount, + }; - /// Registers USDT currency, adds bidirectional trading pairs with - /// conversion ratio one and returns the amount in foreign denomination. - pub fn enable_usdt_trading( - pool_currency: CurrencyId, - amount_pool_denominated: Balance, - enable_lp_transferability: bool, - enable_foreign_to_pool_pair: bool, - enable_pool_to_foreign_pair: bool, - ) -> Balance { - register_usdt::(); - let foreign_currency: CurrencyId = USDT_CURRENCY_ID; - let amount_foreign_denominated: u128 = - IdentityPoolCurrencyConverter::>::stable_to_stable( - foreign_currency, - pool_currency, - amount_pool_denominated, - ) - .unwrap(); + // Should fail if investor does not have investor role yet + assert_noop!( + pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + msg.clone() + ), + DispatchError::Other("Account does not have the TrancheInvestor permission.") + ); + + // Make investor the MembersListAdmin of this Pool + crate::generic::utils::pool::give_role::( + investor.clone(), + pool_id, + PoolRole::TrancheInvestor(default_tranche_id::(pool_id), DEFAULT_VALIDITY), + ); + + assert_ok!(pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + msg + )); - if enable_lp_transferability { - enable_liquidity_pool_transferability::(foreign_currency); + // Verify redemption was transferred into investment account + assert_eq!( + orml_tokens::Pallet::::balance( + default_investment_id::().into(), + &default_investment_account::(), + ), + amount + ); + assert_eq!( + orml_tokens::Pallet::::balance(default_investment_id::().into(), &investor), + 0 + ); + assert_eq!( + orml_tokens::Pallet::::balance( + default_investment_id::().into(), + &AccountConverter::convert(DEFAULT_OTHER_DOMAIN_ADDRESS) + ), + 0 + ); + assert_eq!( + frame_system::Pallet::::events() + .iter() + .last() + .unwrap() + .event, + pallet_investments::Event::::RedeemOrderUpdated { + investment_id: default_investment_id::(), + submitted_at: 0, + who: investor, + amount } + .into() + ); - assert_ok!(pallet_order_book::Pallet::::set_market_feeder( - ::RuntimeOrigin::root(), - Feeder::root(), - )); - crate::generic::utils::oracle::update_feeders::( - POOL_ADMIN.id(), - POOL_ID, - [Feeder::root()], - ); + // Verify order id is 0 + assert_eq!( + pallet_investments::Pallet::::redeem_order_id(investment_id::( + pool_id, + default_tranche_id::(pool_id) + )), + 0 + ); + } - if enable_foreign_to_pool_pair { - crate::generic::utils::oracle::feed_from_root::( - OracleKey::ConversionRatio(foreign_currency, pool_currency), - Ratio::one(), - ); - } - if enable_pool_to_foreign_pair { - crate::generic::utils::oracle::feed_from_root::( - OracleKey::ConversionRatio(pool_currency, foreign_currency), - Ratio::one(), - ); - } + /// Register USDT in the asset registry and enable LiquidityPools cross + /// chain transferability. + /// + /// NOTE: Assumes to be executed within an externalities environment. + fn register_usdt() { + let meta: AssetMetadata = AssetMetadata { + decimals: 6, + name: BoundedVec::default(), + symbol: BoundedVec::default(), + existential_deposit: USDT_ED, + location: Some(VersionedLocation::V4(Location::new( + 1, + [Parachain(1000), PalletInstance(50), GeneralIndex(1984)], + ))), + additional: CustomMetadata { + transferability: CrossChainTransferability::LiquidityPools, + pool_currency: true, + ..CustomMetadata::default() + }, + }; + + assert_ok!(orml_asset_registry::Pallet::::register_asset( + ::RuntimeOrigin::root(), + meta, + Some(USDT_CURRENCY_ID) + )); + } + + /// Registers USDT currency, adds bidirectional trading pairs with + /// conversion ratio one and returns the amount in foreign denomination. + pub fn enable_usdt_trading( + pool_currency: CurrencyId, + amount_pool_denominated: Balance, + enable_lp_transferability: bool, + enable_foreign_to_pool_pair: bool, + enable_pool_to_foreign_pair: bool, + ) -> Balance { + register_usdt::(); + let foreign_currency: CurrencyId = USDT_CURRENCY_ID; + let amount_foreign_denominated: u128 = + IdentityPoolCurrencyConverter::>::stable_to_stable( + foreign_currency, + pool_currency, + amount_pool_denominated, + ) + .unwrap(); - amount_foreign_denominated + if enable_lp_transferability { + enable_liquidity_pool_transferability::(foreign_currency); } - pub fn get_council_members() -> Vec { - vec![Keyring::Alice, Keyring::Bob, Keyring::Charlie] + assert_ok!(pallet_order_book::Pallet::::set_market_feeder( + ::RuntimeOrigin::root(), + Feeder::root(), + )); + crate::generic::utils::oracle::update_feeders::( + POOL_ADMIN.id(), + POOL_ID, + [Feeder::root()], + ); + + if enable_foreign_to_pool_pair { + crate::generic::utils::oracle::feed_from_root::( + OracleKey::ConversionRatio(foreign_currency, pool_currency), + Ratio::one(), + ); + } + if enable_pool_to_foreign_pair { + crate::generic::utils::oracle::feed_from_root::( + OracleKey::ConversionRatio(pool_currency, foreign_currency), + Ratio::one(), + ); } - } - mod add_allow_upgrade { - use cfg_types::tokens::LiquidityPoolsWrappedToken; + amount_foreign_denominated + } - use super::*; + pub fn get_council_members() -> Vec { + vec![Keyring::Alice, Keyring::Bob, Keyring::Charlie] + } +} - #[test_runtimes([development])] - fn add_pool() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .add(genesis::tokens::(vec![( - GLMR_CURRENCY_ID, - DEFAULT_BALANCE_GLMR, - )])) - .storage(), - ); +use utils::*; - setup_test(&mut env); +mod add_allow_upgrade { + use cfg_types::tokens::LiquidityPoolsWrappedToken; - env.parachain_state_mut(|| { - let pool_id = POOL_ID; + use super::*; - // Verify that the pool must exist before we can call - // pallet_liquidity_pools::Pallet::::add_pool - assert_noop!( - pallet_liquidity_pools::Pallet::::add_pool( - RawOrigin::Signed(Keyring::Alice.into()).into(), - pool_id, - Domain::EVM(MOONBEAM_EVM_CHAIN_ID), - ), - pallet_liquidity_pools::Error::::PoolNotFound - ); + #[test_runtimes([development])] + fn add_pool() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .add(genesis::tokens::(vec![( + GLMR_CURRENCY_ID, + DEFAULT_BALANCE_GLMR, + )])) + .storage(), + ); - // Now create the pool - create_ausd_pool::(pool_id); + setup_test(&mut env); - // Verify ALICE can't call `add_pool` given she is not the `PoolAdmin` - assert_noop!( - pallet_liquidity_pools::Pallet::::add_pool( - RawOrigin::Signed(Keyring::Alice.into()).into(), - pool_id, - Domain::EVM(MOONBEAM_EVM_CHAIN_ID), - ), - pallet_liquidity_pools::Error::::NotPoolAdmin - ); + env.parachain_state_mut(|| { + let pool_id = POOL_ID; - // Verify that it works if it's BOB calling it (the pool admin) - assert_ok!(pallet_liquidity_pools::Pallet::::add_pool( - RawOrigin::Signed(POOL_ADMIN.into()).into(), + // Verify that the pool must exist before we can call + // pallet_liquidity_pools::Pallet::::add_pool + assert_noop!( + pallet_liquidity_pools::Pallet::::add_pool( + RawOrigin::Signed(Keyring::Alice.into()).into(), pool_id, Domain::EVM(MOONBEAM_EVM_CHAIN_ID), - )); - }); - } + ), + pallet_liquidity_pools::Error::::PoolNotFound + ); - #[test_runtimes([development])] - fn add_tranche() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .add(genesis::tokens::(vec![( - GLMR_CURRENCY_ID, - DEFAULT_BALANCE_GLMR, - )])) - .storage(), + // Now create the pool + create_ausd_pool::(pool_id); + + // Verify ALICE can't call `add_pool` given she is not the `PoolAdmin` + assert_noop!( + pallet_liquidity_pools::Pallet::::add_pool( + RawOrigin::Signed(Keyring::Alice.into()).into(), + pool_id, + Domain::EVM(MOONBEAM_EVM_CHAIN_ID), + ), + pallet_liquidity_pools::Error::::NotPoolAdmin ); - setup_test(&mut env); + // Verify that it works if it's BOB calling it (the pool admin) + assert_ok!(pallet_liquidity_pools::Pallet::::add_pool( + RawOrigin::Signed(POOL_ADMIN.into()).into(), + pool_id, + Domain::EVM(MOONBEAM_EVM_CHAIN_ID), + )); + }); + } - env.parachain_state_mut(|| { - // Now create the pool - let pool_id = POOL_ID; - create_ausd_pool::(pool_id); + #[test_runtimes([development])] + fn add_tranche() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .add(genesis::tokens::(vec![( + GLMR_CURRENCY_ID, + DEFAULT_BALANCE_GLMR, + )])) + .storage(), + ); - // Verify we can't call pallet_liquidity_pools::Pallet::::add_tranche with a - // non-existing tranche_id - let nonexistent_tranche = [71u8; 16]; + setup_test(&mut env); - assert_noop!( - pallet_liquidity_pools::Pallet::::add_tranche( - RawOrigin::Signed(Keyring::Alice.into()).into(), - pool_id, - nonexistent_tranche, - Domain::EVM(MOONBEAM_EVM_CHAIN_ID), - ), - pallet_liquidity_pools::Error::::TrancheNotFound - ); - let tranche_id = default_tranche_id::(pool_id); + env.parachain_state_mut(|| { + // Now create the pool + let pool_id = POOL_ID; + create_ausd_pool::(pool_id); - // Verify ALICE can't call `add_tranche` given she is not the `PoolAdmin` - assert_noop!( - pallet_liquidity_pools::Pallet::::add_tranche( - RawOrigin::Signed(Keyring::Alice.into()).into(), - pool_id, - tranche_id, - Domain::EVM(MOONBEAM_EVM_CHAIN_ID), - ), - pallet_liquidity_pools::Error::::NotPoolAdmin - ); + // Verify we can't call pallet_liquidity_pools::Pallet::::add_tranche with a + // non-existing tranche_id + let nonexistent_tranche = [71u8; 16]; - // Finally, verify we can call pallet_liquidity_pools::Pallet::::add_tranche - // successfully when called by the PoolAdmin with the right pool + tranche id - // pair. - assert_ok!(pallet_liquidity_pools::Pallet::::add_tranche( - RawOrigin::Signed(POOL_ADMIN.into()).into(), + assert_noop!( + pallet_liquidity_pools::Pallet::::add_tranche( + RawOrigin::Signed(Keyring::Alice.into()).into(), + pool_id, + nonexistent_tranche, + Domain::EVM(MOONBEAM_EVM_CHAIN_ID), + ), + pallet_liquidity_pools::Error::::TrancheNotFound + ); + let tranche_id = default_tranche_id::(pool_id); + + // Verify ALICE can't call `add_tranche` given she is not the `PoolAdmin` + assert_noop!( + pallet_liquidity_pools::Pallet::::add_tranche( + RawOrigin::Signed(Keyring::Alice.into()).into(), pool_id, tranche_id, Domain::EVM(MOONBEAM_EVM_CHAIN_ID), - )); + ), + pallet_liquidity_pools::Error::::NotPoolAdmin + ); - // Edge case: Should throw if tranche exists but metadata does not exist - let tranche_currency_id = CurrencyId::Tranche(pool_id, tranche_id); + // Finally, verify we can call pallet_liquidity_pools::Pallet::::add_tranche + // successfully when called by the PoolAdmin with the right pool + tranche id + // pair. + assert_ok!(pallet_liquidity_pools::Pallet::::add_tranche( + RawOrigin::Signed(POOL_ADMIN.into()).into(), + pool_id, + tranche_id, + Domain::EVM(MOONBEAM_EVM_CHAIN_ID), + )); - orml_asset_registry::Metadata::::remove(tranche_currency_id); + // Edge case: Should throw if tranche exists but metadata does not exist + let tranche_currency_id = CurrencyId::Tranche(pool_id, tranche_id); - assert_noop!( - pallet_liquidity_pools::Pallet::::update_tranche_token_metadata( - RawOrigin::Signed(POOL_ADMIN.into()).into(), - pool_id, - tranche_id, - Domain::EVM(MOONBEAM_EVM_CHAIN_ID), - ), - pallet_liquidity_pools::Error::::TrancheMetadataNotFound - ); - }); - } + orml_asset_registry::Metadata::::remove(tranche_currency_id); - #[test_runtimes([development])] - fn update_member() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .add(genesis::tokens::(vec![( - GLMR_CURRENCY_ID, - DEFAULT_BALANCE_GLMR, - )])) - .storage(), + assert_noop!( + pallet_liquidity_pools::Pallet::::update_tranche_token_metadata( + RawOrigin::Signed(POOL_ADMIN.into()).into(), + pool_id, + tranche_id, + Domain::EVM(MOONBEAM_EVM_CHAIN_ID), + ), + pallet_liquidity_pools::Error::::TrancheMetadataNotFound ); + }); + } - setup_test(&mut env); + #[test_runtimes([development])] + fn update_member() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .add(genesis::tokens::(vec![( + GLMR_CURRENCY_ID, + DEFAULT_BALANCE_GLMR, + )])) + .storage(), + ); - env.parachain_state_mut(|| { - // Now create the pool - let pool_id = POOL_ID; + setup_test(&mut env); - create_ausd_pool::(pool_id); + env.parachain_state_mut(|| { + // Now create the pool + let pool_id = POOL_ID; - let tranche_id = default_tranche_id::(pool_id); + create_ausd_pool::(pool_id); - // Finally, verify we can call pallet_liquidity_pools::Pallet::::add_tranche - // successfully when given a valid pool + tranche id pair. - let new_member = DomainAddress::EVM(MOONBEAM_EVM_CHAIN_ID, [3; 20]); + let tranche_id = default_tranche_id::(pool_id); - // Make ALICE the MembersListAdmin of this Pool - assert_ok!(pallet_permissions::Pallet::::add( - ::RuntimeOrigin::root(), - Role::PoolRole(PoolRole::PoolAdmin), - Keyring::Alice.into(), - PermissionScope::Pool(pool_id), - Role::PoolRole(PoolRole::InvestorAdmin), - )); + // Finally, verify we can call pallet_liquidity_pools::Pallet::::add_tranche + // successfully when given a valid pool + tranche id pair. + let new_member = DomainAddress::EVM(MOONBEAM_EVM_CHAIN_ID, [3; 20]); - // Verify it fails if the destination is not whitelisted yet - assert_noop!( - pallet_liquidity_pools::Pallet::::update_member( - RawOrigin::Signed(Keyring::Alice.into()).into(), - pool_id, - tranche_id, - new_member.clone(), - DEFAULT_VALIDITY, - ), - pallet_liquidity_pools::Error::::InvestorDomainAddressNotAMember, - ); + // Make ALICE the MembersListAdmin of this Pool + assert_ok!(pallet_permissions::Pallet::::add( + ::RuntimeOrigin::root(), + Role::PoolRole(PoolRole::PoolAdmin), + Keyring::Alice.into(), + PermissionScope::Pool(pool_id), + Role::PoolRole(PoolRole::InvestorAdmin), + )); - // Whitelist destination as TrancheInvestor of this Pool - crate::generic::utils::pool::give_role::( - AccountConverter::convert(new_member.clone()), + // Verify it fails if the destination is not whitelisted yet + assert_noop!( + pallet_liquidity_pools::Pallet::::update_member( + RawOrigin::Signed(Keyring::Alice.into()).into(), pool_id, - PoolRole::TrancheInvestor(default_tranche_id::(pool_id), DEFAULT_VALIDITY), - ); + tranche_id, + new_member.clone(), + DEFAULT_VALIDITY, + ), + pallet_liquidity_pools::Error::::InvestorDomainAddressNotAMember, + ); - // Verify the Investor role was set as expected in Permissions - assert!(pallet_permissions::Pallet::::has( - PermissionScope::Pool(pool_id), - AccountConverter::convert(new_member.clone()), - Role::PoolRole(PoolRole::TrancheInvestor(tranche_id, DEFAULT_VALIDITY)), - )); + // Whitelist destination as TrancheInvestor of this Pool + crate::generic::utils::pool::give_role::( + AccountConverter::convert(new_member.clone()), + pool_id, + PoolRole::TrancheInvestor(default_tranche_id::(pool_id), DEFAULT_VALIDITY), + ); - // Verify it now works - assert_ok!(pallet_liquidity_pools::Pallet::::update_member( + // Verify the Investor role was set as expected in Permissions + assert!(pallet_permissions::Pallet::::has( + PermissionScope::Pool(pool_id), + AccountConverter::convert(new_member.clone()), + Role::PoolRole(PoolRole::TrancheInvestor(tranche_id, DEFAULT_VALIDITY)), + )); + + // Verify it now works + assert_ok!(pallet_liquidity_pools::Pallet::::update_member( + RawOrigin::Signed(Keyring::Alice.into()).into(), + pool_id, + tranche_id, + new_member, + DEFAULT_VALIDITY, + )); + + // Verify it cannot be called for another member without whitelisting the domain + // beforehand + assert_noop!( + pallet_liquidity_pools::Pallet::::update_member( RawOrigin::Signed(Keyring::Alice.into()).into(), pool_id, tranche_id, - new_member, + DomainAddress::EVM(MOONBEAM_EVM_CHAIN_ID, [9; 20]), DEFAULT_VALIDITY, - )); - - // Verify it cannot be called for another member without whitelisting the domain - // beforehand - assert_noop!( - pallet_liquidity_pools::Pallet::::update_member( - RawOrigin::Signed(Keyring::Alice.into()).into(), - pool_id, - tranche_id, - DomainAddress::EVM(MOONBEAM_EVM_CHAIN_ID, [9; 20]), - DEFAULT_VALIDITY, - ), - pallet_liquidity_pools::Error::::InvestorDomainAddressNotAMember, - ); - }); - } - - #[test_runtimes([development])] - fn update_token_price() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .add(genesis::tokens::(vec![( - GLMR_CURRENCY_ID, - DEFAULT_BALANCE_GLMR, - )])) - .storage(), + ), + pallet_liquidity_pools::Error::::InvestorDomainAddressNotAMember, ); + }); + } - setup_test(&mut env); + #[test_runtimes([development])] + fn update_token_price() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .add(genesis::tokens::(vec![( + GLMR_CURRENCY_ID, + DEFAULT_BALANCE_GLMR, + )])) + .storage(), + ); - env.parachain_state_mut(|| { - let currency_id = AUSD_CURRENCY_ID; - let pool_id = POOL_ID; + setup_test(&mut env); - enable_liquidity_pool_transferability::(currency_id); + env.parachain_state_mut(|| { + let currency_id = AUSD_CURRENCY_ID; + let pool_id = POOL_ID; - create_ausd_pool::(pool_id); + enable_liquidity_pool_transferability::(currency_id); - assert_ok!(pallet_liquidity_pools::Pallet::::update_token_price( - RawOrigin::Signed(Keyring::Bob.into()).into(), - pool_id, - default_tranche_id::(pool_id), - currency_id, - Domain::EVM(MOONBEAM_EVM_CHAIN_ID), - )); - }); - } + create_ausd_pool::(pool_id); - #[test_runtimes([development])] - fn add_currency() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .add(genesis::tokens::(vec![( - GLMR_CURRENCY_ID, - DEFAULT_BALANCE_GLMR, - )])) - .storage(), - ); + assert_ok!(pallet_liquidity_pools::Pallet::::update_token_price( + RawOrigin::Signed(Keyring::Bob.into()).into(), + pool_id, + default_tranche_id::(pool_id), + currency_id, + Domain::EVM(MOONBEAM_EVM_CHAIN_ID), + )); + }); + } - setup_test(&mut env); + #[test_runtimes([development])] + fn add_currency() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .add(genesis::tokens::(vec![( + GLMR_CURRENCY_ID, + DEFAULT_BALANCE_GLMR, + )])) + .storage(), + ); - let (domain, sender, message) = env.parachain_state_mut(|| { - let gateway_sender = ::Sender::get(); + setup_test(&mut env); - let currency_id = AUSD_CURRENCY_ID; + env.parachain_state_mut(|| { + let gateway_sender = ::Sender::get(); - enable_liquidity_pool_transferability::(currency_id); + let currency_id = AUSD_CURRENCY_ID; - assert_eq!( - orml_tokens::Pallet::::free_balance(GLMR_CURRENCY_ID, &gateway_sender), - DEFAULT_BALANCE_GLMR - ); - - assert_ok!(pallet_liquidity_pools::Pallet::::add_currency( - RawOrigin::Signed(Keyring::Bob.into()).into(), - currency_id, - )); - - let currency_index = - pallet_liquidity_pools::Pallet::::try_get_general_index(currency_id) - .expect("can get general index for currency"); - - let LiquidityPoolsWrappedToken::EVM { - address: evm_address, - .. - } = pallet_liquidity_pools::Pallet::::try_get_wrapped_token(¤cy_id) - .expect("can get wrapped token"); - - let outbound_message = - pallet_liquidity_pools_gateway::OutboundMessageQueue::::get( - T::OutboundMessageNonce::one(), - ) - .expect("expected outbound queue message"); - - assert_eq!( - outbound_message.2, - Message::AddCurrency { - currency: currency_index, - evm_address, - }, - ); - - outbound_message - }); - - let expected_event = - pallet_liquidity_pools_gateway::Event::::OutboundMessageExecutionSuccess { - sender, - domain, - message, - nonce: T::OutboundMessageNonce::one(), - }; - - env.pass(Blocks::UntilEvent { - event: expected_event.clone().into(), - limit: 3, - }); - - env.check_event(expected_event) - .expect("expected RouterExecutionSuccess event"); - } - - #[test_runtimes([development])] - fn add_currency_should_fail() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .add(genesis::tokens::(vec![( - GLMR_CURRENCY_ID, - DEFAULT_BALANCE_GLMR, - )])) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - assert_noop!( - pallet_liquidity_pools::Pallet::::add_currency( - RawOrigin::Signed(Keyring::Bob.into()).into(), - CurrencyId::ForeignAsset(42) - ), - pallet_liquidity_pools::Error::::AssetNotFound - ); - assert_noop!( - pallet_liquidity_pools::Pallet::::add_currency( - RawOrigin::Signed(Keyring::Bob.into()).into(), - CurrencyId::Native - ), - pallet_liquidity_pools::Error::::AssetNotFound - ); - assert_noop!( - pallet_liquidity_pools::Pallet::::add_currency( - RawOrigin::Signed(Keyring::Bob.into()).into(), - CurrencyId::Staking(cfg_types::tokens::StakingCurrency::BlockRewards) - ), - pallet_liquidity_pools::Error::::AssetNotFound - ); - assert_noop!( - pallet_liquidity_pools::Pallet::::add_currency( - RawOrigin::Signed(Keyring::Bob.into()).into(), - CurrencyId::Staking(cfg_types::tokens::StakingCurrency::BlockRewards) - ), - pallet_liquidity_pools::Error::::AssetNotFound - ); - - // Should fail to add currency_id which is missing a registered - // Location - let currency_id = CurrencyId::ForeignAsset(100); - - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - AssetMetadata { - name: BoundedVec::default(), - symbol: BoundedVec::default(), - decimals: 12, - location: None, - existential_deposit: 1_000_000, - additional: CustomMetadata { - transferability: CrossChainTransferability::LiquidityPools, - mintable: false, - permissioned: false, - pool_currency: false, - local_representation: None, - }, - }, - Some(currency_id) - )); - - assert_noop!( - pallet_liquidity_pools::Pallet::::add_currency( - RawOrigin::Signed(Keyring::Bob.into()).into(), - currency_id - ), - pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsWrappedToken - ); - - // Add convertable Location to metadata but remove transferability - assert_ok!(orml_asset_registry::Pallet::::update_asset( - ::RuntimeOrigin::root(), - currency_id, - None, - None, - None, - None, - // Changed: Add multilocation to metadata for some random EVM chain id for - // which no instance is registered - Some(Some(liquidity_pools_transferable_multilocation::( - u64::MAX, - [1u8; 20], - ))), - Some(CustomMetadata { - // Changed: Disallow liquidityPools transferability - transferability: CrossChainTransferability::Xcm(Default::default()), - ..Default::default() - }), - )); - - assert_noop!( - pallet_liquidity_pools::Pallet::::add_currency( - RawOrigin::Signed(Keyring::Bob.into()).into(), - currency_id - ), - pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsTransferable - ); - - // Switch transferability from XCM to None - assert_ok!(orml_asset_registry::Pallet::::update_asset( - ::RuntimeOrigin::root(), - currency_id, - None, - None, - None, - None, - None, - Some(CustomMetadata { - // Changed: Disallow cross chain transferability entirely - transferability: CrossChainTransferability::None, - ..Default::default() - }) - )); - - assert_noop!( - pallet_liquidity_pools::Pallet::::add_currency( - RawOrigin::Signed(Keyring::Bob.into()).into(), - currency_id - ), - pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsTransferable - ); - }); - } - - #[test_runtimes([development])] - fn allow_investment_currency() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .add(genesis::tokens::(vec![( - GLMR_CURRENCY_ID, - DEFAULT_BALANCE_GLMR, - )])) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let currency_id = AUSD_CURRENCY_ID; - let pool_id = POOL_ID; - let evm_chain_id: u64 = MOONBEAM_EVM_CHAIN_ID; - let evm_address = [1u8; 20]; - - // Create an AUSD pool - create_ausd_pool::(pool_id); - - enable_liquidity_pool_transferability::(currency_id); - - // Enable LiquidityPools transferability - assert_ok!(orml_asset_registry::Pallet::::update_asset( - ::RuntimeOrigin::root(), - currency_id, - None, - None, - None, - None, - // Changed: Add location which can be converted to LiquidityPoolsWrappedToken - Some(Some(liquidity_pools_transferable_multilocation::( - evm_chain_id, - evm_address, - ))), - Some(CustomMetadata { - // Changed: Allow liquidity_pools transferability - transferability: CrossChainTransferability::LiquidityPools, - pool_currency: true, - ..Default::default() - }) - )); - - assert_ok!( - pallet_liquidity_pools::Pallet::::allow_investment_currency( - RawOrigin::Signed(Keyring::Bob.into()).into(), - pool_id, - currency_id, - ) - ); - - assert_noop!( - pallet_liquidity_pools::Pallet::::allow_investment_currency( - RawOrigin::Signed(Keyring::Charlie.into()).into(), - pool_id, - currency_id, - ), - pallet_liquidity_pools::Error::::NotPoolAdmin - ); - }); - } - - #[test_runtimes([development])] - fn allow_investment_currency_should_fail() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .add(genesis::tokens::(vec![( - GLMR_CURRENCY_ID, - DEFAULT_BALANCE_GLMR, - )])) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - let currency_id = CurrencyId::ForeignAsset(42); - let ausd_currency_id = AUSD_CURRENCY_ID; - - // Should fail if pool does not exist - assert_noop!( - pallet_liquidity_pools::Pallet::::allow_investment_currency( - RawOrigin::Signed(Keyring::Bob.into()).into(), - pool_id, - currency_id, - ), - pallet_liquidity_pools::Error::::NotPoolAdmin - ); - - // Register currency_id with pool_currency set to true - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - AssetMetadata { - name: BoundedVec::default(), - symbol: BoundedVec::default(), - decimals: 12, - location: None, - existential_deposit: 1_000_000, - additional: CustomMetadata { - pool_currency: true, - ..Default::default() - }, - }, - Some(currency_id) - )); - - // Create pool - create_currency_pool::(pool_id, currency_id, 10_000 * decimals(12)); - - enable_liquidity_pool_transferability::(ausd_currency_id); - - // Should fail if currency is not liquidityPools transferable - assert_ok!(orml_asset_registry::Pallet::::update_asset( - ::RuntimeOrigin::root(), - currency_id, - None, - None, - None, - None, - None, - Some(CustomMetadata { - // Disallow any cross chain transferability - transferability: CrossChainTransferability::None, - // Changed: Allow to be usable as pool currency - pool_currency: true, - ..Default::default() - }), - )); - assert_noop!( - pallet_liquidity_pools::Pallet::::allow_investment_currency( - RawOrigin::Signed(Keyring::Bob.into()).into(), - pool_id, - currency_id, - ), - pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsTransferable - ); - - // Should fail if currency does not have any Location in metadata - assert_ok!(orml_asset_registry::Pallet::::update_asset( - ::RuntimeOrigin::root(), - currency_id, - None, - None, - None, - None, - None, - Some(CustomMetadata { - // Changed: Allow liquidityPools transferability - transferability: CrossChainTransferability::LiquidityPools, - // Still allow to be pool currency - pool_currency: true, - ..Default::default() - }), - )); - assert_noop!( - pallet_liquidity_pools::Pallet::::allow_investment_currency( - RawOrigin::Signed(Keyring::Bob.into()).into(), - pool_id, - currency_id, - ), - pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsWrappedToken - ); - - // Should fail if currency does not have LiquidityPoolsWrappedToken location in - // metadata - assert_ok!(orml_asset_registry::Pallet::::update_asset( - ::RuntimeOrigin::root(), - currency_id, - None, - None, - None, - None, - // Changed: Add some location which cannot be converted to - // LiquidityPoolsWrappedToken - Some(Some(VersionedLocation::V4(Default::default()))), - // No change for transferability required as it is already allowed for - // LiquidityPools - None, - )); - assert_noop!( - pallet_liquidity_pools::Pallet::::allow_investment_currency( - RawOrigin::Signed(Keyring::Bob.into()).into(), - pool_id, - currency_id, - ), - pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsWrappedToken - ); - }); - } - - #[test_runtimes([development])] - fn disallow_investment_currency() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .add(genesis::tokens::(vec![( - GLMR_CURRENCY_ID, - DEFAULT_BALANCE_GLMR, - )])) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let currency_id = AUSD_CURRENCY_ID; - let pool_id = POOL_ID; - let evm_chain_id: u64 = MOONBEAM_EVM_CHAIN_ID; - let evm_address = [1u8; 20]; - - // Create an AUSD pool - create_ausd_pool::(pool_id); - - enable_liquidity_pool_transferability::(currency_id); - - // Enable LiquidityPools transferability - assert_ok!(orml_asset_registry::Pallet::::update_asset( - ::RuntimeOrigin::root(), - currency_id, - None, - None, - None, - None, - // Changed: Add location which can be converted to LiquidityPoolsWrappedToken - Some(Some(liquidity_pools_transferable_multilocation::( - evm_chain_id, - evm_address, - ))), - Some(CustomMetadata { - // Changed: Allow liquidity_pools transferability - transferability: CrossChainTransferability::LiquidityPools, - pool_currency: true, - ..Default::default() - }) - )); - - assert_ok!( - pallet_liquidity_pools::Pallet::::disallow_investment_currency( - RawOrigin::Signed(Keyring::Bob.into()).into(), - pool_id, - currency_id, - ) - ); - - assert_noop!( - pallet_liquidity_pools::Pallet::::disallow_investment_currency( - RawOrigin::Signed(Keyring::Charlie.into()).into(), - pool_id, - currency_id, - ), - pallet_liquidity_pools::Error::::NotPoolAdmin - ); - }); - } - - #[test_runtimes([development])] - fn disallow_investment_currency_should_fail() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .add(genesis::tokens::(vec![( - GLMR_CURRENCY_ID, - DEFAULT_BALANCE_GLMR, - )])) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - let currency_id = CurrencyId::ForeignAsset(42); - let ausd_currency_id = AUSD_CURRENCY_ID; - - // Should fail if pool does not exist - assert_noop!( - pallet_liquidity_pools::Pallet::::disallow_investment_currency( - RawOrigin::Signed(Keyring::Bob.into()).into(), - pool_id, - currency_id, - ), - pallet_liquidity_pools::Error::::NotPoolAdmin - ); - - // Register currency_id with pool_currency set to true - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - AssetMetadata { - name: BoundedVec::default(), - symbol: BoundedVec::default(), - decimals: 12, - location: None, - existential_deposit: 1_000_000, - additional: CustomMetadata { - pool_currency: true, - ..Default::default() - }, - }, - Some(currency_id) - )); - - // Create pool - create_currency_pool::(pool_id, currency_id, 10_000 * decimals(12)); - - enable_liquidity_pool_transferability::(ausd_currency_id); - - // Should fail if currency is not liquidityPools transferable - assert_ok!(orml_asset_registry::Pallet::::update_asset( - ::RuntimeOrigin::root(), - currency_id, - None, - None, - None, - None, - None, - Some(CustomMetadata { - // Disallow any cross chain transferability - transferability: CrossChainTransferability::None, - // Changed: Allow to be usable as pool currency - pool_currency: true, - ..Default::default() - }), - )); - assert_noop!( - pallet_liquidity_pools::Pallet::::disallow_investment_currency( - RawOrigin::Signed(Keyring::Bob.into()).into(), - pool_id, - currency_id, - ), - pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsTransferable - ); - - // Should fail if currency does not have any Location in metadata - assert_ok!(orml_asset_registry::Pallet::::update_asset( - ::RuntimeOrigin::root(), - currency_id, - None, - None, - None, - None, - None, - Some(CustomMetadata { - // Changed: Allow liquidityPools transferability - transferability: CrossChainTransferability::LiquidityPools, - // Still allow to be pool currency - pool_currency: true, - ..Default::default() - }), - )); - assert_noop!( - pallet_liquidity_pools::Pallet::::disallow_investment_currency( - RawOrigin::Signed(Keyring::Bob.into()).into(), - pool_id, - currency_id, - ), - pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsWrappedToken - ); - - // Should fail if currency does not have LiquidityPoolsWrappedToken location in - // metadata - assert_ok!(orml_asset_registry::Pallet::::update_asset( - ::RuntimeOrigin::root(), - currency_id, - None, - None, - None, - None, - // Changed: Add some location which cannot be converted to - // LiquidityPoolsWrappedToken - Some(Some(VersionedLocation::V4(Default::default()))), - // No change for transferability required as it is already allowed for - // LiquidityPools - None, - )); - assert_noop!( - pallet_liquidity_pools::Pallet::::disallow_investment_currency( - RawOrigin::Signed(Keyring::Bob.into()).into(), - pool_id, - currency_id, - ), - pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsWrappedToken - ); - }); - } - - #[test_runtimes([development])] - fn schedule_upgrade() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .add(genesis::tokens::(vec![( - GLMR_CURRENCY_ID, - DEFAULT_BALANCE_GLMR, - )])) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - // Only Root can call `schedule_upgrade` - assert_noop!( - pallet_liquidity_pools::Pallet::::schedule_upgrade( - RawOrigin::Signed(Keyring::Bob.into()).into(), - MOONBEAM_EVM_CHAIN_ID, - [7; 20] - ), - BadOrigin - ); - - // Now it finally works - assert_ok!(pallet_liquidity_pools::Pallet::::schedule_upgrade( - ::RuntimeOrigin::root(), - MOONBEAM_EVM_CHAIN_ID, - [7; 20] - )); - }); - } - - #[test_runtimes([development])] - fn cancel_upgrade() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .add(genesis::tokens::(vec![( - GLMR_CURRENCY_ID, - DEFAULT_BALANCE_GLMR, - )])) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - // Only Root can call `cancel_upgrade` - assert_noop!( - pallet_liquidity_pools::Pallet::::cancel_upgrade( - RawOrigin::Signed(Keyring::Bob.into()).into(), - MOONBEAM_EVM_CHAIN_ID, - [7; 20] - ), - BadOrigin - ); - - // Now it finally works - assert_ok!(pallet_liquidity_pools::Pallet::::cancel_upgrade( - ::RuntimeOrigin::root(), - MOONBEAM_EVM_CHAIN_ID, - [7; 20] - )); - }); - } - - #[test_runtimes([development])] - fn update_tranche_token_metadata() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .add(genesis::tokens::(vec![( - GLMR_CURRENCY_ID, - DEFAULT_BALANCE_GLMR, - )])) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - // NOTE: Default pool admin is BOB - create_ausd_pool::(pool_id); - - // Missing tranche token should throw - let nonexistent_tranche = [71u8; 16]; - - assert_noop!( - pallet_liquidity_pools::Pallet::::update_tranche_token_metadata( - RawOrigin::Signed(Keyring::Alice.into()).into(), - pool_id, - nonexistent_tranche, - Domain::EVM(MOONBEAM_EVM_CHAIN_ID), - ), - pallet_liquidity_pools::Error::::TrancheNotFound - ); - - let tranche_id = default_tranche_id::(pool_id); - - // Moving the update to another domain can be called by anyone - assert_ok!( - pallet_liquidity_pools::Pallet::::update_tranche_token_metadata( - RawOrigin::Signed(Keyring::Alice.into()).into(), - pool_id, - tranche_id, - Domain::EVM(MOONBEAM_EVM_CHAIN_ID), - ) - ); - - // Edge case: Should throw if tranche exists but metadata does not exist - let tranche_currency_id = CurrencyId::Tranche(pool_id, tranche_id); - - orml_asset_registry::Metadata::::remove(tranche_currency_id); - - assert_noop!( - pallet_liquidity_pools::Pallet::::update_tranche_token_metadata( - RawOrigin::Signed(POOL_ADMIN.into()).into(), - pool_id, - tranche_id, - Domain::EVM(MOONBEAM_EVM_CHAIN_ID), - ), - pallet_liquidity_pools::Error::::TrancheMetadataNotFound - ); - }); - } - } - - mod foreign_investments { - use super::*; - - mod same_currencies { - use super::*; - - #[test_runtimes([development])] - fn increase_invest_order() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .add(genesis::tokens::(vec![( - GLMR_CURRENCY_ID, - DEFAULT_BALANCE_GLMR, - )])) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - let amount = 10 * decimals(12); - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); - let currency_id = AUSD_CURRENCY_ID; - let currency_decimals = currency_decimals::AUSD; - - // Create new pool - create_currency_pool::(pool_id, currency_id, currency_decimals.into()); - - // Set permissions and execute initial investment - do_initial_increase_investment::( - pool_id, - amount, - investor.clone(), - currency_id, - ); - - // Verify the order was updated to the amount - assert_eq!( - pallet_investments::Pallet::::acc_active_invest_order( - default_investment_id::(), - ) - .amount, - amount - ); - - // Increasing again should just bump invest_amount - let msg = LiquidityPoolMessage::IncreaseInvestOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(currency_id), - amount, - }; - assert_ok!(pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - msg - )); - }); - } - - #[test_runtimes([development])] - fn decrease_invest_order() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - let invest_amount: u128 = 10 * decimals(12); - let decrease_amount = invest_amount / 3; - let final_amount = invest_amount - decrease_amount; - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); - let currency_id: CurrencyId = AUSD_CURRENCY_ID; - let currency_decimals = currency_decimals::AUSD; - - // Create new pool - create_currency_pool::(pool_id, currency_id, currency_decimals.into()); - - // Set permissions and execute initial investment - do_initial_increase_investment::( - pool_id, - invest_amount, - investor.clone(), - currency_id, - ); - - // Mock incoming decrease message - let msg = LiquidityPoolMessage::DecreaseInvestOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(currency_id), - amount: decrease_amount, - }; - - // Expect failure if transferability is disabled since this is required for - // preparing the `ExecutedDecreaseInvest` message. - assert_noop!( - pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - msg.clone() - ), - pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsTransferable - ); - enable_liquidity_pool_transferability::(currency_id); - - // Execute byte message - assert_ok!(pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - msg - )); - - // Verify investment was decreased into investment account - assert_eq!( - orml_tokens::Pallet::::balance( - currency_id, - &default_investment_account::() - ), - final_amount - ); - // Since the investment was done in the pool currency, the decrement happens - // synchronously and thus it must be burned from investor's holdings - assert_eq!(orml_tokens::Pallet::::balance(currency_id, &investor), 0); - assert!(frame_system::Pallet::::events().iter().any(|e| e.event - == pallet_investments::Event::::InvestOrderUpdated { - investment_id: default_investment_id::(), - submitted_at: 0, - who: investor.clone(), - amount: final_amount - } - .into())); - assert!(frame_system::Pallet::::events().iter().any(|e| e.event - == orml_tokens::Event::::Withdrawn { - currency_id, - who: investor.clone(), - amount: decrease_amount - } - .into())); - assert_eq!( - pallet_investments::Pallet::::acc_active_invest_order( - default_investment_id::(), - ) - .amount, - final_amount - ); - }); - } - - #[test_runtimes([development])] - fn cancel_invest_order() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - let invest_amount = 10 * decimals(12); - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); - let currency_id = AUSD_CURRENCY_ID; - let currency_decimals = currency_decimals::AUSD; - - // Create new pool - create_currency_pool::(pool_id, currency_id, currency_decimals.into()); - - // Set permissions and execute initial investment - do_initial_increase_investment::( - pool_id, - invest_amount, - investor.clone(), - currency_id, - ); - - // Verify investment account holds funds before cancelling - assert_eq!( - orml_tokens::Pallet::::balance( - currency_id, - &default_investment_account::() - ), - invest_amount - ); - - // Mock incoming cancel message - let msg = LiquidityPoolMessage::CancelInvestOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(currency_id), - }; - - // Expect failure if transferability is disabled since this is required for - // preparing the `ExecutedDecreaseInvest` message. - assert_noop!( - pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - msg.clone() - ), - pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsTransferable - ); - - enable_liquidity_pool_transferability::(currency_id); - - // Execute byte message - assert_ok!(pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - msg - )); - - // Verify investment was entirely drained from investment account - assert_eq!( - orml_tokens::Pallet::::balance( - currency_id, - &default_investment_account::() - ), - 0 - ); - // Since the investment was done in the pool currency, the decrement happens - // synchronously and thus it must be burned from investor's holdings - assert_eq!(orml_tokens::Pallet::::balance(currency_id, &investor), 0); - assert!(frame_system::Pallet::::events().iter().any(|e| e.event - == pallet_investments::Event::::InvestOrderUpdated { - investment_id: default_investment_id::(), - submitted_at: 0, - who: investor.clone(), - amount: 0 - } - .into())); - assert!(frame_system::Pallet::::events().iter().any(|e| e.event - == orml_tokens::Event::::Withdrawn { - currency_id, - who: investor.clone(), - amount: invest_amount - } - .into())); - assert_eq!( - pallet_investments::Pallet::::acc_active_invest_order( - default_investment_id::(), - ) - .amount, - 0 - ); - }); - } - - #[test_runtimes([development])] - fn collect_invest_order() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - let amount = 10 * decimals(12); - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); - let currency_id = AUSD_CURRENCY_ID; - let currency_decimals = currency_decimals::AUSD; - let sending_domain_locator = - Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()); - enable_liquidity_pool_transferability::(currency_id); - - // Create new pool - create_currency_pool::(pool_id, currency_id, currency_decimals.into()); - let investment_currency_id: CurrencyId = default_investment_id::().into(); - // Set permissions and execute initial investment - do_initial_increase_investment::( - pool_id, - amount, - investor.clone(), - currency_id, - ); - let events_before_collect = frame_system::Pallet::::events(); - - // Process and fulfill order - // NOTE: Without this step, the order id is not cleared and - // `Event::InvestCollectedForNonClearedOrderId` be dispatched - assert_ok!(pallet_investments::Pallet::::process_invest_orders( - default_investment_id::() - )); - - // Tranche tokens will be minted upon fulfillment - assert_eq!( - orml_tokens::Pallet::::total_issuance(investment_currency_id), - 0 - ); - assert_ok!(pallet_investments::Pallet::::invest_fulfillment( - default_investment_id::(), - FulfillmentWithPrice { - of_amount: Perquintill::one(), - price: Ratio::one(), - } - )); - assert_eq!( - orml_tokens::Pallet::::total_issuance(investment_currency_id), - amount - ); - - // Mock collection message msg - let msg = LiquidityPoolMessage::CollectInvest { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(currency_id), - }; - assert_ok!(pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - msg - )); - - // Remove events before collect execution - let events_since_collect: Vec<_> = frame_system::Pallet::::events() - .into_iter() - .filter(|e| !events_before_collect.contains(e)) - .collect(); - - // Verify investment was transferred to the domain locator - assert_eq!( - orml_tokens::Pallet::::balance( - default_investment_id::().into(), - &sending_domain_locator - ), - amount - ); - - // Order should have been cleared by fulfilling investment - assert_eq!( - pallet_investments::Pallet::::acc_active_invest_order( - default_investment_id::(), - ) - .amount, - 0 - ); - assert!(!events_since_collect.iter().any(|e| { - e.event - == pallet_investments::Event::::InvestCollectedForNonClearedOrderId { - investment_id: default_investment_id::(), - who: investor.clone(), - } - .into() - })); - - // Order should not have been updated since everything is collected - assert!(!events_since_collect.iter().any(|e| { - e.event - == pallet_investments::Event::::InvestOrderUpdated { - investment_id: default_investment_id::(), - submitted_at: 0, - who: investor.clone(), - amount: 0, - } - .into() - })); - - // Order should have been fully collected - assert!(events_since_collect.iter().any(|e| { - e.event - == pallet_investments::Event::::InvestOrdersCollected { - investment_id: default_investment_id::(), - processed_orders: vec![0], - who: investor.clone(), - collection: InvestCollection:: { - payout_investment_invest: amount, - remaining_investment_invest: 0, - }, - outcome: CollectOutcome::FullyCollected, - } - .into() - })); - - let sender = ::Sender::get(); - - // Clearing of foreign InvestState should be dispatched - assert!(frame_system::Pallet::::events().iter().any(|e| { - e.event - == pallet_liquidity_pools_gateway::Event::::OutboundMessageSubmitted { - sender: sender.clone(), - domain: DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain(), - message: LiquidityPoolMessage::ExecutedCollectInvest { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(currency_id), - currency_payout: amount, - tranche_tokens_payout: amount, - remaining_invest_amount: 0, - }, - } - .into() - })); - }); - } - - #[test_runtimes([development])] - fn partially_collect_investment_for_through_investments() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - let invest_amount = 10 * decimals(12); - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); - let currency_id = AUSD_CURRENCY_ID; - let currency_decimals = currency_decimals::AUSD; - let sending_domain_locator = - Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()); - create_currency_pool::(pool_id, currency_id, currency_decimals.into()); - do_initial_increase_investment::( - pool_id, - invest_amount, - investor.clone(), - currency_id, - ); - enable_liquidity_pool_transferability::(currency_id); - let investment_currency_id: CurrencyId = default_investment_id::().into(); - - assert!( - !pallet_investments::Pallet::::investment_requires_collect( - &investor, - default_investment_id::() - ) - ); - - // Process 50% of investment at 25% rate, i.e. 1 pool currency = 4 tranche - // tokens - assert_ok!(pallet_investments::Pallet::::process_invest_orders( - default_investment_id::() - )); - assert_ok!(pallet_investments::Pallet::::invest_fulfillment( - default_investment_id::(), - FulfillmentWithPrice { - of_amount: Perquintill::from_percent(50), - price: Ratio::checked_from_rational(1, 4).unwrap(), - } - )); - - // Pre collect assertions - assert!( - pallet_investments::Pallet::::investment_requires_collect( - &investor, - default_investment_id::() - ) - ); - - // Collecting through Investments should denote amounts and transition - // state - assert_ok!(pallet_investments::Pallet::::collect_investments_for( - RawOrigin::Signed(Keyring::Alice.into()).into(), - investor.clone(), - default_investment_id::() - )); - assert!( - !pallet_investments::Pallet::::investment_requires_collect( - &investor, - default_investment_id::() - ) - ); - - // Tranche Tokens should still be transferred to collected to - // domain locator account already - assert_eq!( - orml_tokens::Pallet::::balance(investment_currency_id, &investor), - 0 - ); - assert_eq!( - orml_tokens::Pallet::::balance( - investment_currency_id, - &sending_domain_locator - ), - invest_amount * 2 - ); - assert!(frame_system::Pallet::::events().iter().any(|e| { - e.event - == pallet_investments::Event::::InvestOrdersCollected { - investment_id: default_investment_id::(), - processed_orders: vec![0], - who: investor.clone(), - collection: InvestCollection:: { - payout_investment_invest: invest_amount * 2, - remaining_investment_invest: invest_amount / 2, - }, - outcome: CollectOutcome::FullyCollected, - } - .into() - })); - - let sender = ::Sender::get(); - - assert!(frame_system::Pallet::::events().iter().any(|e| { - e.event - == pallet_liquidity_pools_gateway::Event::::OutboundMessageSubmitted { - sender: sender.clone(), - domain: DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain(), - message: pallet_liquidity_pools::Message::ExecutedCollectInvest { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(currency_id), - currency_payout: invest_amount / 2, - tranche_tokens_payout: invest_amount * 2, - remaining_invest_amount: invest_amount / 2, - }, - } - .into() - })); - - // Process rest of investment at 50% rate (1 pool currency = 2 tranche tokens) - assert_ok!(pallet_investments::Pallet::::process_invest_orders( - default_investment_id::() - )); - assert_ok!(pallet_investments::Pallet::::invest_fulfillment( - default_investment_id::(), - FulfillmentWithPrice { - of_amount: Perquintill::one(), - price: Ratio::checked_from_rational(1, 2).unwrap(), - } - )); - // Order should have been cleared by fulfilling investment - assert_eq!( - pallet_investments::Pallet::::acc_active_invest_order( - default_investment_id::(), - ) - .amount, - 0 - ); - assert_eq!( - orml_tokens::Pallet::::total_issuance(investment_currency_id), - invest_amount * 3 - ); - - // Collect remainder through Investments - assert_ok!(pallet_investments::Pallet::::collect_investments_for( - RawOrigin::Signed(Keyring::Alice.into()).into(), - investor.clone(), - default_investment_id::() - )); - assert!( - !pallet_investments::Pallet::::investment_requires_collect( - &investor, - default_investment_id::() - ) - ); - - // Tranche Tokens should be transferred to collected to - // domain locator account already - let amount_tranche_tokens = invest_amount * 3; - assert_eq!( - orml_tokens::Pallet::::total_issuance(investment_currency_id), - amount_tranche_tokens - ); - assert!( - orml_tokens::Pallet::::balance(investment_currency_id, &investor) - .is_zero() - ); - assert_eq!( - orml_tokens::Pallet::::balance( - investment_currency_id, - &sending_domain_locator - ), - amount_tranche_tokens - ); - assert!(!frame_system::Pallet::::events().iter().any(|e| { - e.event - == pallet_investments::Event::::InvestCollectedForNonClearedOrderId { - investment_id: default_investment_id::(), - who: investor.clone(), - } - .into() - })); - assert!(frame_system::Pallet::::events().iter().any(|e| { - e.event - == pallet_investments::Event::::InvestOrdersCollected { - investment_id: default_investment_id::(), - processed_orders: vec![1], - who: investor.clone(), - collection: InvestCollection:: { - payout_investment_invest: invest_amount, - remaining_investment_invest: 0, - }, - outcome: CollectOutcome::FullyCollected, - } - .into() - })); - - assert!(frame_system::Pallet::::events().iter().any(|e| { - e.event - == pallet_liquidity_pools_gateway::Event::::OutboundMessageSubmitted { - sender: sender.clone(), - domain: DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain(), - message: LiquidityPoolMessage::ExecutedCollectInvest { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(currency_id), - currency_payout: invest_amount / 2, - tranche_tokens_payout: invest_amount, - remaining_invest_amount: 0, - }, - } - .into() - })); - - // Should fail to collect if `InvestmentState` does not - // exist - let msg = LiquidityPoolMessage::CollectInvest { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(currency_id), - }; - assert_noop!( - pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - msg - ), - pallet_foreign_investments::Error::::InfoNotFound - ); - }); - } - - #[test_runtimes([development])] - fn increase_redeem_order() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - let amount = 10 * decimals(12); - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); - let currency_id = AUSD_CURRENCY_ID; - let currency_decimals = currency_decimals::AUSD; - - // Create new pool - create_currency_pool::(pool_id, currency_id, currency_decimals.into()); - - // Set permissions and execute initial redemption - do_initial_increase_redemption::( - pool_id, - amount, - investor.clone(), - currency_id, - ); - - // Verify amount was noted in the corresponding order - assert_eq!( - pallet_investments::Pallet::::acc_active_redeem_order( - default_investment_id::(), - ) - .amount, - amount - ); - - // Increasing again should just bump redeeming amount - assert_ok!(orml_tokens::Pallet::::mint_into( - default_investment_id::().into(), - &Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()), - amount - )); - let msg = LiquidityPoolMessage::IncreaseRedeemOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(currency_id), - amount, - }; - assert_ok!(pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - msg - )); - }); - } - - #[test_runtimes([development])] - fn decrease_redeem_order() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - let redeem_amount = 10 * decimals(12); - let decrease_amount = redeem_amount / 3; - let final_amount = redeem_amount - decrease_amount; - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); - let currency_id = AUSD_CURRENCY_ID; - let currency_decimals = currency_decimals::AUSD; - let sending_domain_locator = - Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()); - - // Create new pool - create_currency_pool::(pool_id, currency_id, currency_decimals.into()); - - // Set permissions and execute initial redemption - do_initial_increase_redemption::( - pool_id, - redeem_amount, - investor.clone(), - currency_id, - ); - - // Verify the corresponding redemption order id is 0 - assert_eq!( - pallet_investments::Pallet::::invest_order_id(investment_id::( - pool_id, - default_tranche_id::(pool_id) - )), - 0 - ); - - // Mock incoming decrease message - let msg = LiquidityPoolMessage::DecreaseRedeemOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(currency_id), - amount: decrease_amount, - }; - - // Execute byte message - assert_ok!(pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - msg - )); - - // Verify investment was decreased into investment account - assert_eq!( - orml_tokens::Pallet::::balance( - default_investment_id::().into(), - &default_investment_account::(), - ), - final_amount - ); - // Tokens should have been transferred from investor's wallet to domain's - // sovereign account - assert_eq!( - orml_tokens::Pallet::::balance( - default_investment_id::().into(), - &investor - ), - 0 - ); - assert_eq!( - orml_tokens::Pallet::::balance( - default_investment_id::().into(), - &sending_domain_locator - ), - decrease_amount - ); - - // Order should have been updated - assert!(frame_system::Pallet::::events().iter().any(|e| e.event - == pallet_investments::Event::::RedeemOrderUpdated { - investment_id: default_investment_id::(), - submitted_at: 0, - who: investor.clone(), - amount: final_amount - } - .into())); - assert_eq!( - pallet_investments::Pallet::::acc_active_redeem_order( - default_investment_id::(), - ) - .amount, - final_amount - ); - - let sender = ::Sender::get(); - - assert!(frame_system::Pallet::::events().iter().any(|e| { - e.event - == pallet_liquidity_pools_gateway::Event::::OutboundMessageSubmitted { - sender: sender.clone(), - domain: DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain(), - message: LiquidityPoolMessage::ExecutedDecreaseRedeemOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(currency_id), - tranche_tokens_payout: decrease_amount, - remaining_redeem_amount: final_amount, - }, - } - .into() - })); - }); - } - - #[test_runtimes([development])] - fn cancel_redeem_order() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - let redeem_amount = 10 * decimals(12); - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); - let currency_id = AUSD_CURRENCY_ID; - let currency_decimals = currency_decimals::AUSD; - let sending_domain_locator = - Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()); - - // Create new pool - create_currency_pool::(pool_id, currency_id, currency_decimals.into()); - - // Set permissions and execute initial redemption - do_initial_increase_redemption::( - pool_id, - redeem_amount, - investor.clone(), - currency_id, - ); - - // Verify the corresponding redemption order id is 0 - assert_eq!( - pallet_investments::Pallet::::invest_order_id(investment_id::( - pool_id, - default_tranche_id::(pool_id) - )), - 0 - ); - - // Mock incoming decrease message - let msg = LiquidityPoolMessage::CancelRedeemOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(currency_id), - }; - - // Execute byte message - assert_ok!(pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - msg - )); - - // Verify investment was decreased into investment account - assert_eq!( - orml_tokens::Pallet::::balance( - default_investment_id::().into(), - &default_investment_account::(), - ), - 0 - ); - // Tokens should have been transferred from investor's wallet to domain's - // sovereign account - assert_eq!( - orml_tokens::Pallet::::balance( - default_investment_id::().into(), - &investor - ), - 0 - ); - assert_eq!( - orml_tokens::Pallet::::balance( - default_investment_id::().into(), - &sending_domain_locator - ), - redeem_amount - ); - - // Order should have been updated - assert!(frame_system::Pallet::::events().iter().any(|e| e.event - == pallet_investments::Event::::RedeemOrderUpdated { - investment_id: default_investment_id::(), - submitted_at: 0, - who: investor.clone(), - amount: 0 - } - .into())); - assert_eq!( - pallet_investments::Pallet::::acc_active_redeem_order( - default_investment_id::(), - ) - .amount, - 0 - ); - }); - } - - #[test_runtimes([development])] - fn fully_collect_redeem_order() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - let amount = 10 * decimals(12); - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); - let currency_id = AUSD_CURRENCY_ID; - let currency_decimals = currency_decimals::AUSD; - let pool_account = pallet_pool_system::pool_types::PoolLocator { pool_id } - .into_account_truncating(); - - // Create new pool - create_currency_pool::(pool_id, currency_id, currency_decimals.into()); - - // Set permissions and execute initial investment - do_initial_increase_redemption::( - pool_id, - amount, - investor.clone(), - currency_id, - ); - let events_before_collect = frame_system::Pallet::::events(); - - // Fund the pool account with sufficient pool currency, else redemption cannot - // swap tranche tokens against pool currency - assert_ok!(orml_tokens::Pallet::::mint_into( - currency_id, - &pool_account, - amount - )); - - // Process and fulfill order - // NOTE: Without this step, the order id is not cleared and - // `Event::RedeemCollectedForNonClearedOrderId` be dispatched - assert_ok!(pallet_investments::Pallet::::process_redeem_orders( - default_investment_id::() - )); - assert_ok!(pallet_investments::Pallet::::redeem_fulfillment( - default_investment_id::(), - FulfillmentWithPrice { - of_amount: Perquintill::one(), - price: Ratio::one(), - } - )); - - // Enable liquidity pool transferability - enable_liquidity_pool_transferability::(currency_id); - - // Mock collection message msg - let msg = LiquidityPoolMessage::CollectRedeem { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(currency_id), - }; - - // Execute byte message - assert_ok!(pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - msg - )); - - // Remove events before collect execution - let events_since_collect: Vec<_> = frame_system::Pallet::::events() - .into_iter() - .filter(|e| !events_before_collect.contains(e)) - .collect(); - - // Verify collected redemption was burned from investor - assert_eq!(orml_tokens::Pallet::::balance(currency_id, &investor), 0); - assert!(frame_system::Pallet::::events().iter().any(|e| e.event - == orml_tokens::Event::::Withdrawn { - currency_id, - who: investor.clone(), - amount - } - .into())); - - // Order should have been cleared by fulfilling redemption - assert_eq!( - pallet_investments::Pallet::::acc_active_redeem_order( - default_investment_id::(), - ) - .amount, - 0 - ); - assert!(!events_since_collect.iter().any(|e| { - e.event - == pallet_investments::Event::::RedeemCollectedForNonClearedOrderId { - investment_id: default_investment_id::(), - who: investor.clone(), - } - .into() - })); - - // Order should not have been updated since everything is collected - assert!(!events_since_collect.iter().any(|e| { - e.event - == pallet_investments::Event::::RedeemOrderUpdated { - investment_id: default_investment_id::(), - submitted_at: 0, - who: investor.clone(), - amount: 0, - } - .into() - })); - - // Order should have been fully collected - assert!(events_since_collect.iter().any(|e| { - e.event - == pallet_investments::Event::::RedeemOrdersCollected { - investment_id: default_investment_id::(), - processed_orders: vec![0], - who: investor.clone(), - collection: RedeemCollection:: { - payout_investment_redeem: amount, - remaining_investment_redeem: 0, - }, - outcome: CollectOutcome::FullyCollected, - } - .into() - })); - - let sender = ::Sender::get(); - - // Clearing of foreign RedeemState should be dispatched - assert!(frame_system::Pallet::::events().iter().any(|e| { - e.event - == pallet_liquidity_pools_gateway::Event::::OutboundMessageSubmitted { - sender: sender.clone(), - domain: DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain(), - message: LiquidityPoolMessage::ExecutedCollectRedeem { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(currency_id), - currency_payout: amount, - tranche_tokens_payout: amount, - remaining_redeem_amount: 0, - }, - } - .into() - })); - }); - } - - #[test_runtimes([development])] - fn partially_collect_redemption_for_through_investments() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - let redeem_amount = 10 * decimals(12); - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); - let currency_id = AUSD_CURRENCY_ID; - let currency_decimals = currency_decimals::AUSD; - let pool_account = pallet_pool_system::pool_types::PoolLocator { pool_id } - .into_account_truncating(); - create_currency_pool::(pool_id, currency_id, currency_decimals.into()); - do_initial_increase_redemption::( - pool_id, - redeem_amount, - investor.clone(), - currency_id, - ); - enable_liquidity_pool_transferability::(currency_id); - - // Fund the pool account with sufficient pool currency, else redemption cannot - // swap tranche tokens against pool currency - assert_ok!(orml_tokens::Pallet::::mint_into( - currency_id, - &pool_account, - redeem_amount - )); - assert!( - !pallet_investments::Pallet::::redemption_requires_collect( - &investor, - default_investment_id::() - ) - ); - - // Process 50% of redemption at 25% rate, i.e. 1 pool currency = 4 tranche - // tokens - assert_ok!(pallet_investments::Pallet::::process_redeem_orders( - default_investment_id::() - )); - assert_ok!(pallet_investments::Pallet::::redeem_fulfillment( - default_investment_id::(), - FulfillmentWithPrice { - of_amount: Perquintill::from_percent(50), - price: Ratio::checked_from_rational(1, 4).unwrap(), - } - )); - - // Pre collect assertions - assert!( - pallet_investments::Pallet::::redemption_requires_collect( - &investor, - default_investment_id::() - ) - ); - - // Collecting through investments should denote amounts and transition - // state - assert_ok!(pallet_investments::Pallet::::collect_redemptions_for( - RawOrigin::Signed(Keyring::Alice.into()).into(), - investor.clone(), - default_investment_id::() - )); - assert!(frame_system::Pallet::::events().iter().any(|e| { - e.event - == pallet_investments::Event::::RedeemOrdersCollected { - investment_id: default_investment_id::(), - processed_orders: vec![0], - who: investor.clone(), - collection: RedeemCollection:: { - payout_investment_redeem: redeem_amount / 8, - remaining_investment_redeem: redeem_amount / 2, - }, - outcome: CollectOutcome::FullyCollected, - } - .into() - })); - - let sender = ::Sender::get(); - - assert!(frame_system::Pallet::::events().iter().any(|e| { - e.event - == pallet_liquidity_pools_gateway::Event::::OutboundMessageSubmitted { - sender: sender.clone(), - domain: DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain(), - message: LiquidityPoolMessage::ExecutedCollectRedeem { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(currency_id), - currency_payout: redeem_amount / 8, - tranche_tokens_payout: redeem_amount / 2, - remaining_redeem_amount: redeem_amount / 2, - }, - } - .into() - })); - assert!( - !pallet_investments::Pallet::::redemption_requires_collect( - &investor, - default_investment_id::() - ) - ); - // Since foreign currency is pool currency, the swap is immediately fulfilled - // and ExecutedCollectRedeem dispatched - assert!(frame_system::Pallet::::events().iter().any(|e| e.event - == orml_tokens::Event::::Withdrawn { - currency_id, - who: investor.clone(), - amount: redeem_amount / 8 - } - .into())); - - // Process rest of redemption at 50% rate - assert_ok!(pallet_investments::Pallet::::process_redeem_orders( - default_investment_id::() - )); - assert_ok!(pallet_investments::Pallet::::redeem_fulfillment( - default_investment_id::(), - FulfillmentWithPrice { - of_amount: Perquintill::one(), - price: Ratio::checked_from_rational(1, 2).unwrap(), - } - )); - // Order should have been cleared by fulfilling redemption - assert_eq!( - pallet_investments::Pallet::::acc_active_redeem_order( - default_investment_id::(), - ) - .amount, - 0 - ); - - // Collect remainder through Investments - assert_ok!(pallet_investments::Pallet::::collect_redemptions_for( - RawOrigin::Signed(Keyring::Alice.into()).into(), - investor.clone(), - default_investment_id::() - )); - assert!( - !pallet_investments::Pallet::::redemption_requires_collect( - &investor, - default_investment_id::() - ) - ); - assert!(!frame_system::Pallet::::events().iter().any(|e| { - e.event - == pallet_investments::Event::::RedeemCollectedForNonClearedOrderId { - investment_id: default_investment_id::(), - who: investor.clone(), - } - .into() - })); - assert!(frame_system::Pallet::::events().iter().any(|e| { - e.event - == pallet_investments::Event::::RedeemOrdersCollected { - investment_id: default_investment_id::(), - processed_orders: vec![1], - who: investor.clone(), - collection: RedeemCollection:: { - payout_investment_redeem: redeem_amount / 4, - remaining_investment_redeem: 0, - }, - outcome: CollectOutcome::FullyCollected, - } - .into() - })); - // Verify collected redemption was burned from investor - assert_eq!(orml_tokens::Pallet::::balance(currency_id, &investor), 0); - assert!(frame_system::Pallet::::events().iter().any(|e| e.event - == orml_tokens::Event::::Withdrawn { - currency_id, - who: investor.clone(), - amount: redeem_amount / 4 - } - .into())); - // Clearing of foreign RedeemState should have been dispatched exactly once - assert!(frame_system::Pallet::::events().iter().any(|e| { - e.event - == pallet_liquidity_pools_gateway::Event::::OutboundMessageSubmitted { - sender: sender.clone(), - domain: DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain(), - message: LiquidityPoolMessage::ExecutedCollectRedeem { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(currency_id), - currency_payout: redeem_amount / 4, - tranche_tokens_payout: redeem_amount / 2, - remaining_redeem_amount: 0, - }, - } - .into() - })); - }); - } - - mod should_fail { - use super::*; - - mod decrease_should_underflow { - use super::*; - - #[test_runtimes([development])] - fn invest_decrease_underflow() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - let invest_amount: u128 = 10 * decimals(12); - let decrease_amount = invest_amount + 1; - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); - let currency_id: CurrencyId = AUSD_CURRENCY_ID; - let currency_decimals = currency_decimals::AUSD; - create_currency_pool::( - pool_id, - currency_id, - currency_decimals.into(), - ); - do_initial_increase_investment::( - pool_id, - invest_amount, - investor.clone(), - currency_id, - ); - enable_liquidity_pool_transferability::(currency_id); - - // Mock incoming decrease message - let msg = LiquidityPoolMessage::DecreaseInvestOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(currency_id), - amount: decrease_amount, - }; - - assert_noop!( - pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - msg - ), - pallet_foreign_investments::Error::::TooMuchDecrease - ); - }); - } - - #[test_runtimes([development])] - fn redeem_decrease_underflow() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - let redeem_amount: u128 = 10 * decimals(12); - let decrease_amount = redeem_amount + 1; - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); - let currency_id: CurrencyId = AUSD_CURRENCY_ID; - let currency_decimals = currency_decimals::AUSD; - create_currency_pool::( - pool_id, - currency_id, - currency_decimals.into(), - ); - do_initial_increase_redemption::( - pool_id, - redeem_amount, - investor.clone(), - currency_id, - ); - - // Mock incoming decrease message - let msg = LiquidityPoolMessage::DecreaseRedeemOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(currency_id), - amount: decrease_amount, - }; - - assert_noop!( - pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - msg - ), - DispatchError::Arithmetic(sp_runtime::ArithmeticError::Underflow) - ); - }); - } - } - - mod should_throw_requires_collect { - use super::*; - - #[test_runtimes([development])] - fn invest_requires_collect() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - let amount: u128 = 10 * decimals(12); - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); - let currency_id: CurrencyId = AUSD_CURRENCY_ID; - let currency_decimals = currency_decimals::AUSD; - create_currency_pool::( - pool_id, - currency_id, - currency_decimals.into(), - ); - do_initial_increase_investment::( - pool_id, - amount, - investor.clone(), - currency_id, - ); - enable_liquidity_pool_transferability::(currency_id); - - // Prepare collection - let pool_account = - pallet_pool_system::pool_types::PoolLocator { pool_id } - .into_account_truncating(); - assert_ok!(orml_tokens::Pallet::::mint_into( - currency_id, - &pool_account, - amount - )); - assert_ok!(pallet_investments::Pallet::::process_invest_orders( - default_investment_id::() - )); - assert_ok!(pallet_investments::Pallet::::invest_fulfillment( - default_investment_id::(), - FulfillmentWithPrice { - of_amount: Perquintill::one(), - price: Ratio::one(), - } - )); - - // Should fail to increase - let increase_msg = LiquidityPoolMessage::IncreaseInvestOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(currency_id), - amount: AUSD_ED, - }; - assert_noop!( - pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - increase_msg - ), - pallet_investments::Error::::CollectRequired - ); - - // Should fail to decrease - let decrease_msg = LiquidityPoolMessage::DecreaseInvestOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(currency_id), - amount: 1, - }; - assert_noop!( - pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - decrease_msg - ), - pallet_investments::Error::::CollectRequired - ); - }); - } - - #[test_runtimes([development])] - fn redeem_requires_collect() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - let amount: u128 = 10 * decimals(12); - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); - let currency_id: CurrencyId = AUSD_CURRENCY_ID; - let currency_decimals = currency_decimals::AUSD; - create_currency_pool::( - pool_id, - currency_id, - currency_decimals.into(), - ); - do_initial_increase_redemption::( - pool_id, - amount, - investor.clone(), - currency_id, - ); - enable_liquidity_pool_transferability::(currency_id); - - // Mint more into DomainLocator required for subsequent invest attempt - assert_ok!(orml_tokens::Pallet::::mint_into( - default_investment_id::().into(), - &Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()), - 1, - )); - - // Prepare collection - let pool_account = - pallet_pool_system::pool_types::PoolLocator { pool_id } - .into_account_truncating(); - assert_ok!(orml_tokens::Pallet::::mint_into( - currency_id, - &pool_account, - amount - )); - assert_ok!(pallet_investments::Pallet::::process_redeem_orders( - default_investment_id::() - )); - assert_ok!(pallet_investments::Pallet::::redeem_fulfillment( - default_investment_id::(), - FulfillmentWithPrice { - of_amount: Perquintill::one(), - price: Ratio::one(), - } - )); - - // Should fail to increase - let increase_msg = LiquidityPoolMessage::IncreaseRedeemOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(currency_id), - amount: 1, - }; - assert_noop!( - pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - increase_msg - ), - pallet_investments::Error::::CollectRequired - ); - - // Should fail to decrease - let decrease_msg = LiquidityPoolMessage::DecreaseRedeemOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(currency_id), - amount: 1, - }; - assert_noop!( - pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - decrease_msg - ), - pallet_investments::Error::::CollectRequired - ); - }); - } - } - - mod payment_payout_currency { - use super::*; - - #[test_runtimes([development])] - fn invalid_invest_payment_currency() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); - let pool_currency = AUSD_CURRENCY_ID; - let currency_decimals = currency_decimals::AUSD; - let foreign_currency: CurrencyId = USDT_CURRENCY_ID; - let amount = 6 * decimals(18); - - create_currency_pool::( - pool_id, - pool_currency, - currency_decimals.into(), - ); - do_initial_increase_investment::( - pool_id, - amount, - investor.clone(), - pool_currency, - ); - - enable_usdt_trading::(pool_currency, amount, true, true, true); - - // Should fail to increase, decrease or collect for - // another foreign currency as long as - // `InvestmentState` exists - let increase_msg = LiquidityPoolMessage::IncreaseInvestOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(foreign_currency), - amount: AUSD_ED, - }; - assert_noop!( - pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - increase_msg - ), - pallet_foreign_investments::Error::::MismatchedForeignCurrency - ); - let decrease_msg = LiquidityPoolMessage::DecreaseInvestOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(foreign_currency), - amount: 1, - }; - assert_noop!( - pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - decrease_msg - ), - pallet_foreign_investments::Error::::MismatchedForeignCurrency - ); - let collect_msg = LiquidityPoolMessage::CollectInvest { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(foreign_currency), - }; - assert_noop!( - pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - collect_msg - ), - pallet_foreign_investments::Error::::MismatchedForeignCurrency - ); - }); - } - - #[test_runtimes([development])] - fn invalid_redeem_payout_currency() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); - let pool_currency = AUSD_CURRENCY_ID; - let currency_decimals = currency_decimals::AUSD; - let foreign_currency: CurrencyId = USDT_CURRENCY_ID; - let amount = 6 * decimals(18); - - create_currency_pool::( - pool_id, - pool_currency, - currency_decimals.into(), - ); - do_initial_increase_redemption::( - pool_id, - amount, - investor.clone(), - pool_currency, - ); - enable_usdt_trading::(pool_currency, amount, true, true, true); - assert_ok!(orml_tokens::Pallet::::mint_into( - default_investment_id::().into(), - &Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()), - amount, - )); - - // Should fail to increase, decrease or collect for - // another foreign currency as long as - // `RedemptionState` exists - let increase_msg = LiquidityPoolMessage::IncreaseRedeemOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(foreign_currency), - amount: 1, - }; - assert_noop!( - pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - increase_msg - ), - pallet_foreign_investments::Error::::MismatchedForeignCurrency - ); - let decrease_msg = LiquidityPoolMessage::DecreaseRedeemOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(foreign_currency), - amount: 1, - }; - assert_noop!( - pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - decrease_msg - ), - pallet_foreign_investments::Error::::MismatchedForeignCurrency - ); - let collect_msg = LiquidityPoolMessage::CollectRedeem { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(foreign_currency), - }; - assert_noop!( - pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - collect_msg - ), - pallet_foreign_investments::Error::::MismatchedForeignCurrency - ); - }); - } - - #[test_runtimes([development])] - fn redeem_payout_currency_not_found() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); - let pool_currency = AUSD_CURRENCY_ID; - let currency_decimals = currency_decimals::AUSD; - let foreign_currency: CurrencyId = USDT_CURRENCY_ID; - let amount = 6 * decimals(18); - - create_currency_pool::( - pool_id, - pool_currency, - currency_decimals.into(), - ); - do_initial_increase_redemption::( - pool_id, - amount, - investor.clone(), - pool_currency, - ); - enable_usdt_trading::(pool_currency, amount, true, true, true); - assert_ok!(orml_tokens::Pallet::::mint_into( - default_investment_id::().into(), - &Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()), - amount, - )); - - // Should fail to decrease or collect for another - // foreign currency as long as `RedemptionState` - // exists - let decrease_msg = LiquidityPoolMessage::DecreaseRedeemOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(foreign_currency), - amount: 1, - }; - assert_noop!( - pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - decrease_msg - ), - pallet_foreign_investments::Error::::MismatchedForeignCurrency - ); - - let collect_msg = LiquidityPoolMessage::CollectRedeem { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(foreign_currency), - }; - assert_noop!( - pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - collect_msg - ), - pallet_foreign_investments::Error::::MismatchedForeignCurrency - ); - }); - } - } - } - } - - mod mismatching_currencies { - use super::*; - - #[test_runtimes([development])] - fn collect_foreign_investment_for() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); - let pool_currency: CurrencyId = AUSD_CURRENCY_ID; - let foreign_currency: CurrencyId = USDT_CURRENCY_ID; - let pool_currency_decimals = currency_decimals::AUSD; - let invest_amount_pool_denominated: u128 = 6 * decimals(18); - let sending_domain_locator = - Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()); - let trader: AccountId = Keyring::Alice.into(); - create_currency_pool::( - pool_id, - pool_currency, - pool_currency_decimals.into(), - ); - - // USDT investment preparations - let invest_amount_foreign_denominated = enable_usdt_trading::( - pool_currency, - invest_amount_pool_denominated, - true, - true, - // not needed because we don't initialize a swap from pool to foreign here - false, - ); - - // Do first investment and fulfill swap order - do_initial_increase_investment::( - pool_id, - invest_amount_foreign_denominated, - investor.clone(), - foreign_currency, - ); - fulfill_swap_into_pool::( - pool_id, - default_order_id::(&investor), - invest_amount_pool_denominated, - invest_amount_foreign_denominated, - trader, - ); - - // Increase invest order to initialize ForeignInvestmentInfo - let msg = LiquidityPoolMessage::IncreaseInvestOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(foreign_currency), - amount: invest_amount_foreign_denominated, - }; - assert_ok!(pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - msg - )); - - // Process 100% of investment at 50% rate (1 pool currency = 2 tranche tokens) - assert_ok!(pallet_investments::Pallet::::process_invest_orders( - default_investment_id::() - )); - assert_ok!(pallet_investments::Pallet::::invest_fulfillment( - default_investment_id::(), - FulfillmentWithPrice { - of_amount: Perquintill::one(), - price: Ratio::checked_from_rational(1, 2).unwrap(), - } - )); - assert_ok!(pallet_investments::Pallet::::collect_investments_for( - RawOrigin::Signed(Keyring::Alice.into()).into(), - investor.clone(), - default_investment_id::() - )); - assert!(orml_tokens::Pallet::::balance( - default_investment_id::().into(), - &investor - ) - .is_zero()); - assert_eq!( - orml_tokens::Pallet::::balance( - default_investment_id::().into(), - &sending_domain_locator - ), - invest_amount_pool_denominated * 2 - ); - - let sender = ::Sender::get(); - - assert!(frame_system::Pallet::::events().iter().any(|e| { - e.event - == pallet_liquidity_pools_gateway::Event::::OutboundMessageSubmitted { - sender: sender.clone(), - domain: DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain(), - message: LiquidityPoolMessage::ExecutedCollectInvest { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(foreign_currency), - currency_payout: invest_amount_foreign_denominated, - tranche_tokens_payout: 2 * invest_amount_pool_denominated, - remaining_invest_amount: invest_amount_foreign_denominated, - }, - } - .into() - })); - }); - } - - /// Invest in pool currency, then increase in allowed foreign - /// currency, then decrease in same foreign currency multiple times. - #[test_runtimes([development])] - fn increase_fulfill_increase_decrease_decrease_partial() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); - let pool_currency: CurrencyId = AUSD_CURRENCY_ID; - let foreign_currency: CurrencyId = USDT_CURRENCY_ID; - let pool_currency_decimals = currency_decimals::AUSD; - let invest_amount_pool_denominated: u128 = 6 * decimals(18); - let trader: AccountId = Keyring::Alice.into(); - create_currency_pool::( - pool_id, - pool_currency, - pool_currency_decimals.into(), - ); - - // USDT investment preparations - let invest_amount_foreign_denominated = enable_usdt_trading::( - pool_currency, - invest_amount_pool_denominated, - true, - true, - true, - ); - - // Do first investment and fulfill swap order - do_initial_increase_investment::( - pool_id, - invest_amount_foreign_denominated, - investor.clone(), - foreign_currency, - ); - fulfill_swap_into_pool::( - pool_id, - default_order_id::(&investor), - invest_amount_pool_denominated, - invest_amount_foreign_denominated, - trader.clone(), - ); - - // Do second investment and not fulfill swap order - let increase_msg = LiquidityPoolMessage::IncreaseInvestOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(foreign_currency), - amount: invest_amount_foreign_denominated, - }; - assert_ok!(pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - increase_msg - )); - - // Decrease pending pool swap by same amount - let decrease_msg_pool_swap_amount = LiquidityPoolMessage::DecreaseInvestOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(foreign_currency), - amount: invest_amount_foreign_denominated, - }; - assert_ok!(pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - decrease_msg_pool_swap_amount - )); - assert!(frame_system::Pallet::::events().iter().any(|e| { - e.event - == pallet_liquidity_pools_gateway::Event::::OutboundMessageSubmitted { - sender: ::Sender::get(), - domain: DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain(), - message: LiquidityPoolMessage::ExecutedDecreaseInvestOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(foreign_currency), - currency_payout: invest_amount_foreign_denominated, - remaining_invest_amount: invest_amount_foreign_denominated, - }, - } - .into() - })); - - // Decrease partially investing amount - let decrease_msg_partial_invest_amount = - LiquidityPoolMessage::DecreaseInvestOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(foreign_currency), - amount: invest_amount_foreign_denominated / 2, - }; - assert_ok!(pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - decrease_msg_partial_invest_amount.clone() - )); - - // Consume entire investing amount by sending same message - assert_ok!(pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - decrease_msg_partial_invest_amount.clone() - )); - - // Swap decreased amount - assert_ok!(pallet_order_book::Pallet::::fill_order( - RawOrigin::Signed(trader.clone()).into(), - default_order_id::(&investor), - invest_amount_pool_denominated - )); - assert!(frame_system::Pallet::::events().iter().any(|e| { - e.event - == pallet_liquidity_pools_gateway::Event::::OutboundMessageSubmitted { - sender: ::Sender::get(), - domain: DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain(), - message: LiquidityPoolMessage::ExecutedDecreaseInvestOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(foreign_currency), - currency_payout: invest_amount_foreign_denominated, - remaining_invest_amount: 0, - }, - } - .into() - })); - }); - } - - /// Propagate swaps only via OrderBook fulfillments. - /// - /// Flow: Increase, fulfill, decrease, fulfill - #[test_runtimes([development])] - fn invest_swaps_happy_path() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .add(genesis::tokens::(vec![ - (AUSD_CURRENCY_ID, AUSD_ED), - (USDT_CURRENCY_ID, USDT_ED), - ])) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); - let trader: AccountId = Keyring::Alice.into(); - let pool_currency: CurrencyId = AUSD_CURRENCY_ID; - let foreign_currency: CurrencyId = USDT_CURRENCY_ID; - let pool_currency_decimals = currency_decimals::AUSD; - let invest_amount_pool_denominated: u128 = 10 * decimals(18); - create_currency_pool::( - pool_id, - pool_currency, - pool_currency_decimals.into(), - ); - let invest_amount_foreign_denominated: u128 = enable_usdt_trading::( - pool_currency, - invest_amount_pool_denominated, - true, - true, - true, - ); - - // Increase such that active swap into USDT is initialized - do_initial_increase_investment::( - pool_id, - invest_amount_foreign_denominated, - investor.clone(), - foreign_currency, - ); - - // Fulfilling order should propagate it from swapping to investing - let swap_order_id = default_order_id::(&investor); - fulfill_swap_into_pool::( - pool_id, - swap_order_id, - invest_amount_pool_denominated, - invest_amount_foreign_denominated, - trader.clone(), - ); - assert!(frame_system::Pallet::::events().iter().any(|e| { - e.event - == pallet_order_book::Event::::OrderFulfillment { - order_id: swap_order_id, - placing_account: investor.clone(), - fulfilling_account: trader.clone(), - partial_fulfillment: false, - fulfillment_amount: invest_amount_foreign_denominated, - currency_in: pool_currency, - currency_out: foreign_currency, - ratio: Ratio::one(), - } - .into() - })); - - // Decrease by half the investment amount - let msg = LiquidityPoolMessage::DecreaseInvestOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(foreign_currency), - amount: invest_amount_foreign_denominated / 2, - }; - assert_ok!(pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - msg.clone() - )); - - let swap_order_id = default_order_id::(&investor); - assert_ok!(pallet_order_book::Pallet::::fill_order( - RawOrigin::Signed(trader.clone()).into(), - swap_order_id, - invest_amount_pool_denominated / 2 - )); - assert!(frame_system::Pallet::::events().iter().any(|e| { - e.event - == pallet_order_book::Event::::OrderFulfillment { - order_id: swap_order_id, - placing_account: investor.clone(), - fulfilling_account: trader.clone(), - partial_fulfillment: false, - fulfillment_amount: invest_amount_pool_denominated / 2, - currency_in: foreign_currency, - currency_out: pool_currency, - ratio: Ratio::one(), - } - .into() - })); - - let sender = ::Sender::get(); - - assert!(frame_system::Pallet::::events().iter().any(|e| { - e.event - == pallet_liquidity_pools_gateway::Event::::OutboundMessageSubmitted { - sender: sender.clone(), - domain: DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain(), - message: LiquidityPoolMessage::ExecutedDecreaseInvestOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(foreign_currency), - currency_payout: invest_amount_foreign_denominated / 2, - remaining_invest_amount: invest_amount_foreign_denominated / 2, - }, - } - .into() - })); - }); - } - - #[test_runtimes([development])] - fn increase_fulfill_decrease_fulfill_partial_increase() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); - let pool_currency: CurrencyId = AUSD_CURRENCY_ID; - let foreign_currency: CurrencyId = USDT_CURRENCY_ID; - let pool_currency_decimals = currency_decimals::AUSD; - let invest_amount_pool_denominated: u128 = 10 * decimals(18); - let trader: AccountId = Keyring::Alice.into(); - create_currency_pool::( - pool_id, - pool_currency, - pool_currency_decimals.into(), - ); - - // USDT investment preparations - let invest_amount_foreign_denominated = enable_usdt_trading::( - pool_currency, - invest_amount_pool_denominated, - true, - true, - true, - ); - - // Do first investment and fulfill swap order - do_initial_increase_investment::( - pool_id, - invest_amount_foreign_denominated, - investor.clone(), - foreign_currency, - ); - fulfill_swap_into_pool::( - pool_id, - default_order_id::(&investor), - invest_amount_pool_denominated, - invest_amount_foreign_denominated, - trader.clone(), - ); - - // Decrease pending pool swap by same amount - let decrease_msg_pool_swap_amount = LiquidityPoolMessage::DecreaseInvestOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(foreign_currency), - amount: invest_amount_foreign_denominated, - }; - assert_ok!(pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - decrease_msg_pool_swap_amount - )); - - // Fulfill decrease swap partially - assert_ok!(pallet_order_book::Pallet::::fill_order( - RawOrigin::Signed(trader.clone()).into(), - default_order_id::(&investor), - 3 * invest_amount_pool_denominated / 4 - )); - - // Increase more than pending swap (pool -> foreign) amount from decrease - let increase_msg = LiquidityPoolMessage::IncreaseInvestOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(foreign_currency), - amount: invest_amount_foreign_denominated / 2, - }; - assert_ok!(pallet_liquidity_pools::Pallet::::submit( - DEFAULT_DOMAIN_ADDRESS_MOONBEAM, - increase_msg - )); - - assert!(frame_system::Pallet::::events().iter().any(|e| { - e.event - == pallet_liquidity_pools_gateway::Event::::OutboundMessageSubmitted { - sender: ::Sender::get(), - domain: DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain(), - message: LiquidityPoolMessage::ExecutedDecreaseInvestOrder { - pool_id, - tranche_id: default_tranche_id::(pool_id), - investor: investor.clone().into(), - currency: general_currency_index::(foreign_currency), - currency_payout: invest_amount_foreign_denominated, - remaining_invest_amount: invest_amount_foreign_denominated / 2, - }, - } - .into() - })); - }); - } - } - } - - mod transfers { - use super::*; - - #[test_runtimes([development])] - fn transfer_non_tranche_tokens_from_local() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let initial_balance = 2 * AUSD_ED; - let amount = initial_balance / 2; - let dest_address = DEFAULT_DOMAIN_ADDRESS_MOONBEAM; - let currency_id = AUSD_CURRENCY_ID; - let source_account = Keyring::Charlie; - - // Mint sufficient balance - assert_eq!( - orml_tokens::Pallet::::free_balance(currency_id, &source_account.into()), - 0 - ); - assert_ok!(orml_tokens::Pallet::::mint_into( - currency_id, - &source_account.into(), - initial_balance - )); - assert_eq!( - orml_tokens::Pallet::::free_balance(currency_id, &source_account.into()), - initial_balance - ); - - // Only `ForeignAsset` can be transferred - assert_noop!( - pallet_liquidity_pools::Pallet::::transfer( - RawOrigin::Signed(source_account.into()).into(), - CurrencyId::Tranche(42u64, [0u8; 16]), - dest_address.clone(), - amount, - ), - pallet_liquidity_pools::Error::::InvalidTransferCurrency - ); - assert_noop!( - pallet_liquidity_pools::Pallet::::transfer( - RawOrigin::Signed(source_account.into()).into(), - CurrencyId::Staking(cfg_types::tokens::StakingCurrency::BlockRewards), - dest_address.clone(), - amount, - ), - pallet_liquidity_pools::Error::::AssetNotFound - ); - assert_noop!( - pallet_liquidity_pools::Pallet::::transfer( - RawOrigin::Signed(source_account.into()).into(), - CurrencyId::Native, - dest_address.clone(), - amount, - ), - pallet_liquidity_pools::Error::::AssetNotFound - ); - - // Cannot transfer as long as cross chain transferability is disabled - assert_noop!( - pallet_liquidity_pools::Pallet::::transfer( - RawOrigin::Signed(source_account.into()).into(), - currency_id, - dest_address.clone(), - initial_balance, - ), - pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsTransferable - ); - - // Enable LiquidityPools transferability - enable_liquidity_pool_transferability::(currency_id); - - // Cannot transfer more than owned - assert_noop!( - pallet_liquidity_pools::Pallet::::transfer( - RawOrigin::Signed(source_account.into()).into(), - currency_id, - dest_address.clone(), - initial_balance.saturating_add(1), - ), - pallet_liquidity_pools::Error::::BalanceTooLow - ); - - let pre_total_issuance = orml_tokens::Pallet::::total_issuance(currency_id); - - assert_ok!(pallet_liquidity_pools::Pallet::::transfer( - RawOrigin::Signed(source_account.into()).into(), - currency_id, - dest_address.clone(), - amount, - )); - - assert_eq!( - orml_tokens::Pallet::::total_issuance(currency_id), - pre_total_issuance - amount - ); - assert_eq!( - orml_tokens::Pallet::::free_balance(currency_id, &source_account.into()), - initial_balance - amount - ); - }); - } - - fn transfer_cfg_to_sibling(env: &mut FudgeEnv) { - let alice_initial_balance = cfg(1_000); - let transfer_amount = cfg(5); - let cfg_in_sibling = CurrencyId::ForeignAsset(12); - - // CFG Metadata - let meta: AssetMetadata = AssetMetadata { - decimals: 18, - name: BoundedVec::default(), - symbol: BoundedVec::default(), - existential_deposit: 1_000_000_000_000, - location: Some(VersionedLocation::V4(Location::new( - 1, - [ - Parachain(T::FudgeHandle::PARA_ID), - general_key(parachains::polkadot::centrifuge::CFG_KEY), - ], - ))), - additional: CustomMetadata { - transferability: CrossChainTransferability::Xcm(Default::default()), - ..CustomMetadata::default() - }, - }; - - env.parachain_state_mut(|| { - assert_eq!( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.into()), - alice_initial_balance - ); - assert_eq!( - pallet_balances::Pallet::::free_balance(¶chain_account( - T::FudgeHandle::SIBLING_ID - )), - 0 - ); - - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta.clone(), - Some(CurrencyId::Native), - )); - }); - - env.sibling_state_mut(|| { - assert_eq!( - orml_tokens::Pallet::::free_balance(cfg_in_sibling, &Keyring::Bob.into()), - 0 - ); - - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta, - Some(cfg_in_sibling) - )); - }); - - env.parachain_state_mut(|| { - assert_ok!(pallet_restricted_xtokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Alice.into()).into(), - CurrencyId::Native, - transfer_amount, - Box::new( - Location::new( - 1, - [ - Parachain(T::FudgeHandle::SIBLING_ID), - Junction::AccountId32 { - network: None, - id: Keyring::Bob.into(), - }, - ], - ) - .into() - ), - WeightLimit::Limited(8_000_000_000_000.into()), - )); - - // Confirm that Keyring::Alice's balance is initial balance - amount transferred - assert_eq!( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.into()), - alice_initial_balance - transfer_amount - ); - - // Verify that the amount transferred is now part of the sibling account here - assert_eq!( - pallet_balances::Pallet::::free_balance(¶chain_account( - T::FudgeHandle::SIBLING_ID - )), - transfer_amount - ); - }); - - env.pass(Blocks::ByNumber(2)); - - env.sibling_state(|| { - let current_balance = - orml_tokens::Pallet::::free_balance(cfg_in_sibling, &Keyring::Bob.into()); - - // Verify that Keyring::Bob now has (amount transferred - fee) - assert_eq!(current_balance, transfer_amount - fee(18)); - - // Sanity check for the actual amount Keyring::Bob ends up with - assert_eq!(current_balance, 4993570400000000000); - }); - } - - #[test_runtimes([development])] - fn transfer_cfg_to_and_from_sibling() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - // In order to be able to transfer CFG from Moonbeam to Development, we need to - // first send CFG from Development to Moonbeam, or else it fails since it'd be - // like Moonbeam had minted CFG on their side. - transfer_cfg_to_sibling::(&mut env); - - let para_to_sibling_transfer_amount = cfg(5); - - let alice_balance = cfg(1_000) - para_to_sibling_transfer_amount; - let bob_balance = para_to_sibling_transfer_amount - fee(18); - let charlie_balance = cfg(1_000); - - let sibling_to_para_transfer_amount = cfg(4); - // Note: This asset was registered in `transfer_cfg_to_sibling` - let cfg_in_sibling = CurrencyId::ForeignAsset(12); - - env.parachain_state(|| { - assert_eq!( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.into()), - alice_balance - ); - }); - - env.sibling_state_mut(|| { - assert_eq!( - pallet_balances::Pallet::::free_balance(¶chain_account( - T::FudgeHandle::PARA_ID - )), - 0 - ); - - assert_eq!( - orml_tokens::Pallet::::free_balance(cfg_in_sibling, &Keyring::Bob.into()), - bob_balance - ); - }); - - env.sibling_state_mut(|| { - assert_ok!(pallet_restricted_xtokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Bob.into()).into(), - cfg_in_sibling, - sibling_to_para_transfer_amount, - Box::new( - Location::new( - 1, - [ - Parachain(T::FudgeHandle::PARA_ID), - Junction::AccountId32 { - network: None, - id: Keyring::Charlie.into(), - } - ] - ) - .into() - ), - WeightLimit::Limited(8_000_000_000_000.into()), - )); - - // Confirm that Charlie's balance is initial balance - amount transferred - assert_eq!( - orml_tokens::Pallet::::free_balance(cfg_in_sibling, &Keyring::Bob.into()), - bob_balance - sibling_to_para_transfer_amount - ); - }); - - env.pass(Blocks::ByNumber(3)); - - env.parachain_state(|| { - // Verify that Charlie's balance equals the amount transferred - fee - assert_eq!( - pallet_balances::Pallet::::free_balance(&Into::::into( - Keyring::Charlie - )), - charlie_balance + sibling_to_para_transfer_amount - cfg_fee(), - ); - }); - } - } - - mod routers { - use super::*; - - mod axelar_evm { - use std::ops::AddAssign; - - use super::*; - - #[test_runtimes([development])] - fn test_via_outbound_queue() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .add(genesis::council_members::(get_council_members())) - .storage(), - ); - - let test_domain = Domain::EVM(1); - - let axelar_contract_address = H160::from_low_u64_be(1); - let axelar_contract_code: Vec = vec![0, 0, 0]; - let axelar_contract_hash = BlakeTwo256::hash_of(&axelar_contract_code); - let liquidity_pools_contract_address = H160::from_low_u64_be(2); - - env.parachain_state_mut(|| { - pallet_evm::AccountCodes::::insert( - axelar_contract_address, - axelar_contract_code, - ) - }); - - let transaction_call_cost = env - .parachain_state(|| ::config().gas_transaction_call); - - let evm_domain = EVMDomain { - target_contract_address: axelar_contract_address, - target_contract_hash: axelar_contract_hash, - fee_values: FeeValues { - value: U256::from(0), - gas_limit: U256::from(transaction_call_cost + 1_000_000), - gas_price: U256::from(10), - }, - }; - - let axelar_evm_router = AxelarEVMRouter:: { - router: EVMRouter { - evm_domain, - _marker: Default::default(), - }, - evm_chain: BoundedVec::>::try_from( - "ethereum".as_bytes().to_vec(), - ) - .unwrap(), - _marker: Default::default(), - liquidity_pools_contract_address, - }; - - let test_router = DomainRouter::::AxelarEVM(axelar_evm_router); - - env.parachain_state_mut(|| { - assert_ok!( - pallet_liquidity_pools_gateway::Pallet::::set_domain_router( - ::RuntimeOrigin::root(), - test_domain.clone(), - test_router, - ) - ); - }); - - let sender = Keyring::Alice.id(); - let gateway_sender = env.parachain_state(|| { - ::Sender::get() - }); - - let gateway_sender_h160: H160 = H160::from_slice( - &>::as_ref(&gateway_sender) - [0..20], - ); - - let msg = LiquidityPoolMessage::Transfer { - currency: 0, - sender: Keyring::Alice.id().into(), - receiver: Keyring::Bob.id().into(), - amount: 1_000u128, - }; - - // Failure - gateway sender account is not funded. - assert_ok!(env.parachain_state_mut(|| { - as OutboundQueue>::submit( - sender.clone(), - test_domain.clone(), - msg.clone(), - ) - })); - - let mut nonce = T::OutboundMessageNonce::one(); - - let expected_event = - pallet_liquidity_pools_gateway::Event::::OutboundMessageExecutionFailure { - sender: gateway_sender.clone(), - domain: test_domain.clone(), - message: msg.clone(), - error: pallet_evm::Error::::BalanceLow.into(), - nonce, - }; - - env.pass(Blocks::UntilEvent { - event: expected_event.clone().into(), - limit: 3, - }); - - env.check_event(expected_event) - .expect("expected RouterExecutionFailure event"); - - nonce.add_assign(T::OutboundMessageNonce::one()); - - assert_ok!(env.parachain_state_mut(|| { - // Note how both the target address and the gateway sender need to have some - // balance. - crate::generic::utils::evm::mint_balance_into_derived_account::( - axelar_contract_address, - cfg(1_000_000_000), - ); - crate::generic::utils::evm::mint_balance_into_derived_account::( - gateway_sender_h160, - cfg(1_000_000), - ); - - as OutboundQueue>::submit( - sender.clone(), - test_domain.clone(), - msg.clone(), - ) - })); - - let expected_event = - pallet_liquidity_pools_gateway::Event::::OutboundMessageExecutionSuccess { - sender: gateway_sender.clone(), - domain: test_domain.clone(), - message: msg.clone(), - nonce, - }; - - env.pass(Blocks::UntilEvent { - event: expected_event.clone().into(), - limit: 3, - }); - - env.check_event(expected_event) - .expect("expected RouterExecutionSuccess event"); - - // Router not found - let unused_domain = Domain::EVM(1234); - - env.parachain_state_mut(|| { - assert_noop!( - as OutboundQueue>::submit( - sender, - unused_domain.clone(), - msg, - ), - pallet_liquidity_pools_gateway::Error::::RouterNotFound - ); - }); - } - } - - mod ethereum_xcm { - use utils::*; - - use super::*; - - mod utils { - use super::*; - - pub fn submit_test_fn( - router_creation_fn: RouterCreationFn, - ) { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - let msg = Message::::Transfer { - currency: 0, - sender: Keyring::Alice.into(), - receiver: Keyring::Bob.into(), - amount: 1_000u128, - }; - - env.parachain_state_mut(|| { - let domain_router = router_creation_fn( - Location::new(1, Parachain(T::FudgeHandle::SIBLING_ID)).into(), - GLMR_CURRENCY_ID, - ); - - assert_ok!( - pallet_liquidity_pools_gateway::Pallet::::set_domain_router( - ::RuntimeOrigin::root(), - TEST_DOMAIN, - domain_router, - ) - ); - - assert_ok!( - as OutboundQueue>::submit( - Keyring::Alice.into(), - TEST_DOMAIN, - msg.clone(), - ) - ); - }); - - let gateway_sender = env.parachain_state(|| { - ::Sender::get() - }); - - let expected_event = - pallet_liquidity_pools_gateway::Event::::OutboundMessageExecutionSuccess { - sender: gateway_sender, - domain: TEST_DOMAIN, - message: msg, - nonce: T::OutboundMessageNonce::one(), - }; - - env.pass(Blocks::UntilEvent { - event: expected_event.clone().into(), - limit: 3, - }); - - env.check_event(expected_event) - .expect("expected RouterExecutionSuccess event"); - } - - type RouterCreationFn = - Box DomainRouter>; - - pub fn get_axelar_xcm_router_fn() -> RouterCreationFn - { - Box::new( - |location: VersionedLocation, currency_id: CurrencyId| -> DomainRouter { - let router = AxelarXCMRouter:: { - router: XCMRouter { - xcm_domain: XcmDomain { - location: Box::new( - location.try_into().expect("Bad xcm domain location"), - ), - ethereum_xcm_transact_call_index: BoundedVec::truncate_from( - vec![38, 0], - ), - contract_address: H160::from_low_u64_be(11), - max_gas_limit: 700_000, - transact_required_weight_at_most: Default::default(), - overall_weight: Default::default(), - fee_currency: currency_id, - fee_amount: decimals(18).saturating_div(5), - }, - _marker: Default::default(), - }, - axelar_target_chain: BoundedVec::< - u8, - ConstU32, - >::try_from( - "ethereum".as_bytes().to_vec() - ) - .unwrap(), - axelar_target_contract: H160::from_low_u64_be(111), - _marker: Default::default(), - }; - - DomainRouter::AxelarXCM(router) - }, - ) - } - - pub fn get_ethereum_xcm_router_fn() -> RouterCreationFn - { - Box::new( - |location: VersionedLocation, currency_id: CurrencyId| -> DomainRouter { - let router = EthereumXCMRouter:: { - router: XCMRouter { - xcm_domain: XcmDomain { - location: Box::new( - location.try_into().expect("Bad xcm domain location"), - ), - ethereum_xcm_transact_call_index: BoundedVec::truncate_from( - vec![38, 0], - ), - contract_address: H160::from_low_u64_be(11), - max_gas_limit: 700_000, - transact_required_weight_at_most: Default::default(), - overall_weight: Default::default(), - fee_currency: currency_id, - fee_amount: decimals(18).saturating_div(5), - }, - _marker: Default::default(), - }, - _marker: Default::default(), - }; - - DomainRouter::EthereumXCM(router) - }, - ) - } - } - - const TEST_DOMAIN: Domain = Domain::EVM(1); - - #[test_runtimes([development])] - fn submit_ethereum_xcm() { - submit_test_fn::(get_ethereum_xcm_router_fn::()); - } - - #[test_runtimes([development])] - fn submit_axelar_xcm() { - submit_test_fn::(get_axelar_xcm_router_fn::()); - } - } - } - - mod gateway { - use super::*; - - #[test_runtimes([development])] - fn set_domain_router() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .add(genesis::council_members::(get_council_members())) - .storage(), + enable_liquidity_pool_transferability::(currency_id); + + assert_eq!( + orml_tokens::Pallet::::free_balance(GLMR_CURRENCY_ID, &gateway_sender), + DEFAULT_BALANCE_GLMR ); - let test_domain = Domain::EVM(1); + assert_ok!(pallet_liquidity_pools::Pallet::::add_currency( + RawOrigin::Signed(Keyring::Bob.into()).into(), + currency_id, + )); - let axelar_contract_address = H160::from_low_u64_be(1); - let axelar_contract_code: Vec = vec![0, 0, 0]; - let axelar_contract_hash = BlakeTwo256::hash_of(&axelar_contract_code); - let liquidity_pools_contract_address = H160::from_low_u64_be(2); + let currency_index = + pallet_liquidity_pools::Pallet::::try_get_general_index(currency_id) + .expect("can get general index for currency"); - env.parachain_state_mut(|| { - pallet_evm::AccountCodes::::insert(axelar_contract_address, axelar_contract_code) - }); + let LiquidityPoolsWrappedToken::EVM { + address: evm_address, + .. + } = pallet_liquidity_pools::Pallet::::try_get_wrapped_token(¤cy_id) + .expect("can get wrapped token"); - let evm_domain = EVMDomain { - target_contract_address: axelar_contract_address, - target_contract_hash: axelar_contract_hash, - fee_values: FeeValues { - value: U256::from(10), - gas_limit: U256::from(1_000_000), - gas_price: U256::from(10), - }, - }; + let outbound_message = pallet_liquidity_pools_gateway::OutboundMessageQueue::::get( + T::OutboundMessageNonce::one(), + ) + .expect("expected outbound queue message"); - let axelar_evm_router = AxelarEVMRouter:: { - router: EVMRouter { - evm_domain, - _marker: Default::default(), + assert_eq!( + outbound_message.2, + Message::AddCurrency { + currency: currency_index, + evm_address, }, - evm_chain: BoundedVec::>::try_from( - "ethereum".as_bytes().to_vec(), - ) - .unwrap(), - _marker: Default::default(), - liquidity_pools_contract_address, - }; - - let test_router = DomainRouter::::AxelarEVM(axelar_evm_router); - - let set_domain_router_call = - set_domain_router_call(test_domain.clone(), test_router.clone()); - - let council_threshold = 2; - let voting_period = 3; - - execute_via_democracy::( - &mut env, - get_council_members(), - set_domain_router_call, - council_threshold, - voting_period, - 0, - 0, ); + }); + } - env.parachain_state(|| { - let router = - pallet_liquidity_pools_gateway::Pallet::::domain_routers(test_domain) - .expect("domain router is set"); + #[test_runtimes([development])] + fn add_currency_should_fail() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .add(genesis::tokens::(vec![( + GLMR_CURRENCY_ID, + DEFAULT_BALANCE_GLMR, + )])) + .storage(), + ); - assert!(router.eq(&test_router)); - }); - } + setup_test(&mut env); - #[test_runtimes([development])] - fn add_remove_instances() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .add(genesis::council_members::(get_council_members())) - .storage(), + env.parachain_state_mut(|| { + assert_noop!( + pallet_liquidity_pools::Pallet::::add_currency( + RawOrigin::Signed(Keyring::Bob.into()).into(), + CurrencyId::ForeignAsset(42) + ), + pallet_liquidity_pools::Error::::AssetNotFound + ); + assert_noop!( + pallet_liquidity_pools::Pallet::::add_currency( + RawOrigin::Signed(Keyring::Bob.into()).into(), + CurrencyId::Native + ), + pallet_liquidity_pools::Error::::AssetNotFound + ); + assert_noop!( + pallet_liquidity_pools::Pallet::::add_currency( + RawOrigin::Signed(Keyring::Bob.into()).into(), + CurrencyId::Staking(cfg_types::tokens::StakingCurrency::BlockRewards) + ), + pallet_liquidity_pools::Error::::AssetNotFound + ); + assert_noop!( + pallet_liquidity_pools::Pallet::::add_currency( + RawOrigin::Signed(Keyring::Bob.into()).into(), + CurrencyId::Staking(cfg_types::tokens::StakingCurrency::BlockRewards) + ), + pallet_liquidity_pools::Error::::AssetNotFound ); - let test_instance = DomainAddress::EVM(1, [0; 20]); - - let add_instance_call = add_instance_call::(test_instance.clone()); + // Should fail to add currency_id which is missing a registered + // Location + let currency_id = CurrencyId::ForeignAsset(100); - let council_threshold = 2; - let voting_period = 3; + assert_ok!(orml_asset_registry::Pallet::::register_asset( + ::RuntimeOrigin::root(), + AssetMetadata { + name: BoundedVec::default(), + symbol: BoundedVec::default(), + decimals: 12, + location: None, + existential_deposit: 1_000_000, + additional: CustomMetadata { + transferability: CrossChainTransferability::LiquidityPools, + mintable: false, + permissioned: false, + pool_currency: false, + local_representation: None, + }, + }, + Some(currency_id) + )); - let (prop_index, ref_index) = execute_via_democracy::( - &mut env, - get_council_members(), - add_instance_call, - council_threshold, - voting_period, - 0, - 0, + assert_noop!( + pallet_liquidity_pools::Pallet::::add_currency( + RawOrigin::Signed(Keyring::Bob.into()).into(), + currency_id + ), + pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsWrappedToken ); - env.parachain_state(|| { - assert!( - pallet_liquidity_pools_gateway::Allowlist::::contains_key( - test_instance.domain(), - test_instance.clone() - ) - ); - }); - - let remove_instance_call = remove_instance_call::(test_instance.clone()); + // Add convertable Location to metadata but remove transferability + assert_ok!(orml_asset_registry::Pallet::::update_asset( + ::RuntimeOrigin::root(), + currency_id, + None, + None, + None, + None, + // Changed: Add multilocation to metadata for some random EVM chain id for + // which no instance is registered + Some(Some(liquidity_pools_transferable_multilocation::( + u64::MAX, + [1u8; 20], + ))), + Some(CustomMetadata { + // Changed: Disallow liquidityPools transferability + transferability: CrossChainTransferability::Xcm(Default::default()), + ..Default::default() + }), + )); - execute_via_democracy::( - &mut env, - get_council_members(), - remove_instance_call, - council_threshold, - voting_period, - prop_index, - ref_index, + assert_noop!( + pallet_liquidity_pools::Pallet::::add_currency( + RawOrigin::Signed(Keyring::Bob.into()).into(), + currency_id + ), + pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsTransferable ); - env.parachain_state(|| { - assert!( - !pallet_liquidity_pools_gateway::Allowlist::::contains_key( - test_instance.domain(), - test_instance.clone() - ) - ); - }); - } + // Switch transferability from XCM to None + assert_ok!(orml_asset_registry::Pallet::::update_asset( + ::RuntimeOrigin::root(), + currency_id, + None, + None, + None, + None, + None, + Some(CustomMetadata { + // Changed: Disallow cross chain transferability entirely + transferability: CrossChainTransferability::None, + ..Default::default() + }) + )); - #[test_runtimes([development])] - fn process_msg() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .add(genesis::council_members::(get_council_members())) - .storage(), + assert_noop!( + pallet_liquidity_pools::Pallet::::add_currency( + RawOrigin::Signed(Keyring::Bob.into()).into(), + currency_id + ), + pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsTransferable ); + }); + } - let test_instance = DomainAddress::EVM(1, [0; 20]); - - let add_instance_call = add_instance_call::(test_instance.clone()); + #[test_runtimes([development])] + fn allow_investment_currency() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .add(genesis::tokens::(vec![( + GLMR_CURRENCY_ID, + DEFAULT_BALANCE_GLMR, + )])) + .storage(), + ); - let council_threshold = 2; - let voting_period = 3; + setup_test(&mut env); - execute_via_democracy::( - &mut env, - get_council_members(), - add_instance_call, - council_threshold, - voting_period, - 0, - 0, - ); + env.parachain_state_mut(|| { + let currency_id = AUSD_CURRENCY_ID; + let pool_id = POOL_ID; + let evm_chain_id: u64 = MOONBEAM_EVM_CHAIN_ID; + let evm_address = [1u8; 20]; - env.parachain_state(|| { - assert!( - pallet_liquidity_pools_gateway::Allowlist::::contains_key( - test_instance.domain(), - test_instance.clone() - ) - ); - }); + // Create an AUSD pool + create_ausd_pool::(pool_id); - let msg = LiquidityPoolMessage::AddPool { pool_id: 123 }; + enable_liquidity_pool_transferability::(currency_id); - let encoded_msg = msg.serialize(); + // Enable LiquidityPools transferability + assert_ok!(orml_asset_registry::Pallet::::update_asset( + ::RuntimeOrigin::root(), + currency_id, + None, + None, + None, + None, + // Changed: Add location which can be converted to LiquidityPoolsWrappedToken + Some(Some(liquidity_pools_transferable_multilocation::( + evm_chain_id, + evm_address, + ))), + Some(CustomMetadata { + // Changed: Allow liquidity_pools transferability + transferability: CrossChainTransferability::LiquidityPools, + pool_currency: true, + ..Default::default() + }) + )); - let gateway_msg = BoundedVec::< - u8, - ::MaxIncomingMessageSize, - >::try_from(encoded_msg) - .unwrap(); + assert_ok!( + pallet_liquidity_pools::Pallet::::allow_investment_currency( + RawOrigin::Signed(Keyring::Bob.into()).into(), + pool_id, + currency_id, + ) + ); - env.parachain_state_mut(|| { - assert_noop!( - pallet_liquidity_pools_gateway::Pallet::::process_msg( - GatewayOrigin::Domain(test_instance).into(), - gateway_msg, - ), - pallet_liquidity_pools::Error::::InvalidIncomingMessage, - ); - }); - } + assert_noop!( + pallet_liquidity_pools::Pallet::::allow_investment_currency( + RawOrigin::Signed(Keyring::Charlie.into()).into(), + pool_id, + currency_id, + ), + pallet_liquidity_pools::Error::::NotPoolAdmin + ); + }); } -} -mod altair { - use altair_runtime::{xcm::CurrencyIdConvert, PoolPalletIndex}; - use utils::*; + #[test_runtimes([development])] + fn allow_investment_currency_should_fail() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .add(genesis::tokens::(vec![( + GLMR_CURRENCY_ID, + DEFAULT_BALANCE_GLMR, + )])) + .storage(), + ); - use super::*; + setup_test(&mut env); - pub const KSM_ASSET_ID: CurrencyId = CurrencyId::ForeignAsset(1000); + env.parachain_state_mut(|| { + let pool_id = POOL_ID; + let currency_id = CurrencyId::ForeignAsset(42); + let ausd_currency_id = AUSD_CURRENCY_ID; - mod utils { - use super::*; + // Should fail if pool does not exist + assert_noop!( + pallet_liquidity_pools::Pallet::::allow_investment_currency( + RawOrigin::Signed(Keyring::Bob.into()).into(), + pool_id, + currency_id, + ), + pallet_liquidity_pools::Error::::NotPoolAdmin + ); - pub fn register_air() { - let meta: AssetMetadata = AssetMetadata { - decimals: 18, - name: BoundedVec::default(), - symbol: BoundedVec::default(), - existential_deposit: 1_000_000_000_000, - location: Some(VersionedLocation::V4(Location::new( - 1, - [ - Parachain(parachains::kusama::altair::ID), - general_key(parachains::kusama::altair::AIR_KEY), - ], - ))), - additional: CustomMetadata { - transferability: CrossChainTransferability::Xcm(Default::default()), - ..CustomMetadata::default() + // Register currency_id with pool_currency set to true + assert_ok!(orml_asset_registry::Pallet::::register_asset( + ::RuntimeOrigin::root(), + AssetMetadata { + name: BoundedVec::default(), + symbol: BoundedVec::default(), + decimals: 12, + location: None, + existential_deposit: 1_000_000, + additional: CustomMetadata { + pool_currency: true, + ..Default::default() + }, }, - }; + Some(currency_id) + )); - assert_ok!(orml_asset_registry::Pallet::::register_asset( + // Create pool + create_currency_pool::(pool_id, currency_id, 10_000 * decimals(12)); + + enable_liquidity_pool_transferability::(ausd_currency_id); + + // Should fail if currency is not liquidityPools transferable + assert_ok!(orml_asset_registry::Pallet::::update_asset( ::RuntimeOrigin::root(), - meta, - Some(CurrencyId::Native) + currency_id, + None, + None, + None, + None, + None, + Some(CustomMetadata { + // Disallow any cross chain transferability + transferability: CrossChainTransferability::None, + // Changed: Allow to be usable as pool currency + pool_currency: true, + ..Default::default() + }), )); - } + assert_noop!( + pallet_liquidity_pools::Pallet::::allow_investment_currency( + RawOrigin::Signed(Keyring::Bob.into()).into(), + pool_id, + currency_id, + ), + pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsTransferable + ); - pub fn register_ksm() { - let meta: AssetMetadata = AssetMetadata { - decimals: 12, - name: BoundedVec::default(), - symbol: BoundedVec::default(), - existential_deposit: 1_000_000_000, - location: Some(VersionedLocation::V4(Location::new(1, Here))), - additional: CustomMetadata { - transferability: CrossChainTransferability::Xcm(Default::default()), - ..CustomMetadata::default() - }, - }; + // Should fail if currency does not have any Location in metadata + assert_ok!(orml_asset_registry::Pallet::::update_asset( + ::RuntimeOrigin::root(), + currency_id, + None, + None, + None, + None, + None, + Some(CustomMetadata { + // Changed: Allow liquidityPools transferability + transferability: CrossChainTransferability::LiquidityPools, + // Still allow to be pool currency + pool_currency: true, + ..Default::default() + }), + )); + assert_noop!( + pallet_liquidity_pools::Pallet::::allow_investment_currency( + RawOrigin::Signed(Keyring::Bob.into()).into(), + pool_id, + currency_id, + ), + pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsWrappedToken + ); - assert_ok!(orml_asset_registry::Pallet::::register_asset( + // Should fail if currency does not have LiquidityPoolsWrappedToken location in + // metadata + assert_ok!(orml_asset_registry::Pallet::::update_asset( ::RuntimeOrigin::root(), - meta, - Some(KSM_ASSET_ID) + currency_id, + None, + None, + None, + None, + // Changed: Add some location which cannot be converted to + // LiquidityPoolsWrappedToken + Some(Some(VersionedLocation::V4(Default::default()))), + // No change for transferability required as it is already allowed for + // LiquidityPools + None, )); - } + assert_noop!( + pallet_liquidity_pools::Pallet::::allow_investment_currency( + RawOrigin::Signed(Keyring::Bob.into()).into(), + pool_id, + currency_id, + ), + pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsWrappedToken + ); + }); + } + + #[test_runtimes([development])] + fn disallow_investment_currency() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .add(genesis::tokens::(vec![( + GLMR_CURRENCY_ID, + DEFAULT_BALANCE_GLMR, + )])) + .storage(), + ); - pub fn air(amount: Balance) -> Balance { - amount * decimals(currency_decimals::NATIVE) - } + setup_test(&mut env); - pub fn ksm(amount: Balance) -> Balance { - amount * decimals(currency_decimals::KSM) - } + env.parachain_state_mut(|| { + let currency_id = AUSD_CURRENCY_ID; + let pool_id = POOL_ID; + let evm_chain_id: u64 = MOONBEAM_EVM_CHAIN_ID; + let evm_address = [1u8; 20]; - pub fn foreign(amount: Balance, num_decimals: u32) -> Balance { - amount * decimals(num_decimals) - } + // Create an AUSD pool + create_ausd_pool::(pool_id); - pub fn air_fee() -> Balance { - fee(currency_decimals::NATIVE) - } + enable_liquidity_pool_transferability::(currency_id); - // The fee associated with transferring KSM tokens - pub fn ksm_fee() -> Balance { - calc_fee(ksm_per_second()) - } - } + // Enable LiquidityPools transferability + assert_ok!(orml_asset_registry::Pallet::::update_asset( + ::RuntimeOrigin::root(), + currency_id, + None, + None, + None, + None, + // Changed: Add location which can be converted to LiquidityPoolsWrappedToken + Some(Some(liquidity_pools_transferable_multilocation::( + evm_chain_id, + evm_address, + ))), + Some(CustomMetadata { + // Changed: Allow liquidity_pools transferability + transferability: CrossChainTransferability::LiquidityPools, + pool_currency: true, + ..Default::default() + }) + )); - mod transfers { - use super::*; + assert_ok!( + pallet_liquidity_pools::Pallet::::disallow_investment_currency( + RawOrigin::Signed(Keyring::Bob.into()).into(), + pool_id, + currency_id, + ) + ); + + assert_noop!( + pallet_liquidity_pools::Pallet::::disallow_investment_currency( + RawOrigin::Signed(Keyring::Charlie.into()).into(), + pool_id, + currency_id, + ), + pallet_liquidity_pools::Error::::NotPoolAdmin + ); + }); + } - fn transfer_air_to_sibling(env: &mut FudgeEnv) { - let alice_initial_balance = air(10); - let transfer_amount = air(5); - let air_in_sibling = CurrencyId::ForeignAsset(12); + #[test_runtimes([development])] + fn disallow_investment_currency_should_fail() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .add(genesis::tokens::(vec![( + GLMR_CURRENCY_ID, + DEFAULT_BALANCE_GLMR, + )])) + .storage(), + ); - env.parachain_state_mut(|| { - assert_eq!( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.into()), - alice_initial_balance - ); - assert_eq!( - pallet_balances::Pallet::::free_balance(¶chain_account( - T::FudgeHandle::SIBLING_ID - )), - 0 - ); + setup_test(&mut env); - // Register AIR as foreign asset in the sibling parachain - let meta: AssetMetadata = AssetMetadata { - decimals: 18, - name: BoundedVec::default(), - symbol: BoundedVec::default(), - existential_deposit: 1_000_000_000_000, - location: Some(VersionedLocation::V4(Location::new( - 1, - [ - Parachain(T::FudgeHandle::PARA_ID), - general_key(parachains::kusama::altair::AIR_KEY), - ], - ))), - additional: CustomMetadata { - transferability: CrossChainTransferability::Xcm(Default::default()), - ..CustomMetadata::default() - }, - }; - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta, - Some(CurrencyId::Native) - )); - }); + env.parachain_state_mut(|| { + let pool_id = POOL_ID; + let currency_id = CurrencyId::ForeignAsset(42); + let ausd_currency_id = AUSD_CURRENCY_ID; - env.sibling_state_mut(|| { - assert_eq!( - orml_tokens::Pallet::::free_balance(air_in_sibling, &Keyring::Bob.into()), - 0 - ); + // Should fail if pool does not exist + assert_noop!( + pallet_liquidity_pools::Pallet::::disallow_investment_currency( + RawOrigin::Signed(Keyring::Bob.into()).into(), + pool_id, + currency_id, + ), + pallet_liquidity_pools::Error::::NotPoolAdmin + ); - // Register AIR as foreign asset in the sibling parachain - let meta: AssetMetadata = AssetMetadata { - decimals: 18, + // Register currency_id with pool_currency set to true + assert_ok!(orml_asset_registry::Pallet::::register_asset( + ::RuntimeOrigin::root(), + AssetMetadata { name: BoundedVec::default(), symbol: BoundedVec::default(), - existential_deposit: 1_000_000_000_000, - location: Some(VersionedLocation::V4(Location::new( - 1, - [ - Parachain(T::FudgeHandle::PARA_ID), - general_key(parachains::kusama::altair::AIR_KEY), - ], - ))), + decimals: 12, + location: None, + existential_deposit: 1_000_000, additional: CustomMetadata { - transferability: CrossChainTransferability::Xcm(Default::default()), - ..CustomMetadata::default() + pool_currency: true, + ..Default::default() }, - }; - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta, - Some(air_in_sibling) - )); - }); - - env.pass(Blocks::ByNumber(1)); - - env.parachain_state_mut(|| { - assert_ok!(orml_xtokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Alice.into()).into(), - CurrencyId::Native, - transfer_amount, - Box::new( - Location::new( - 1, - [ - Parachain(T::FudgeHandle::SIBLING_ID), - Junction::AccountId32 { - network: None, - id: Keyring::Bob.into(), - } - ] - ) - .into() - ), - WeightLimit::Limited(8_000_000_000_000.into()), - )); - - // Confirm that Alice's balance is initial balance - amount transferred - assert_eq!( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.into()), - alice_initial_balance - transfer_amount - ); - - // Verify that the amount transferred is now part of the sibling account here - assert_eq!( - pallet_balances::Pallet::::free_balance(¶chain_account( - T::FudgeHandle::SIBLING_ID - )), - transfer_amount - ); - }); - - env.pass(Blocks::ByNumber(2)); - - env.sibling_state_mut(|| { - let current_balance = - orml_tokens::Pallet::::free_balance(air_in_sibling, &Keyring::Bob.into()); + }, + Some(currency_id) + )); - // Verify that Keyring::Bob now has (amount transferred - fee) - assert_eq!(current_balance, transfer_amount - fee(18)); + // Create pool + create_currency_pool::(pool_id, currency_id, 10_000 * decimals(12)); - // Sanity check for the actual amount Keyring::Bob ends up with - assert_eq!(current_balance, 4993570400000000000); - }); - } + enable_liquidity_pool_transferability::(ausd_currency_id); - #[test_runtimes([altair])] - fn test_air_transfers_to_and_from_sibling() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(air(10))) - .storage(), + // Should fail if currency is not liquidityPools transferable + assert_ok!(orml_asset_registry::Pallet::::update_asset( + ::RuntimeOrigin::root(), + currency_id, + None, + None, + None, + None, + None, + Some(CustomMetadata { + // Disallow any cross chain transferability + transferability: CrossChainTransferability::None, + // Changed: Allow to be usable as pool currency + pool_currency: true, + ..Default::default() + }), + )); + assert_noop!( + pallet_liquidity_pools::Pallet::::disallow_investment_currency( + RawOrigin::Signed(Keyring::Bob.into()).into(), + pool_id, + currency_id, + ), + pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsTransferable ); - setup_xcm(&mut env); - - // In order to be able to transfer AIR from Sibling to Altair, we need to first - // send AIR from Altair to Sibling, or else it fails since it'd be like Sibling - // had minted AIR on their side. - transfer_air_to_sibling(&mut env); - - let alice_initial_balance = air(5); - let bob_initial_balance = air(5) - air_fee(); - let transfer_amount = air(1); + // Should fail if currency does not have any Location in metadata + assert_ok!(orml_asset_registry::Pallet::::update_asset( + ::RuntimeOrigin::root(), + currency_id, + None, + None, + None, + None, + None, + Some(CustomMetadata { + // Changed: Allow liquidityPools transferability + transferability: CrossChainTransferability::LiquidityPools, + // Still allow to be pool currency + pool_currency: true, + ..Default::default() + }), + )); + assert_noop!( + pallet_liquidity_pools::Pallet::::disallow_investment_currency( + RawOrigin::Signed(Keyring::Bob.into()).into(), + pool_id, + currency_id, + ), + pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsWrappedToken + ); - // Note: This asset was registered in `transfer_air_to_sibling` - let air_in_sibling = CurrencyId::ForeignAsset(12); + // Should fail if currency does not have LiquidityPoolsWrappedToken location in + // metadata + assert_ok!(orml_asset_registry::Pallet::::update_asset( + ::RuntimeOrigin::root(), + currency_id, + None, + None, + None, + None, + // Changed: Add some location which cannot be converted to + // LiquidityPoolsWrappedToken + Some(Some(VersionedLocation::V4(Default::default()))), + // No change for transferability required as it is already allowed for + // LiquidityPools + None, + )); + assert_noop!( + pallet_liquidity_pools::Pallet::::disallow_investment_currency( + RawOrigin::Signed(Keyring::Bob.into()).into(), + pool_id, + currency_id, + ), + pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsWrappedToken + ); + }); + } - env.parachain_state_mut(|| { - assert_eq!( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.into()), - alice_initial_balance - ); - }); + #[test_runtimes([development])] + fn schedule_upgrade() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .add(genesis::tokens::(vec![( + GLMR_CURRENCY_ID, + DEFAULT_BALANCE_GLMR, + )])) + .storage(), + ); - env.sibling_state_mut(|| { - assert_eq!( - pallet_balances::Pallet::::free_balance(¶chain_account( - T::FudgeHandle::PARA_ID - )), - 0 - ); - assert_eq!( - orml_tokens::Pallet::::free_balance(air_in_sibling, &Keyring::Bob.into()), - bob_initial_balance - ); + setup_test(&mut env); - assert_ok!(orml_xtokens::Pallet::::transfer( + env.parachain_state_mut(|| { + // Only Root can call `schedule_upgrade` + assert_noop!( + pallet_liquidity_pools::Pallet::::schedule_upgrade( RawOrigin::Signed(Keyring::Bob.into()).into(), - air_in_sibling, - transfer_amount, - Box::new( - Location::new( - 1, - [ - Parachain(T::FudgeHandle::PARA_ID), - Junction::AccountId32 { - network: None, - id: Keyring::Alice.into(), - } - ] - ) - .into() - ), - WeightLimit::Limited(8_000_000_000_000.into()), - )); + MOONBEAM_EVM_CHAIN_ID, + [7; 20] + ), + BadOrigin + ); - // Confirm that Bobs's balance is initial balance - amount transferred - assert_eq!( - orml_tokens::Pallet::::free_balance(air_in_sibling, &Keyring::Bob.into()), - bob_initial_balance - transfer_amount - ); - }); + // Now it finally works + assert_ok!(pallet_liquidity_pools::Pallet::::schedule_upgrade( + ::RuntimeOrigin::root(), + MOONBEAM_EVM_CHAIN_ID, + [7; 20] + )); + }); + } - env.pass(Blocks::ByNumber(3)); + #[test_runtimes([development])] + fn cancel_upgrade() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .add(genesis::tokens::(vec![( + GLMR_CURRENCY_ID, + DEFAULT_BALANCE_GLMR, + )])) + .storage(), + ); - env.parachain_state_mut(|| { - // Verify that Keyring::Alice now has initial balance + amount transferred - fee - assert_eq!( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.into()), - alice_initial_balance + transfer_amount - air_fee(), - ); - }); - } + setup_test(&mut env); - #[test_runtimes([altair])] - fn transfer_ausd_to_altair() { - let mut env = FudgeEnv::::default(); + env.parachain_state_mut(|| { + // Only Root can call `cancel_upgrade` + assert_noop!( + pallet_liquidity_pools::Pallet::::cancel_upgrade( + RawOrigin::Signed(Keyring::Bob.into()).into(), + MOONBEAM_EVM_CHAIN_ID, + [7; 20] + ), + BadOrigin + ); - setup_xcm(&mut env); + // Now it finally works + assert_ok!(pallet_liquidity_pools::Pallet::::cancel_upgrade( + ::RuntimeOrigin::root(), + MOONBEAM_EVM_CHAIN_ID, + [7; 20] + )); + }); + } - let alice_initial_balance = ausd(10); - let transfer_amount = ausd(7); + #[test_runtimes([development])] + fn update_tranche_token_metadata() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .add(genesis::tokens::(vec![( + GLMR_CURRENCY_ID, + DEFAULT_BALANCE_GLMR, + )])) + .storage(), + ); - env.sibling_state_mut(|| { - register_ausd::(); + setup_test(&mut env); - assert_ok!(orml_tokens::Pallet::::deposit( - AUSD_CURRENCY_ID, - &Keyring::Alice.into(), - alice_initial_balance - )); + env.parachain_state_mut(|| { + let pool_id = POOL_ID; + // NOTE: Default pool admin is BOB + create_ausd_pool::(pool_id); - assert_eq!( - orml_tokens::Pallet::::free_balance( - AUSD_CURRENCY_ID, - ¶chain_account(T::FudgeHandle::PARA_ID) - ), - 0 - ); - }); + // Missing tranche token should throw + let nonexistent_tranche = [71u8; 16]; - env.parachain_state_mut(|| { - register_ausd::(); + assert_noop!( + pallet_liquidity_pools::Pallet::::update_tranche_token_metadata( + RawOrigin::Signed(Keyring::Alice.into()).into(), + pool_id, + nonexistent_tranche, + Domain::EVM(MOONBEAM_EVM_CHAIN_ID), + ), + pallet_liquidity_pools::Error::::TrancheNotFound + ); - assert_eq!( - orml_tokens::Pallet::::free_balance(AUSD_CURRENCY_ID, &Keyring::Bob.into()), - 0, - ); - }); + let tranche_id = default_tranche_id::(pool_id); - env.sibling_state_mut(|| { - assert_eq!( - orml_tokens::Pallet::::free_balance( - AUSD_CURRENCY_ID, - &Keyring::Alice.into() - ), - ausd(10), - ); - assert_ok!(orml_xtokens::Pallet::::transfer( + // Moving the update to another domain can be called by anyone + assert_ok!( + pallet_liquidity_pools::Pallet::::update_tranche_token_metadata( RawOrigin::Signed(Keyring::Alice.into()).into(), - AUSD_CURRENCY_ID, - transfer_amount, - Box::new( - Location::new( - 1, - [ - Parachain(T::FudgeHandle::PARA_ID), - Junction::AccountId32 { - network: None, - id: Keyring::Bob.into(), - } - ] - ) - .into() - ), - WeightLimit::Limited(8_000_000_000_000.into()), - )); + pool_id, + tranche_id, + Domain::EVM(MOONBEAM_EVM_CHAIN_ID), + ) + ); - assert_eq!( - orml_tokens::Pallet::::free_balance( - AUSD_CURRENCY_ID, - &Keyring::Alice.into() - ), - alice_initial_balance - transfer_amount - ); + // Edge case: Should throw if tranche exists but metadata does not exist + let tranche_currency_id = CurrencyId::Tranche(pool_id, tranche_id); - // Verify that the amount transferred is now part of the altair parachain - // account here - assert_eq!( - orml_tokens::Pallet::::free_balance( - AUSD_CURRENCY_ID, - ¶chain_account(T::FudgeHandle::PARA_ID) - ), - transfer_amount - ); - }); + orml_asset_registry::Metadata::::remove(tranche_currency_id); - env.pass(Blocks::ByNumber(3)); + assert_noop!( + pallet_liquidity_pools::Pallet::::update_tranche_token_metadata( + RawOrigin::Signed(POOL_ADMIN.into()).into(), + pool_id, + tranche_id, + Domain::EVM(MOONBEAM_EVM_CHAIN_ID), + ), + pallet_liquidity_pools::Error::::TrancheMetadataNotFound + ); + }); + } +} - env.parachain_state_mut(|| { - // Verify that Keyring::Bob now has initial balance + amount transferred - fee - assert_eq!( - orml_tokens::Pallet::::free_balance(AUSD_CURRENCY_ID, &Keyring::Bob.into()), - transfer_amount - ausd_fee() - ); - }); - } +mod foreign_investments { + use super::*; - fn transfer_ksm_from_relay_chain( - env: &mut FudgeEnv, - transfer_amount: Balance, - currency_id: CurrencyId, - meta: AssetMetadata, - ) { - env.parachain_state_mut(|| { - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta.clone(), - Some(currency_id), - )); + mod same_currencies { + use super::*; - assert_eq!( - orml_tokens::Pallet::::free_balance(currency_id, &Keyring::Bob.into()), - 0 - ); - }); + #[test_runtimes([development])] + fn increase_invest_order() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .add(genesis::tokens::(vec![( + GLMR_CURRENCY_ID, + DEFAULT_BALANCE_GLMR, + )])) + .storage(), + ); - env.relay_state_mut(|| { - assert_ok!( - pallet_balances::Pallet::>::force_set_balance( - as frame_system::Config>::RuntimeOrigin::root(), - as frame_system::Config>::Lookup::unlookup( - Keyring::Alice.id() - ), - transfer_amount * 2, - ) - ); + setup_test(&mut env); - assert_ok!( - pallet_xcm::Pallet::>::force_xcm_version( - as frame_system::Config>::RuntimeOrigin::root(), - Box::new(Location::new( - 0, - Junction::Parachain(T::FudgeHandle::PARA_ID), - )), - XCM_VERSION, - ) - ); + env.parachain_state_mut(|| { + let pool_id = POOL_ID; + let amount = 10 * decimals(12); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let currency_id = AUSD_CURRENCY_ID; + let currency_decimals = currency_decimals::AUSD; - assert_ok!( - pallet_xcm::Pallet::>::reserve_transfer_assets( - RawOrigin::Signed(Keyring::Alice.into()).into(), - Box::new(Parachain(T::FudgeHandle::PARA_ID).into()), - Box::new( - Junction::AccountId32 { - network: None, - id: Keyring::Bob.into(), - } - .into() - ), - Box::new((Here, transfer_amount).into()), - 0 - ) - ); - }); + // Create new pool + create_currency_pool::(pool_id, currency_id, currency_decimals.into()); - env.pass(Blocks::ByNumber(2)); + // Set permissions and execute initial investment + do_initial_increase_investment::(pool_id, amount, investor.clone(), currency_id); - env.parachain_state(|| { + // Verify the order was updated to the amount assert_eq!( - orml_tokens::Pallet::::free_balance(currency_id, &Keyring::Bob.into()), - 1991963000000 // Comes from `transfer_amount - fee(meta.decimals)` with noise + pallet_investments::Pallet::::acc_active_invest_order( + default_investment_id::(), + ) + .amount, + amount ); + + // Increasing again should just bump invest_amount + let msg = LiquidityPoolMessage::IncreaseInvestOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(currency_id), + amount, + }; + assert_ok!(pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + msg + )); }); } - #[test_runtimes([altair])] - fn transfer_ksm_to_and_from_relay_chain() { - let mut env = FudgeEnv::::default(); - - let transfer_amount: Balance = ksm(2); - let currency_id = CurrencyId::ForeignAsset(3001); - let meta: AssetMetadata = AssetMetadata { - decimals: 12, - name: BoundedVec::default(), - symbol: BoundedVec::default(), - existential_deposit: 1_000_000_000, - location: Some(VersionedLocation::V4(Location::new(1, Here))), - additional: CustomMetadata { - transferability: CrossChainTransferability::Xcm(Default::default()), - ..CustomMetadata::default() - }, - }; - - // First we need some KSM on Altair - transfer_ksm_from_relay_chain(&mut env, transfer_amount, currency_id, meta.clone()); + #[test_runtimes([development])] + fn decrease_invest_order() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .storage(), + ); - let currency_id = CurrencyId::ForeignAsset(3001); + setup_test(&mut env); env.parachain_state_mut(|| { - assert_ok!(pallet_xcm::Pallet::::force_xcm_version( - ::RuntimeOrigin::root(), - Box::new(Location::new(1, Junctions::Here)), - XCM_VERSION, - )); - - assert_ok!(orml_xtokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Bob.into()).into(), + let pool_id = POOL_ID; + let invest_amount: u128 = 10 * decimals(12); + let decrease_amount = invest_amount / 3; + let final_amount = invest_amount - decrease_amount; + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let currency_id: CurrencyId = AUSD_CURRENCY_ID; + let currency_decimals = currency_decimals::AUSD; + + // Create new pool + create_currency_pool::(pool_id, currency_id, currency_decimals.into()); + + // Set permissions and execute initial investment + do_initial_increase_investment::( + pool_id, + invest_amount, + investor.clone(), currency_id, - ksm(1), - Box::new( - Location::new( - 1, - Junction::AccountId32 { - id: Keyring::Bob.into(), - network: None, - } - ) - .into() + ); + + // Mock incoming decrease message + let msg = LiquidityPoolMessage::DecreaseInvestOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(currency_id), + amount: decrease_amount, + }; + + // Expect failure if transferability is disabled since this is required for + // preparing the `ExecutedDecreaseInvest` message. + assert_noop!( + pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + msg.clone() ), - WeightLimit::Limited(4_000_000_000.into()) - )); - }); + pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsTransferable + ); + enable_liquidity_pool_transferability::(currency_id); - env.pass(Blocks::ByNumber(2)); + // Execute byte message + assert_ok!(pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + msg + )); - env.relay_state_mut(|| { + // Verify investment was decreased into investment account assert_eq!( - pallet_balances::Pallet::>::free_balance( - &Keyring::Bob.into() + orml_tokens::Pallet::::balance( + currency_id, + &default_investment_account::() ), - 999989698923 + final_amount + ); + // Since the investment was done in the pool currency, the decrement happens + // synchronously and thus it must be burned from investor's holdings + assert_eq!(orml_tokens::Pallet::::balance(currency_id, &investor), 0); + assert!(frame_system::Pallet::::events().iter().any(|e| e.event + == pallet_investments::Event::::InvestOrderUpdated { + investment_id: default_investment_id::(), + submitted_at: 0, + who: investor.clone(), + amount: final_amount + } + .into())); + assert!(frame_system::Pallet::::events().iter().any(|e| e.event + == orml_tokens::Event::::Withdrawn { + currency_id, + who: investor.clone(), + amount: decrease_amount + } + .into())); + assert_eq!( + pallet_investments::Pallet::::acc_active_invest_order( + default_investment_id::(), + ) + .amount, + final_amount ); }); } - #[test_runtimes([altair])] - fn transfer_foreign_sibling_to_altair() { + #[test_runtimes([development])] + fn cancel_invest_order() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() - .add(genesis::balances::(air(10))) + .add(genesis::balances::(cfg(1_000))) .storage(), ); - setup_xcm(&mut env); + setup_test(&mut env); - let sibling_asset_id = CurrencyId::ForeignAsset(1); - let asset_location = Location::new( - 1, - [Parachain(T::FudgeHandle::SIBLING_ID), general_key(&[0, 1])], - ); - let meta: AssetMetadata = AssetMetadata { - decimals: 18, - name: BoundedVec::default(), - symbol: BoundedVec::default(), - existential_deposit: 1_000_000_000_000, - location: Some(VersionedLocation::V4(asset_location)), - additional: CustomMetadata { - transferability: CrossChainTransferability::Xcm(XcmMetadata { - // We specify a custom fee_per_second and verify below that this value is - // used when XCM transfer fees are charged for this token. - fee_per_second: Some(8420000000000000000), - }), - ..CustomMetadata::default() - }, - }; - let transfer_amount = foreign(1, meta.decimals); + env.parachain_state_mut(|| { + let pool_id = POOL_ID; + let invest_amount = 10 * decimals(12); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let currency_id = AUSD_CURRENCY_ID; + let currency_decimals = currency_decimals::AUSD; - env.sibling_state_mut(|| { - assert_eq!( - orml_tokens::Pallet::::free_balance(sibling_asset_id, &Keyring::Bob.into()), - 0 + // Create new pool + create_currency_pool::(pool_id, currency_id, currency_decimals.into()); + + // Set permissions and execute initial investment + do_initial_increase_investment::( + pool_id, + invest_amount, + investor.clone(), + currency_id, ); - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta.clone(), - Some(CurrencyId::Native), - )); - }); - env.parachain_state_mut(|| { - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta.clone(), - Some(sibling_asset_id) - )); - }); + // Verify investment account holds funds before cancelling + assert_eq!( + orml_tokens::Pallet::::balance( + currency_id, + &default_investment_account::() + ), + invest_amount + ); - env.sibling_state_mut(|| { - assert_ok!(pallet_balances::Pallet::::force_set_balance( - ::RuntimeOrigin::root(), - Keyring::Alice.id().into(), - transfer_amount * 2, - )); + // Mock incoming cancel message + let msg = LiquidityPoolMessage::CancelInvestOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(currency_id), + }; - assert_ok!(orml_xtokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Alice.into()).into(), - CurrencyId::Native, - transfer_amount, - Box::new( - Location::new( - 1, - [ - Parachain(T::FudgeHandle::PARA_ID), - Junction::AccountId32 { - network: None, - id: Keyring::Bob.into(), - } - ] - ) - .into() + // Expect failure if transferability is disabled since this is required for + // preparing the `ExecutedDecreaseInvest` message. + assert_noop!( + pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + msg.clone() ), - WeightLimit::Limited(8_000_000_000_000.into()), - )); - - // Confirm that Alice's balance is initial balance - amount transferred - assert_eq!( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.into()), - transfer_amount + pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsTransferable ); - }); - env.pass(Blocks::ByNumber(3)); + enable_liquidity_pool_transferability::(currency_id); - env.parachain_state_mut(|| { - let bob_balance = - orml_tokens::Pallet::::free_balance(sibling_asset_id, &Keyring::Bob.into()); + // Execute byte message + assert_ok!(pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + msg + )); - // Verify that Keyring::Bob now has initial balance + amount transferred - fee + // Verify investment was entirely drained from investment account assert_eq!( - bob_balance, - transfer_amount - - calc_fee( - xcm_metadata(meta.additional.transferability) - .unwrap() - .fee_per_second - .unwrap() - ) + orml_tokens::Pallet::::balance( + currency_id, + &default_investment_account::() + ), + 0 + ); + // Since the investment was done in the pool currency, the decrement happens + // synchronously and thus it must be burned from investor's holdings + assert_eq!(orml_tokens::Pallet::::balance(currency_id, &investor), 0); + assert!(frame_system::Pallet::::events().iter().any(|e| e.event + == pallet_investments::Event::::InvestOrderUpdated { + investment_id: default_investment_id::(), + submitted_at: 0, + who: investor.clone(), + amount: 0 + } + .into())); + assert!(frame_system::Pallet::::events().iter().any(|e| e.event + == orml_tokens::Event::::Withdrawn { + currency_id, + who: investor.clone(), + amount: invest_amount + } + .into())); + assert_eq!( + pallet_investments::Pallet::::acc_active_invest_order( + default_investment_id::(), + ) + .amount, + 0 ); - // Sanity check to ensure the calculated is what is expected - assert_eq!(bob_balance, 993264000000000000); }); } - #[test_runtimes([altair])] - fn transfer_wormhole_usdc_karura_to_altair() { - let mut env = FudgeEnv::::from_storage( - Default::default(), - Default::default(), + #[test_runtimes([development])] + fn collect_invest_order() { + let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() - .add(genesis::balances::(air(10))) + .add(genesis::balances::(cfg(1_000))) .storage(), ); - setup_xcm(&mut env); + setup_test(&mut env); - let usdc_asset_id = CurrencyId::ForeignAsset(39); - let asset_location = Location::new( - 1, - [ - Parachain(T::FudgeHandle::SIBLING_ID), - general_key("0x02f3a00dd12f644daec907013b16eb6d14bf1c4cb4".as_bytes()), - ], - ); - let meta: AssetMetadata = AssetMetadata { - decimals: 6, - name: BoundedVec::default(), - symbol: BoundedVec::default(), - existential_deposit: 1, - location: Some(VersionedLocation::V4(asset_location)), - additional: CustomMetadata { - transferability: CrossChainTransferability::Xcm(Default::default()), - ..CustomMetadata::default() - }, - }; - let transfer_amount = foreign(12, meta.decimals); - let alice_initial_balance = transfer_amount * 100; - - env.sibling_state_mut(|| { - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta.clone(), - Some(usdc_asset_id) - )); - assert_ok!(orml_tokens::Pallet::::deposit( - usdc_asset_id, - &Keyring::Alice.into(), - alice_initial_balance + env.parachain_state_mut(|| { + let pool_id = POOL_ID; + let amount = 10 * decimals(12); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let currency_id = AUSD_CURRENCY_ID; + let currency_decimals = currency_decimals::AUSD; + let sending_domain_locator = + Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()); + enable_liquidity_pool_transferability::(currency_id); + + // Create new pool + create_currency_pool::(pool_id, currency_id, currency_decimals.into()); + let investment_currency_id: CurrencyId = default_investment_id::().into(); + // Set permissions and execute initial investment + do_initial_increase_investment::(pool_id, amount, investor.clone(), currency_id); + let events_before_collect = frame_system::Pallet::::events(); + + // Process and fulfill order + // NOTE: Without this step, the order id is not cleared and + // `Event::InvestCollectedForNonClearedOrderId` be dispatched + assert_ok!(pallet_investments::Pallet::::process_invest_orders( + default_investment_id::() )); + + // Tranche tokens will be minted upon fulfillment assert_eq!( - orml_tokens::Pallet::::free_balance(usdc_asset_id, &Keyring::Alice.into()), - alice_initial_balance + orml_tokens::Pallet::::total_issuance(investment_currency_id), + 0 ); + assert_ok!(pallet_investments::Pallet::::invest_fulfillment( + default_investment_id::(), + FulfillmentWithPrice { + of_amount: Perquintill::one(), + price: Ratio::one(), + } + )); assert_eq!( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.into()), - air(10) + orml_tokens::Pallet::::total_issuance(investment_currency_id), + amount ); - }); - env.parachain_state_mut(|| { - // First, register the asset in centrifuge - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta.clone(), - Some(usdc_asset_id) + // Mock collection message msg + let msg = LiquidityPoolMessage::CollectInvest { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(currency_id), + }; + assert_ok!(pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + msg )); - }); - env.sibling_state_mut(|| { - assert_ok!(orml_xtokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Alice.into()).into(), - usdc_asset_id, - transfer_amount, - Box::new( - Location::new( - 1, - [ - Parachain(T::FudgeHandle::PARA_ID), - Junction::AccountId32 { - network: None, - id: Keyring::Bob.into(), - } - ] - ) - .into() - ), - WeightLimit::Limited(8_000_000_000.into()), - )); + // Remove events before collect execution + let events_since_collect: Vec<_> = frame_system::Pallet::::events() + .into_iter() + .filter(|e| !events_before_collect.contains(e)) + .collect(); - // Confirm that Alice's balance is initial balance - amount transferred + // Verify investment was transferred to the domain locator assert_eq!( - orml_tokens::Pallet::::free_balance(usdc_asset_id, &Keyring::Alice.into()), - alice_initial_balance - transfer_amount + orml_tokens::Pallet::::balance( + default_investment_id::().into(), + &sending_domain_locator + ), + amount ); - }); - env.pass(Blocks::ByNumber(3)); - - env.parachain_state_mut(|| { - let bob_balance = - orml_tokens::Pallet::::free_balance(usdc_asset_id, &Keyring::Bob.into()); - - // Sanity check to ensure the calculated is what is expected - assert_eq!(bob_balance, 11993571); - }); - } - } - - mod asset_registry { - use super::*; - - #[test_runtimes([altair])] - fn register_air_works() { - let mut env = FudgeEnv::::default(); - - env.parachain_state_mut(|| { - let meta: AssetMetadata = AssetMetadata { - decimals: 18, - name: BoundedVec::default(), - symbol: BoundedVec::default(), - existential_deposit: 1_000_000_000_000, - location: Some(VersionedLocation::V4(Location::new( - 0, - general_key(parachains::kusama::altair::AIR_KEY), - ))), - additional: CustomMetadata { - transferability: CrossChainTransferability::Xcm(Default::default()), - ..CustomMetadata::default() - }, - }; + // Order should have been cleared by fulfilling investment + assert_eq!( + pallet_investments::Pallet::::acc_active_invest_order( + default_investment_id::(), + ) + .amount, + 0 + ); + assert!(!events_since_collect.iter().any(|e| { + e.event + == pallet_investments::Event::::InvestCollectedForNonClearedOrderId { + investment_id: default_investment_id::(), + who: investor.clone(), + } + .into() + })); - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta, - Some(CurrencyId::Native) - )); - }); - } + // Order should not have been updated since everything is collected + assert!(!events_since_collect.iter().any(|e| { + e.event + == pallet_investments::Event::::InvestOrderUpdated { + investment_id: default_investment_id::(), + submitted_at: 0, + who: investor.clone(), + amount: 0, + } + .into() + })); - #[test_runtimes([altair])] - fn register_foreign_asset_works() { - let mut env = FudgeEnv::::default(); + // Order should have been fully collected + assert!(events_since_collect.iter().any(|e| { + e.event + == pallet_investments::Event::::InvestOrdersCollected { + investment_id: default_investment_id::(), + processed_orders: vec![0], + who: investor.clone(), + collection: InvestCollection:: { + payout_investment_invest: amount, + remaining_investment_invest: 0, + }, + outcome: CollectOutcome::FullyCollected, + } + .into() + })); - env.parachain_state_mut(|| { - let meta: AssetMetadata = AssetMetadata { - decimals: 12, - name: BoundedVec::default(), - symbol: BoundedVec::default(), - existential_deposit: 1_000_000_000_000, - location: Some(VersionedLocation::V4(Location::new( - 1, - [ - Parachain(T::FudgeHandle::SIBLING_ID), - general_key(parachains::kusama::karura::AUSD_KEY), - ], - ))), - additional: CustomMetadata { - transferability: CrossChainTransferability::Xcm(Default::default()), - ..CustomMetadata::default() - }, - }; + let sender = ::Sender::get(); - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta, - Some(CurrencyId::ForeignAsset(42)) - )); + // Clearing of foreign InvestState should be dispatched + assert!(frame_system::Pallet::::events().iter().any(|e| { + e.event + == pallet_liquidity_pools_gateway::Event::::OutboundMessageSubmitted { + sender: sender.clone(), + domain: DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain(), + message: LiquidityPoolMessage::ExecutedCollectInvest { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(currency_id), + currency_payout: amount, + tranche_tokens_payout: amount, + remaining_invest_amount: 0, + }, + } + .into() + })); }); } - // Verify that registering tranche tokens is not allowed through extrinsics - #[test_runtimes([altair])] - fn register_tranche_asset_blocked() { - let mut env = FudgeEnv::::default(); + #[test_runtimes([development])] + fn partially_collect_investment_for_through_investments() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .storage(), + ); - env.parachain_state_mut(|| { - let meta: AssetMetadata = AssetMetadata { - decimals: 12, - name: BoundedVec::default(), - symbol: BoundedVec::default(), - existential_deposit: 1_000_000_000_000, - location: Some(VersionedLocation::V4(Location::new( - 1, - [Parachain(2000), general_key(&[42])], - ))), - additional: CustomMetadata { - transferability: CrossChainTransferability::Xcm(Default::default()), - ..CustomMetadata::default() - }, - }; + setup_test(&mut env); - // It fails with `BadOrigin` even when submitted with `Origin::root` since we - // only allow for tranche tokens to be registered through the pools pallet. - let asset_id = CurrencyId::Tranche(42, [42u8; 16]); - assert_noop!( - orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta, - Some(asset_id) - ), - BadOrigin + env.parachain_state_mut(|| { + let pool_id = POOL_ID; + let invest_amount = 10 * decimals(12); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let currency_id = AUSD_CURRENCY_ID; + let currency_decimals = currency_decimals::AUSD; + let sending_domain_locator = + Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()); + create_currency_pool::(pool_id, currency_id, currency_decimals.into()); + do_initial_increase_investment::( + pool_id, + invest_amount, + investor.clone(), + currency_id, ); - }); - } - } - - mod currency_id_convert { - use super::*; - - #[test_runtimes([altair])] - fn convert_air() { - let mut env = FudgeEnv::::default(); - - assert_eq!(parachains::kusama::altair::AIR_KEY.to_vec(), vec![0, 1]); + enable_liquidity_pool_transferability::(currency_id); + let investment_currency_id: CurrencyId = default_investment_id::().into(); - env.parachain_state_mut(|| { - // The way AIR is represented relative within the Altair runtime - let air_location_inner: Location = - Location::new(0, general_key(parachains::kusama::altair::AIR_KEY)); + assert!( + !pallet_investments::Pallet::::investment_requires_collect( + &investor, + default_investment_id::() + ) + ); - // register air - register_air::(); + // Process 50% of investment at 25% rate, i.e. 1 pool currency = 4 tranche + // tokens + assert_ok!(pallet_investments::Pallet::::process_invest_orders( + default_investment_id::() + )); + assert_ok!(pallet_investments::Pallet::::invest_fulfillment( + default_investment_id::(), + FulfillmentWithPrice { + of_amount: Perquintill::from_percent(50), + price: Ratio::checked_from_rational(1, 4).unwrap(), + } + )); - assert_eq!( - >::convert(air_location_inner), - Some(CurrencyId::Native), + // Pre collect assertions + assert!( + pallet_investments::Pallet::::investment_requires_collect( + &investor, + default_investment_id::() + ) ); - // The canonical way AIR is represented out in the wild - let air_location_canonical: Location = Location::new( - 1, - [ - Parachain(T::FudgeHandle::PARA_ID), - general_key(parachains::kusama::altair::AIR_KEY), - ], + // Collecting through Investments should denote amounts and transition + // state + assert_ok!(pallet_investments::Pallet::::collect_investments_for( + RawOrigin::Signed(Keyring::Alice.into()).into(), + investor.clone(), + default_investment_id::() + )); + assert!( + !pallet_investments::Pallet::::investment_requires_collect( + &investor, + default_investment_id::() + ) ); + // Tranche Tokens should still be transferred to collected to + // domain locator account already assert_eq!( - >::convert(CurrencyId::Native), - Some(air_location_canonical) - ) - }); - } + orml_tokens::Pallet::::balance(investment_currency_id, &investor), + 0 + ); + assert_eq!( + orml_tokens::Pallet::::balance( + investment_currency_id, + &sending_domain_locator + ), + invest_amount * 2 + ); + assert!(frame_system::Pallet::::events().iter().any(|e| { + e.event + == pallet_investments::Event::::InvestOrdersCollected { + investment_id: default_investment_id::(), + processed_orders: vec![0], + who: investor.clone(), + collection: InvestCollection:: { + payout_investment_invest: invest_amount * 2, + remaining_investment_invest: invest_amount / 2, + }, + outcome: CollectOutcome::FullyCollected, + } + .into() + })); - /// Verify that Tranche tokens are not handled by the CurrencyIdConvert - /// since we don't allow Tranche tokens to be transferable through XCM. - #[test_runtimes([altair])] - fn convert_tranche() { - let mut env = FudgeEnv::::default(); + let sender = ::Sender::get(); - let tranche_currency = CurrencyId::Tranche(401, [0; 16]); - let tranche_id = - WeakBoundedVec::>::force_from(tranche_currency.encode(), None); - let tranche_multilocation = Location::new( - 1, - [ - Parachain(T::FudgeHandle::PARA_ID), - PalletInstance(PoolPalletIndex::get()), - GeneralKey { - length: tranche_id.len() as u8, - data: vec_to_fixed_array(tranche_id), - }, - ], - ); + assert!(frame_system::Pallet::::events().iter().any(|e| { + e.event + == pallet_liquidity_pools_gateway::Event::::OutboundMessageSubmitted { + sender: sender.clone(), + domain: DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain(), + message: pallet_liquidity_pools::Message::ExecutedCollectInvest { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(currency_id), + currency_payout: invest_amount / 2, + tranche_tokens_payout: invest_amount * 2, + remaining_invest_amount: invest_amount / 2, + }, + } + .into() + })); - env.parachain_state_mut(|| { + // Process rest of investment at 50% rate (1 pool currency = 2 tranche tokens) + assert_ok!(pallet_investments::Pallet::::process_invest_orders( + default_investment_id::() + )); + assert_ok!(pallet_investments::Pallet::::invest_fulfillment( + default_investment_id::(), + FulfillmentWithPrice { + of_amount: Perquintill::one(), + price: Ratio::checked_from_rational(1, 2).unwrap(), + } + )); + // Order should have been cleared by fulfilling investment assert_eq!( - >::convert(tranche_multilocation), - None, + pallet_investments::Pallet::::acc_active_invest_order( + default_investment_id::(), + ) + .amount, + 0 ); - }); - - env.parachain_state_mut(|| { assert_eq!( - >::convert(tranche_currency), - None - ) - }); - } - - #[test_runtimes([altair])] - fn convert_ausd() { - let mut env = FudgeEnv::::default(); - - env.parachain_state_mut(|| { - assert_eq!(parachains::kusama::karura::AUSD_KEY, &[0, 129]); - - let ausd_location: Location = Location::new( - 1, - [ - Parachain(T::FudgeHandle::SIBLING_ID), - general_key(parachains::kusama::karura::AUSD_KEY), - ], + orml_tokens::Pallet::::total_issuance(investment_currency_id), + invest_amount * 3 ); - register_ausd::(); + // Collect remainder through Investments + assert_ok!(pallet_investments::Pallet::::collect_investments_for( + RawOrigin::Signed(Keyring::Alice.into()).into(), + investor.clone(), + default_investment_id::() + )); + assert!( + !pallet_investments::Pallet::::investment_requires_collect( + &investor, + default_investment_id::() + ) + ); + // Tranche Tokens should be transferred to collected to + // domain locator account already + let amount_tranche_tokens = invest_amount * 3; assert_eq!( - >::convert(ausd_location.clone()), - Some(AUSD_CURRENCY_ID), + orml_tokens::Pallet::::total_issuance(investment_currency_id), + amount_tranche_tokens + ); + assert!( + orml_tokens::Pallet::::balance(investment_currency_id, &investor).is_zero() ); - assert_eq!( - >::convert(AUSD_CURRENCY_ID), - Some(ausd_location) - ) - }); - } - - #[test_runtimes([altair])] - fn convert_ksm() { - let mut env = FudgeEnv::::default(); - - let ksm_location: Location = Location::parent().into(); + orml_tokens::Pallet::::balance( + investment_currency_id, + &sending_domain_locator + ), + amount_tranche_tokens + ); + assert!(!frame_system::Pallet::::events().iter().any(|e| { + e.event + == pallet_investments::Event::::InvestCollectedForNonClearedOrderId { + investment_id: default_investment_id::(), + who: investor.clone(), + } + .into() + })); + assert!(frame_system::Pallet::::events().iter().any(|e| { + e.event + == pallet_investments::Event::::InvestOrdersCollected { + investment_id: default_investment_id::(), + processed_orders: vec![1], + who: investor.clone(), + collection: InvestCollection:: { + payout_investment_invest: invest_amount, + remaining_investment_invest: 0, + }, + outcome: CollectOutcome::FullyCollected, + } + .into() + })); - env.parachain_state_mut(|| { - register_ksm::(); + assert!(frame_system::Pallet::::events().iter().any(|e| { + e.event + == pallet_liquidity_pools_gateway::Event::::OutboundMessageSubmitted { + sender: sender.clone(), + domain: DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain(), + message: LiquidityPoolMessage::ExecutedCollectInvest { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(currency_id), + currency_payout: invest_amount / 2, + tranche_tokens_payout: invest_amount, + remaining_invest_amount: 0, + }, + } + .into() + })); - assert_eq!( - >::convert(ksm_location.clone()), - Some(KSM_ASSET_ID), + // Should fail to collect if `InvestmentState` does not + // exist + let msg = LiquidityPoolMessage::CollectInvest { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(currency_id), + }; + assert_noop!( + pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + msg + ), + pallet_foreign_investments::Error::::InfoNotFound ); - - assert_eq!( - >::convert(KSM_ASSET_ID), - Some(ksm_location) - ) }); } - #[test_runtimes([altair])] - fn convert_unkown_multilocation() { - let mut env = FudgeEnv::::default(); - - let unknown_location: Location = - Location::new(1, [Parachain(T::FudgeHandle::PARA_ID), general_key(&[42])]); - - env.parachain_state_mut(|| { - assert!(>::convert(unknown_location).is_none()); - }); - } + #[test_runtimes([development])] + fn increase_redeem_order() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .storage(), + ); - #[test_runtimes([altair])] - fn convert_unsupported_currency() { - let mut env = FudgeEnv::::default(); + setup_test(&mut env); env.parachain_state_mut(|| { - assert_eq!( - >::convert(CurrencyId::Tranche( - 0, - [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] - )), - None - ) - }); - } - } -} - -mod centrifuge { - use centrifuge_runtime::xcm::CurrencyIdConvert; - use utils::*; - - use super::*; - - mod utils { - use super::*; - - /// The test asset id attributed to DOT - pub const DOT_ASSET_ID: CurrencyId = CurrencyId::ForeignAsset(91); - - pub const LP_ETH_USDC: CurrencyId = CurrencyId::ForeignAsset(100_001); - - pub const USDC: CurrencyId = CurrencyId::ForeignAsset(6); - - /// An Asset that is NOT XCM transferable - pub const NO_XCM_ASSET_ID: CurrencyId = CurrencyId::ForeignAsset(401); - - /// Register DOT in the asset registry. - /// It should be executed within an externalities environment. - pub fn register_dot() { - let meta: AssetMetadata = AssetMetadata { - decimals: 10, - name: BoundedVec::default(), - symbol: BoundedVec::default(), - existential_deposit: 100_000_000, - location: Some(VersionedLocation::V4(Location::parent())), - additional: CustomMetadata { - transferability: CrossChainTransferability::Xcm(Default::default()), - ..CustomMetadata::default() - }, - }; - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta, - Some(DOT_ASSET_ID) - )); - } - - pub fn register_lp_eth_usdc() { - let meta: AssetMetadata = AssetMetadata { - decimals: 6, - name: BoundedVec::default(), - symbol: BoundedVec::default(), - existential_deposit: 1_000, - location: Some(VersionedLocation::V4(Location::new( - 0, - [ - PalletInstance(103), - GlobalConsensus(NetworkId::Ethereum { chain_id: 1 }), - AccountKey20 { - network: None, - key: hex_literal::hex!("a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"), - }, - ], - ))), - additional: CustomMetadata { - transferability: CrossChainTransferability::LiquidityPools, - ..CustomMetadata::default() - }, - }; - - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta, - Some(LP_ETH_USDC) - )); - } - - pub fn register_usdc() { - let meta: AssetMetadata = AssetMetadata { - decimals: 6, - name: BoundedVec::default(), - symbol: BoundedVec::default(), - existential_deposit: 1_000, - location: Some(VersionedLocation::V4(Location::new( - 1, - [ - Junction::Parachain(1000), - Junction::PalletInstance(50), - Junction::GeneralIndex(1337), - ], - ))), - additional: CustomMetadata { - transferability: CrossChainTransferability::Xcm(Default::default()), - ..CustomMetadata::default() - }, - }; - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta, - Some(USDC) - )); - } - - /// Register CFG in the asset registry. - /// It should be executed within an externalities environment. - pub fn register_cfg(para_id: u32) { - let meta: AssetMetadata = AssetMetadata { - decimals: 18, - name: BoundedVec::default(), - symbol: BoundedVec::default(), - existential_deposit: 1_000_000_000_000, - location: Some(VersionedLocation::V4(Location::new( - 1, - [ - Parachain(para_id), - general_key(parachains::polkadot::centrifuge::CFG_KEY), - ], - ))), - additional: CustomMetadata { - transferability: CrossChainTransferability::Xcm(Default::default()), - ..CustomMetadata::default() - }, - }; - - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta, - Some(CurrencyId::Native) - )); - } + let pool_id = POOL_ID; + let amount = 10 * decimals(12); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let currency_id = AUSD_CURRENCY_ID; + let currency_decimals = currency_decimals::AUSD; - /// Register CFG in the asset registry as XCM v2, just like it is in - /// production. It should be executed within an externalities - /// environment. - pub fn register_cfg_v2() { - let meta: AssetMetadata = AssetMetadata { - decimals: 18, - name: BoundedVec::default(), - symbol: BoundedVec::default(), - existential_deposit: 1_000_000_000_000, - location: Some(VersionedLocation::V2(staging_xcm::v2::MultiLocation::new( - 1, - staging_xcm::v2::Junctions::X2( - staging_xcm::v2::Junction::Parachain(T::FudgeHandle::PARA_ID), - staging_xcm::v2::Junction::GeneralKey( - WeakBoundedVec::>::force_from( - parachains::polkadot::centrifuge::CFG_KEY.into(), - None, - ), - ), - ), - ))), - additional: CustomMetadata { - transferability: CrossChainTransferability::Xcm(Default::default()), - ..CustomMetadata::default() - }, - }; + // Create new pool + create_currency_pool::(pool_id, currency_id, currency_decimals.into()); - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta, - Some(CurrencyId::Native) - )); - } + // Set permissions and execute initial redemption + do_initial_increase_redemption::(pool_id, amount, investor.clone(), currency_id); - /// Register a token whose `CrossChainTransferability` does NOT include - /// XCM. - pub fn register_no_xcm_token() { - let meta: AssetMetadata = AssetMetadata { - decimals: 18, - name: BoundedVec::default(), - symbol: BoundedVec::default(), - existential_deposit: 1_000_000_000_000, - location: None, - additional: CustomMetadata { - transferability: CrossChainTransferability::LiquidityPools, - ..CustomMetadata::default() - }, - }; + // Verify amount was noted in the corresponding order + assert_eq!( + pallet_investments::Pallet::::acc_active_redeem_order( + default_investment_id::(), + ) + .amount, + amount + ); - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta, - Some(NO_XCM_ASSET_ID) - )); + // Increasing again should just bump redeeming amount + assert_ok!(orml_tokens::Pallet::::mint_into( + default_investment_id::().into(), + &Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()), + amount + )); + let msg = LiquidityPoolMessage::IncreaseRedeemOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(currency_id), + amount, + }; + assert_ok!(pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + msg + )); + }); } - // The fee associated with transferring DOT tokens - pub fn dot_fee() -> Balance { - fee(10) - } + #[test_runtimes([development])] + fn decrease_redeem_order() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .storage(), + ); - pub fn lp_eth_usdc_fee() -> Balance { - fee(6) - } + setup_test(&mut env); - pub fn usdc_fee() -> Balance { - fee(6) - } + env.parachain_state_mut(|| { + let pool_id = POOL_ID; + let redeem_amount = 10 * decimals(12); + let decrease_amount = redeem_amount / 3; + let final_amount = redeem_amount - decrease_amount; + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let currency_id = AUSD_CURRENCY_ID; + let currency_decimals = currency_decimals::AUSD; + let sending_domain_locator = + Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()); - pub fn dot(amount: Balance) -> Balance { - amount * decimals(10) - } + // Create new pool + create_currency_pool::(pool_id, currency_id, currency_decimals.into()); - pub fn lp_eth_usdc(amount: Balance) -> Balance { - amount * decimals(6) - } + // Set permissions and execute initial redemption + do_initial_increase_redemption::( + pool_id, + redeem_amount, + investor.clone(), + currency_id, + ); - pub fn usdc(amount: Balance) -> Balance { - amount * decimals(6) - } + // Verify the corresponding redemption order id is 0 + assert_eq!( + pallet_investments::Pallet::::invest_order_id(investment_id::( + pool_id, + default_tranche_id::(pool_id) + )), + 0 + ); - pub fn foreign(amount: Balance, num_decimals: u32) -> Balance { - amount * decimals(num_decimals) - } + // Mock incoming decrease message + let msg = LiquidityPoolMessage::DecreaseRedeemOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(currency_id), + amount: decrease_amount, + }; - pub fn transfer_dot_from_relay_chain(env: &mut FudgeEnv) { - let alice_initial_dot = dot(10); - let transfer_amount: Balance = dot(3); + // Execute byte message + assert_ok!(pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + msg + )); - env.parachain_state_mut(|| { - register_dot::(); + // Verify investment was decreased into investment account + assert_eq!( + orml_tokens::Pallet::::balance( + default_investment_id::().into(), + &default_investment_account::(), + ), + final_amount + ); + // Tokens should have been transferred from investor's wallet to domain's + // sovereign account assert_eq!( - orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Alice.into()), + orml_tokens::Pallet::::balance( + default_investment_id::().into(), + &investor + ), 0 ); - }); + assert_eq!( + orml_tokens::Pallet::::balance( + default_investment_id::().into(), + &sending_domain_locator + ), + decrease_amount + ); - env.relay_state_mut(|| { - assert_ok!( - pallet_balances::Pallet::>::force_set_balance( - as frame_system::Config>::RuntimeOrigin::root(), - as frame_system::Config>::Lookup::unlookup( - Keyring::Alice.id() - ), - alice_initial_dot, + // Order should have been updated + assert!(frame_system::Pallet::::events().iter().any(|e| e.event + == pallet_investments::Event::::RedeemOrderUpdated { + investment_id: default_investment_id::(), + submitted_at: 0, + who: investor.clone(), + amount: final_amount + } + .into())); + assert_eq!( + pallet_investments::Pallet::::acc_active_redeem_order( + default_investment_id::(), ) + .amount, + final_amount ); - assert_ok!( - pallet_xcm::Pallet::>::force_xcm_version( - as frame_system::Config>::RuntimeOrigin::root(), - Box::new(Location::new( - 0, - Junction::Parachain(T::FudgeHandle::PARA_ID), - )), - XCM_VERSION, - ) + let sender = ::Sender::get(); + + assert!(frame_system::Pallet::::events().iter().any(|e| { + e.event + == pallet_liquidity_pools_gateway::Event::::OutboundMessageSubmitted { + sender: sender.clone(), + domain: DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain(), + message: LiquidityPoolMessage::ExecutedDecreaseRedeemOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(currency_id), + tranche_tokens_payout: decrease_amount, + remaining_redeem_amount: final_amount, + }, + } + .into() + })); + }); + } + + #[test_runtimes([development])] + fn cancel_redeem_order() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .storage(), + ); + + setup_test(&mut env); + + env.parachain_state_mut(|| { + let pool_id = POOL_ID; + let redeem_amount = 10 * decimals(12); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let currency_id = AUSD_CURRENCY_ID; + let currency_decimals = currency_decimals::AUSD; + let sending_domain_locator = + Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()); + + // Create new pool + create_currency_pool::(pool_id, currency_id, currency_decimals.into()); + + // Set permissions and execute initial redemption + do_initial_increase_redemption::( + pool_id, + redeem_amount, + investor.clone(), + currency_id, ); - assert_ok!( - pallet_xcm::Pallet::>::reserve_transfer_assets( - RawOrigin::Signed(Keyring::Alice.into()).into(), - Box::new(Parachain(T::FudgeHandle::PARA_ID).into()), - Box::new( - Junction::AccountId32 { - network: None, - id: Keyring::Alice.into(), - } - .into() - ), - Box::new((Here, transfer_amount).into()), - 0 - ) + // Verify the corresponding redemption order id is 0 + assert_eq!( + pallet_investments::Pallet::::invest_order_id(investment_id::( + pool_id, + default_tranche_id::(pool_id) + )), + 0 ); + // Mock incoming decrease message + let msg = LiquidityPoolMessage::CancelRedeemOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(currency_id), + }; + + // Execute byte message + assert_ok!(pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + msg + )); + + // Verify investment was decreased into investment account assert_eq!( - pallet_balances::Pallet::>::free_balance( - &Keyring::Alice.into() + orml_tokens::Pallet::::balance( + default_investment_id::().into(), + &default_investment_account::(), ), - 69867666991 // Comes from alice_initial_dot - transfer_amount with noise + 0 + ); + // Tokens should have been transferred from investor's wallet to domain's + // sovereign account + assert_eq!( + orml_tokens::Pallet::::balance( + default_investment_id::().into(), + &investor + ), + 0 + ); + assert_eq!( + orml_tokens::Pallet::::balance( + default_investment_id::().into(), + &sending_domain_locator + ), + redeem_amount ); - }); - - env.pass(Blocks::ByNumber(2)); - env.parachain_state(|| { + // Order should have been updated + assert!(frame_system::Pallet::::events().iter().any(|e| e.event + == pallet_investments::Event::::RedeemOrderUpdated { + investment_id: default_investment_id::(), + submitted_at: 0, + who: investor.clone(), + amount: 0 + } + .into())); assert_eq!( - orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Alice.into()), - 29919630000 // Comes from `transfer_amount - dot_fee()` with some noise + pallet_investments::Pallet::::acc_active_redeem_order( + default_investment_id::(), + ) + .amount, + 0 ); }); } - } - mod asset_registry { - use super::*; + #[test_runtimes([development])] + fn fully_collect_redeem_order() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .storage(), + ); - #[test_runtimes([centrifuge])] - fn register_cfg_works() { - let mut env = FudgeEnv::::default(); + setup_test(&mut env); env.parachain_state_mut(|| { - let meta: AssetMetadata = AssetMetadata { - decimals: 18, - name: BoundedVec::default(), - symbol: BoundedVec::default(), - existential_deposit: 1_000_000_000_000, - location: Some(VersionedLocation::V4(Location::new( - 0, - general_key(parachains::polkadot::centrifuge::CFG_KEY), - ))), - additional: CustomMetadata { - transferability: CrossChainTransferability::Xcm(Default::default()), - ..CustomMetadata::default() - }, - }; + let pool_id = POOL_ID; + let amount = 10 * decimals(12); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let currency_id = AUSD_CURRENCY_ID; + let currency_decimals = currency_decimals::AUSD; + let pool_account = pallet_pool_system::pool_types::PoolLocator { pool_id } + .into_account_truncating(); - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta, - Some(CurrencyId::Native) - )); - }); - } + // Create new pool + create_currency_pool::(pool_id, currency_id, currency_decimals.into()); - #[test_runtimes([centrifuge])] - fn register_foreign_asset_works() { - let mut env = FudgeEnv::::default(); + // Set permissions and execute initial investment + do_initial_increase_redemption::(pool_id, amount, investor.clone(), currency_id); + let events_before_collect = frame_system::Pallet::::events(); - env.parachain_state_mut(|| { - let meta: AssetMetadata = AssetMetadata { - decimals: 12, - name: BoundedVec::default(), - symbol: BoundedVec::default(), - existential_deposit: 1_000_000_000_000, - location: Some(VersionedLocation::V4(Location::new( - 1, - [ - Parachain(parachains::polkadot::acala::ID), - general_key(parachains::polkadot::acala::AUSD_KEY), - ], - ))), - additional: CustomMetadata { - transferability: CrossChainTransferability::Xcm(Default::default()), - ..CustomMetadata::default() - }, - }; + // Fund the pool account with sufficient pool currency, else redemption cannot + // swap tranche tokens against pool currency + assert_ok!(orml_tokens::Pallet::::mint_into( + currency_id, + &pool_account, + amount + )); - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta, - Some(CurrencyId::ForeignAsset(42)) + // Process and fulfill order + // NOTE: Without this step, the order id is not cleared and + // `Event::RedeemCollectedForNonClearedOrderId` be dispatched + assert_ok!(pallet_investments::Pallet::::process_redeem_orders( + default_investment_id::() + )); + assert_ok!(pallet_investments::Pallet::::redeem_fulfillment( + default_investment_id::(), + FulfillmentWithPrice { + of_amount: Perquintill::one(), + price: Ratio::one(), + } )); - }); - } - // Verify that registering tranche tokens is not allowed through extrinsics - #[test_runtimes([centrifuge])] - fn register_tranche_asset_blocked() { - let mut env = FudgeEnv::::default(); + // Enable liquidity pool transferability + enable_liquidity_pool_transferability::(currency_id); - env.parachain_state_mut(|| { - let meta: AssetMetadata = AssetMetadata { - decimals: 12, - name: BoundedVec::default(), - symbol: BoundedVec::default(), - existential_deposit: 1_000_000_000_000, - location: Some(VersionedLocation::V4(Location::new( - 1, - [Parachain(2000), general_key(&[42])], - ))), - additional: CustomMetadata { - transferability: CrossChainTransferability::Xcm(Default::default()), - ..CustomMetadata::default() - }, + // Mock collection message msg + let msg = LiquidityPoolMessage::CollectRedeem { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(currency_id), }; - // It fails with `BadOrigin` even when submitted with `Origin::root` since we - // only allow for tranche tokens to be registered through the pools pallet. - let asset_id = CurrencyId::Tranche(42, [42u8; 16]); - assert_noop!( - orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta, - Some(asset_id) - ), - BadOrigin - ); - }); - } - } - - mod currency_id_convert { - use super::*; - - #[test_runtimes([centrifuge])] - fn convert_cfg() { - let mut env = FudgeEnv::::default(); - - assert_eq!(parachains::polkadot::centrifuge::CFG_KEY, &[0, 1]); + // Execute byte message + assert_ok!(pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + msg + )); - env.parachain_state_mut(|| { - // The way CFG is represented relative within the Centrifuge runtime - let cfg_location_inner: Location = - Location::new(0, general_key(parachains::polkadot::centrifuge::CFG_KEY)); + // Remove events before collect execution + let events_since_collect: Vec<_> = frame_system::Pallet::::events() + .into_iter() + .filter(|e| !events_before_collect.contains(e)) + .collect(); - register_cfg::(T::FudgeHandle::PARA_ID); + // Verify collected redemption was burned from investor + assert_eq!(orml_tokens::Pallet::::balance(currency_id, &investor), 0); + assert!(frame_system::Pallet::::events().iter().any(|e| e.event + == orml_tokens::Event::::Withdrawn { + currency_id, + who: investor.clone(), + amount + } + .into())); + // Order should have been cleared by fulfilling redemption assert_eq!( - >::convert(cfg_location_inner), - Some(CurrencyId::Native), + pallet_investments::Pallet::::acc_active_redeem_order( + default_investment_id::(), + ) + .amount, + 0 ); + assert!(!events_since_collect.iter().any(|e| { + e.event + == pallet_investments::Event::::RedeemCollectedForNonClearedOrderId { + investment_id: default_investment_id::(), + who: investor.clone(), + } + .into() + })); - // The canonical way CFG is represented out in the wild - let cfg_location_canonical: Location = Location::new( - 1, - [ - Parachain(parachains::polkadot::centrifuge::ID), - general_key(parachains::polkadot::centrifuge::CFG_KEY), - ], - ); + // Order should not have been updated since everything is collected + assert!(!events_since_collect.iter().any(|e| { + e.event + == pallet_investments::Event::::RedeemOrderUpdated { + investment_id: default_investment_id::(), + submitted_at: 0, + who: investor.clone(), + amount: 0, + } + .into() + })); - assert_eq!( - >::convert(CurrencyId::Native), - Some(cfg_location_canonical) - ) + // Order should have been fully collected + assert!(events_since_collect.iter().any(|e| { + e.event + == pallet_investments::Event::::RedeemOrdersCollected { + investment_id: default_investment_id::(), + processed_orders: vec![0], + who: investor.clone(), + collection: RedeemCollection:: { + payout_investment_redeem: amount, + remaining_investment_redeem: 0, + }, + outcome: CollectOutcome::FullyCollected, + } + .into() + })); + + let sender = ::Sender::get(); + + // Clearing of foreign RedeemState should be dispatched + assert!(frame_system::Pallet::::events().iter().any(|e| { + e.event + == pallet_liquidity_pools_gateway::Event::::OutboundMessageSubmitted { + sender: sender.clone(), + domain: DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain(), + message: LiquidityPoolMessage::ExecutedCollectRedeem { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(currency_id), + currency_payout: amount, + tranche_tokens_payout: amount, + remaining_redeem_amount: 0, + }, + } + .into() + })); }); } - /// Verify that even with CFG registered in the AssetRegistry with a XCM - /// v2 Location, that `CurrencyIdConvert` can look it up given an - /// identical location in XCM v3. - #[test_runtimes([centrifuge])] - fn convert_cfg_xcm_v2() { - let mut env = FudgeEnv::::default(); + #[test_runtimes([development])] + fn partially_collect_redemption_for_through_investments() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .storage(), + ); - assert_eq!(parachains::polkadot::centrifuge::CFG_KEY, &[0, 1]); + setup_test(&mut env); env.parachain_state_mut(|| { - // Registered as xcm v2 - register_cfg_v2::(); - - // The way CFG is represented relative within the Centrifuge runtime in xcm v3 - let cfg_location_inner: Location = - Location::new(0, general_key(parachains::polkadot::centrifuge::CFG_KEY)); - - assert_eq!( - >::convert(cfg_location_inner), - Some(CurrencyId::Native), + let pool_id = POOL_ID; + let redeem_amount = 10 * decimals(12); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let currency_id = AUSD_CURRENCY_ID; + let currency_decimals = currency_decimals::AUSD; + let pool_account = pallet_pool_system::pool_types::PoolLocator { pool_id } + .into_account_truncating(); + create_currency_pool::(pool_id, currency_id, currency_decimals.into()); + do_initial_increase_redemption::( + pool_id, + redeem_amount, + investor.clone(), + currency_id, ); + enable_liquidity_pool_transferability::(currency_id); - // The canonical way CFG is represented out in the wild - let cfg_location_canonical: Location = Location::new( - 1, - [ - Parachain(parachains::polkadot::centrifuge::ID), - general_key(parachains::polkadot::centrifuge::CFG_KEY), - ], + // Fund the pool account with sufficient pool currency, else redemption cannot + // swap tranche tokens against pool currency + assert_ok!(orml_tokens::Pallet::::mint_into( + currency_id, + &pool_account, + redeem_amount + )); + assert!( + !pallet_investments::Pallet::::redemption_requires_collect( + &investor, + default_investment_id::() + ) ); - assert_eq!( - >::convert(CurrencyId::Native), - Some(cfg_location_canonical) - ) - }); - } - - /// Verify that a registered token that is NOT XCM transferable is - /// filtered out by CurrencyIdConvert as expected. - #[test_runtimes([centrifuge])] - fn convert_no_xcm_token() { - let mut env = FudgeEnv::::default(); - - env.parachain_state_mut(|| { - register_no_xcm_token::(); + // Process 50% of redemption at 25% rate, i.e. 1 pool currency = 4 tranche + // tokens + assert_ok!(pallet_investments::Pallet::::process_redeem_orders( + default_investment_id::() + )); + assert_ok!(pallet_investments::Pallet::::redeem_fulfillment( + default_investment_id::(), + FulfillmentWithPrice { + of_amount: Perquintill::from_percent(50), + price: Ratio::checked_from_rational(1, 4).unwrap(), + } + )); - assert_eq!( - >::convert(NO_XCM_ASSET_ID), - None - ) - }); - } + // Pre collect assertions + assert!( + pallet_investments::Pallet::::redemption_requires_collect( + &investor, + default_investment_id::() + ) + ); - #[test_runtimes([centrifuge])] - fn convert_dot() { - let mut env = FudgeEnv::::default(); + // Collecting through investments should denote amounts and transition + // state + assert_ok!(pallet_investments::Pallet::::collect_redemptions_for( + RawOrigin::Signed(Keyring::Alice.into()).into(), + investor.clone(), + default_investment_id::() + )); + assert!(frame_system::Pallet::::events().iter().any(|e| { + e.event + == pallet_investments::Event::::RedeemOrdersCollected { + investment_id: default_investment_id::(), + processed_orders: vec![0], + who: investor.clone(), + collection: RedeemCollection:: { + payout_investment_redeem: redeem_amount / 8, + remaining_investment_redeem: redeem_amount / 2, + }, + outcome: CollectOutcome::FullyCollected, + } + .into() + })); - let dot_location: Location = Location::parent(); + let sender = ::Sender::get(); - env.parachain_state_mut(|| { - register_dot::(); + assert!(frame_system::Pallet::::events().iter().any(|e| { + e.event + == pallet_liquidity_pools_gateway::Event::::OutboundMessageSubmitted { + sender: sender.clone(), + domain: DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain(), + message: LiquidityPoolMessage::ExecutedCollectRedeem { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(currency_id), + currency_payout: redeem_amount / 8, + tranche_tokens_payout: redeem_amount / 2, + remaining_redeem_amount: redeem_amount / 2, + }, + } + .into() + })); + assert!( + !pallet_investments::Pallet::::redemption_requires_collect( + &investor, + default_investment_id::() + ) + ); + // Since foreign currency is pool currency, the swap is immediately fulfilled + // and ExecutedCollectRedeem dispatched + assert!(frame_system::Pallet::::events().iter().any(|e| e.event + == orml_tokens::Event::::Withdrawn { + currency_id, + who: investor.clone(), + amount: redeem_amount / 8 + } + .into())); + // Process rest of redemption at 50% rate + assert_ok!(pallet_investments::Pallet::::process_redeem_orders( + default_investment_id::() + )); + assert_ok!(pallet_investments::Pallet::::redeem_fulfillment( + default_investment_id::(), + FulfillmentWithPrice { + of_amount: Perquintill::one(), + price: Ratio::checked_from_rational(1, 2).unwrap(), + } + )); + // Order should have been cleared by fulfilling redemption assert_eq!( - >::convert(dot_location.clone()), - Some(DOT_ASSET_ID), + pallet_investments::Pallet::::acc_active_redeem_order( + default_investment_id::(), + ) + .amount, + 0 ); - assert_eq!( - >::convert(DOT_ASSET_ID), - Some(dot_location) - ) + // Collect remainder through Investments + assert_ok!(pallet_investments::Pallet::::collect_redemptions_for( + RawOrigin::Signed(Keyring::Alice.into()).into(), + investor.clone(), + default_investment_id::() + )); + assert!( + !pallet_investments::Pallet::::redemption_requires_collect( + &investor, + default_investment_id::() + ) + ); + assert!(!frame_system::Pallet::::events().iter().any(|e| { + e.event + == pallet_investments::Event::::RedeemCollectedForNonClearedOrderId { + investment_id: default_investment_id::(), + who: investor.clone(), + } + .into() + })); + assert!(frame_system::Pallet::::events().iter().any(|e| { + e.event + == pallet_investments::Event::::RedeemOrdersCollected { + investment_id: default_investment_id::(), + processed_orders: vec![1], + who: investor.clone(), + collection: RedeemCollection:: { + payout_investment_redeem: redeem_amount / 4, + remaining_investment_redeem: 0, + }, + outcome: CollectOutcome::FullyCollected, + } + .into() + })); + // Verify collected redemption was burned from investor + assert_eq!(orml_tokens::Pallet::::balance(currency_id, &investor), 0); + assert!(frame_system::Pallet::::events().iter().any(|e| e.event + == orml_tokens::Event::::Withdrawn { + currency_id, + who: investor.clone(), + amount: redeem_amount / 4 + } + .into())); + // Clearing of foreign RedeemState should have been dispatched exactly once + assert!(frame_system::Pallet::::events().iter().any(|e| { + e.event + == pallet_liquidity_pools_gateway::Event::::OutboundMessageSubmitted { + sender: sender.clone(), + domain: DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain(), + message: LiquidityPoolMessage::ExecutedCollectRedeem { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(currency_id), + currency_payout: redeem_amount / 4, + tranche_tokens_payout: redeem_amount / 2, + remaining_redeem_amount: 0, + }, + } + .into() + })); }); } - #[test_runtimes([centrifuge])] - fn convert_unknown_multilocation() { - let mut env = FudgeEnv::::default(); + mod should_fail { + use super::*; - let unknown_location: Location = Location::new( - 1, - [ - Parachain(T::FudgeHandle::PARA_ID), - general_key([42].as_ref()), - ], - ); + mod decrease_should_underflow { + use super::*; - env.parachain_state_mut(|| { - assert!(>::convert(unknown_location).is_none()); - }); - } + #[test_runtimes([development])] + fn invest_decrease_underflow() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .storage(), + ); - #[test_runtimes([centrifuge])] - fn convert_unsupported_currency() { - let mut env = FudgeEnv::::default(); + setup_test(&mut env); - env.parachain_state_mut(|| { - assert_eq!( - >::convert(CurrencyId::Tranche( - 0, - [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] - )), - None - ) - }); - } - } + env.parachain_state_mut(|| { + let pool_id = POOL_ID; + let invest_amount: u128 = 10 * decimals(12); + let decrease_amount = invest_amount + 1; + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let currency_id: CurrencyId = AUSD_CURRENCY_ID; + let currency_decimals = currency_decimals::AUSD; + create_currency_pool::(pool_id, currency_id, currency_decimals.into()); + do_initial_increase_investment::( + pool_id, + invest_amount, + investor.clone(), + currency_id, + ); + enable_liquidity_pool_transferability::(currency_id); - mod restricted_transfers { - use cfg_types::tokens::{CurrencyId::Native, FilterCurrency}; + // Mock incoming decrease message + let msg = LiquidityPoolMessage::DecreaseInvestOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(currency_id), + amount: decrease_amount, + }; - use super::*; - use crate::generic::envs::runtime_env::RuntimeEnv; + assert_noop!( + pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + msg + ), + pallet_foreign_investments::Error::::TooMuchDecrease + ); + }); + } - const TRANSFER_AMOUNT: u128 = 10; + #[test_runtimes([development])] + fn redeem_decrease_underflow() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .storage(), + ); - fn xcm_location() -> VersionedLocation { - VersionedLocation::V4(Location::new( - 1, - AccountId32 { - id: Keyring::Alice.into(), - network: None, - }, - )) - } + setup_test(&mut env); - fn allowed_xcm_location() -> RestrictedTransferLocation { - RestrictedTransferLocation::Xcm(Box::new(xcm_location())) - } + env.parachain_state_mut(|| { + let pool_id = POOL_ID; + let redeem_amount: u128 = 10 * decimals(12); + let decrease_amount = redeem_amount + 1; + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let currency_id: CurrencyId = AUSD_CURRENCY_ID; + let currency_decimals = currency_decimals::AUSD; + create_currency_pool::(pool_id, currency_id, currency_decimals.into()); + do_initial_increase_redemption::( + pool_id, + redeem_amount, + investor.clone(), + currency_id, + ); - fn add_allowance( - account: Keyring, - asset: CurrencyId, - location: RestrictedTransferLocation, - ) { - assert_ok!( - pallet_transfer_allowlist::Pallet::::add_transfer_allowance( - RawOrigin::Signed(account.into()).into(), - FilterCurrency::Specific(asset), - location - ) - ); - } + // Mock incoming decrease message + let msg = LiquidityPoolMessage::DecreaseRedeemOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(currency_id), + amount: decrease_amount, + }; - #[test_runtimes([centrifuge])] - fn restrict_cfg_extrinsic() { - let mut env = RuntimeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(TRANSFER_AMOUNT + 10))) - .add(orml_tokens::GenesisConfig:: { - balances: vec![( - Keyring::Alice.id(), - USDC, - T::ExistentialDeposit::get() + usdc(TRANSFER_AMOUNT), - )], - }) - .storage(), - ); + assert_noop!( + pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + msg + ), + DispatchError::Arithmetic(sp_runtime::ArithmeticError::Underflow) + ); + }); + } + } - let (pre_transfer_alice, pre_transfer_bob, pre_transfer_charlie) = env - .parachain_state_mut(|| { - // NOTE: The para-id is not relevant here - register_cfg::(2031); + mod should_throw_requires_collect { + use super::*; - assert_ok!( - pallet_transfer_allowlist::Pallet::::add_transfer_allowance( - RawOrigin::Signed(Keyring::Alice.into()).into(), - FilterCurrency::All, - RestrictedTransferLocation::Local(Keyring::Bob.id()) - ) + #[test_runtimes([development])] + fn invest_requires_collect() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .storage(), ); - ( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()), - pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()), - pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()), - ) - }); - - let call = pallet_balances::Call::::transfer_allow_death { - dest: Keyring::Charlie.into(), - value: cfg(TRANSFER_AMOUNT), - }; - env.submit_now(Keyring::Alice, call).unwrap(); - - let call = pallet_balances::Call::::transfer_allow_death { - dest: Keyring::Bob.into(), - value: cfg(TRANSFER_AMOUNT), - }; - let fee = env.submit_now(Keyring::Alice, call).unwrap(); - - // Restrict also CFG local - env.parachain_state(|| { - let after_transfer_alice = - pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()); - let after_transfer_bob = - pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()); - let after_transfer_charlie = - pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()); - - assert_eq!( - after_transfer_alice, - pre_transfer_alice - cfg(TRANSFER_AMOUNT) - 2 * fee - ); - assert_eq!(after_transfer_bob, pre_transfer_bob + cfg(TRANSFER_AMOUNT)); - assert_eq!(after_transfer_charlie, pre_transfer_charlie); - }); - } + setup_test(&mut env); - #[test_runtimes([centrifuge])] - fn restrict_all() { - let mut env = RuntimeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(TRANSFER_AMOUNT + 10))) - .add(orml_tokens::GenesisConfig:: { - balances: vec![( - Keyring::Alice.id(), - USDC, - T::ExistentialDeposit::get() + usdc(TRANSFER_AMOUNT), - )], - }) - .storage(), - ); + env.parachain_state_mut(|| { + let pool_id = POOL_ID; + let amount: u128 = 10 * decimals(12); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let currency_id: CurrencyId = AUSD_CURRENCY_ID; + let currency_decimals = currency_decimals::AUSD; + create_currency_pool::(pool_id, currency_id, currency_decimals.into()); + do_initial_increase_investment::( + pool_id, + amount, + investor.clone(), + currency_id, + ); + enable_liquidity_pool_transferability::(currency_id); - // Set allowance - env.parachain_state_mut(|| { - assert_ok!( - pallet_transfer_allowlist::Pallet::::add_transfer_allowance( - RawOrigin::Signed(Keyring::Alice.into()).into(), - FilterCurrency::All, - RestrictedTransferLocation::Local(Keyring::Bob.id()) - ) - ); - }); + // Prepare collection + let pool_account = pallet_pool_system::pool_types::PoolLocator { pool_id } + .into_account_truncating(); + assert_ok!(orml_tokens::Pallet::::mint_into( + currency_id, + &pool_account, + amount + )); + assert_ok!(pallet_investments::Pallet::::process_invest_orders( + default_investment_id::() + )); + assert_ok!(pallet_investments::Pallet::::invest_fulfillment( + default_investment_id::(), + FulfillmentWithPrice { + of_amount: Perquintill::one(), + price: Ratio::one(), + } + )); - // Restrict USDC local - env.parachain_state_mut(|| { - register_usdc::(); + // Should fail to increase + let increase_msg = LiquidityPoolMessage::IncreaseInvestOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(currency_id), + amount: AUSD_ED, + }; + assert_noop!( + pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + increase_msg + ), + pallet_investments::Error::::CollectRequired + ); - let pre_transfer_alice = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Alice.id()); - let pre_transfer_bob = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Bob.id()); - let pre_transfer_charlie = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Charlie.id()); + // Should fail to decrease + let decrease_msg = LiquidityPoolMessage::DecreaseInvestOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(currency_id), + amount: 1, + }; + assert_noop!( + pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + decrease_msg + ), + pallet_investments::Error::::CollectRequired + ); + }); + } - assert_noop!( - pallet_restricted_tokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Alice.into()).into(), - Keyring::Charlie.into(), - USDC, - lp_eth_usdc(TRANSFER_AMOUNT) - ), - pallet_restricted_tokens::Error::::PreConditionsNotMet - ); + #[test_runtimes([development])] + fn redeem_requires_collect() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .storage(), + ); - let after_transfer_alice = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Alice.id()); - let after_transfer_charlie = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Charlie.id()); + setup_test(&mut env); - assert_eq!(after_transfer_alice, pre_transfer_alice); - assert_eq!(after_transfer_charlie, pre_transfer_charlie); + env.parachain_state_mut(|| { + let pool_id = POOL_ID; + let amount: u128 = 10 * decimals(12); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let currency_id: CurrencyId = AUSD_CURRENCY_ID; + let currency_decimals = currency_decimals::AUSD; + create_currency_pool::(pool_id, currency_id, currency_decimals.into()); + do_initial_increase_redemption::( + pool_id, + amount, + investor.clone(), + currency_id, + ); + enable_liquidity_pool_transferability::(currency_id); - assert_ok!(pallet_restricted_tokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Alice.into()).into(), - Keyring::Bob.into(), - USDC, - usdc(TRANSFER_AMOUNT) - ),); - - let after_transfer_alice = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Alice.id()); - let after_transfer_bob = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Bob.id()); - let after_transfer_charlie = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Charlie.id()); + // Mint more into DomainLocator required for subsequent invest attempt + assert_ok!(orml_tokens::Pallet::::mint_into( + default_investment_id::().into(), + &Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()), + 1, + )); - assert_eq!( - after_transfer_alice, - pre_transfer_alice - usdc(TRANSFER_AMOUNT) - ); - assert_eq!(after_transfer_bob, pre_transfer_bob + usdc(TRANSFER_AMOUNT)); - assert_eq!(after_transfer_charlie, pre_transfer_charlie); - }); + // Prepare collection + let pool_account = pallet_pool_system::pool_types::PoolLocator { pool_id } + .into_account_truncating(); + assert_ok!(orml_tokens::Pallet::::mint_into( + currency_id, + &pool_account, + amount + )); + assert_ok!(pallet_investments::Pallet::::process_redeem_orders( + default_investment_id::() + )); + assert_ok!(pallet_investments::Pallet::::redeem_fulfillment( + default_investment_id::(), + FulfillmentWithPrice { + of_amount: Perquintill::one(), + price: Ratio::one(), + } + )); - // Restrict also CFG local - env.parachain_state_mut(|| { - // NOTE: The para-id is not relevant here - register_cfg::(2031); + // Should fail to increase + let increase_msg = LiquidityPoolMessage::IncreaseRedeemOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(currency_id), + amount: 1, + }; + assert_noop!( + pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + increase_msg + ), + pallet_investments::Error::::CollectRequired + ); - let pre_transfer_alice = - pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()); - let pre_transfer_bob = - pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()); - let pre_transfer_charlie = - pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()); + // Should fail to decrease + let decrease_msg = LiquidityPoolMessage::DecreaseRedeemOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(currency_id), + amount: 1, + }; + assert_noop!( + pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + decrease_msg + ), + pallet_investments::Error::::CollectRequired + ); + }); + } + } - assert_noop!( - pallet_restricted_tokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Alice.into()).into(), - Keyring::Charlie.into(), - Native, - cfg(TRANSFER_AMOUNT) - ), - pallet_restricted_tokens::Error::::PreConditionsNotMet - ); + mod payment_payout_currency { + use super::*; - let after_transfer_alice = - pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()); - let after_transfer_charlie = - pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()); + #[test_runtimes([development])] + fn invalid_invest_payment_currency() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .storage(), + ); - assert_eq!(after_transfer_alice, pre_transfer_alice); - assert_eq!(after_transfer_charlie, pre_transfer_charlie); + setup_test(&mut env); - assert_ok!(pallet_restricted_tokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Alice.into()).into(), - Keyring::Bob.into(), - Native, - cfg(TRANSFER_AMOUNT) - ),); - - let after_transfer_alice = - pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()); - let after_transfer_bob = - pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()); - let after_transfer_charlie = - pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()); + env.parachain_state_mut(|| { + let pool_id = POOL_ID; + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let pool_currency = AUSD_CURRENCY_ID; + let currency_decimals = currency_decimals::AUSD; + let foreign_currency: CurrencyId = USDT_CURRENCY_ID; + let amount = 6 * decimals(18); + + create_currency_pool::(pool_id, pool_currency, currency_decimals.into()); + do_initial_increase_investment::( + pool_id, + amount, + investor.clone(), + pool_currency, + ); - assert_eq!( - after_transfer_alice, - pre_transfer_alice - cfg(TRANSFER_AMOUNT) - ); - assert_eq!(after_transfer_bob, pre_transfer_bob + cfg(TRANSFER_AMOUNT)); - assert_eq!(after_transfer_charlie, pre_transfer_charlie); - }); - } + enable_usdt_trading::(pool_currency, amount, true, true, true); - #[test_runtimes([centrifuge])] - fn restrict_lp_eth_usdc_transfer() { - let mut env = RuntimeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(10))) - .add(orml_tokens::GenesisConfig:: { - balances: vec![( - Keyring::Alice.id(), - LP_ETH_USDC, - T::ExistentialDeposit::get() + lp_eth_usdc(TRANSFER_AMOUNT), - )], - }) - .storage(), - ); + // Should fail to increase, decrease or collect for + // another foreign currency as long as + // `InvestmentState` exists + let increase_msg = LiquidityPoolMessage::IncreaseInvestOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(foreign_currency), + amount: AUSD_ED, + }; + assert_noop!( + pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + increase_msg + ), + pallet_foreign_investments::Error::::MismatchedForeignCurrency + ); + let decrease_msg = LiquidityPoolMessage::DecreaseInvestOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(foreign_currency), + amount: 1, + }; + assert_noop!( + pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + decrease_msg + ), + pallet_foreign_investments::Error::::MismatchedForeignCurrency + ); + let collect_msg = LiquidityPoolMessage::CollectInvest { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(foreign_currency), + }; + assert_noop!( + pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + collect_msg + ), + pallet_foreign_investments::Error::::MismatchedForeignCurrency + ); + }); + } - env.parachain_state_mut(|| { - register_lp_eth_usdc::(); - - let pre_transfer_alice = - orml_tokens::Pallet::::free_balance(LP_ETH_USDC, &Keyring::Alice.id()); - let pre_transfer_bob = - orml_tokens::Pallet::::free_balance(LP_ETH_USDC, &Keyring::Bob.id()); - let pre_transfer_charlie = - orml_tokens::Pallet::::free_balance(LP_ETH_USDC, &Keyring::Charlie.id()); - - add_allowance::( - Keyring::Alice, - LP_ETH_USDC, - RestrictedTransferLocation::Local(Keyring::Bob.id()), - ); + #[test_runtimes([development])] + fn invalid_redeem_payout_currency() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .storage(), + ); - assert_noop!( - pallet_restricted_tokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Alice.into()).into(), - Keyring::Charlie.into(), - LP_ETH_USDC, - lp_eth_usdc(TRANSFER_AMOUNT) - ), - pallet_restricted_tokens::Error::::PreConditionsNotMet - ); + setup_test(&mut env); + + env.parachain_state_mut(|| { + let pool_id = POOL_ID; + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let pool_currency = AUSD_CURRENCY_ID; + let currency_decimals = currency_decimals::AUSD; + let foreign_currency: CurrencyId = USDT_CURRENCY_ID; + let amount = 6 * decimals(18); + + create_currency_pool::(pool_id, pool_currency, currency_decimals.into()); + do_initial_increase_redemption::( + pool_id, + amount, + investor.clone(), + pool_currency, + ); + enable_usdt_trading::(pool_currency, amount, true, true, true); + assert_ok!(orml_tokens::Pallet::::mint_into( + default_investment_id::().into(), + &Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()), + amount, + )); + + // Should fail to increase, decrease or collect for + // another foreign currency as long as + // `RedemptionState` exists + let increase_msg = LiquidityPoolMessage::IncreaseRedeemOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(foreign_currency), + amount: 1, + }; + assert_noop!( + pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + increase_msg + ), + pallet_foreign_investments::Error::::MismatchedForeignCurrency + ); + let decrease_msg = LiquidityPoolMessage::DecreaseRedeemOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(foreign_currency), + amount: 1, + }; + assert_noop!( + pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + decrease_msg + ), + pallet_foreign_investments::Error::::MismatchedForeignCurrency + ); + let collect_msg = LiquidityPoolMessage::CollectRedeem { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(foreign_currency), + }; + assert_noop!( + pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + collect_msg + ), + pallet_foreign_investments::Error::::MismatchedForeignCurrency + ); + }); + } - let after_transfer_alice = - orml_tokens::Pallet::::free_balance(LP_ETH_USDC, &Keyring::Alice.id()); - let after_transfer_charlie = - orml_tokens::Pallet::::free_balance(LP_ETH_USDC, &Keyring::Charlie.id()); + #[test_runtimes([development])] + fn redeem_payout_currency_not_found() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .storage(), + ); - assert_eq!(after_transfer_alice, pre_transfer_alice); - assert_eq!(after_transfer_charlie, pre_transfer_charlie); + setup_test(&mut env); - assert_ok!(pallet_restricted_tokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Alice.into()).into(), - Keyring::Bob.into(), - LP_ETH_USDC, - lp_eth_usdc(TRANSFER_AMOUNT) - ),); - - let after_transfer_alice = - orml_tokens::Pallet::::free_balance(LP_ETH_USDC, &Keyring::Alice.id()); - let after_transfer_bob = - orml_tokens::Pallet::::free_balance(LP_ETH_USDC, &Keyring::Bob.id()); - let after_transfer_charlie = - orml_tokens::Pallet::::free_balance(LP_ETH_USDC, &Keyring::Charlie.id()); + env.parachain_state_mut(|| { + let pool_id = POOL_ID; + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let pool_currency = AUSD_CURRENCY_ID; + let currency_decimals = currency_decimals::AUSD; + let foreign_currency: CurrencyId = USDT_CURRENCY_ID; + let amount = 6 * decimals(18); + + create_currency_pool::(pool_id, pool_currency, currency_decimals.into()); + do_initial_increase_redemption::( + pool_id, + amount, + investor.clone(), + pool_currency, + ); + enable_usdt_trading::(pool_currency, amount, true, true, true); + assert_ok!(orml_tokens::Pallet::::mint_into( + default_investment_id::().into(), + &Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()), + amount, + )); + + // Should fail to decrease or collect for another + // foreign currency as long as `RedemptionState` + // exists + let decrease_msg = LiquidityPoolMessage::DecreaseRedeemOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(foreign_currency), + amount: 1, + }; + assert_noop!( + pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + decrease_msg + ), + pallet_foreign_investments::Error::::MismatchedForeignCurrency + ); - assert_eq!( - after_transfer_alice, - pre_transfer_alice - lp_eth_usdc(TRANSFER_AMOUNT) - ); - assert_eq!( - after_transfer_bob, - pre_transfer_bob + lp_eth_usdc(TRANSFER_AMOUNT) - ); - assert_eq!(after_transfer_charlie, pre_transfer_charlie); - }); + let collect_msg = LiquidityPoolMessage::CollectRedeem { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(foreign_currency), + }; + assert_noop!( + pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + collect_msg + ), + pallet_foreign_investments::Error::::MismatchedForeignCurrency + ); + }); + } + } } + } + + mod mismatching_currencies { + use super::*; - #[test_runtimes([centrifuge])] - fn restrict_lp_eth_usdc_lp_transfer() { + #[test_runtimes([development])] + fn collect_foreign_investment_for() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() - .add(genesis::balances::(cfg(10))) - .add(orml_tokens::GenesisConfig:: { - balances: vec![( - Keyring::Alice.id(), - LP_ETH_USDC, - T::ExistentialDeposit::get() + lp_eth_usdc(TRANSFER_AMOUNT), - )], - }) + .add(genesis::balances::(cfg(1_000))) .storage(), ); - setup_xcm(&mut env); + setup_test(&mut env); env.parachain_state_mut(|| { - register_usdc::(); - register_lp_eth_usdc::(); - - assert_ok!(orml_tokens::Pallet::::set_balance( - ::RuntimeOrigin::root(), - ::Sender::get().into(), - USDC, - usdc(1_000), - 0, - )); - - let router = DomainRouter::EthereumXCM(EthereumXCMRouter:: { - router: XCMRouter { - xcm_domain: XcmDomain { - location: Box::new( - Location::new(1, Parachain(T::FudgeHandle::SIBLING_ID)).into(), - ), - ethereum_xcm_transact_call_index: BoundedVec::truncate_from(vec![ - 38, 0, - ]), - contract_address: H160::from_low_u64_be(11), - max_gas_limit: 700_000, - transact_required_weight_at_most: Default::default(), - overall_weight: Default::default(), - fee_currency: USDC, - fee_amount: usdc(1), - }, - _marker: Default::default(), - }, - _marker: Default::default(), - }); - - assert_ok!( - pallet_liquidity_pools_gateway::Pallet::::set_domain_router( - ::RuntimeOrigin::root(), - Domain::EVM(1), - router, - ) - ); - - let receiver = H160::from_slice( - &>::as_ref(&Keyring::Charlie.id()) - [0..20], + let pool_id = POOL_ID; + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let pool_currency: CurrencyId = AUSD_CURRENCY_ID; + let foreign_currency: CurrencyId = USDT_CURRENCY_ID; + let pool_currency_decimals = currency_decimals::AUSD; + let invest_amount_pool_denominated: u128 = 6 * decimals(18); + let sending_domain_locator = + Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()); + let trader: AccountId = Keyring::Alice.into(); + create_currency_pool::(pool_id, pool_currency, pool_currency_decimals.into()); + + // USDT investment preparations + let invest_amount_foreign_denominated = enable_usdt_trading::( + pool_currency, + invest_amount_pool_denominated, + true, + true, + // not needed because we don't initialize a swap from pool to foreign here + false, ); - let domain_address = DomainAddress::EVM(1, receiver.into()); - - add_allowance::( - Keyring::Alice, - LP_ETH_USDC, - RestrictedTransferLocation::Address(domain_address.clone()), + // Do first investment and fulfill swap order + do_initial_increase_investment::( + pool_id, + invest_amount_foreign_denominated, + investor.clone(), + foreign_currency, ); - - assert_noop!( - pallet_liquidity_pools::Pallet::::transfer( - RawOrigin::Signed(Keyring::Alice.into()).into(), - LP_ETH_USDC, - DomainAddress::EVM(1, [1u8; 20]), - lp_eth_usdc(TRANSFER_AMOUNT), - ), - pallet_transfer_allowlist::Error::::NoAllowanceForDestination + fulfill_swap_into_pool::( + pool_id, + default_order_id::(&investor), + invest_amount_pool_denominated, + invest_amount_foreign_denominated, + trader, ); - let total_issuance_pre = orml_tokens::Pallet::::total_issuance(LP_ETH_USDC); + // Increase invest order to initialize ForeignInvestmentInfo + let msg = LiquidityPoolMessage::IncreaseInvestOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(foreign_currency), + amount: invest_amount_foreign_denominated, + }; + assert_ok!(pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + msg + )); - assert_ok!(pallet_liquidity_pools::Pallet::::transfer( + // Process 100% of investment at 50% rate (1 pool currency = 2 tranche tokens) + assert_ok!(pallet_investments::Pallet::::process_invest_orders( + default_investment_id::() + )); + assert_ok!(pallet_investments::Pallet::::invest_fulfillment( + default_investment_id::(), + FulfillmentWithPrice { + of_amount: Perquintill::one(), + price: Ratio::checked_from_rational(1, 2).unwrap(), + } + )); + assert_ok!(pallet_investments::Pallet::::collect_investments_for( RawOrigin::Signed(Keyring::Alice.into()).into(), - LP_ETH_USDC, - domain_address, - lp_eth_usdc(TRANSFER_AMOUNT), + investor.clone(), + default_investment_id::() )); - + assert!(orml_tokens::Pallet::::balance( + default_investment_id::().into(), + &investor + ) + .is_zero()); assert_eq!( - orml_tokens::Pallet::::total_issuance(LP_ETH_USDC), - total_issuance_pre - lp_eth_usdc(TRANSFER_AMOUNT), - ); - }); - } - - #[test_runtimes([centrifuge])] - fn restrict_usdc_transfer() { - let mut env = RuntimeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(10))) - .add(orml_tokens::GenesisConfig:: { - balances: vec![( - Keyring::Alice.id(), - USDC, - T::ExistentialDeposit::get() + usdc(TRANSFER_AMOUNT), - )], - }) - .storage(), - ); - - env.parachain_state_mut(|| { - register_usdc::(); - - let pre_transfer_alice = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Alice.id()); - let pre_transfer_bob = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Bob.id()); - let pre_transfer_charlie = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Charlie.id()); - - add_allowance::( - Keyring::Alice, - USDC, - RestrictedTransferLocation::Local(Keyring::Bob.id()), - ); - - assert_noop!( - pallet_restricted_tokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Alice.into()).into(), - Keyring::Charlie.into(), - USDC, - lp_eth_usdc(TRANSFER_AMOUNT) + orml_tokens::Pallet::::balance( + default_investment_id::().into(), + &sending_domain_locator ), - pallet_restricted_tokens::Error::::PreConditionsNotMet + invest_amount_pool_denominated * 2 ); - let after_transfer_alice = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Alice.id()); - let after_transfer_charlie = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Charlie.id()); - - assert_eq!(after_transfer_alice, pre_transfer_alice); - assert_eq!(after_transfer_charlie, pre_transfer_charlie); - - assert_ok!(pallet_restricted_tokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Alice.into()).into(), - Keyring::Bob.into(), - USDC, - usdc(TRANSFER_AMOUNT) - ),); - - let after_transfer_alice = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Alice.id()); - let after_transfer_bob = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Bob.id()); - let after_transfer_charlie = - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Charlie.id()); + let sender = ::Sender::get(); - assert_eq!( - after_transfer_alice, - pre_transfer_alice - usdc(TRANSFER_AMOUNT) - ); - assert_eq!(after_transfer_bob, pre_transfer_bob + usdc(TRANSFER_AMOUNT)); - assert_eq!(after_transfer_charlie, pre_transfer_charlie); + assert!(frame_system::Pallet::::events().iter().any(|e| { + e.event + == pallet_liquidity_pools_gateway::Event::::OutboundMessageSubmitted { + sender: sender.clone(), + domain: DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain(), + message: LiquidityPoolMessage::ExecutedCollectInvest { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(foreign_currency), + currency_payout: invest_amount_foreign_denominated, + tranche_tokens_payout: 2 * invest_amount_pool_denominated, + remaining_invest_amount: invest_amount_foreign_denominated, + }, + } + .into() + })); }); } - #[test_runtimes([centrifuge])] - fn restrict_usdc_xcm_transfer() { - let mut env = FudgeEnv::::from_storage( - paras::GenesisConfig::> { - _config: Default::default(), - paras: vec![( - 1000.into(), - ParaGenesisArgs { - genesis_head: Default::default(), - validation_code: ValidationCode::from(vec![0, 1, 2, 3]), - para_kind: ParaKind::Parachain, - }, - )], - } - .build_storage() - .unwrap(), + /// Invest in pool currency, then increase in allowed foreign + /// currency, then decrease in same foreign currency multiple times. + #[test_runtimes([development])] + fn increase_fulfill_increase_decrease_decrease_partial() { + let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() - .add(genesis::balances::(cfg(10))) + .add(genesis::balances::(cfg(1_000))) .storage(), - Default::default(), ); - // Configuring XCM in this test fails because the Hrmp - // configuration is not applied. We force the application here, - // but we should configure correctly this because something is off. - env.relay_state_mut(|| { - polkadot_runtime_parachains::configuration::Pallet::>::force_set_active_config( - crate::generic::envs::fudge_env::handle::hrmp_host_config() - ); - }); - - setup_xcm(&mut env); - - setup_usdc_xcm(&mut env); - - env.sibling_state_mut(|| { - register_usdc::(); - }); + setup_test(&mut env); env.parachain_state_mut(|| { - register_usdc::(); + let pool_id = POOL_ID; + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let pool_currency: CurrencyId = AUSD_CURRENCY_ID; + let foreign_currency: CurrencyId = USDT_CURRENCY_ID; + let pool_currency_decimals = currency_decimals::AUSD; + let invest_amount_pool_denominated: u128 = 6 * decimals(18); + let trader: AccountId = Keyring::Alice.into(); + create_currency_pool::(pool_id, pool_currency, pool_currency_decimals.into()); + + // USDT investment preparations + let invest_amount_foreign_denominated = enable_usdt_trading::( + pool_currency, + invest_amount_pool_denominated, + true, + true, + true, + ); - let alice_initial_usdc = usdc(3_000); + // Do first investment and fulfill swap order + do_initial_increase_investment::( + pool_id, + invest_amount_foreign_denominated, + investor.clone(), + foreign_currency, + ); + fulfill_swap_into_pool::( + pool_id, + default_order_id::(&investor), + invest_amount_pool_denominated, + invest_amount_foreign_denominated, + trader.clone(), + ); - assert_ok!(orml_tokens::Pallet::::mint_into( - USDC, - &Keyring::Alice.into(), - alice_initial_usdc + // Do second investment and not fulfill swap order + let increase_msg = LiquidityPoolMessage::IncreaseInvestOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(foreign_currency), + amount: invest_amount_foreign_denominated, + }; + assert_ok!(pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + increase_msg )); - assert_ok!( - pallet_transfer_allowlist::Pallet::::add_transfer_allowance( - RawOrigin::Signed(Keyring::Alice.into()).into(), - FilterCurrency::Specific(USDC), - RestrictedTransferLocation::Xcm(Box::new(VersionedLocation::V4( - Location::new( - 1, - [ - Parachain(T::FudgeHandle::SIBLING_ID), - Junction::AccountId32 { - id: Keyring::Alice.into(), - network: None, - } - ] - ) - ))) - ) - ); + // Decrease pending pool swap by same amount + let decrease_msg_pool_swap_amount = LiquidityPoolMessage::DecreaseInvestOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(foreign_currency), + amount: invest_amount_foreign_denominated, + }; + assert_ok!(pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + decrease_msg_pool_swap_amount + )); + assert!(frame_system::Pallet::::events().iter().any(|e| { + e.event + == pallet_liquidity_pools_gateway::Event::::OutboundMessageSubmitted { + sender: ::Sender::get(), + domain: DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain(), + message: LiquidityPoolMessage::ExecutedDecreaseInvestOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(foreign_currency), + currency_payout: invest_amount_foreign_denominated, + remaining_invest_amount: invest_amount_foreign_denominated, + }, + } + .into() + })); - assert_noop!( - pallet_restricted_xtokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Alice.into()).into(), - USDC, - usdc(1_000), - Box::new( - Location::new( - 1, - [ - Parachain(T::FudgeHandle::SIBLING_ID), - Junction::AccountId32 { - id: Keyring::Bob.into(), - network: None, - } - ] - ) - .into() - ), - WeightLimit::Unlimited, - ), - pallet_transfer_allowlist::Error::::NoAllowanceForDestination - ); + // Decrease partially investing amount + let decrease_msg_partial_invest_amount = + LiquidityPoolMessage::DecreaseInvestOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(foreign_currency), + amount: invest_amount_foreign_denominated / 2, + }; + assert_ok!(pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + decrease_msg_partial_invest_amount.clone() + )); - assert_ok!(pallet_restricted_xtokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Alice.into()).into(), - USDC, - usdc(1_000), - Box::new( - Location::new( - 1, - [ - Parachain(T::FudgeHandle::SIBLING_ID), - Junction::AccountId32 { - id: Keyring::Alice.into(), - network: None, - } - ] - ) + // Consume entire investing amount by sending same message + assert_ok!(pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + decrease_msg_partial_invest_amount.clone() + )); + + // Swap decreased amount + assert_ok!(pallet_order_book::Pallet::::fill_order( + RawOrigin::Signed(trader.clone()).into(), + default_order_id::(&investor), + invest_amount_pool_denominated + )); + assert!(frame_system::Pallet::::events().iter().any(|e| { + e.event + == pallet_liquidity_pools_gateway::Event::::OutboundMessageSubmitted { + sender: ::Sender::get(), + domain: DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain(), + message: LiquidityPoolMessage::ExecutedDecreaseInvestOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(foreign_currency), + currency_payout: invest_amount_foreign_denominated, + remaining_invest_amount: 0, + }, + } .into() - ), - WeightLimit::Unlimited, - )); - - assert_eq!( - orml_tokens::Pallet::::free_balance(USDC, &Keyring::Alice.into()), - alice_initial_usdc - usdc(1_000), - ); + })); }); - - // NOTE - we cannot confirm that the Alice account present on the - // sibling receives this transfer since the orml_xtokens pallet - // sends a message to parachain 1000 (the parachain of the USDC - // currency) which in turn should send a message to the sibling. - // Since parachain 1000 is just a dummy added in the paras - // genesis config and not an actual sibling with a runtime, the - // transfer does not take place. } - #[test_runtimes([centrifuge])] - fn restrict_dot_transfer() { - let mut env = RuntimeEnv::::from_parachain_storage( + /// Propagate swaps only via OrderBook fulfillments. + /// + /// Flow: Increase, fulfill, decrease, fulfill + #[test_runtimes([development])] + fn invest_swaps_happy_path() { + let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() - .add(genesis::balances::(cfg(10))) - .add(orml_tokens::GenesisConfig:: { - balances: vec![( - Keyring::Alice.id(), - DOT_ASSET_ID, - T::ExistentialDeposit::get() + dot(TRANSFER_AMOUNT), - )], - }) + .add(genesis::balances::(cfg(1_000))) + .add(genesis::tokens::(vec![ + (AUSD_CURRENCY_ID, AUSD_ED), + (USDT_CURRENCY_ID, USDT_ED), + ])) .storage(), ); + setup_test(&mut env); + env.parachain_state_mut(|| { - register_dot::(); - - let pre_transfer_alice = - orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Alice.id()); - let pre_transfer_bob = - orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Bob.id()); - let pre_transfer_charlie = - orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Charlie.id()); - - add_allowance::( - Keyring::Alice, - DOT_ASSET_ID, - RestrictedTransferLocation::Local(Keyring::Bob.id()), + let pool_id = POOL_ID; + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let trader: AccountId = Keyring::Alice.into(); + let pool_currency: CurrencyId = AUSD_CURRENCY_ID; + let foreign_currency: CurrencyId = USDT_CURRENCY_ID; + let pool_currency_decimals = currency_decimals::AUSD; + let invest_amount_pool_denominated: u128 = 10 * decimals(18); + create_currency_pool::(pool_id, pool_currency, pool_currency_decimals.into()); + let invest_amount_foreign_denominated: u128 = enable_usdt_trading::( + pool_currency, + invest_amount_pool_denominated, + true, + true, + true, ); - assert_noop!( - pallet_restricted_tokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Alice.into()).into(), - Keyring::Charlie.into(), - DOT_ASSET_ID, - dot(TRANSFER_AMOUNT) - ), - pallet_restricted_tokens::Error::::PreConditionsNotMet + // Increase such that active swap into USDT is initialized + do_initial_increase_investment::( + pool_id, + invest_amount_foreign_denominated, + investor.clone(), + foreign_currency, + ); + + // Fulfilling order should propagate it from swapping to investing + let swap_order_id = default_order_id::(&investor); + fulfill_swap_into_pool::( + pool_id, + swap_order_id, + invest_amount_pool_denominated, + invest_amount_foreign_denominated, + trader.clone(), ); + assert!(frame_system::Pallet::::events().iter().any(|e| { + e.event + == pallet_order_book::Event::::OrderFulfillment { + order_id: swap_order_id, + placing_account: investor.clone(), + fulfilling_account: trader.clone(), + partial_fulfillment: false, + fulfillment_amount: invest_amount_foreign_denominated, + currency_in: pool_currency, + currency_out: foreign_currency, + ratio: Ratio::one(), + } + .into() + })); - let after_transfer_alice = - orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Alice.id()); - let after_transfer_charlie = - orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Charlie.id()); + // Decrease by half the investment amount + let msg = LiquidityPoolMessage::DecreaseInvestOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(foreign_currency), + amount: invest_amount_foreign_denominated / 2, + }; + assert_ok!(pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + msg.clone() + )); - assert_eq!(after_transfer_alice, pre_transfer_alice); - assert_eq!(after_transfer_charlie, pre_transfer_charlie); + let swap_order_id = default_order_id::(&investor); + assert_ok!(pallet_order_book::Pallet::::fill_order( + RawOrigin::Signed(trader.clone()).into(), + swap_order_id, + invest_amount_pool_denominated / 2 + )); + assert!(frame_system::Pallet::::events().iter().any(|e| { + e.event + == pallet_order_book::Event::::OrderFulfillment { + order_id: swap_order_id, + placing_account: investor.clone(), + fulfilling_account: trader.clone(), + partial_fulfillment: false, + fulfillment_amount: invest_amount_pool_denominated / 2, + currency_in: foreign_currency, + currency_out: pool_currency, + ratio: Ratio::one(), + } + .into() + })); - assert_ok!(pallet_restricted_tokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Alice.into()).into(), - Keyring::Bob.into(), - DOT_ASSET_ID, - dot(TRANSFER_AMOUNT) - ),); - - let after_transfer_alice = - orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Alice.id()); - let after_transfer_bob = - orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Bob.id()); - let after_transfer_charlie = - orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Charlie.id()); + let sender = ::Sender::get(); - assert_eq!( - after_transfer_alice, - pre_transfer_alice - dot(TRANSFER_AMOUNT) - ); - assert_eq!(after_transfer_bob, pre_transfer_bob + dot(TRANSFER_AMOUNT)); - assert_eq!(after_transfer_charlie, pre_transfer_charlie); + assert!(frame_system::Pallet::::events().iter().any(|e| { + e.event + == pallet_liquidity_pools_gateway::Event::::OutboundMessageSubmitted { + sender: sender.clone(), + domain: DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain(), + message: LiquidityPoolMessage::ExecutedDecreaseInvestOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(foreign_currency), + currency_payout: invest_amount_foreign_denominated / 2, + remaining_invest_amount: invest_amount_foreign_denominated / 2, + }, + } + .into() + })); }); } - #[test_runtimes([centrifuge])] - fn restrict_dot_xcm_transfer() { + #[test_runtimes([development])] + fn increase_fulfill_decrease_fulfill_partial_increase() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() - .add(genesis::balances::(cfg(10))) + .add(genesis::balances::(cfg(1_000))) .storage(), ); - transfer_dot_from_relay_chain(&mut env); + setup_test(&mut env); env.parachain_state_mut(|| { - let alice_initial_dot = - orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Alice.into()); - - assert_ok!(pallet_xcm::Pallet::::force_xcm_version( - ::RuntimeOrigin::root(), - Box::new(Location::new(1, Junctions::Here)), - XCM_VERSION, - )); - - assert_ok!( - pallet_transfer_allowlist::Pallet::::add_transfer_allowance( - RawOrigin::Signed(Keyring::Alice.into()).into(), - FilterCurrency::Specific(DOT_ASSET_ID), - allowed_xcm_location() - ) + let pool_id = POOL_ID; + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let pool_currency: CurrencyId = AUSD_CURRENCY_ID; + let foreign_currency: CurrencyId = USDT_CURRENCY_ID; + let pool_currency_decimals = currency_decimals::AUSD; + let invest_amount_pool_denominated: u128 = 10 * decimals(18); + let trader: AccountId = Keyring::Alice.into(); + create_currency_pool::(pool_id, pool_currency, pool_currency_decimals.into()); + + // USDT investment preparations + let invest_amount_foreign_denominated = enable_usdt_trading::( + pool_currency, + invest_amount_pool_denominated, + true, + true, + true, ); - assert_noop!( - pallet_restricted_xtokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Alice.into()).into(), - DOT_ASSET_ID, - dot(1), - Box::new( - Location::new( - 1, - Junction::AccountId32 { - id: Keyring::Bob.into(), - network: None, - } - ) - .into() - ), - WeightLimit::Unlimited, - ), - pallet_transfer_allowlist::Error::::NoAllowanceForDestination + // Do first investment and fulfill swap order + do_initial_increase_investment::( + pool_id, + invest_amount_foreign_denominated, + investor.clone(), + foreign_currency, + ); + fulfill_swap_into_pool::( + pool_id, + default_order_id::(&investor), + invest_amount_pool_denominated, + invest_amount_foreign_denominated, + trader.clone(), ); - assert_ok!(pallet_restricted_xtokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Alice.into()).into(), - DOT_ASSET_ID, - dot(1), - Box::new( - Location::new( - 1, - Junction::AccountId32 { - id: Keyring::Alice.into(), - network: None, - } - ) - .into() - ), - WeightLimit::Unlimited, + // Decrease pending pool swap by same amount + let decrease_msg_pool_swap_amount = LiquidityPoolMessage::DecreaseInvestOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(foreign_currency), + amount: invest_amount_foreign_denominated, + }; + assert_ok!(pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + decrease_msg_pool_swap_amount )); - assert_eq!( - orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Alice.into()), - alice_initial_dot - dot(1), - ); - }); + // Fulfill decrease swap partially + assert_ok!(pallet_order_book::Pallet::::fill_order( + RawOrigin::Signed(trader.clone()).into(), + default_order_id::(&investor), + 3 * invest_amount_pool_denominated / 4 + )); - env.pass(Blocks::ByNumber(2)); + // Increase more than pending swap (pool -> foreign) amount from decrease + let increase_msg = LiquidityPoolMessage::IncreaseInvestOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(foreign_currency), + amount: invest_amount_foreign_denominated / 2, + }; + assert_ok!(pallet_liquidity_pools::Pallet::::submit( + DEFAULT_DOMAIN_ADDRESS_MOONBEAM, + increase_msg + )); - env.relay_state_mut(|| { - assert_eq!( - pallet_balances::Pallet::>::free_balance( - &Keyring::Alice.into() - ), - 79857365914 - ); + assert!(frame_system::Pallet::::events().iter().any(|e| { + e.event + == pallet_liquidity_pools_gateway::Event::::OutboundMessageSubmitted { + sender: ::Sender::get(), + domain: DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain(), + message: LiquidityPoolMessage::ExecutedDecreaseInvestOrder { + pool_id, + tranche_id: default_tranche_id::(pool_id), + investor: investor.clone().into(), + currency: general_currency_index::(foreign_currency), + currency_payout: invest_amount_foreign_denominated, + remaining_invest_amount: invest_amount_foreign_denominated / 2, + }, + } + .into() + })); }); } } +} - mod transfers { - use super::*; +mod transfers { + use super::*; - fn transfer_cfg_to_sibling(env: &mut FudgeEnv) { - let alice_initial_balance = cfg(10); - let transfer_amount = cfg(5); - let cfg_in_sibling = CurrencyId::ForeignAsset(12); - - // CFG Metadata - let meta: AssetMetadata = AssetMetadata { - decimals: 18, - name: BoundedVec::default(), - symbol: BoundedVec::default(), - existential_deposit: 1_000_000_000_000, - location: Some(VersionedLocation::V4(Location::new( - 1, - [ - Parachain(T::FudgeHandle::PARA_ID), - general_key(parachains::polkadot::centrifuge::CFG_KEY), - ], - ))), - additional: CustomMetadata { - transferability: CrossChainTransferability::Xcm(Default::default()), - ..CustomMetadata::default() - }, - }; + // TODO: Must be moved to lp/transfers.rs (?) or to UT? It seems more an UT. - env.parachain_state_mut(|| { - assert_eq!( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.into()), - alice_initial_balance - ); - assert_eq!( - pallet_balances::Pallet::::free_balance(¶chain_account( - T::FudgeHandle::SIBLING_ID - )), - 0 - ); + #[test_runtimes([development])] + fn transfer_non_tranche_tokens_from_local() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .storage(), + ); - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta.clone(), - Some(CurrencyId::Native), - )); - }); + setup_test(&mut env); - env.sibling_state_mut(|| { - assert_eq!( - orml_tokens::Pallet::::free_balance(cfg_in_sibling, &Keyring::Bob.into()), - 0 - ); + env.parachain_state_mut(|| { + let initial_balance = 2 * AUSD_ED; + let amount = initial_balance / 2; + let dest_address = DEFAULT_DOMAIN_ADDRESS_MOONBEAM; + let currency_id = AUSD_CURRENCY_ID; + let source_account = Keyring::Charlie; - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta, - Some(cfg_in_sibling) - )); - }); + // Mint sufficient balance + assert_eq!( + orml_tokens::Pallet::::free_balance(currency_id, &source_account.into()), + 0 + ); + assert_ok!(orml_tokens::Pallet::::mint_into( + currency_id, + &source_account.into(), + initial_balance + )); + assert_eq!( + orml_tokens::Pallet::::free_balance(currency_id, &source_account.into()), + initial_balance + ); - env.parachain_state_mut(|| { - assert_ok!(orml_xtokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Alice.into()).into(), + // Only `ForeignAsset` can be transferred + assert_noop!( + pallet_liquidity_pools::Pallet::::transfer( + RawOrigin::Signed(source_account.into()).into(), + CurrencyId::Tranche(42u64, [0u8; 16]), + dest_address.clone(), + amount, + ), + pallet_liquidity_pools::Error::::InvalidTransferCurrency + ); + assert_noop!( + pallet_liquidity_pools::Pallet::::transfer( + RawOrigin::Signed(source_account.into()).into(), + CurrencyId::Staking(cfg_types::tokens::StakingCurrency::BlockRewards), + dest_address.clone(), + amount, + ), + pallet_liquidity_pools::Error::::AssetNotFound + ); + assert_noop!( + pallet_liquidity_pools::Pallet::::transfer( + RawOrigin::Signed(source_account.into()).into(), CurrencyId::Native, - transfer_amount, - Box::new( - Location::new( - 1, - [ - Parachain(T::FudgeHandle::SIBLING_ID), - Junction::AccountId32 { - network: None, - id: Keyring::Bob.into(), - } - ] - ) - .into() - ), - WeightLimit::Limited(8_000_000_000_000.into()), - )); + dest_address.clone(), + amount, + ), + pallet_liquidity_pools::Error::::AssetNotFound + ); - // Confirm that Alice's balance is initial balance - amount transferred - assert_eq!( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.into()), - alice_initial_balance - transfer_amount - ); + // Cannot transfer as long as cross chain transferability is disabled + assert_noop!( + pallet_liquidity_pools::Pallet::::transfer( + RawOrigin::Signed(source_account.into()).into(), + currency_id, + dest_address.clone(), + initial_balance, + ), + pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsTransferable + ); - // Verify that the amount transferred is now part of the sibling account here - assert_eq!( - pallet_balances::Pallet::::free_balance(¶chain_account( - T::FudgeHandle::SIBLING_ID - )), - transfer_amount - ); - }); + // Enable LiquidityPools transferability + enable_liquidity_pool_transferability::(currency_id); + + // Cannot transfer more than owned + assert_noop!( + pallet_liquidity_pools::Pallet::::transfer( + RawOrigin::Signed(source_account.into()).into(), + currency_id, + dest_address.clone(), + initial_balance.saturating_add(1), + ), + pallet_liquidity_pools::Error::::BalanceTooLow + ); - env.pass(Blocks::ByNumber(2)); + let pre_total_issuance = orml_tokens::Pallet::::total_issuance(currency_id); + + assert_ok!(pallet_liquidity_pools::Pallet::::transfer( + RawOrigin::Signed(source_account.into()).into(), + currency_id, + dest_address.clone(), + amount, + )); - env.sibling_state_mut(|| { - let current_balance = - orml_tokens::Pallet::::free_balance(cfg_in_sibling, &Keyring::Bob.into()); + assert_eq!( + orml_tokens::Pallet::::total_issuance(currency_id), + pre_total_issuance - amount + ); + assert_eq!( + orml_tokens::Pallet::::free_balance(currency_id, &source_account.into()), + initial_balance - amount + ); + }); + } +} - // Verify that Keyring::Bob now has (amount transferred - fee) - assert_eq!(current_balance, transfer_amount - fee(18)); +mod routers { + use super::*; - // Sanity check for the actual amount Keyring::Bob ends up with - assert_eq!(current_balance, 4993570400000000000); - }); - } + mod axelar_evm { + use std::ops::AddAssign; - #[test_runtimes([centrifuge])] - fn test_cfg_transfers_to_and_from_sibling() { + use super::*; + + #[test_runtimes([development])] + fn test_via_outbound_queue() { let mut env = FudgeEnv::::from_parachain_storage( Genesis::default() - .add(genesis::balances::(cfg(10))) + .add(genesis::balances::(cfg(1_000))) .storage(), ); - setup_xcm(&mut env); - - // In order to be able to transfer CFG from Sibling to Centrifuge, we need to - // first send CFG from Centrifuge to Sibling, or else it fails since it'd be - // like Sibling had minted CFG on their side. - transfer_cfg_to_sibling(&mut env); + let test_domain = Domain::EVM(1); - let alice_initial_balance = cfg(5); - let bob_initial_balance = cfg(5) - cfg_fee(); - let transfer_amount = cfg(1); - // Note: This asset was registered in `transfer_cfg_to_sibling` - let cfg_in_sibling = CurrencyId::ForeignAsset(12); + let axelar_contract_address = H160::from_low_u64_be(1); + let axelar_contract_code: Vec = vec![0, 0, 0]; + let axelar_contract_hash = BlakeTwo256::hash_of(&axelar_contract_code); + let liquidity_pools_contract_address = H160::from_low_u64_be(2); env.parachain_state_mut(|| { - assert_eq!( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.into()), - alice_initial_balance - ); + pallet_evm::AccountCodes::::insert(axelar_contract_address, axelar_contract_code) }); - env.sibling_state_mut(|| { - assert_eq!( - pallet_balances::Pallet::::free_balance(¶chain_account( - T::FudgeHandle::PARA_ID - )), - 0 - ); - assert_eq!( - orml_tokens::Pallet::::free_balance(cfg_in_sibling, &Keyring::Bob.into()), - bob_initial_balance - ); - }); + let transaction_call_cost = + env.parachain_state(|| ::config().gas_transaction_call); - env.sibling_state_mut(|| { - assert_ok!(orml_xtokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Bob.into()).into(), - cfg_in_sibling, - transfer_amount, - Box::new( - Location::new( - 1, - [ - Parachain(T::FudgeHandle::PARA_ID), - Junction::AccountId32 { - network: None, - id: Keyring::Alice.into(), - } - ] - ) - .into() - ), - WeightLimit::Limited(8_000_000_000_000.into()), - )); + let evm_domain = EVMDomain { + target_contract_address: axelar_contract_address, + target_contract_hash: axelar_contract_hash, + fee_values: FeeValues { + value: U256::from(0), + gas_limit: U256::from(transaction_call_cost + 1_000_000), + gas_price: U256::from(10), + }, + }; - // Confirm that Bobs's balance is initial balance - amount transferred - assert_eq!( - orml_tokens::Pallet::::free_balance(cfg_in_sibling, &Keyring::Bob.into()), - bob_initial_balance - transfer_amount - ); - }); + let axelar_evm_router = AxelarEVMRouter:: { + router: EVMRouter { + evm_domain, + _marker: Default::default(), + }, + evm_chain: BoundedVec::>::try_from( + "ethereum".as_bytes().to_vec(), + ) + .unwrap(), + _marker: Default::default(), + liquidity_pools_contract_address, + }; - env.pass(Blocks::ByNumber(3)); + let test_router = DomainRouter::::AxelarEVM(axelar_evm_router); env.parachain_state_mut(|| { - // Verify that Keyring::Alice now has initial balance + amount transferred - fee - assert_eq!( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.into()), - alice_initial_balance + transfer_amount - cfg_fee(), + assert_ok!( + pallet_liquidity_pools_gateway::Pallet::::set_domain_router( + ::RuntimeOrigin::root(), + test_domain.clone(), + test_router, + ) ); }); - } - #[test_runtimes([centrifuge])] - fn transfer_ausd_to_centrifuge() { - let mut env = FudgeEnv::::default(); + let sender = Keyring::Alice.id(); + let gateway_sender = env + .parachain_state(|| ::Sender::get()); - setup_xcm(&mut env); + let gateway_sender_h160: H160 = H160::from_slice( + &>::as_ref(&gateway_sender)[0..20], + ); - let alice_initial_balance = ausd(10); - let transfer_amount = ausd(7); + let msg = LiquidityPoolMessage::Transfer { + currency: 0, + sender: Keyring::Alice.id().into(), + receiver: Keyring::Bob.id().into(), + amount: 1_000u128, + }; - env.sibling_state_mut(|| { - register_ausd::(); + // Failure - gateway sender account is not funded. + assert_ok!(env.parachain_state_mut(|| { + as OutboundQueue>::submit( + sender.clone(), + test_domain.clone(), + msg.clone(), + ) + })); - assert_ok!(orml_tokens::Pallet::::deposit( - AUSD_CURRENCY_ID, - &Keyring::Alice.into(), - alice_initial_balance - )); + let mut nonce = T::OutboundMessageNonce::one(); - assert_eq!( - orml_tokens::Pallet::::free_balance( - AUSD_CURRENCY_ID, - ¶chain_account(T::FudgeHandle::PARA_ID) - ), - 0 - ); + let expected_event = + pallet_liquidity_pools_gateway::Event::::OutboundMessageExecutionFailure { + sender: gateway_sender.clone(), + domain: test_domain.clone(), + message: msg.clone(), + error: pallet_evm::Error::::BalanceLow.into(), + nonce, + }; + + env.pass(Blocks::UntilEvent { + event: expected_event.clone().into(), + limit: 3, }); - env.parachain_state_mut(|| { - register_ausd::(); + env.check_event(expected_event) + .expect("expected RouterExecutionFailure event"); - assert_eq!( - orml_tokens::Pallet::::free_balance(AUSD_CURRENCY_ID, &Keyring::Bob.into()), - 0, - ); - }); + nonce.add_assign(T::OutboundMessageNonce::one()); - env.sibling_state_mut(|| { - assert_eq!( - orml_tokens::Pallet::::free_balance( - AUSD_CURRENCY_ID, - &Keyring::Alice.into() - ), - ausd(10), + assert_ok!(env.parachain_state_mut(|| { + // Note how both the target address and the gateway sender need to have some + // balance. + crate::generic::utils::evm::mint_balance_into_derived_account::( + axelar_contract_address, + cfg(1_000_000_000), ); - assert_ok!(orml_xtokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Alice.into()).into(), - AUSD_CURRENCY_ID, - transfer_amount, - Box::new( - Location::new( - 1, - [ - Parachain(T::FudgeHandle::PARA_ID), - Junction::AccountId32 { - network: None, - id: Keyring::Bob.into(), - } - ] - ) - .into() - ), - WeightLimit::Limited(8_000_000_000_000.into()), - )); - - assert_eq!( - orml_tokens::Pallet::::free_balance( - AUSD_CURRENCY_ID, - &Keyring::Alice.into() - ), - alice_initial_balance - transfer_amount + crate::generic::utils::evm::mint_balance_into_derived_account::( + gateway_sender_h160, + cfg(1_000_000), ); - // Verify that the amount transferred is now part of the centrifuge parachain - // account here - assert_eq!( - orml_tokens::Pallet::::free_balance( - AUSD_CURRENCY_ID, - ¶chain_account(T::FudgeHandle::PARA_ID) - ), - transfer_amount - ); - }); + as OutboundQueue>::submit( + sender.clone(), + test_domain.clone(), + msg.clone(), + ) + })); - env.pass(Blocks::ByNumber(3)); + let expected_event = + pallet_liquidity_pools_gateway::Event::::OutboundMessageExecutionSuccess { + sender: gateway_sender.clone(), + domain: test_domain.clone(), + message: msg.clone(), + nonce, + }; - env.parachain_state_mut(|| { - // Verify that Keyring::Bob now has initial balance + amount transferred - fee - assert_eq!( - orml_tokens::Pallet::::free_balance(AUSD_CURRENCY_ID, &Keyring::Bob.into()), - transfer_amount - ausd_fee() - ); + env.pass(Blocks::UntilEvent { + event: expected_event.clone().into(), + limit: 3, }); - } - #[test_runtimes([centrifuge])] - fn transfer_dot_to_and_from_relay_chain() { - let mut env = FudgeEnv::::default(); + env.check_event(expected_event) + .expect("expected OutboundMessageExecutionSuccess event"); - transfer_dot_from_relay_chain(&mut env); + // Router not found + let unused_domain = Domain::EVM(1234); env.parachain_state_mut(|| { - let alice_initial_dot = - orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Alice.into()); - - assert_ok!(pallet_xcm::Pallet::::force_xcm_version( - ::RuntimeOrigin::root(), - Box::new(Location::new(1, Junctions::Here)), - XCM_VERSION, - )); - - assert_ok!(orml_xtokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Alice.into()).into(), - DOT_ASSET_ID, - dot(1), - Box::new( - Location::new( - 1, - Junction::AccountId32 { - id: Keyring::Alice.into(), - network: None, - } - ) - .into() + assert_noop!( + as OutboundQueue>::submit( + sender, + unused_domain.clone(), + msg, ), - WeightLimit::Unlimited, - )); - - assert_eq!( - orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Alice.into()), - alice_initial_dot - dot(1), + pallet_liquidity_pools_gateway::Error::::RouterNotFound ); }); + } + } - env.pass(Blocks::ByNumber(2)); + mod ethereum_xcm { + use super::*; - env.relay_state_mut(|| { - assert_eq!( - pallet_balances::Pallet::>::free_balance( - &Keyring::Alice.into() - ), - 79857365914 - ); - }); - } + mod utils { + use super::*; - #[test_runtimes([centrifuge])] - fn transfer_foreign_sibling_to_centrifuge() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(10))) - .storage(), - ); + pub fn submit_test_fn( + router_creation_fn: RouterCreationFn, + ) { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .storage(), + ); - setup_xcm(&mut env); + setup_test(&mut env); - let sibling_asset_id = CurrencyId::ForeignAsset(1); - let asset_location = Location::new( - 1, - [Parachain(T::FudgeHandle::SIBLING_ID), general_key(&[0, 1])], - ); - let meta: AssetMetadata = AssetMetadata { - decimals: 18, - name: BoundedVec::default(), - symbol: BoundedVec::default(), - existential_deposit: 1_000_000_000_000, - location: Some(VersionedLocation::V4(asset_location)), - additional: CustomMetadata { - transferability: CrossChainTransferability::Xcm(XcmMetadata { - // We specify a custom fee_per_second and verify below that this value is - // used when XCM transfer fees are charged for this token. - fee_per_second: Some(8420000000000000000), - }), - ..CustomMetadata::default() - }, - }; - let transfer_amount = foreign(1, meta.decimals); + enable_para_to_sibling_communication::(&mut env); - env.sibling_state_mut(|| { - assert_eq!( - orml_tokens::Pallet::::free_balance(sibling_asset_id, &Keyring::Bob.into()), - 0 - ); - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta.clone(), - Some(CurrencyId::Native), - )); - }); + let msg = Message::::Transfer { + currency: 0, + sender: Keyring::Alice.into(), + receiver: Keyring::Bob.into(), + amount: 1_000u128, + }; - env.parachain_state_mut(|| { - // First, register the asset in centrifuge - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta.clone(), - Some(sibling_asset_id) - )); - }); + env.parachain_state_mut(|| { + let domain_router = router_creation_fn( + Location::new(1, Parachain(SIBLING_ID)).into(), + GLMR_CURRENCY_ID, + ); - env.sibling_state_mut(|| { - assert_ok!(pallet_balances::Pallet::::force_set_balance( - ::RuntimeOrigin::root(), - Keyring::Alice.id().into(), - transfer_amount * 2, - )); + assert_ok!( + pallet_liquidity_pools_gateway::Pallet::::set_domain_router( + ::RuntimeOrigin::root(), + TEST_DOMAIN, + domain_router, + ) + ); - assert_ok!(orml_xtokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Alice.into()).into(), - CurrencyId::Native, - transfer_amount, - Box::new( - Location::new( - 1, - [ - Parachain(T::FudgeHandle::PARA_ID), - Junction::AccountId32 { - network: None, - id: Keyring::Bob.into(), - } - ] + assert_ok!( + as OutboundQueue>::submit( + Keyring::Alice.into(), + TEST_DOMAIN, + msg.clone(), ) - .into() - ), - WeightLimit::Limited(8_000_000_000_000.into()), - )); + ); + }); - // Confirm that Alice's balance is initial balance - amount transferred - assert_eq!( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.into()), - transfer_amount - ); - }); + let gateway_sender = env.parachain_state(|| { + ::Sender::get() + }); - env.pass(Blocks::ByNumber(3)); + let expected_event = + pallet_liquidity_pools_gateway::Event::::OutboundMessageExecutionSuccess { + sender: gateway_sender, + domain: TEST_DOMAIN, + message: msg, + nonce: T::OutboundMessageNonce::one(), + }; - env.parachain_state_mut(|| { - let bob_balance = - orml_tokens::Pallet::::free_balance(sibling_asset_id, &Keyring::Bob.into()); + env.pass(Blocks::UntilEvent { + event: expected_event.clone().into(), + limit: 3, + }); - // Verify that Keyring::Bob now has initial balance + amount transferred - fee - assert_eq!( - bob_balance, - transfer_amount - - calc_fee( - xcm_metadata(meta.additional.transferability) - .unwrap() - .fee_per_second - .unwrap() - ) - ); - // Sanity check to ensure the calculated is what is expected - assert_eq!(bob_balance, 993264000000000000); - }); - } + env.check_event(expected_event) + .expect("expected OutboundMessageExecutionSuccess event"); + } - #[test_runtimes([centrifuge])] - fn transfer_wormhole_usdc_acala_to_centrifuge() { - let mut env = FudgeEnv::::from_storage( - Default::default(), - Default::default(), - Genesis::default() - .add(genesis::balances::(cfg(10))) - .storage(), - ); + type RouterCreationFn = + Box DomainRouter>; + + pub fn get_axelar_xcm_router_fn() -> RouterCreationFn { + Box::new( + |location: VersionedLocation, currency_id: CurrencyId| -> DomainRouter { + let router = AxelarXCMRouter:: { + router: XCMRouter { + xcm_domain: XcmDomain { + location: Box::new( + location.try_into().expect("Bad xcm domain location"), + ), + ethereum_xcm_transact_call_index: BoundedVec::truncate_from( + vec![38, 0], + ), + contract_address: H160::from_low_u64_be(11), + max_gas_limit: 700_000, + transact_required_weight_at_most: Default::default(), + overall_weight: Default::default(), + fee_currency: currency_id, + fee_amount: decimals(18).saturating_div(5), + }, + _marker: Default::default(), + }, + axelar_target_chain: BoundedVec::< + u8, + ConstU32, + >::try_from("ethereum".as_bytes().to_vec()) + .unwrap(), + axelar_target_contract: H160::from_low_u64_be(111), + _marker: Default::default(), + }; - setup_xcm(&mut env); + DomainRouter::AxelarXCM(router) + }, + ) + } - let usdc_asset_id = CurrencyId::ForeignAsset(39); - let asset_location = Location::new( - 1, - [ - Parachain(T::FudgeHandle::SIBLING_ID), - general_key("0x02f3a00dd12f644daec907013b16eb6d14bf1c4cb4".as_bytes()), - ], - ); - let meta: AssetMetadata = AssetMetadata { - decimals: 6, - name: BoundedVec::default(), - symbol: BoundedVec::default(), - existential_deposit: 1, - location: Some(VersionedLocation::V4(asset_location)), - additional: CustomMetadata { - transferability: CrossChainTransferability::Xcm(Default::default()), - ..CustomMetadata::default() - }, - }; - let transfer_amount = foreign(12, meta.decimals); - let alice_initial_balance = transfer_amount * 100; - - env.sibling_state_mut(|| { - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta.clone(), - Some(usdc_asset_id) - )); - assert_ok!(orml_tokens::Pallet::::deposit( - usdc_asset_id, - &Keyring::Alice.into(), - alice_initial_balance - )); - assert_eq!( - orml_tokens::Pallet::::free_balance(usdc_asset_id, &Keyring::Alice.into()), - alice_initial_balance - ); - assert_eq!( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.into()), - cfg(10) - ); - }); + pub fn get_ethereum_xcm_router_fn() -> RouterCreationFn { + Box::new( + |location: VersionedLocation, currency_id: CurrencyId| -> DomainRouter { + let router = EthereumXCMRouter:: { + router: XCMRouter { + xcm_domain: XcmDomain { + location: Box::new( + location.try_into().expect("Bad xcm domain location"), + ), + ethereum_xcm_transact_call_index: BoundedVec::truncate_from( + vec![38, 0], + ), + contract_address: H160::from_low_u64_be(11), + max_gas_limit: 700_000, + transact_required_weight_at_most: Default::default(), + overall_weight: Default::default(), + fee_currency: currency_id, + fee_amount: decimals(18).saturating_div(5), + }, + _marker: Default::default(), + }, + _marker: Default::default(), + }; - env.parachain_state_mut(|| { - assert_ok!(orml_asset_registry::Pallet::::register_asset( - ::RuntimeOrigin::root(), - meta.clone(), - Some(usdc_asset_id) - )); - }); + DomainRouter::EthereumXCM(router) + }, + ) + } + } - env.sibling_state_mut(|| { - assert_ok!(orml_xtokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Alice.into()).into(), - usdc_asset_id, - transfer_amount, - Box::new( - Location::new( - 1, - [ - Parachain(T::FudgeHandle::PARA_ID), - Junction::AccountId32 { - network: None, - id: Keyring::Bob.into(), - } - ] - ) - .into() - ), - WeightLimit::Limited(8_000_000_000.into()), - )); - // Confirm that Alice's balance is initial balance - amount transferred - assert_eq!( - orml_tokens::Pallet::::free_balance(usdc_asset_id, &Keyring::Alice.into()), - alice_initial_balance - transfer_amount - ); - }); + use utils::*; - env.pass(Blocks::ByNumber(3)); + const TEST_DOMAIN: Domain = Domain::EVM(1); - env.parachain_state_mut(|| { - let bob_balance = - orml_tokens::Pallet::::free_balance(usdc_asset_id, &Keyring::Bob.into()); + #[test_runtimes([development])] + fn submit_ethereum_xcm() { + submit_test_fn::(get_ethereum_xcm_router_fn::()); + } - // Sanity check to ensure the calculated is what is expected - assert_eq!(bob_balance, 11993571); - }); + #[test_runtimes([development])] + fn submit_axelar_xcm() { + submit_test_fn::(get_axelar_xcm_router_fn::()); } } } -mod all { +mod gateway { use super::*; - mod restricted_calls { - use super::*; + #[test_runtimes([development])] + fn set_domain_router() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .add(genesis::council_members::(get_council_members())) + .storage(), + ); - #[test_runtimes(all)] - fn xtokens_transfer() { - let mut env = FudgeEnv::::default(); + let test_domain = Domain::EVM(1); - env.parachain_state_mut(|| { - assert_noop!( - orml_xtokens::Pallet::::transfer( - RawOrigin::Signed(Keyring::Alice.into()).into(), - CurrencyId::Tranche(401, [0; 16]), - 42, - Box::new( - Location::new( - 1, - [ - Parachain(T::FudgeHandle::SIBLING_ID), - Junction::AccountId32 { - network: None, - id: Keyring::Bob.into(), - } - ] - ) - .into() - ), - WeightLimit::Limited(8_000_000_000_000.into()), - ), - orml_xtokens::Error::::NotCrossChainTransferableCurrency - ); - }); - } + let axelar_contract_address = H160::from_low_u64_be(1); + let axelar_contract_code: Vec = vec![0, 0, 0]; + let axelar_contract_hash = BlakeTwo256::hash_of(&axelar_contract_code); + let liquidity_pools_contract_address = H160::from_low_u64_be(2); - #[test_runtimes(all)] - fn xtokens_transfer_multiasset() { - let mut env = FudgeEnv::::default(); + env.parachain_state_mut(|| { + pallet_evm::AccountCodes::::insert(axelar_contract_address, axelar_contract_code) + }); - let tranche_currency = CurrencyId::Tranche(401, [0; 16]); - let tranche_id = - WeakBoundedVec::>::force_from(tranche_currency.encode(), None); - let tranche_location = Location::new( - 1, - [ - Parachain(123), - PalletInstance(42), - GeneralKey { - length: tranche_id.len() as u8, - data: vec_to_fixed_array(tranche_id), - }, - ], - ); - let tranche_asset = VersionedAsset::from(Asset::from(( - AssetId(tranche_location), - Fungibility::Fungible(42), - ))); + let evm_domain = EVMDomain { + target_contract_address: axelar_contract_address, + target_contract_hash: axelar_contract_hash, + fee_values: FeeValues { + value: U256::from(10), + gas_limit: U256::from(1_000_000), + gas_price: U256::from(10), + }, + }; - env.parachain_state_mut(|| { - assert_noop!( - orml_xtokens::Pallet::::transfer_multiasset( - RawOrigin::Signed(Keyring::Alice.into()).into(), - Box::new(tranche_asset), - Box::new( - Location::new( - 1, - [ - Parachain(T::FudgeHandle::SIBLING_ID), - Junction::AccountId32 { - network: None, - id: Keyring::Bob.into(), - } - ] - ) - .into() - ), - WeightLimit::Limited(8_000_000_000_000.into()), - ), - orml_xtokens::Error::::XcmExecutionFailed - ); - }); - } + let axelar_evm_router = AxelarEVMRouter:: { + router: EVMRouter { + evm_domain, + _marker: Default::default(), + }, + evm_chain: BoundedVec::>::try_from( + "ethereum".as_bytes().to_vec(), + ) + .unwrap(), + _marker: Default::default(), + liquidity_pools_contract_address, + }; - #[test_runtimes(all)] - fn xtokens_transfer_multiassets() { - let mut env = FudgeEnv::::default(); + let test_router = DomainRouter::::AxelarEVM(axelar_evm_router); - let tranche_currency = CurrencyId::Tranche(401, [0; 16]); - let tranche_id = - WeakBoundedVec::>::force_from(tranche_currency.encode(), None); - let tranche_location = Location::new( - 1, - [ - Parachain(123), - PalletInstance(42), - GeneralKey { - length: tranche_id.len() as u8, - data: vec_to_fixed_array(tranche_id), - }, - ], + let set_domain_router_call = + set_domain_router_call(test_domain.clone(), test_router.clone()); + + let council_threshold = 2; + let voting_period = 3; + + execute_via_democracy::( + &mut env, + get_council_members(), + set_domain_router_call, + council_threshold, + voting_period, + 0, + 0, + ); + + env.parachain_state(|| { + let router = pallet_liquidity_pools_gateway::Pallet::::domain_routers(test_domain) + .expect("domain router is set"); + + assert!(router.eq(&test_router)); + }); + } + + #[test_runtimes([development])] + fn add_remove_instances() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .add(genesis::council_members::(get_council_members())) + .storage(), + ); + + let test_instance = DomainAddress::EVM(1, [0; 20]); + + let add_instance_call = add_instance_call::(test_instance.clone()); + + let council_threshold = 2; + let voting_period = 3; + + let (prop_index, ref_index) = execute_via_democracy::( + &mut env, + get_council_members(), + add_instance_call, + council_threshold, + voting_period, + 0, + 0, + ); + + env.parachain_state(|| { + assert!( + pallet_liquidity_pools_gateway::Allowlist::::contains_key( + test_instance.domain(), + test_instance.clone() + ) ); - let tranche_asset = Asset::from((AssetId(tranche_location), Fungibility::Fungible(42))); + }); - env.parachain_state_mut(|| { - assert_noop!( - orml_xtokens::Pallet::::transfer_multiassets( - RawOrigin::Signed(Keyring::Alice.into()).into(), - Box::new(VersionedAssets::from(Assets::from(vec![tranche_asset]))), - 0, - Box::new( - Location::new( - 1, - [ - Parachain(T::FudgeHandle::SIBLING_ID), - Junction::AccountId32 { - network: None, - id: Keyring::Bob.into(), - } - ] - ) - .into() - ), - WeightLimit::Limited(8_000_000_000_000.into()), - ), - orml_xtokens::Error::::XcmExecutionFailed - ); - }); - } + let remove_instance_call = remove_instance_call::(test_instance.clone()); + + execute_via_democracy::( + &mut env, + get_council_members(), + remove_instance_call, + council_threshold, + voting_period, + prop_index, + ref_index, + ); + + env.parachain_state(|| { + assert!( + !pallet_liquidity_pools_gateway::Allowlist::::contains_key( + test_instance.domain(), + test_instance.clone() + ) + ); + }); + } + + #[test_runtimes([development])] + fn process_msg() { + let mut env = FudgeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1_000))) + .add(genesis::council_members::(get_council_members())) + .storage(), + ); + + let test_instance = DomainAddress::EVM(1, [0; 20]); + + let add_instance_call = add_instance_call::(test_instance.clone()); + + let council_threshold = 2; + let voting_period = 3; + + execute_via_democracy::( + &mut env, + get_council_members(), + add_instance_call, + council_threshold, + voting_period, + 0, + 0, + ); + + env.parachain_state(|| { + assert!( + pallet_liquidity_pools_gateway::Allowlist::::contains_key( + test_instance.domain(), + test_instance.clone() + ) + ); + }); + + let msg = LiquidityPoolMessage::AddPool { pool_id: 123 }; + + let encoded_msg = msg.serialize(); + + let gateway_msg = BoundedVec::< + u8, + ::MaxIncomingMessageSize, + >::try_from(encoded_msg) + .unwrap(); + + env.parachain_state_mut(|| { + assert_noop!( + pallet_liquidity_pools_gateway::Pallet::::process_msg( + GatewayOrigin::Domain(test_instance).into(), + gateway_msg, + ), + pallet_liquidity_pools::Error::::InvalidIncomingMessage, + ); + }); } } diff --git a/runtime/integration-tests/src/generic/cases/loans.rs b/runtime/integration-tests/src/generic/cases/loans.rs index 657724a01e..61f6ce7349 100644 --- a/runtime/integration-tests/src/generic/cases/loans.rs +++ b/runtime/integration-tests/src/generic/cases/loans.rs @@ -76,7 +76,7 @@ mod common { .add(genesis::balances::( T::ExistentialDeposit::get() + FOR_FEES, )) - .add(genesis::assets::(vec![Box::new(Usd6)])) + .add(genesis::assets::(vec![(Usd6.id(), &Usd6.metadata())])) .add(genesis::tokens::(vec![(Usd6.id(), Usd6.ed())])) .storage(), ); diff --git a/runtime/integration-tests/src/generic/cases/lp/mod.rs b/runtime/integration-tests/src/generic/cases/lp/mod.rs index d10a514f0b..87669e43ec 100644 --- a/runtime/integration-tests/src/generic/cases/lp/mod.rs +++ b/runtime/integration-tests/src/generic/cases/lp/mod.rs @@ -162,11 +162,14 @@ pub mod utils { } pub fn verify_outbound_success( - _: ::Message, + message: ::Message, ) { assert!(matches!( last_event::>(), - pallet_liquidity_pools_gateway::Event::::OutboundMessageExecutionSuccess { .. } + pallet_liquidity_pools_gateway::Event::::OutboundMessageExecutionSuccess { + message: processed_message, + .. + } if processed_message == message )); } diff --git a/runtime/integration-tests/src/generic/cases/lp/transfers.rs b/runtime/integration-tests/src/generic/cases/lp/transfers.rs index af772f9f56..864f3f43c0 100644 --- a/runtime/integration-tests/src/generic/cases/lp/transfers.rs +++ b/runtime/integration-tests/src/generic/cases/lp/transfers.rs @@ -143,13 +143,13 @@ fn transfer_tokens_from_local() { utils::prepare_hold_usdc_local::(&mut env); env.state_mut(|_evm| { - let call = pallet_liquidity_pools::Pallet::::transfer( + pallet_liquidity_pools::Pallet::::transfer( OriginFor::::signed(Keyring::Ferdie.into()), USDC.id(), DomainAddress::evm(EVM_DOMAIN_CHAIN_ID, Keyring::Ferdie.into()), AMOUNT, - ); - call.unwrap(); + ) + .unwrap(); lp::utils::process_outbound::(lp::utils::verify_outbound_success::); }); diff --git a/runtime/integration-tests/src/generic/cases/precompile.rs b/runtime/integration-tests/src/generic/cases/precompile.rs index e438ec8149..d7f71c405a 100644 --- a/runtime/integration-tests/src/generic/cases/precompile.rs +++ b/runtime/integration-tests/src/generic/cases/precompile.rs @@ -30,7 +30,7 @@ use crate::generic::{ fn axelar_precompile_execute() { RuntimeEnv::::from_parachain_storage( Genesis::default() - .add(genesis::assets::(vec![Box::new(Usd18)])) + .add(genesis::assets::([(Usd18.id(), &Usd18.metadata())])) .storage(), ) .parachain_state_mut(|| { diff --git a/runtime/integration-tests/src/generic/cases/proxy.rs b/runtime/integration-tests/src/generic/cases/proxy.rs index fdd1781e28..a1ce753c5e 100644 --- a/runtime/integration-tests/src/generic/cases/proxy.rs +++ b/runtime/integration-tests/src/generic/cases/proxy.rs @@ -1,27 +1,18 @@ -use cfg_primitives::Balance; -use cfg_types::{tokens::CrossChainTransferability, xcm::XcmMetadata}; -use frame_support::{assert_err, assert_ok, traits::Get}; +use cfg_types::tokens::{AssetMetadata, CurrencyId}; +use frame_support::{assert_err, assert_ok}; use frame_system::RawOrigin; use sp_runtime::{traits::StaticLookup, DispatchResult}; -use staging_xcm::{ - prelude::Parachain, - v4::{Junction, Location, WeightLimit}, - VersionedLocation, -}; +use staging_xcm::v4::WeightLimit; use crate::{ generic::{ config::Runtime, env::Env, - envs::{ - fudge_env::{handle::FudgeHandle, FudgeEnv, FudgeSupport}, - runtime_env::RuntimeEnv, - }, + envs::runtime_env::RuntimeEnv, utils::{ - self, - currency::{cfg, register_currency, usd6, CurrencyInfo, Usd6}, + currency::{cfg, CurrencyInfo, CustomCurrency}, genesis::{self, Genesis}, - xcm::setup_xcm, + xcm::{account_location, transferable_metadata}, }, }, utils::accounts::Keyring, @@ -31,107 +22,73 @@ const FROM: Keyring = Keyring::Charlie; const PROXY: Keyring = Keyring::Alice; const TO: Keyring = Keyring::Bob; -const FOR_FEES: Balance = cfg(1); -const TRANSFER_AMOUNT: Balance = usd6(100); +enum TransferKind { + Local, + Xcm, +} -fn configure_proxy_and_transfer(proxy_type: T::ProxyType) -> DispatchResult { - let env = RuntimeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::( - T::ExistentialDeposit::get() + FOR_FEES, - )) - .add(genesis::tokens::(vec![(Usd6.id(), Usd6.ed())])) - .storage(), +fn run_test(proxy_type: T::ProxyType, transfer_kind: TransferKind) -> DispatchResult { + let para_id = 1234; + let curr = CustomCurrency( + CurrencyId::ForeignAsset(1), + AssetMetadata { + decimals: 6, + ..transferable_metadata(Some(para_id)) + }, ); - let call = pallet_restricted_tokens::Call::transfer { - currency_id: Usd6.id(), - amount: TRANSFER_AMOUNT, - dest: T::Lookup::unlookup(TO.id()), - } - .into(); - - configure_proxy_and_call::(env, proxy_type, call) -} - -fn configure_proxy_and_x_transfer( - proxy_type: T::ProxyType, -) -> DispatchResult { - let mut env = FudgeEnv::::from_parachain_storage( + let mut env = RuntimeEnv::::from_parachain_storage( Genesis::default() - .add(genesis::balances::( - T::ExistentialDeposit::get() + FOR_FEES, - )) - .add(genesis::tokens::(vec![(Usd6.id(), Usd6.ed())])) + .add(genesis::balances::(cfg(1))) // For fees + .add(genesis::tokens::(vec![(curr.id(), curr.val(1000))])) + .add(genesis::assets::(vec![(curr.id(), curr.metadata())])) .storage(), ); - setup_xcm(&mut env); - - env.parachain_state_mut(|| { - register_currency::(Usd6, |meta| { - meta.location = Some(VersionedLocation::V4(Location::new( - 1, - Parachain(T::FudgeHandle::SIBLING_ID), - ))); - meta.additional.transferability = CrossChainTransferability::Xcm(XcmMetadata { - fee_per_second: Some(1_000), - }); - }); - }); - - let call = pallet_restricted_xtokens::Call::transfer { - currency_id: Usd6.id(), - amount: TRANSFER_AMOUNT, - dest: Box::new( - Location::new( - 1, - [ - Parachain(T::FudgeHandle::SIBLING_ID), - Junction::AccountId32 { - id: TO.into(), - network: None, - }, - ], - ) - .into(), - ), - dest_weight_limit: WeightLimit::Unlimited, - } - .into(); - - configure_proxy_and_call::(env, proxy_type, call) -} + let call = match transfer_kind { + TransferKind::Local => pallet_restricted_tokens::Call::transfer { + currency_id: curr.id(), + amount: curr.val(100), + dest: T::Lookup::unlookup(TO.id()), + } + .into(), + TransferKind::Xcm => pallet_restricted_xtokens::Call::transfer { + currency_id: curr.id(), + amount: curr.val(100), + dest: account_location(1, Some(para_id), TO.id()), + dest_weight_limit: WeightLimit::Unlimited, + } + .into(), + }; -fn configure_proxy_and_call( - mut env: impl Env, - proxy_type: T::ProxyType, - call: T::RuntimeCallExt, -) -> DispatchResult { env.parachain_state_mut(|| { - utils::give_tokens::(FROM.id(), Usd6.id(), TRANSFER_AMOUNT); - // Register PROXY as proxy of FROM - pallet_proxy::Pallet::::add_proxy( + assert_ok!(pallet_proxy::Pallet::::add_proxy( RawOrigin::Signed(FROM.id()).into(), T::Lookup::unlookup(PROXY.id()), proxy_type, 0, - ) - .unwrap(); + )); // Acts as FROM using PROXY - pallet_proxy::Pallet::::proxy( + assert_ok!(pallet_proxy::Pallet::::proxy( RawOrigin::Signed(PROXY.id()).into(), T::Lookup::unlookup(FROM.id()), None, Box::new(call), - ) - .unwrap(); + )); }); env.find_event(|e| match e { - pallet_proxy::Event::::ProxyExecuted { result } => Some(result), + pallet_proxy::Event::::ProxyExecuted { result } => { + if result == Err(orml_xtokens::Error::::XcmExecutionFailed.into()) { + // We have not configured XCM, so if we reach the sending phase though xcm we + // can assert that proxy was filtered correctly. + Some(Ok(())) + } else { + Some(result) + } + } _ => None, }) .unwrap() @@ -142,8 +99,9 @@ fn development_transfer_with_proxy_transfer() where T: pallet_proxy::Config, { - assert_ok!(configure_proxy_and_transfer::( - development_runtime::ProxyType::Transfer + assert_ok!(run_test::( + development_runtime::ProxyType::Transfer, + TransferKind::Local )); } @@ -153,7 +111,7 @@ where T: pallet_proxy::Config, { assert_err!( - configure_proxy_and_transfer::(development_runtime::ProxyType::Borrow), + run_test::(development_runtime::ProxyType::Borrow, TransferKind::Local), frame_system::Error::::CallFiltered, ); } @@ -164,39 +122,40 @@ where T: pallet_proxy::Config, { assert_err!( - configure_proxy_and_transfer::(development_runtime::ProxyType::Invest), + run_test::(development_runtime::ProxyType::Invest, TransferKind::Local), frame_system::Error::::CallFiltered, ); } #[test_runtimes([development])] -fn development_x_transfer_with_proxy_transfer() +fn development_x_transfer_with_proxy_transfer() where T: pallet_proxy::Config, { - assert_ok!(configure_proxy_and_x_transfer::( - development_runtime::ProxyType::Transfer + assert_ok!(run_test::( + development_runtime::ProxyType::Transfer, + TransferKind::Xcm )); } #[test_runtimes([development])] -fn development_x_transfer_with_proxy_borrow() +fn development_x_transfer_with_proxy_borrow() where T: pallet_proxy::Config, { assert_err!( - configure_proxy_and_x_transfer::(development_runtime::ProxyType::Borrow), + run_test::(development_runtime::ProxyType::Borrow, TransferKind::Xcm), frame_system::Error::::CallFiltered, ); } #[test_runtimes([development])] -fn development_x_transfer_with_proxy_invest() +fn development_x_transfer_with_proxy_invest() where T: pallet_proxy::Config, { assert_err!( - configure_proxy_and_x_transfer::(development_runtime::ProxyType::Invest), + run_test::(development_runtime::ProxyType::Invest, TransferKind::Xcm), frame_system::Error::::CallFiltered, ); } @@ -206,8 +165,9 @@ fn altair_transfer_with_proxy_transfer() where T: pallet_proxy::Config, { - assert_ok!(configure_proxy_and_transfer::( - altair_runtime::ProxyType::Transfer + assert_ok!(run_test::( + altair_runtime::ProxyType::Transfer, + TransferKind::Local )); } @@ -217,7 +177,7 @@ where T: pallet_proxy::Config, { assert_err!( - configure_proxy_and_transfer::(altair_runtime::ProxyType::Borrow), + run_test::(altair_runtime::ProxyType::Borrow, TransferKind::Local), frame_system::Error::::CallFiltered, ); } @@ -228,39 +188,40 @@ where T: pallet_proxy::Config, { assert_err!( - configure_proxy_and_transfer::(altair_runtime::ProxyType::Invest), + run_test::(altair_runtime::ProxyType::Invest, TransferKind::Local), frame_system::Error::::CallFiltered, ); } #[test_runtimes([altair])] -fn altair_x_transfer_with_proxy_transfer() +fn altair_x_transfer_with_proxy_transfer() where T: pallet_proxy::Config, { - assert_ok!(configure_proxy_and_x_transfer::( - altair_runtime::ProxyType::Transfer + assert_ok!(run_test::( + altair_runtime::ProxyType::Transfer, + TransferKind::Xcm )); } #[test_runtimes([altair])] -fn altair_x_transfer_with_proxy_borrow() +fn altair_x_transfer_with_proxy_borrow() where T: pallet_proxy::Config, { assert_err!( - configure_proxy_and_x_transfer::(altair_runtime::ProxyType::Borrow), + run_test::(altair_runtime::ProxyType::Borrow, TransferKind::Xcm), frame_system::Error::::CallFiltered, ); } #[test_runtimes([altair])] -fn altair_x_transfer_with_proxy_invest() +fn altair_x_transfer_with_proxy_invest() where T: pallet_proxy::Config, { assert_err!( - configure_proxy_and_x_transfer::(altair_runtime::ProxyType::Invest), + run_test::(altair_runtime::ProxyType::Invest, TransferKind::Xcm), frame_system::Error::::CallFiltered, ); } @@ -270,8 +231,9 @@ fn centrifuge_transfer_with_proxy_transfer() where T: pallet_proxy::Config, { - assert_ok!(configure_proxy_and_transfer::( - centrifuge_runtime::ProxyType::Transfer + assert_ok!(run_test::( + centrifuge_runtime::ProxyType::Transfer, + TransferKind::Local )); } @@ -281,7 +243,7 @@ where T: pallet_proxy::Config, { assert_err!( - configure_proxy_and_transfer::(centrifuge_runtime::ProxyType::Borrow), + run_test::(centrifuge_runtime::ProxyType::Borrow, TransferKind::Local), frame_system::Error::::CallFiltered, ); } @@ -292,39 +254,40 @@ where T: pallet_proxy::Config, { assert_err!( - configure_proxy_and_transfer::(centrifuge_runtime::ProxyType::Invest), + run_test::(centrifuge_runtime::ProxyType::Invest, TransferKind::Local), frame_system::Error::::CallFiltered, ); } #[test_runtimes([centrifuge])] -fn centrifuge_x_transfer_with_proxy_transfer() +fn centrifuge_x_transfer_with_proxy_transfer() where T: pallet_proxy::Config, { - assert_ok!(configure_proxy_and_x_transfer::( - centrifuge_runtime::ProxyType::Transfer + assert_ok!(run_test::( + centrifuge_runtime::ProxyType::Transfer, + TransferKind::Xcm )); } #[test_runtimes([centrifuge])] -fn centrifuge_x_transfer_with_proxy_borrow() +fn centrifuge_x_transfer_with_proxy_borrow() where T: pallet_proxy::Config, { assert_err!( - configure_proxy_and_x_transfer::(centrifuge_runtime::ProxyType::Borrow), + run_test::(centrifuge_runtime::ProxyType::Borrow, TransferKind::Xcm), frame_system::Error::::CallFiltered, ); } #[test_runtimes([centrifuge])] -fn centrifuge_x_transfer_with_proxy_invest() +fn centrifuge_x_transfer_with_proxy_invest() where T: pallet_proxy::Config, { assert_err!( - configure_proxy_and_x_transfer::(centrifuge_runtime::ProxyType::Invest), + run_test::(centrifuge_runtime::ProxyType::Invest, TransferKind::Xcm), frame_system::Error::::CallFiltered, ); } diff --git a/runtime/integration-tests/src/generic/cases/restricted_transfers.rs b/runtime/integration-tests/src/generic/cases/restricted_transfers.rs index ab1af8deb7..3d7725c20a 100644 --- a/runtime/integration-tests/src/generic/cases/restricted_transfers.rs +++ b/runtime/integration-tests/src/generic/cases/restricted_transfers.rs @@ -10,34 +10,42 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -mod cfg { - use cfg_primitives::{currency_decimals, Balance}; - use cfg_types::{ - locations::RestrictedTransferLocation, - tokens::{CurrencyId, FilterCurrency}, - }; - use frame_support::{assert_ok, dispatch::RawOrigin}; - use runtime_common::remarks::Remark; - use sp_runtime::traits::Zero; - - use crate::{ - generic::{ - config::Runtime, - env::Env, - envs::runtime_env::RuntimeEnv, - utils::{genesis, genesis::Genesis}, +use cfg_primitives::Balance; +use cfg_types::{ + domain_address::DomainAddress, + locations::RestrictedTransferLocation, + tokens::{ + AssetMetadata, CrossChainTransferability, CurrencyId, CustomMetadata, FilterCurrency, + }, +}; +use cumulus_primitives_core::WeightLimit; +use frame_support::{assert_noop, assert_ok, dispatch::RawOrigin, traits::PalletInfo}; +use runtime_common::remarks::Remark; +use sp_runtime::traits::Zero; +use staging_xcm::{ + v4::{Junction::*, Location, NetworkId}, + VersionedLocation, +}; + +use crate::{ + generic::{ + config::Runtime, + env::Env, + envs::runtime_env::RuntimeEnv, + utils::{ + currency::{cfg, default_metadata, CurrencyInfo, CustomCurrency}, + genesis, + genesis::Genesis, + xcm::{account_location, transferable_metadata}, }, - utils::accounts::Keyring, - }; + }, + utils::accounts::Keyring, +}; - const TRANSFER_AMOUNT: Balance = 100; +mod local { + use super::*; - pub fn decimals(decimals: u32) -> Balance { - 10u128.saturating_pow(decimals) - } - pub fn cfg(amount: Balance) -> Balance { - amount * decimals(currency_decimals::NATIVE) - } + const TRANSFER_AMOUNT: u32 = 100; fn setup(filter: FilterCurrency) -> RuntimeEnv { let mut env = RuntimeEnv::::from_parachain_storage( @@ -66,155 +74,76 @@ mod cfg { env } - fn validate_fail(who: Keyring, call: impl Into + Clone) { - // With FilterCurrencyAll - { - let mut env = setup::(FilterCurrency::All); - - let (pre_transfer_alice, pre_transfer_bob, pre_transfer_charlie) = - env.parachain_state(|| { - // NOTE: The para-id is not relevant here - ( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()), - pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()), - pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()), - ) - }); - - let fee = env.submit_now(who, call.clone()).unwrap(); - // NOTE: Only use fee, if submitter is Alice - let fee = if who != Keyring::Alice { 0 } else { fee }; - - env.parachain_state(|| { - let after_transfer_alice = - pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()); - let after_transfer_bob = - pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()); - let after_transfer_charlie = - pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()); - - assert_eq!(after_transfer_alice, pre_transfer_alice - fee); - assert_eq!(after_transfer_bob, pre_transfer_bob); - assert_eq!(after_transfer_charlie, pre_transfer_charlie); - }); - } + fn people_balances() -> (Balance, Balance, Balance) { + ( + pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()), + pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()), + pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()), + ) + } - // With FilterCurrency::Specific(CurrencyId::Native) - { - let mut env = setup::(FilterCurrency::Specific(CurrencyId::Native)); - - let (pre_transfer_alice, pre_transfer_bob, pre_transfer_charlie) = - env.parachain_state(|| { - // NOTE: The para-id is not relevant here - ( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()), - pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()), - pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()), - ) - }); - - let fee = env.submit_now(who, call).unwrap(); - // NOTE: Only use fee, if submitter is Alice - let fee = if who != Keyring::Alice { 0 } else { fee }; - - env.parachain_state(|| { - let after_transfer_alice = - pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()); - let after_transfer_bob = - pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()); - let after_transfer_charlie = - pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()); - - assert_eq!(after_transfer_alice, pre_transfer_alice - fee); - assert_eq!(after_transfer_bob, pre_transfer_bob); - assert_eq!(after_transfer_charlie, pre_transfer_charlie); - }); - } + fn process_ok( + env: &mut RuntimeEnv, + who: Keyring, + call: impl Into, + ) { + let (pre_transfer_alice, pre_transfer_bob, pre_transfer_charlie) = + env.parachain_state(|| people_balances::()); + + let fee = env.submit_now(who, call).unwrap(); + // NOTE: Only use fee, if submitter is Alice + let fee = if who != Keyring::Alice { 0 } else { fee }; + + let (after_transfer_alice, after_transfer_bob, after_transfer_charlie) = + env.parachain_state(|| people_balances::()); + + assert_eq!( + after_transfer_alice, + pre_transfer_alice - fee - cfg(TRANSFER_AMOUNT) + ); + assert_eq!(after_transfer_bob, pre_transfer_bob + cfg(TRANSFER_AMOUNT)); + assert_eq!(after_transfer_charlie, pre_transfer_charlie); + } + + fn process_fail( + env: &mut RuntimeEnv, + who: Keyring, + call: impl Into, + ) { + let (pre_transfer_alice, pre_transfer_bob, pre_transfer_charlie) = + env.parachain_state(|| people_balances::()); + + let fee = env.submit_now(who, call).unwrap(); + // NOTE: Only use fee, if submitter is Alice + let fee = if who != Keyring::Alice { 0 } else { fee }; + + let (after_transfer_alice, after_transfer_bob, after_transfer_charlie) = + env.parachain_state(|| people_balances::()); + + assert_eq!(after_transfer_alice, pre_transfer_alice - fee); + assert_eq!(after_transfer_bob, pre_transfer_bob); + assert_eq!(after_transfer_charlie, pre_transfer_charlie); } fn validate_ok(who: Keyring, call: impl Into + Clone) { - // With FilterCurrencyAll - { - let mut env = setup::(FilterCurrency::All); - - let (pre_transfer_alice, pre_transfer_bob, pre_transfer_charlie) = - env.parachain_state(|| { - // NOTE: The para-id is not relevant here - ( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()), - pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()), - pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()), - ) - }); - - let fee = env.submit_now(who, call.clone()).unwrap(); - - // NOTE: Only use fee, if submitter is Alice - let fee = if who != Keyring::Alice { 0 } else { fee }; - - env.parachain_state(|| { - let after_transfer_alice = - pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()); - let after_transfer_bob = - pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()); - let after_transfer_charlie = - pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()); - - assert_eq!( - after_transfer_alice, - pre_transfer_alice - fee - cfg(TRANSFER_AMOUNT) - ); - assert_eq!(after_transfer_bob, pre_transfer_bob + cfg(TRANSFER_AMOUNT)); - assert_eq!(after_transfer_charlie, pre_transfer_charlie); - }); - } + let mut env = setup::(FilterCurrency::All); + process_ok(&mut env, who, call.clone()); - // With FilterCurrency::Specific(CurrencyId::Native) - { - let mut env = setup::(FilterCurrency::Specific(CurrencyId::Native)); - - let (pre_transfer_alice, pre_transfer_bob, pre_transfer_charlie) = - env.parachain_state(|| { - // NOTE: The para-id is not relevant here - ( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()), - pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()), - pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()), - ) - }); - - let fee = env.submit_now(who, call).unwrap(); - // NOTE: Only use fee, if submitter is Alice - let fee = if who != Keyring::Alice { 0 } else { fee }; - - env.parachain_state(|| { - let after_transfer_alice = - pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()); - let after_transfer_bob = - pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()); - let after_transfer_charlie = - pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()); - - assert_eq!( - after_transfer_alice, - pre_transfer_alice - fee - cfg(TRANSFER_AMOUNT) - ); - assert_eq!(after_transfer_bob, pre_transfer_bob + cfg(TRANSFER_AMOUNT)); - assert_eq!(after_transfer_charlie, pre_transfer_charlie); - }); - } + let mut env = setup::(FilterCurrency::Specific(CurrencyId::Native)); + process_ok(&mut env, who, call.clone()); } - fn transfer_ok() -> pallet_balances::Call { - pallet_balances::Call::::transfer_allow_death { - dest: Keyring::Bob.into(), - value: cfg(TRANSFER_AMOUNT), - } + fn validate_fail(who: Keyring, call: impl Into + Clone) { + let mut env = setup::(FilterCurrency::All); + process_fail(&mut env, who, call.clone()); + + let mut env = setup::(FilterCurrency::Specific(CurrencyId::Native)); + process_fail(&mut env, who, call.clone()); } - fn transfer_fail() -> pallet_balances::Call { - pallet_balances::Call::::transfer_allow_death { - dest: Keyring::Charlie.into(), + fn transfer_to(dest: Keyring) -> pallet_balances::Call { + pallet_balances::Call::transfer_allow_death { + dest: dest.into(), value: cfg(TRANSFER_AMOUNT), } } @@ -227,38 +156,13 @@ mod cfg { .storage(), ); - let (pre_transfer_alice, pre_transfer_bob, pre_transfer_charlie) = - env.parachain_state(|| { - // NOTE: The para-id is not relevant here - ( - pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()), - pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()), - pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()), - ) - }); - - let fee = env.submit_now(Keyring::Alice, transfer_ok::()).unwrap(); - - env.parachain_state(|| { - let after_transfer_alice = - pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()); - let after_transfer_bob = pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()); - let after_transfer_charlie = - pallet_balances::Pallet::::free_balance(&Keyring::Charlie.id()); - - assert_eq!( - after_transfer_alice, - pre_transfer_alice - fee - cfg(TRANSFER_AMOUNT) - ); - assert_eq!(after_transfer_bob, pre_transfer_bob + cfg(TRANSFER_AMOUNT)); - assert_eq!(after_transfer_charlie, pre_transfer_charlie); - }); + process_ok(&mut env, Keyring::Alice, transfer_to(Keyring::Bob)); } #[test_runtimes(all)] fn basic_transfer() { - validate_ok::(Keyring::Alice, transfer_ok::()); - validate_fail::(Keyring::Alice, transfer_fail::()); + validate_ok::(Keyring::Alice, transfer_to(Keyring::Bob)); + validate_fail::(Keyring::Alice, transfer_to(Keyring::Charlie)); } #[test_runtimes(all)] @@ -268,7 +172,7 @@ mod cfg { pallet_proxy::Call::::proxy { real: Keyring::Alice.into(), force_proxy_type: None, - call: Box::new(transfer_ok::().into()), + call: Box::new(transfer_to(Keyring::Bob).into()), }, ); validate_fail::( @@ -276,7 +180,7 @@ mod cfg { pallet_proxy::Call::::proxy { real: Keyring::Alice.into(), force_proxy_type: None, - call: Box::new(transfer_fail::().into()), + call: Box::new(transfer_to(Keyring::Charlie).into()), }, ); } @@ -290,7 +194,7 @@ mod cfg { force_proxy_type: None, call: Box::new( pallet_utility::Call::::batch { - calls: vec![transfer_ok::().into()], + calls: vec![transfer_to(Keyring::Bob).into()], } .into(), ), @@ -303,7 +207,7 @@ mod cfg { force_proxy_type: None, call: Box::new( pallet_utility::Call::::batch { - calls: vec![transfer_fail::().into()], + calls: vec![transfer_to(Keyring::Charlie).into()], } .into(), ), @@ -316,16 +220,16 @@ mod cfg { validate_ok::( Keyring::Alice, pallet_utility::Call::::batch { - calls: vec![transfer_ok::().into()], + calls: vec![transfer_to(Keyring::Bob).into()], }, ); validate_fail::( Keyring::Alice, pallet_utility::Call::::batch { calls: vec![ - transfer_fail::().into(), - transfer_fail::().into(), - transfer_fail::().into(), + transfer_to(Keyring::Charlie).into(), + transfer_to(Keyring::Charlie).into(), + transfer_to(Keyring::Charlie).into(), ], }, ); @@ -336,16 +240,16 @@ mod cfg { validate_ok::( Keyring::Alice, pallet_utility::Call::::batch_all { - calls: vec![transfer_ok::().into()], + calls: vec![transfer_to(Keyring::Bob).into()], }, ); validate_fail::( Keyring::Alice, pallet_utility::Call::::batch_all { calls: vec![ - transfer_fail::().into(), - transfer_fail::().into(), - transfer_fail::().into(), + transfer_to(Keyring::Charlie).into(), + transfer_to(Keyring::Charlie).into(), + transfer_to(Keyring::Charlie).into(), ], }, ); @@ -366,7 +270,7 @@ mod cfg { )] .try_into() .expect("Small enough. qed."), - call: Box::new(transfer_ok::().into()), + call: Box::new(transfer_to(Keyring::Bob).into()), }, ); validate_fail::( @@ -382,8 +286,149 @@ mod cfg { )] .try_into() .expect("Small enough. qed."), - call: Box::new(transfer_fail::().into()), + call: Box::new(transfer_to(Keyring::Charlie).into()), + }, + ); + } +} + +mod xcm { + use super::*; + + const TRANSFER: u32 = 100; + const PARA_ID: u32 = 1000; + + #[test_runtimes(all)] + fn restrict_xcm_transfer() { + let curr = CustomCurrency( + CurrencyId::ForeignAsset(1), + AssetMetadata { + decimals: 6, + ..transferable_metadata(Some(PARA_ID)) }, ); + + let mut env = RuntimeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(1))) // For fees + .add(genesis::tokens::([(curr.id(), curr.val(TRANSFER))])) + .add(genesis::assets::([(curr.id(), curr.metadata())])) + .storage(), + ); + + env.parachain_state_mut(|| { + assert_ok!( + pallet_transfer_allowlist::Pallet::::add_transfer_allowance( + RawOrigin::Signed(Keyring::Alice.into()).into(), + FilterCurrency::Specific(curr.id()), + RestrictedTransferLocation::Xcm(account_location( + 1, + Some(PARA_ID), + Keyring::Alice.id() + )), + ) + ); + + assert_noop!( + pallet_restricted_xtokens::Pallet::::transfer( + RawOrigin::Signed(Keyring::Alice.into()).into(), + curr.id(), + curr.val(TRANSFER), + account_location(1, Some(PARA_ID), Keyring::Bob.id()), + WeightLimit::Unlimited, + ), + pallet_transfer_allowlist::Error::::NoAllowanceForDestination + ); + + assert_noop!( + pallet_restricted_xtokens::Pallet::::transfer( + RawOrigin::Signed(Keyring::Alice.into()).into(), + curr.id(), + curr.val(TRANSFER), + account_location(1, Some(PARA_ID), Keyring::Alice.id()), + WeightLimit::Unlimited, + ), + // But it's ok, we do not care about the xcm transaction in this context. + // It is already checked at `xcm_transfers.rs` + orml_xtokens::Error::::XcmExecutionFailed + ); + }); + } +} + +mod eth_address { + use super::*; + + const TRANSFER: u32 = 10; + const CHAIN_ID: u64 = 1; + const CONTRACT_ACCOUNT: [u8; 20] = [1; 20]; + + #[test_runtimes(all)] + fn restrict_lp_eth_transfer() { + let pallet_index = T::PalletInfo::index::>(); + let curr = CustomCurrency( + CurrencyId::ForeignAsset(1), + AssetMetadata { + decimals: 6, + location: Some(VersionedLocation::V4(Location::new( + 0, + [ + PalletInstance(pallet_index.unwrap() as u8), + GlobalConsensus(NetworkId::Ethereum { chain_id: CHAIN_ID }), + AccountKey20 { + network: None, + key: CONTRACT_ACCOUNT, + }, + ], + ))), + additional: CustomMetadata { + transferability: CrossChainTransferability::LiquidityPools, + ..CustomMetadata::default() + }, + ..default_metadata() + }, + ); + + let mut env = RuntimeEnv::::from_parachain_storage( + Genesis::default() + .add(genesis::balances::(cfg(10))) + .add(genesis::tokens::([(curr.id(), curr.val(TRANSFER))])) + .add(genesis::assets::([(curr.id(), curr.metadata())])) + .storage(), + ); + + env.parachain_state_mut(|| { + let curr_contract = DomainAddress::EVM(CHAIN_ID, CONTRACT_ACCOUNT); + + assert_ok!( + pallet_transfer_allowlist::Pallet::::add_transfer_allowance( + RawOrigin::Signed(Keyring::Alice.into()).into(), + FilterCurrency::Specific(curr.id()), + RestrictedTransferLocation::Address(curr_contract.clone()), + ) + ); + + assert_noop!( + pallet_liquidity_pools::Pallet::::transfer( + RawOrigin::Signed(Keyring::Alice.into()).into(), + curr.id(), + DomainAddress::EVM(CHAIN_ID, [2; 20]), // Not the allowed contract account + curr.val(TRANSFER), + ), + pallet_transfer_allowlist::Error::::NoAllowanceForDestination + ); + + assert_noop!( + pallet_liquidity_pools::Pallet::::transfer( + RawOrigin::Signed(Keyring::Alice.into()).into(), + curr.id(), + curr_contract, + curr.val(TRANSFER), + ), + // But it's ok, we do not care about the router transaction in this context. + // Is already checked at `liquidity_pools.rs` + pallet_liquidity_pools_gateway::Error::::RouterNotFound + ); + }); } } diff --git a/runtime/integration-tests/src/generic/cases/xcm_transfers.rs b/runtime/integration-tests/src/generic/cases/xcm_transfers.rs new file mode 100644 index 0000000000..04f471144b --- /dev/null +++ b/runtime/integration-tests/src/generic/cases/xcm_transfers.rs @@ -0,0 +1,236 @@ +use cfg_types::tokens::{AssetMetadata, CurrencyId, CurrencyId::Native}; +use frame_support::{assert_ok, dispatch::RawOrigin}; +use orml_traits::MultiCurrency; +use staging_xcm::v4::{Junction::*, Junctions::Here, WeightLimit}; + +use crate::{ + generic::{ + config::Runtime, + env::{Blocks, Env}, + envs::fudge_env::{ + handle::{PARA_ID, SIBLING_ID}, + FudgeEnv, FudgeSupport, RelayRuntime, + }, + utils::{ + currency::{cfg, CurrencyInfo, CustomCurrency}, + genesis, + genesis::Genesis, + xcm::{ + account_location, enable_para_to_relay_communication, + enable_para_to_sibling_communication, enable_relay_to_para_communication, + transferable_metadata, + }, + }, + }, + utils::{accounts::Keyring, approx::Approximate}, +}; + +const INITIAL: u32 = 100; +const TRANSFER: u32 = 20; + +fn create_transferable_currency(decimals: u32, para_id: Option) -> CustomCurrency { + CustomCurrency( + CurrencyId::ForeignAsset(1), + AssetMetadata { + decimals, + ..transferable_metadata(para_id) + }, + ) +} + +#[test_runtimes(all)] +fn para_to_sibling_with_foreign_to_foreign_tokens() { + let curr = create_transferable_currency(6, Some(PARA_ID)); + + let mut env = FudgeEnv::::from_storage( + Default::default(), + Genesis::default() + .add(genesis::tokens::([(curr.id(), curr.val(INITIAL))])) + .add(genesis::assets::([(curr.id(), curr.metadata())])) + .storage(), + Genesis::default() + .add(genesis::assets::([(curr.id(), curr.metadata())])) + .storage(), + ); + + enable_para_to_sibling_communication::(&mut env); + + env.parachain_state_mut(|| { + assert_ok!(orml_xtokens::Pallet::::transfer( + RawOrigin::Signed(Keyring::Alice.id()).into(), + curr.id(), + curr.val(TRANSFER), + account_location(1, Some(SIBLING_ID), Keyring::Bob.id()), + WeightLimit::Unlimited, + )); + + assert_eq!( + orml_tokens::Pallet::::free_balance(curr.id(), &Keyring::Alice.id()), + curr.val(INITIAL) - curr.val(TRANSFER) + ); + }); + + env.pass(Blocks::ByNumber(2)); + + env.sibling_state(|| { + assert_eq!( + orml_tokens::Pallet::::free_balance(curr.id(), &Keyring::Bob.id()), + curr.val(TRANSFER) + ); + }); +} + +#[test_runtimes(all)] +fn para_to_sibling_with_native_to_foreign_tokens() { + let curr = create_transferable_currency(18, Some(PARA_ID)); + + let mut env = FudgeEnv::::from_storage( + Default::default(), + Genesis::default() + .add(genesis::balances::(cfg(INITIAL))) + .add(genesis::assets::([(Native, curr.metadata())])) + .storage(), + Genesis::default() + .add(genesis::assets::([(curr.id(), curr.metadata())])) + .storage(), + ); + + enable_para_to_sibling_communication::(&mut env); + + env.parachain_state_mut(|| { + assert_ok!(orml_xtokens::Pallet::::transfer( + RawOrigin::Signed(Keyring::Alice.id()).into(), + Native, + cfg(TRANSFER), + account_location(1, Some(SIBLING_ID), Keyring::Bob.id()), + WeightLimit::Unlimited, + )); + + assert_eq!( + pallet_balances::Pallet::::free_balance(&Keyring::Alice.id()), + cfg(INITIAL) - cfg(TRANSFER) + ); + }); + + env.pass(Blocks::ByNumber(2)); + + env.sibling_state(|| { + assert_eq!( + orml_tokens::Pallet::::free_balance(curr.id(), &Keyring::Bob.id()), + curr.val(TRANSFER) + ); + }); +} + +#[test_runtimes(all)] +fn para_to_sibling_with_foreign_to_native_tokens() { + let curr = create_transferable_currency(18, Some(PARA_ID)); + + let mut env = FudgeEnv::::from_storage( + Default::default(), + Genesis::default() + .add(genesis::tokens::([(curr.id(), curr.val(INITIAL))])) + .add(genesis::assets::([(curr.id(), curr.metadata())])) + .storage(), + Genesis::default() + .add(genesis::assets::([(Native, curr.metadata())])) + .storage(), + ); + + enable_para_to_sibling_communication::(&mut env); + + env.parachain_state_mut(|| { + assert_ok!(orml_xtokens::Pallet::::transfer( + RawOrigin::Signed(Keyring::Alice.id()).into(), + curr.id(), + curr.val(TRANSFER), + account_location(1, Some(SIBLING_ID), Keyring::Bob.id()), + WeightLimit::Unlimited, + )); + + assert_eq!( + orml_tokens::Pallet::::free_balance(curr.id(), &Keyring::Alice.id()), + curr.val(INITIAL) - curr.val(TRANSFER) + ); + }); + + env.pass(Blocks::ByNumber(2)); + + env.sibling_state(|| { + assert_eq!( + pallet_balances::Pallet::::free_balance(&Keyring::Bob.id()), + cfg(TRANSFER) + ); + }); +} + +#[test_runtimes(all)] +fn para_from_to_relay_using_relay_native_tokens() { + let curr = create_transferable_currency(10, None); + + let mut env = FudgeEnv::::from_storage( + Genesis::default() + .add(genesis::balances::>(curr.val(INITIAL))) + .storage(), + Genesis::default() + .add(genesis::assets::([(curr.id(), curr.metadata())])) + .storage(), + Default::default(), + ); + + // From Relay to Parachain + enable_relay_to_para_communication::(&mut env); + + env.relay_state_mut(|| { + assert_ok!( + pallet_xcm::Pallet::>::reserve_transfer_assets( + RawOrigin::Signed(Keyring::Alice.id()).into(), + Box::new(Parachain(PARA_ID).into()), + account_location(0, None, Keyring::Bob.id()), + Box::new((Here, curr.val(TRANSFER)).into()), + 0, + ) + ); + + assert_eq!( + pallet_balances::Pallet::>::free_balance(&Keyring::Alice.id()), + (curr.val(INITIAL) - curr.val(TRANSFER)).approx(0.01) + ); + }); + + env.pass(Blocks::ByNumber(2)); + + env.parachain_state(|| { + assert_eq!( + orml_tokens::Pallet::::free_balance(curr.id(), &Keyring::Bob.id()), + curr.val(TRANSFER) + ); + }); + + // From Parachain to Relay + enable_para_to_relay_communication::(&mut env); + + env.parachain_state_mut(|| { + assert_ok!(orml_xtokens::Pallet::::transfer( + RawOrigin::Signed(Keyring::Bob.id()).into(), + curr.id(), + curr.val(TRANSFER / 2), + account_location(1, None, Keyring::Alice.id()), + WeightLimit::Unlimited, + )); + + assert_eq!( + orml_tokens::Pallet::::free_balance(curr.id(), &Keyring::Bob.id()), + (curr.val(TRANSFER) - curr.val(TRANSFER / 2)).approx(0.01) + ); + }); + + env.pass(Blocks::ByNumber(2)); + + env.relay_state(|| { + assert_eq!( + pallet_balances::Pallet::>::free_balance(&Keyring::Alice.id()), + (curr.val(INITIAL) - curr.val(TRANSFER) + curr.val(TRANSFER / 2)).approx(0.01) + ); + }); +} diff --git a/runtime/integration-tests/src/generic/envs/fudge_env.rs b/runtime/integration-tests/src/generic/envs/fudge_env.rs index 214b3037a5..4c9cc28d0c 100644 --- a/runtime/integration-tests/src/generic/envs/fudge_env.rs +++ b/runtime/integration-tests/src/generic/envs/fudge_env.rs @@ -24,7 +24,7 @@ pub trait FudgeSupport: Runtime { type FudgeHandle: FudgeHandle; } -pub type FudgeRelayRuntime = <::FudgeHandle as FudgeHandle>::RelayRuntime; +pub type RelayRuntime = <::FudgeHandle as FudgeHandle>::RelayRuntime; /// Evironment that uses fudge to interact with the runtime pub struct FudgeEnv { @@ -48,6 +48,8 @@ impl Env for FudgeEnv { parachain_storage: Storage, sibling_storage: Storage, ) -> Self { + crate::utils::logs::init_logs(); + let mut handle = T::FudgeHandle::new(relay_storage, parachain_storage, sibling_storage); handle.evolve(); diff --git a/runtime/integration-tests/src/generic/envs/fudge_env/handle.rs b/runtime/integration-tests/src/generic/envs/fudge_env/handle.rs index 0e5321df5e..07d3af10e7 100644 --- a/runtime/integration-tests/src/generic/envs/fudge_env/handle.rs +++ b/runtime/integration-tests/src/generic/envs/fudge_env/handle.rs @@ -32,6 +32,8 @@ use crate::generic::config::Runtime; /// Start date used for timestamps in test-enviornments /// Sat Jan 01 2022 00:00:00 GMT+0000 pub const START_DATE: u64 = 1640995200u64; +pub const PARA_ID: u32 = 1001; +pub const SIBLING_ID: u32 = 1002; type InherentCreator = Box< dyn CreateInherentDataProviders< @@ -118,9 +120,6 @@ pub trait FudgeHandle { const RELAY_CODE: Option<&'static [u8]>; const PARACHAIN_CODE: Option<&'static [u8]>; - const PARA_ID: u32; - const SIBLING_ID: u32; - fn relay(&self) -> &RelaychainBuilder; fn relay_mut(&mut self) -> &mut RelaychainBuilder; @@ -146,8 +145,6 @@ pub trait FudgeHandle { storage: Storage, session_keys: ::Keys, ) -> RelaychainBuilder { - crate::utils::logs::init_logs(); - sp_tracing::enter_span!(sp_tracing::Level::INFO, "Relay - StartUp"); let code = Self::RELAY_CODE.expect("ESSENTIAL: WASM is built."); diff --git a/runtime/integration-tests/src/generic/impls.rs b/runtime/integration-tests/src/generic/impls.rs index 764c40ee27..8c0791ac0d 100644 --- a/runtime/integration-tests/src/generic/impls.rs +++ b/runtime/integration-tests/src/generic/impls.rs @@ -46,8 +46,6 @@ macro_rules! impl_fudge_support { $relay_path:ident, $relay_session_keys:expr, $parachain_path:ident, - $parachain_id:literal, - $sibling_id:literal ) => { const _: () = { use fudge::primitives::{Chain, ParaId}; @@ -58,6 +56,7 @@ macro_rules! impl_fudge_support { use crate::generic::envs::fudge_env::{ handle::{ FudgeHandle, ParachainBuilder, ParachainClient, RelayClient, RelaychainBuilder, + PARA_ID, SIBLING_ID, }, FudgeSupport, }; @@ -67,11 +66,11 @@ macro_rules! impl_fudge_support { #[fudge::relaychain] pub relay: RelaychainBuilder<$relay_path::RuntimeApi, $relay_path::Runtime>, - #[fudge::parachain($parachain_id)] + #[fudge::parachain(PARA_ID)] pub parachain: ParachainBuilder<$parachain_path::Block, $parachain_path::RuntimeApi>, - #[fudge::parachain($sibling_id)] + #[fudge::parachain(SIBLING_ID)] pub sibling: ParachainBuilder<$parachain_path::Block, $parachain_path::RuntimeApi>, } @@ -91,9 +90,7 @@ macro_rules! impl_fudge_support { type RelayRuntime = $relay_path::Runtime; const PARACHAIN_CODE: Option<&'static [u8]> = $parachain_path::WASM_BINARY; - const PARA_ID: u32 = $parachain_id; const RELAY_CODE: Option<&'static [u8]> = $relay_path::WASM_BINARY; - const SIBLING_ID: u32 = $sibling_id; fn new( relay_storage: Storage, @@ -102,12 +99,12 @@ macro_rules! impl_fudge_support { ) -> Self { let relay = Self::new_relay_builder(relay_storage, $relay_session_keys); let parachain = Self::new_parachain_builder( - ParaId::from(Self::PARA_ID), + ParaId::from(PARA_ID), &relay, parachain_storage, ); let sibling = Self::new_parachain_builder( - ParaId::from(Self::SIBLING_ID), + ParaId::from(SIBLING_ID), &relay, sibling_storage, ); @@ -183,8 +180,6 @@ impl_fudge_support!( rococo_runtime, default_rococo_session_keys(), development_runtime, - 2000, - 2001 ); impl_fudge_support!( @@ -192,8 +187,6 @@ impl_fudge_support!( rococo_runtime, default_rococo_session_keys(), altair_runtime, - 2088, - 2089 ); impl_fudge_support!( @@ -201,8 +194,6 @@ impl_fudge_support!( rococo_runtime, default_rococo_session_keys(), centrifuge_runtime, - 2031, - 2032 ); pub fn default_rococo_session_keys() -> rococo_runtime::SessionKeys { diff --git a/runtime/integration-tests/src/generic/mod.rs b/runtime/integration-tests/src/generic/mod.rs index 9d0f96e633..4dc2de2226 100644 --- a/runtime/integration-tests/src/generic/mod.rs +++ b/runtime/integration-tests/src/generic/mod.rs @@ -11,7 +11,9 @@ pub mod utils; // Test cases mod cases { mod account_derivation; + mod assets; mod block_rewards; + mod currency_conversions; mod ethereum_transaction; mod example; mod investments; @@ -22,6 +24,7 @@ mod cases { mod precompile; mod proxy; mod restricted_transfers; + mod xcm_transfers; } /// Generate tests for the specified runtimes or all runtimes. diff --git a/runtime/integration-tests/src/generic/utils/currency.rs b/runtime/integration-tests/src/generic/utils/currency.rs index 6d8b029e43..bec217c89e 100644 --- a/runtime/integration-tests/src/generic/utils/currency.rs +++ b/runtime/integration-tests/src/generic/utils/currency.rs @@ -5,11 +5,27 @@ use cfg_primitives::{conversion, liquidity_pools::GeneralCurrencyPrefix, Balance use cfg_types::tokens::{AssetMetadata, CurrencyId, CustomMetadata, GeneralCurrencyIndex}; use frame_support::{assert_ok, traits::OriginTrait}; use sp_runtime::FixedPointNumber; +use staging_xcm::VersionedLocation; use crate::generic::config::Runtime; -pub const fn cfg(amount: Balance) -> Balance { - amount * CFG +pub fn default_metadata() -> AssetMetadata { + AssetMetadata { + decimals: 0, + name: Default::default(), + symbol: Default::default(), + existential_deposit: 0, + location: None, + additional: Default::default(), + } +} + +const fn amount_pow(amount: Balance, exp: u32) -> Balance { + amount * 10u128.pow(exp) +} + +pub const fn cfg(amount: u32) -> Balance { + amount as Balance * CFG } pub trait CurrencyInfo { @@ -31,7 +47,7 @@ pub trait CurrencyInfo { &self.symbol() } - fn location(&self) -> Option { + fn location(&self) -> Option { None } @@ -89,7 +105,7 @@ impl CurrencyInfo for Usd6 { } pub const fn usd6(amount: Balance) -> Balance { - amount * 10u128.pow(6) + amount_pow(amount, 6) } pub struct Usd12; @@ -115,7 +131,7 @@ impl CurrencyInfo for Usd12 { } pub const fn usd12(amount: Balance) -> Balance { - amount * 10u128.pow(12) + amount_pow(amount, 12) } pub struct Usd18; @@ -141,7 +157,47 @@ impl CurrencyInfo for Usd18 { } pub const fn usd18(amount: Balance) -> Balance { - amount * 10u128.pow(18) + amount_pow(amount, 18) +} + +#[derive(Clone)] +pub struct CustomCurrency(pub CurrencyId, pub AssetMetadata); +impl CurrencyInfo for CustomCurrency { + fn id(&self) -> CurrencyId { + self.0 + } + + fn decimals(&self) -> u32 { + self.1.decimals + } + + fn symbol(&self) -> &'static str { + format!("Custom-{}", self.decimals()).leak() + } + + fn location(&self) -> Option { + self.1.location.clone() + } + + fn custom(&self) -> CustomMetadata { + self.1.additional + } + + fn metadata(&self) -> AssetMetadata { + self.1.clone() + } +} + +impl CustomCurrency { + // Using `u32` on purpose here to avoid placing a `Balance` as input and + // generating more decimals than expected. + pub const fn val(&self, amount: u32) -> Balance { + amount_pow(amount as Balance, self.1.decimals) + } + + pub fn metadata(&self) -> &AssetMetadata { + &self.1 + } } pub fn register_currency( diff --git a/runtime/integration-tests/src/generic/utils/genesis.rs b/runtime/integration-tests/src/generic/utils/genesis.rs index 6a656b872a..1648a95ba7 100644 --- a/runtime/integration-tests/src/generic/utils/genesis.rs +++ b/runtime/integration-tests/src/generic/utils/genesis.rs @@ -1,14 +1,17 @@ //! PLEASE be as much generic as possible because no domain or use cases are //! considered at this level. -use cfg_primitives::Balance; -use cfg_types::{fixed_point::Rate, tokens::CurrencyId}; +use cfg_primitives::{AccountId, Balance}; +use cfg_types::{ + fixed_point::Rate, + tokens::{AssetMetadata, CurrencyId}, +}; use parity_scale_codec::Encode; use sp_core::Get; use sp_runtime::{BuildStorage, FixedPointNumber, Storage}; use crate::{ - generic::{config::Runtime, utils::currency::CurrencyInfo}, + generic::config::Runtime, utils::accounts::{default_accounts, Keyring}, }; @@ -28,56 +31,62 @@ impl Genesis { } } -pub fn balances(balance: Balance) -> impl BuildStorage { - let mut accounts = Vec::new(); - accounts.extend(default_accounts().into_iter().map(|k| (k.id(), balance))); - accounts.extend( - default_accounts() +pub fn balances>( + balance: Balance, +) -> impl BuildStorage { + pallet_balances::GenesisConfig:: { + balances: default_accounts() .into_iter() - .map(|k| (k.id_ed25519(), balance)), - ); - - pallet_balances::GenesisConfig:: { balances: accounts } + .map(Keyring::id) + .chain(default_accounts().into_iter().map(Keyring::id_ed25519)) + .map(|id| (id, balance)) + .collect(), + } } -pub fn tokens(values: Vec<(CurrencyId, Balance)>) -> impl BuildStorage { - let mut accounts = Vec::new(); - accounts.extend(default_accounts().into_iter().flat_map(|keyring| { - values - .clone() - .into_iter() - .map(|(curency_id, balance)| (keyring.id(), curency_id, balance)) - .collect::>() - })); - accounts.extend(default_accounts().into_iter().flat_map(|keyring| { - values - .clone() +pub fn tokens( + values: impl IntoIterator + Clone, +) -> impl BuildStorage { + orml_tokens::GenesisConfig:: { + balances: default_accounts() .into_iter() - .map(|(curency_id, balance)| (keyring.id_ed25519(), curency_id, balance)) - .collect::>() - })); - - orml_tokens::GenesisConfig:: { balances: accounts } + .map(Keyring::id) + .chain(default_accounts().into_iter().map(Keyring::id_ed25519)) + .flat_map(|account_id| { + values + .clone() + .into_iter() + .map(|(curency_id, balance)| (account_id.clone(), curency_id, balance)) + .collect::>() + }) + .collect(), + } } -pub fn assets(currency_ids: Vec>) -> impl BuildStorage { +pub fn assets<'a, T: Runtime>( + currency_ids: impl IntoIterator, +) -> impl BuildStorage { orml_asset_registry::module::GenesisConfig:: { assets: currency_ids .into_iter() - .map(|currency_id| (currency_id.id(), currency_id.metadata().encode())) + .map(|(currency_id, metadata)| (currency_id, metadata.encode())) .collect(), last_asset_id: Default::default(), // It seems deprecated } } -pub fn council_members(members: Vec) -> impl BuildStorage { +pub fn council_members( + members: impl IntoIterator, +) -> impl BuildStorage { pallet_collective::GenesisConfig:: { phantom: Default::default(), members: members.into_iter().map(|acc| acc.id().into()).collect(), } } -pub fn invulnerables(invulnerables: Vec) -> impl BuildStorage { +pub fn invulnerables( + invulnerables: impl IntoIterator, +) -> impl BuildStorage { pallet_collator_selection::GenesisConfig:: { invulnerables: invulnerables.into_iter().map(|acc| acc.id()).collect(), candidacy_bond: cfg_primitives::MILLI_CFG, @@ -94,7 +103,9 @@ pub fn session_keys() -> impl BuildStorage { } } -pub fn block_rewards(collators: Vec) -> impl BuildStorage { +pub fn block_rewards( + collators: impl IntoIterator, +) -> impl BuildStorage { pallet_block_rewards::GenesisConfig:: { collators: collators.into_iter().map(|acc| acc.id()).collect(), collator_reward: (1000 * cfg_primitives::CFG).into(), @@ -102,3 +113,10 @@ pub fn block_rewards(collators: Vec) -> impl BuildStorage { last_update: Default::default(), } } + +pub fn parachain_id(para_id: u32) -> impl BuildStorage { + staging_parachain_info::GenesisConfig:: { + _config: Default::default(), + parachain_id: para_id.into(), + } +} diff --git a/runtime/integration-tests/src/generic/utils/xcm.rs b/runtime/integration-tests/src/generic/utils/xcm.rs index 97c788071b..9f6b4d7f07 100644 --- a/runtime/integration-tests/src/generic/utils/xcm.rs +++ b/runtime/integration-tests/src/generic/utils/xcm.rs @@ -1,69 +1,107 @@ -use frame_support::{assert_ok, traits::OriginTrait}; +use cfg_primitives::AccountId; +use cfg_types::tokens::{AssetMetadata, CrossChainTransferability, CustomMetadata}; +use frame_support::{assert_ok, dispatch::RawOrigin}; use polkadot_parachain_primitives::primitives::Id; use staging_xcm::{ prelude::XCM_VERSION, - v4::{Junction, Location}, + v4::{Junction::*, Location}, + VersionedLocation, }; use crate::generic::{ config::Runtime, env::{Blocks, Env}, - envs::fudge_env::{handle::FudgeHandle, FudgeEnv, FudgeRelayRuntime, FudgeSupport}, + envs::fudge_env::{ + handle::{PARA_ID, SIBLING_ID}, + FudgeEnv, FudgeSupport, RelayRuntime, + }, + utils::currency::default_metadata, }; -pub fn setup_xcm(env: &mut FudgeEnv) { +pub fn enable_relay_to_para_communication(env: &mut FudgeEnv) { + env.relay_state_mut(|| { + assert_ok!(pallet_xcm::Pallet::>::force_xcm_version( + RawOrigin::Root.into(), + Box::new(Location::new(0, Parachain(PARA_ID))), + XCM_VERSION, + )); + }); +} + +pub fn enable_para_to_relay_communication(env: &mut FudgeEnv) { env.parachain_state_mut(|| { - // Set the XCM version used when sending XCM messages to sibling. assert_ok!(pallet_xcm::Pallet::::force_xcm_version( - ::RuntimeOrigin::root(), - Box::new(Location::new( - 1, - Junction::Parachain(T::FudgeHandle::SIBLING_ID), - )), + RawOrigin::Root.into(), + Box::new(Location::parent()), XCM_VERSION, )); }); +} - env.sibling_state_mut(|| { - // Set the XCM version used when sending XCM messages to parachain. +pub fn enable_para_to_sibling_communication(env: &mut FudgeEnv) { + env.parachain_state_mut(|| { assert_ok!(pallet_xcm::Pallet::::force_xcm_version( - ::RuntimeOrigin::root(), - Box::new(Location::new( - 1, - Junction::Parachain(T::FudgeHandle::PARA_ID), - )), + RawOrigin::Root.into(), + Box::new(Location::new(1, Parachain(SIBLING_ID))), XCM_VERSION, )); }); env.relay_state_mut(|| { - assert_ok!(polkadot_runtime_parachains::hrmp::Pallet::< - FudgeRelayRuntime, - >::force_open_hrmp_channel( - as frame_system::Config>::RuntimeOrigin::root(), - Id::from(T::FudgeHandle::PARA_ID), - Id::from(T::FudgeHandle::SIBLING_ID), - 10, - 1024, - )); - - assert_ok!(polkadot_runtime_parachains::hrmp::Pallet::< - FudgeRelayRuntime, - >::force_open_hrmp_channel( - as frame_system::Config>::RuntimeOrigin::root(), - Id::from(T::FudgeHandle::SIBLING_ID), - Id::from(T::FudgeHandle::PARA_ID), - 10, - 1024, - )); + // Enable para -> sibling comunication though relay + assert_ok!( + polkadot_runtime_parachains::hrmp::Pallet::>::force_open_hrmp_channel( + RawOrigin::Root.into(), + Id::from(PARA_ID), + Id::from(SIBLING_ID), + 10, + 1024, + ) + ); - assert_ok!(polkadot_runtime_parachains::hrmp::Pallet::< - FudgeRelayRuntime, - >::force_process_hrmp_open( - as frame_system::Config>::RuntimeOrigin::root(), - 2, - )); + assert_ok!( + polkadot_runtime_parachains::hrmp::Pallet::>::force_process_hrmp_open( + RawOrigin::Root.into(), + 1 + ) + ); }); env.pass(Blocks::ByNumber(1)); } + +pub fn account_location( + parents: u8, + para_id: Option, + account_id: AccountId, +) -> Box { + let account = AccountId32 { + network: None, + id: account_id.into(), + }; + + Box::new(VersionedLocation::V4(match para_id { + Some(para_id) => Location::new(parents, [Parachain(para_id), account]), + None => Location::new(parents, account), + })) +} + +pub fn transferable_custom() -> CustomMetadata { + CustomMetadata { + transferability: CrossChainTransferability::xcm_with_fees(0), + ..Default::default() + } +} + +pub fn transferable_metadata(origin_para_id: Option) -> AssetMetadata { + let location = match origin_para_id { + Some(para_id) => Location::new(1, Parachain(para_id)), + None => Location::parent(), + }; + + AssetMetadata { + location: Some(VersionedLocation::V4(location)), + additional: transferable_custom(), + ..default_metadata() + } +} diff --git a/runtime/integration-tests/src/utils/mod.rs b/runtime/integration-tests/src/utils/mod.rs index f4f23fffaa..3ee465c7a6 100644 --- a/runtime/integration-tests/src/utils/mod.rs +++ b/runtime/integration-tests/src/utils/mod.rs @@ -12,3 +12,73 @@ pub mod accounts; pub mod logs; + +pub mod orml_asset_registry { + // orml_asset_registry has remove the reexport of all pallet stuff, + // we reexport it again here + pub use orml_asset_registry::module::*; +} + +pub mod approx { + use std::fmt; + + use cfg_primitives::Balance; + + #[derive(Clone)] + pub struct Approximation { + value: Balance, + offset: Balance, + is_positive: bool, + } + + impl PartialEq for Balance { + fn eq(&self, ap: &Approximation) -> bool { + match ap.is_positive { + true => *self <= ap.value && *self + ap.offset >= ap.value, + false => *self >= ap.value && *self - ap.offset <= ap.value, + } + } + } + + impl fmt::Debug for Approximation { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let (from, to) = match self.is_positive { + true => (self.value - self.offset, self.value), + false => (self.value, self.value + self.offset), + }; + + write!(f, "Approximation: [{}, {}]", from, to) + } + } + + /// Allow to compare `Balance` values with approximated values: + pub trait Approximate { + fn approx(&self, variation: f64) -> Approximation; + } + + impl Approximate for Balance { + fn approx(&self, variation: f64) -> Approximation { + let offset = match variation >= 0.0 { + true => (*self as f64 * variation) as Balance, + false => (*self as f64 * -variation) as Balance, + }; + + Approximation { + value: *self, + offset, + is_positive: variation >= 0.0, + } + } + } + + #[test] + fn approximations() { + assert_eq!(1000u128, 996.approx(-0.01)); + assert_eq!(1000u128, 1004.approx(0.01)); + assert_eq!(1000u128, 1500.approx(0.5)); + + assert_ne!(1000u128, 996.approx(0.01)); + assert_ne!(1000u128, 1004.approx(-0.01)); + assert_ne!(1000u128, 1500.approx(0.1)); + } +} From 47384e9c3f8b4f2669396622f3cf90459abfa526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Enrique=20Mu=C3=B1oz=20Mart=C3=ADn?= Date: Tue, 25 Jun 2024 09:59:13 +0200 Subject: [PATCH 20/21] Liquidity-pools: Add unitary tests (#1879) * prepare mock for UTs and simplify some minor things * normal function instead of Convert trait * rename into_account_id() to evm_to_account() * add UTs for transfer * simplify account conversion * remove unused CurrencyIdOf * remove already covered tests * remove democracy utils * apply Cosmin suggestions * add transfer_tranche_tokens tests * minor clean * add add_pool tests * add add_tranche tests * check balance post transfers * fix lp tests * fix imports after rebasing --- Cargo.lock | 9 +- .../src/{try_convert.rs => converter.rs} | 18 +- libs/mocks/src/foreign_investment.rs | 159 +++++ libs/mocks/src/lib.rs | 5 +- libs/mocks/src/outbound_queue.rs | 37 + libs/types/src/domain_address.rs | 36 +- libs/types/src/tokens.rs | 12 + pallets/liquidity-pools-gateway/src/mock.rs | 12 +- pallets/liquidity-pools/Cargo.toml | 47 +- pallets/liquidity-pools/src/contract.rs | 63 -- pallets/liquidity-pools/src/hooks.rs | 6 +- pallets/liquidity-pools/src/inbound.rs | 6 +- pallets/liquidity-pools/src/lib.rs | 167 ++--- pallets/liquidity-pools/src/mock.rs | 141 ++++ pallets/liquidity-pools/src/routers.rs | 35 - pallets/liquidity-pools/src/tests.rs | 632 ++++++++++++++++++ runtime/altair/src/lib.rs | 2 - runtime/centrifuge/src/lib.rs | 2 - runtime/common/src/account_conversion.rs | 25 +- runtime/common/src/gateway.rs | 2 +- runtime/common/src/xcm.rs | 35 +- runtime/development/src/lib.rs | 2 - .../src/generic/cases/assets.rs | 6 +- .../src/generic/cases/currency_conversions.rs | 4 +- .../src/generic/cases/liquidity_pools.rs | 547 ++------------- .../src/generic/cases/lp/transfers.rs | 51 +- .../src/generic/cases/restricted_transfers.rs | 5 +- .../src/generic/utils/currency.rs | 11 - .../src/generic/utils/democracy.rs | 276 -------- .../src/generic/utils/mod.rs | 1 - .../src/generic/utils/xcm.rs | 5 +- .../integration-tests/src/utils/accounts.rs | 3 +- 32 files changed, 1207 insertions(+), 1155 deletions(-) rename libs/mocks/src/{try_convert.rs => converter.rs} (64%) create mode 100644 libs/mocks/src/foreign_investment.rs create mode 100644 libs/mocks/src/outbound_queue.rs delete mode 100644 pallets/liquidity-pools/src/contract.rs create mode 100644 pallets/liquidity-pools/src/mock.rs delete mode 100644 pallets/liquidity-pools/src/routers.rs create mode 100644 pallets/liquidity-pools/src/tests.rs delete mode 100644 runtime/integration-tests/src/generic/utils/democracy.rs diff --git a/Cargo.lock b/Cargo.lock index 18559e03f9..5f272b6ec9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8215,22 +8215,16 @@ dependencies = [ name = "pallet-liquidity-pools" version = "0.0.1" dependencies = [ + "cfg-mocks", "cfg-primitives", "cfg-traits", "cfg-types", "cfg-utils", - "ethabi", - "fp-self-contained", - "frame-benchmarking", "frame-support", "frame-system", "hex", "orml-tokens", "orml-traits", - "pallet-balances", - "pallet-ethereum", - "pallet-timestamp", - "pallet-uniques", "parity-scale-codec", "scale-info", "sp-core", @@ -8238,7 +8232,6 @@ dependencies = [ "sp-runtime", "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2)", "staging-xcm", - "xcm-primitives", ] [[package]] diff --git a/libs/mocks/src/try_convert.rs b/libs/mocks/src/converter.rs similarity index 64% rename from libs/mocks/src/try_convert.rs rename to libs/mocks/src/converter.rs index 99fc901812..4882151717 100644 --- a/libs/mocks/src/try_convert.rs +++ b/libs/mocks/src/converter.rs @@ -3,14 +3,12 @@ pub mod pallet { use cfg_traits::TryConvert; use frame_support::pallet_prelude::*; use mock_builder::{execute_call_instance, register_call_instance}; + use sp_runtime::traits::Convert; #[pallet::config] pub trait Config: frame_system::Config { type From; - type To; - - type Error; } #[pallet::pallet] @@ -20,16 +18,26 @@ pub mod pallet { type CallIds, I: 'static = ()> = StorageMap<_, _, String, mock_builder::CallId>; impl, I: 'static> Pallet { - pub fn mock_try_convert(f: impl Fn(T::From) -> Result + 'static) { + pub fn mock_try_convert(f: impl Fn(T::From) -> Result + 'static) { + register_call_instance!(f); + } + + pub fn mock_convert(f: impl Fn(T::From) -> T::To + 'static) { register_call_instance!(f); } } impl, I: 'static> TryConvert for Pallet { - type Error = T::Error; + type Error = DispatchError; fn try_convert(from: T::From) -> Result { execute_call_instance!(from) } } + + impl, I: 'static> Convert for Pallet { + fn convert(from: T::From) -> T::To { + execute_call_instance!(from) + } + } } diff --git a/libs/mocks/src/foreign_investment.rs b/libs/mocks/src/foreign_investment.rs new file mode 100644 index 0000000000..8dd0471caa --- /dev/null +++ b/libs/mocks/src/foreign_investment.rs @@ -0,0 +1,159 @@ +#[frame_support::pallet(dev_mode)] +pub mod pallet { + use cfg_traits::investments::ForeignInvestment; + use frame_support::pallet_prelude::*; + use mock_builder::{execute_call, register_call}; + + #[pallet::config] + pub trait Config: frame_system::Config { + type Amount; + type TrancheAmount; + type CurrencyId; + type InvestmentId; + } + + #[pallet::pallet] + pub struct Pallet(_); + + #[pallet::storage] + type CallIds = StorageMap<_, _, String, mock_builder::CallId>; + + impl Pallet { + pub fn mock_increase_foreign_investment( + f: impl Fn(&T::AccountId, T::InvestmentId, T::Amount, T::CurrencyId) -> DispatchResult + + 'static, + ) { + register_call!(move |(a, b, c, d)| f(a, b, c, d)); + } + + pub fn mock_decrease_foreign_investment( + f: impl Fn(&T::AccountId, T::InvestmentId, T::Amount, T::CurrencyId) -> DispatchResult + + 'static, + ) { + register_call!(move |(a, b, c, d)| f(a, b, c, d)); + } + + pub fn mock_increase_foreign_redemption( + f: impl Fn( + &T::AccountId, + T::InvestmentId, + T::TrancheAmount, + T::CurrencyId, + ) -> DispatchResult + + 'static, + ) { + register_call!(move |(a, b, c, d)| f(a, b, c, d)); + } + + pub fn mock_decrease_foreign_redemption( + f: impl Fn( + &T::AccountId, + T::InvestmentId, + T::TrancheAmount, + T::CurrencyId, + ) -> DispatchResult + + 'static, + ) { + register_call!(move |(a, b, c, d)| f(a, b, c, d)); + } + + pub fn mock_collect_foreign_investment( + f: impl Fn(&T::AccountId, T::InvestmentId, T::CurrencyId) -> DispatchResult + 'static, + ) { + register_call!(move |(a, b, c)| f(a, b, c)); + } + + pub fn mock_collect_foreign_redemption( + f: impl Fn(&T::AccountId, T::InvestmentId, T::CurrencyId) -> DispatchResult + 'static, + ) { + register_call!(move |(a, b, c)| f(a, b, c)); + } + + pub fn mock_investment( + f: impl Fn(&T::AccountId, T::InvestmentId) -> Result + 'static, + ) { + register_call!(move |(a, b)| f(a, b)); + } + + pub fn mock_redemption( + f: impl Fn(&T::AccountId, T::InvestmentId) -> Result + + 'static, + ) { + register_call!(move |(a, b)| f(a, b)); + } + } + + impl ForeignInvestment for Pallet { + type Amount = T::Amount; + type CurrencyId = T::CurrencyId; + type Error = DispatchError; + type InvestmentId = T::InvestmentId; + type TrancheAmount = T::TrancheAmount; + + fn increase_foreign_investment( + a: &T::AccountId, + b: Self::InvestmentId, + c: Self::Amount, + d: Self::CurrencyId, + ) -> DispatchResult { + execute_call!((a, b, c, d)) + } + + fn decrease_foreign_investment( + a: &T::AccountId, + b: Self::InvestmentId, + c: Self::Amount, + d: Self::CurrencyId, + ) -> DispatchResult { + execute_call!((a, b, c, d)) + } + + fn increase_foreign_redemption( + a: &T::AccountId, + b: Self::InvestmentId, + c: Self::TrancheAmount, + d: Self::CurrencyId, + ) -> DispatchResult { + execute_call!((a, b, c, d)) + } + + fn decrease_foreign_redemption( + a: &T::AccountId, + b: Self::InvestmentId, + c: Self::TrancheAmount, + d: Self::CurrencyId, + ) -> DispatchResult { + execute_call!((a, b, c, d)) + } + + fn collect_foreign_investment( + a: &T::AccountId, + b: Self::InvestmentId, + c: Self::CurrencyId, + ) -> DispatchResult { + execute_call!((a, b, c)) + } + + fn collect_foreign_redemption( + a: &T::AccountId, + b: Self::InvestmentId, + c: Self::CurrencyId, + ) -> DispatchResult { + execute_call!((a, b, c)) + } + + fn investment( + a: &T::AccountId, + b: Self::InvestmentId, + ) -> Result { + execute_call!((a, b)) + } + + fn redemption( + a: &T::AccountId, + b: Self::InvestmentId, + ) -> Result { + execute_call!((a, b)) + } + } +} diff --git a/libs/mocks/src/lib.rs b/libs/mocks/src/lib.rs index eec8873049..de52496021 100644 --- a/libs/mocks/src/lib.rs +++ b/libs/mocks/src/lib.rs @@ -1,11 +1,14 @@ pub mod asset_registry; pub mod change_guard; +pub mod converter; pub mod currency_conversion; pub mod data; pub mod fees; +pub mod foreign_investment; pub mod investment; pub mod liquidity_pools; pub mod liquidity_pools_gateway_routers; +pub mod outbound_queue; pub mod pay_fee; pub mod permissions; pub mod pools; @@ -14,7 +17,6 @@ pub mod rewards; pub mod status_notification; pub mod time; pub mod token_swaps; -pub mod try_convert; pub mod value_provider; pub mod write_off_policy; @@ -33,7 +35,6 @@ pub use rewards::pallet as pallet_mock_rewards; pub use status_notification::pallet as pallet_mock_status_notification; pub use time::pallet as pallet_mock_time; pub use token_swaps::pallet as pallet_mock_token_swaps; -pub use try_convert::pallet as pallet_mock_try_convert; pub use value_provider::pallet as pallet_mock_value_provider; pub use write_off_policy::pallet as pallet_mock_write_off_policy; diff --git a/libs/mocks/src/outbound_queue.rs b/libs/mocks/src/outbound_queue.rs new file mode 100644 index 0000000000..986f4acd55 --- /dev/null +++ b/libs/mocks/src/outbound_queue.rs @@ -0,0 +1,37 @@ +#[frame_support::pallet(dev_mode)] +pub mod pallet { + use cfg_traits::liquidity_pools::OutboundQueue; + use frame_support::pallet_prelude::*; + use mock_builder::{execute_call, register_call}; + + #[pallet::config] + pub trait Config: frame_system::Config { + type Sender; + type Destination; + type Message; + } + + #[pallet::pallet] + pub struct Pallet(_); + + #[pallet::storage] + type CallIds = StorageMap<_, _, String, mock_builder::CallId>; + + impl Pallet { + pub fn mock_submit( + f: impl Fn(T::Sender, T::Destination, T::Message) -> DispatchResult + 'static, + ) { + register_call!(move |(a, b, c)| f(a, b, c)); + } + } + + impl OutboundQueue for Pallet { + type Destination = T::Destination; + type Message = T::Message; + type Sender = T::Sender; + + fn submit(a: Self::Sender, b: Self::Destination, c: Self::Message) -> DispatchResult { + execute_call!((a, b, c)) + } + } +} diff --git a/libs/types/src/domain_address.rs b/libs/types/src/domain_address.rs index dc450b683a..f3a19eb094 100644 --- a/libs/types/src/domain_address.rs +++ b/libs/types/src/domain_address.rs @@ -15,7 +15,7 @@ use cfg_utils::{decode_be_bytes, vec_to_fixed_array}; use frame_support::pallet_prelude::RuntimeDebug; use parity_scale_codec::{Decode, Encode, Input, MaxEncodedLen}; use scale_info::TypeInfo; -use sp_runtime::traits::{AccountIdConversion, Convert}; +use sp_runtime::traits::AccountIdConversion; use sp_std::{vec, vec::Vec}; use crate::EVMChainId; @@ -63,12 +63,12 @@ impl Codec for Domain { } } -impl Convert for Domain -where - AccountId: Encode + Decode, -{ - fn convert(domain: Domain) -> AccountId { - DomainLocator { domain }.into_account_truncating() +impl Domain { + pub fn into_account(&self) -> AccountId { + DomainLocator { + domain: self.clone(), + } + .into_account_truncating() } } @@ -118,3 +118,25 @@ impl DomainAddress { self.clone().into() } } + +#[cfg(test)] +mod tests { + use parity_scale_codec::{Decode, Encode}; + + use super::*; + + #[test] + fn test_domain_encode_decode() { + test_domain_identity(Domain::Centrifuge); + test_domain_identity(Domain::EVM(1284)); + test_domain_identity(Domain::EVM(1)); + } + + /// Test that (decode . encode) results in the original value + fn test_domain_identity(domain: Domain) { + let encoded = domain.encode(); + let decoded = Domain::decode(&mut encoded.as_slice()).unwrap(); + + assert_eq!(domain, decoded); + } +} diff --git a/libs/types/src/tokens.rs b/libs/types/src/tokens.rs index 77c2737b2a..824e6a5608 100644 --- a/libs/types/src/tokens.rs +++ b/libs/types/src/tokens.rs @@ -321,6 +321,18 @@ pub struct CustomMetadata { pub local_representation: Option, } +#[cfg(feature = "std")] +pub fn default_metadata() -> AssetMetadata { + AssetMetadata { + decimals: 0, + name: Default::default(), + symbol: Default::default(), + existential_deposit: 0, + location: None, + additional: Default::default(), + } +} + /// The Cross Chain Transferability property of an asset describes the way(s), /// if any, that said asset is cross-chain transferable. It may currently be /// transferable through Xcm, Centrifuge Liquidity Pools, or All . diff --git a/pallets/liquidity-pools-gateway/src/mock.rs b/pallets/liquidity-pools-gateway/src/mock.rs index b99959e456..4f0f2c78de 100644 --- a/pallets/liquidity-pools-gateway/src/mock.rs +++ b/pallets/liquidity-pools-gateway/src/mock.rs @@ -1,13 +1,10 @@ -use cfg_mocks::{ - pallet_mock_liquidity_pools, pallet_mock_routers, pallet_mock_try_convert, MessageMock, - RouterMock, -}; +use cfg_mocks::{pallet_mock_liquidity_pools, pallet_mock_routers, MessageMock, RouterMock}; use cfg_primitives::OutboundMessageNonce; use cfg_types::domain_address::DomainAddress; use frame_support::derive_impl; use frame_system::EnsureRoot; use sp_core::{crypto::AccountId32, ConstU128, H256}; -use sp_runtime::{traits::IdentityLookup, BuildStorage, DispatchError}; +use sp_runtime::{traits::IdentityLookup, BuildStorage}; use crate::{pallet as pallet_liquidity_pools_gateway, EnsureLocal}; @@ -26,7 +23,7 @@ frame_support::construct_runtime!( Balances: pallet_balances, MockLiquidityPools: pallet_mock_liquidity_pools, MockRouters: pallet_mock_routers, - MockOriginRecovery: pallet_mock_try_convert, + MockOriginRecovery: cfg_mocks::converter::pallet, LiquidityPoolsGateway: pallet_liquidity_pools_gateway, } ); @@ -55,8 +52,7 @@ impl pallet_mock_liquidity_pools::Config for Runtime { impl pallet_mock_routers::Config for Runtime {} -impl pallet_mock_try_convert::Config for Runtime { - type Error = DispatchError; +impl cfg_mocks::converter::pallet::Config for Runtime { type From = (Vec, Vec); type To = DomainAddress; } diff --git a/pallets/liquidity-pools/Cargo.toml b/pallets/liquidity-pools/Cargo.toml index 1bbbad918b..a5c8dfbf01 100644 --- a/pallets/liquidity-pools/Cargo.toml +++ b/pallets/liquidity-pools/Cargo.toml @@ -13,24 +13,16 @@ documentation.workspace = true targets = ["x86_64-unknown-linux-gnu"] [dependencies] -ethabi = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } hex = { workspace = true } orml-traits = { workspace = true } parity-scale-codec = { workspace = true } scale-info = { workspace = true } +sp-core = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } - -# Substrate crates -sp-core = { workspace = true } - -# Optional dependencies for benchmarking -frame-benchmarking = { workspace = true, optional = true } -orml-tokens = { workspace = true, optional = true } -pallet-balances = { workspace = true, optional = true } -pallet-uniques = { workspace = true, optional = true } +staging-xcm = { workspace = true } # Our custom pallets cfg-primitives = { workspace = true } @@ -38,27 +30,16 @@ cfg-traits = { workspace = true } cfg-types = { workspace = true } cfg-utils = { workspace = true } -# Polkadot -staging-xcm = { workspace = true } - -fp-self-contained = { workspace = true } -pallet-ethereum = { workspace = true } -xcm-primitives = { workspace = true } - [dev-dependencies] -hex = { workspace = true, default-features = true } - -# Substrate crates & pallets -pallet-balances = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-uniques = { workspace = true } -sp-core = { workspace = true } +cfg-mocks = { workspace = true, default-features = true } +orml-tokens = { workspace = true, default-features = true } sp-io = { workspace = true } [features] default = ["std"] std = [ "parity-scale-codec/std", + "cfg-primitives/std", "cfg-types/std", "cfg-traits/std", "cfg-utils/std", @@ -66,22 +47,11 @@ std = [ "frame-system/std", "sp-std/std", "sp-runtime/std", - "orml-tokens/std", "orml-traits/std", - "pallet-balances/std", "staging-xcm/std", - "pallet-ethereum/std", - "xcm-primitives/std", - "ethabi/std", - "pallet-uniques/std", - "cfg-primitives/std", - "frame-benchmarking/std", "scale-info/std", - "fp-self-contained/std", ] runtime-benchmarks = [ - "frame-benchmarking/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", "orml-tokens/runtime-benchmarks", "cfg-primitives/runtime-benchmarks", "cfg-traits/runtime-benchmarks", @@ -89,9 +59,8 @@ runtime-benchmarks = [ "cfg-utils/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", - "pallet-ethereum/runtime-benchmarks", "sp-runtime/runtime-benchmarks", - "xcm-primitives/runtime-benchmarks", + "cfg-mocks/runtime-benchmarks", ] try-runtime = [ "cfg-primitives/try-runtime", @@ -101,8 +70,6 @@ try-runtime = [ "cfg-types/try-runtime", "cfg-utils/try-runtime", "frame-system/try-runtime", - "pallet-ethereum/try-runtime", - "pallet-balances/try-runtime", - "fp-self-contained/try-runtime", "sp-runtime/try-runtime", + "cfg-mocks/try-runtime", ] diff --git a/pallets/liquidity-pools/src/contract.rs b/pallets/liquidity-pools/src/contract.rs deleted file mode 100644 index 852b6e1fc8..0000000000 --- a/pallets/liquidity-pools/src/contract.rs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2021 Centrifuge Foundation (centrifuge.io). -// This file is part of Centrifuge chain project. - -// Centrifuge is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version (see http://www.gnu.org/licenses). - -// Centrifuge is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -use ethabi::{Bytes, Contract}; -use sp_std::{vec, vec::Vec}; - -/// The solidity LiquidityPools' XCMRouter handle function name. -static HANDLE_FUNCTION: &str = "handle"; - -/// Return the encoded contract call, i.e, -/// LiquidityPoolsXcmRouter::handle(encoded_msg). -pub fn encoded_contract_call(encoded_msg: Vec) -> Bytes { - let contract = xcm_router_contract(); - let encoded_contract_call = contract - .function(HANDLE_FUNCTION) - .expect("Known at compilation time") - .encode_input(&[ethabi::Token::Bytes(encoded_msg)]) - .expect("Known at compilation time"); - - encoded_contract_call -} - -/// The LiquidityPoolsXcmRouter Abi as in ethabi::Contract. -/// Note: We only concern ourselves with the `handle` function of the contract -/// since that's all we need to build the calls for remote EVM execution. -pub fn xcm_router_contract() -> Contract { - use sp_std::collections::btree_map::BTreeMap; - - let mut functions = BTreeMap::new(); - #[allow(deprecated)] - functions.insert( - "handle".into(), - vec![ethabi::Function { - name: HANDLE_FUNCTION.into(), - inputs: vec![ethabi::Param { - name: "message".into(), - kind: ethabi::ParamType::Bytes, - internal_type: None, - }], - outputs: vec![], - constant: Some(false), - state_mutability: Default::default(), - }], - ); - - ethabi::Contract { - constructor: None, - functions, - events: Default::default(), - errors: Default::default(), - receive: false, - fallback: false, - } -} diff --git a/pallets/liquidity-pools/src/hooks.rs b/pallets/liquidity-pools/src/hooks.rs index fcf43a495c..50421af6ce 100644 --- a/pallets/liquidity-pools/src/hooks.rs +++ b/pallets/liquidity-pools/src/hooks.rs @@ -15,7 +15,7 @@ use cfg_traits::{ investments::TrancheCurrency, liquidity_pools::OutboundQueue, StatusNotificationHook, }; use cfg_types::{ - domain_address::{Domain, DomainAddress}, + domain_address::DomainAddress, investments::{ExecutedForeignCollect, ExecutedForeignDecreaseInvest}, }; use frame_support::{ @@ -26,7 +26,7 @@ use frame_support::{ transactional, }; use sp_core::Get; -use sp_runtime::{traits::Convert, DispatchError, DispatchResult}; +use sp_runtime::{DispatchError, DispatchResult}; use sp_std::marker::PhantomData; use crate::{pallet::Config, Message, MessageOf, Pallet}; @@ -141,7 +141,7 @@ where T::Tokens::transfer( investment_id.clone().into(), &investor, - &Domain::convert(domain_address.domain()), + &domain_address.domain().into_account(), status.amount_tranche_tokens_payout, Preservation::Expendable, )?; diff --git a/pallets/liquidity-pools/src/inbound.rs b/pallets/liquidity-pools/src/inbound.rs index 3386fddff4..185d04cbd4 100644 --- a/pallets/liquidity-pools/src/inbound.rs +++ b/pallets/liquidity-pools/src/inbound.rs @@ -81,7 +81,7 @@ where T::Tokens::transfer( invest_id.into(), - &Domain::convert(sending_domain), + &sending_domain.into_account(), &local_representation_of_receiver, amount, Preservation::Expendable, @@ -206,7 +206,7 @@ where // origination domain T::Tokens::transfer( invest_id.clone().into(), - &Domain::convert(sending_domain.domain()), + &sending_domain.domain().into_account(), &investor, amount, Preservation::Expendable, @@ -252,7 +252,7 @@ where T::Tokens::transfer( invest_id.clone().into(), &investor, - &Domain::convert(destination.domain()), + &destination.domain().into_account(), tranche_tokens_payout, Preservation::Expendable, )?; diff --git a/pallets/liquidity-pools/src/lib.rs b/pallets/liquidity-pools/src/lib.rs index 2d1a0dea54..76d8c827b6 100644 --- a/pallets/liquidity-pools/src/lib.rs +++ b/pallets/liquidity-pools/src/lib.rs @@ -41,7 +41,10 @@ #![cfg_attr(not(feature = "std"), no_std)] use core::convert::TryFrom; -use cfg_traits::liquidity_pools::{InboundQueue, OutboundQueue}; +use cfg_traits::{ + liquidity_pools::{InboundQueue, OutboundQueue}, + PreConditions, +}; use cfg_types::{ domain_address::{Domain, DomainAddress}, tokens::GeneralCurrencyIndex, @@ -56,8 +59,6 @@ use frame_support::{ }; use orml_traits::asset_registry::{self, Inspect as _}; pub use pallet::*; -use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; -use scale_info::TypeInfo; use sp_runtime::{ traits::{AtLeast32BitUnsigned, Convert}, FixedPointNumber, SaturatedConversion, @@ -73,25 +74,16 @@ use staging_xcm::{ pub mod defensive_weights; mod message; -pub use message::*; - -mod routers; -pub use routers::*; - -mod contract; -pub use contract::*; +pub use message::Message; pub mod hooks; mod inbound; -/// The Parachains that Centrifuge Liquidity Pools support. -#[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo, MaxEncodedLen)] -#[cfg_attr(feature = "std", derive(Debug))] -pub enum ParachainId { - /// Moonbeam - It may be Moonbeam on Polkadot, Moonriver on Kusama, or - /// Moonbase on a testnet. - Moonbeam, -} +#[cfg(test)] +mod mock; + +#[cfg(test)] +mod tests; // Type aliases pub type MessageOf = Message< @@ -102,8 +94,6 @@ pub type MessageOf = Message< ::BalanceRatio, >; -pub type CurrencyIdOf = ::CurrencyId; - pub type GeneralCurrencyIndexType = u128; pub type GeneralCurrencyIndexOf = @@ -113,8 +103,7 @@ pub type GeneralCurrencyIndexOf = pub mod pallet { use cfg_traits::{ investments::{ForeignInvestment, TrancheCurrency}, - CurrencyInspect, Permissions, PoolInspect, PreConditions, Seconds, TimeAsSecs, - TrancheTokenPrice, + CurrencyInspect, Permissions, PoolInspect, Seconds, TimeAsSecs, TrancheTokenPrice, }; use cfg_types::{ permissions::{PermissionScope, PoolRole, Role}, @@ -172,23 +161,19 @@ pub mod pallet { + FixedPointNumber + TypeInfo; - /// The origin allowed to make admin-like changes, such calling - /// `set_domain_router`. - type AdminOrigin: EnsureOrigin; - /// The source of truth for pool inspection operations such as its /// existence, the corresponding tranche token or the investment /// currency. type PoolInspect: PoolInspect< Self::AccountId, - CurrencyIdOf, + Self::CurrencyId, PoolId = Self::PoolId, TrancheId = Self::TrancheId, >; type TrancheTokenPrice: TrancheTokenPrice< Self::AccountId, - CurrencyIdOf, + Self::CurrencyId, BalanceRatio = Self::BalanceRatio, PoolId = Self::PoolId, TrancheId = Self::TrancheId, @@ -198,7 +183,7 @@ pub mod pallet { /// The source of truth for investment permissions. type Permission: Permissions< Self::AccountId, - Scope = PermissionScope>, + Scope = PermissionScope, Role = Role, Error = DispatchError, >; @@ -210,15 +195,11 @@ pub mod pallet { /// The type for handling transfers, burning and minting of /// multi-assets. type Tokens: Mutate - + Inspect< - Self::AccountId, - AssetId = CurrencyIdOf, - Balance = ::Balance, - >; + + Inspect; /// The currency type of investments. type TrancheCurrency: TrancheCurrency - + Into> + + Into + Clone; /// Enables investing and redeeming into investment classes with foreign @@ -227,7 +208,7 @@ pub mod pallet { Self::AccountId, Amount = Self::Balance, TrancheAmount = Self::Balance, - CurrencyId = CurrencyIdOf, + CurrencyId = Self::CurrencyId, Error = DispatchError, InvestmentId = ::TrancheCurrency, >; @@ -235,7 +216,7 @@ pub mod pallet { /// The source of truth for the transferability of assets via the /// LiquidityPools feature. type AssetRegistry: asset_registry::Inspect< - AssetId = CurrencyIdOf, + AssetId = Self::CurrencyId, Balance = ::Balance, CustomMetadata = CustomMetadata, >; @@ -251,15 +232,11 @@ pub mod pallet { + TryInto, Error = DispatchError> + TryFrom, Error = DispatchError> // Enables checking whether currency is tranche token - + CurrencyInspect>; + + CurrencyInspect; /// The converter from a DomainAddress to a Substrate AccountId. type DomainAddressToAccountId: Convert; - /// The converter from a Domain and 32 byte array to Substrate - /// AccountId. - type DomainAccountToAccountId: Convert<(Domain, [u8; 32]), Self::AccountId>; - /// The converter from a Domain and a 32 byte array to DomainAddress. type DomainAccountToDomainAddress: Convert<(Domain, [u8; 32]), DomainAddress>; @@ -274,13 +251,13 @@ pub mod pallet { #[pallet::constant] type GeneralCurrencyPrefix: Get<[u8; 12]>; - #[pallet::constant] /// The type for paying the transaction fees for the dispatch of /// `Executed*` and `ScheduleUpgrade` messages. /// /// NOTE: We need to make sure to collect the appropriate amount /// beforehand as part of receiving the corresponding investment /// message. + #[pallet::constant] type TreasuryAccount: Get; type PreTransferFilter: PreConditions< @@ -355,7 +332,7 @@ pub mod pallet { ::AccountId: From<[u8; 32]> + Into<[u8; 32]>, { /// Add a pool to a given domain - #[pallet::weight(< T as Config >::WeightInfo::add_pool())] + #[pallet::weight(T::WeightInfo::add_pool())] #[pallet::call_index(2)] pub fn add_pool( origin: OriginFor, @@ -383,7 +360,7 @@ pub mod pallet { } /// Add a tranche to a given domain - #[pallet::weight(< T as Config >::WeightInfo::add_tranche())] + #[pallet::weight(T::WeightInfo::add_tranche())] #[pallet::call_index(3)] pub fn add_tranche( origin: OriginFor, @@ -393,11 +370,6 @@ pub mod pallet { ) -> DispatchResult { let who = ensure_signed(origin.clone())?; - ensure!( - T::PoolInspect::tranche_exists(pool_id, tranche_id), - Error::::TrancheNotFound - ); - ensure!( T::Permission::has( PermissionScope::Pool(pool_id), @@ -440,13 +412,13 @@ pub mod pallet { /// domain, this call origin can be permissionless. /// /// The `currency_id` parameter is necessary for the EVM side. - #[pallet::weight(< T as Config >::WeightInfo::update_token_price())] + #[pallet::weight(T::WeightInfo::update_token_price())] #[pallet::call_index(4)] pub fn update_token_price( origin: OriginFor, pool_id: T::PoolId, tranche_id: T::TrancheId, - currency_id: CurrencyIdOf, + currency_id: T::CurrencyId, destination: Domain, ) -> DispatchResult { let who = ensure_signed(origin.clone())?; @@ -484,7 +456,7 @@ pub mod pallet { } /// Update a member - #[pallet::weight(< T as Config >::WeightInfo::update_member())] + #[pallet::weight(T::WeightInfo::update_member())] #[pallet::call_index(5)] pub fn update_member( origin: OriginFor, @@ -539,14 +511,14 @@ pub mod pallet { /// /// NOTE: The transferring account is not kept alive as we allow its /// death. - #[pallet::weight(< T as Config >::WeightInfo::transfer())] + #[pallet::weight(T::WeightInfo::transfer())] #[pallet::call_index(6)] pub fn transfer_tranche_tokens( origin: OriginFor, pool_id: T::PoolId, tranche_id: T::TrancheId, domain_address: DomainAddress, - amount: ::Balance, + amount: T::Balance, ) -> DispatchResult { let who = ensure_signed(origin.clone())?; @@ -573,7 +545,7 @@ pub mod pallet { T::Tokens::transfer( invest_id.into(), &who, - &Domain::convert(domain_address.domain()), + &domain_address.domain().into_account(), amount, // NOTE: Here, we allow death Preservation::Expendable, @@ -587,10 +559,7 @@ pub mod pallet { tranche_id, amount, domain: domain_address.domain(), - sender: who - .encode() - .try_into() - .map_err(|_| DispatchError::Other("Conversion to 32 bytes failed"))?, + sender: who.into(), receiver: domain_address.address(), }, )?; @@ -604,19 +573,19 @@ pub mod pallet { /// /// NOTE: The transferring account is not kept alive as we allow its /// death. - #[pallet::weight(< T as Config >::WeightInfo::transfer())] + #[pallet::weight(T::WeightInfo::transfer())] #[pallet::call_index(7)] pub fn transfer( origin: OriginFor, - currency_id: CurrencyIdOf, + currency_id: T::CurrencyId, receiver: DomainAddress, - amount: ::Balance, + amount: T::Balance, ) -> DispatchResult { let who = ensure_signed(origin.clone())?; ensure!(!amount.is_zero(), Error::::InvalidTransferAmount); ensure!( - !CurrencyIdOf::::is_tranche_token(currency_id), + !T::CurrencyId::is_tranche_token(currency_id), Error::::InvalidTransferCurrency ); let currency = Self::try_get_general_index(currency_id)?; @@ -665,10 +634,7 @@ pub mod pallet { Message::Transfer { amount, currency, - sender: who - .encode() - .try_into() - .map_err(|_| DispatchError::Other("Conversion to 32 bytes failed"))?, + sender: who.into(), receiver: receiver.address(), }, )?; @@ -680,7 +646,7 @@ pub mod pallet { /// from the given currency. #[pallet::weight(10_000 + T::DbWeight::get().writes(1).ref_time())] #[pallet::call_index(8)] - pub fn add_currency(origin: OriginFor, currency_id: CurrencyIdOf) -> DispatchResult { + pub fn add_currency(origin: OriginFor, currency_id: T::CurrencyId) -> DispatchResult { let who = ensure_signed(origin)?; let currency = Self::try_get_general_index(currency_id)?; @@ -709,7 +675,7 @@ pub mod pallet { pub fn allow_investment_currency( origin: OriginFor, pool_id: T::PoolId, - currency_id: CurrencyIdOf, + currency_id: T::CurrencyId, ) -> DispatchResult { // TODO(future): In the future, should be permissioned by trait which // does not exist yet. @@ -754,7 +720,7 @@ pub mod pallet { } /// Schedule an upgrade of an EVM-based liquidity pool contract instance - #[pallet::weight(::WeightInfo::cancel_upgrade())] + #[pallet::weight(T::WeightInfo::cancel_upgrade())] #[pallet::call_index(11)] pub fn cancel_upgrade( origin: OriginFor, @@ -775,7 +741,7 @@ pub mod pallet { /// NOTE: Pulls the metadata from the `AssetRegistry` and thus requires /// the pool admin to have updated the tranche tokens metadata there /// beforehand. - #[pallet::weight(::WeightInfo::update_tranche_token_metadata())] + #[pallet::weight(T::WeightInfo::update_tranche_token_metadata())] #[pallet::call_index(12)] pub fn update_tranche_token_metadata( origin: OriginFor, @@ -815,7 +781,7 @@ pub mod pallet { pub fn disallow_investment_currency( origin: OriginFor, pool_id: T::PoolId, - currency_id: CurrencyIdOf, + currency_id: T::CurrencyId, ) -> DispatchResult { let who = ensure_signed(origin)?; @@ -848,13 +814,13 @@ pub mod pallet { /// Requires the currency to be registered in the `AssetRegistry`. /// /// NOTE: Reverse operation of `try_get_currency_id`. - pub fn try_get_general_index(currency: CurrencyIdOf) -> Result { + pub fn try_get_general_index(currency: T::CurrencyId) -> Result { ensure!( T::AssetRegistry::metadata(¤cy).is_some(), Error::::AssetNotFound ); - let general_index: GeneralCurrencyIndexOf = CurrencyIdOf::::try_into(currency)?; + let general_index: GeneralCurrencyIndexOf = T::CurrencyId::try_into(currency)?; Ok(general_index.index) } @@ -866,8 +832,8 @@ pub mod pallet { /// NOTE: Reverse operation of `try_get_general_index`. pub fn try_get_currency_id( index: GeneralCurrencyIndexOf, - ) -> Result, DispatchError> { - let currency = CurrencyIdOf::::try_from(index)?; + ) -> Result { + let currency = T::CurrencyId::try_from(index)?; ensure!( T::AssetRegistry::metadata(¤cy).is_some(), Error::::AssetNotFound @@ -882,7 +848,7 @@ pub mod pallet { /// /// Requires the currency to be registered in the `AssetRegistry`. pub fn try_get_wrapped_token( - currency_id: &CurrencyIdOf, + currency_id: &T::CurrencyId, ) -> Result { let meta = T::AssetRegistry::metadata(currency_id).ok_or(Error::::AssetNotFound)?; ensure!( @@ -937,7 +903,7 @@ pub mod pallet { /// Performs multiple checks for the provided currency and returns its /// general index and the EVM chain ID associated with it. pub fn validate_investment_currency( - currency_id: CurrencyIdOf, + currency_id: T::CurrencyId, ) -> Result<(u128, EVMChainId), DispatchError> { // Ensure the currency is enabled as pool_currency let metadata = @@ -954,6 +920,11 @@ pub mod pallet { Ok((currency, chain_id)) } + + fn domain_account_to_account_id(domain_account: (Domain, [u8; 32])) -> T::AccountId { + let domain_address = T::DomainAccountToDomainAddress::convert(domain_account); + T::DomainAddressToAccountId::convert(domain_address) + } } impl InboundQueue for Pallet @@ -1000,7 +971,7 @@ pub mod pallet { } => Self::handle_increase_invest_order( pool_id, tranche_id, - T::DomainAccountToAccountId::convert((sender.domain(), investor)), + Self::domain_account_to_account_id((sender.domain(), investor)), currency.into(), amount, ), @@ -1013,7 +984,7 @@ pub mod pallet { } => Self::handle_decrease_invest_order( pool_id, tranche_id, - T::DomainAccountToAccountId::convert((sender.domain(), investor)), + Self::domain_account_to_account_id((sender.domain(), investor)), currency.into(), amount, ), @@ -1026,7 +997,7 @@ pub mod pallet { } => Self::handle_increase_redeem_order( pool_id, tranche_id, - T::DomainAccountToAccountId::convert((sender.domain(), investor)), + Self::domain_account_to_account_id((sender.domain(), investor)), amount, currency.into(), sender, @@ -1040,7 +1011,7 @@ pub mod pallet { } => Self::handle_decrease_redeem_order( pool_id, tranche_id, - T::DomainAccountToAccountId::convert((sender.domain(), investor)), + Self::domain_account_to_account_id((sender.domain(), investor)), amount, currency.into(), sender, @@ -1053,7 +1024,7 @@ pub mod pallet { } => Self::handle_collect_investment( pool_id, tranche_id, - T::DomainAccountToAccountId::convert((sender.domain(), investor)), + Self::domain_account_to_account_id((sender.domain(), investor)), currency.into(), ), Message::CollectRedeem { @@ -1064,7 +1035,7 @@ pub mod pallet { } => Self::handle_collect_redemption( pool_id, tranche_id, - T::DomainAccountToAccountId::convert((sender.domain(), investor)), + Self::domain_account_to_account_id((sender.domain(), investor)), currency.into(), ), Message::CancelInvestOrder { @@ -1075,7 +1046,7 @@ pub mod pallet { } => Self::handle_cancel_invest_order( pool_id, tranche_id, - T::DomainAccountToAccountId::convert((sender.domain(), investor)), + Self::domain_account_to_account_id((sender.domain(), investor)), currency.into(), ), Message::CancelRedeemOrder { @@ -1086,7 +1057,7 @@ pub mod pallet { } => Self::handle_cancel_redeem_order( pool_id, tranche_id, - T::DomainAccountToAccountId::convert((sender.domain(), investor)), + Self::domain_account_to_account_id((sender.domain(), investor)), currency.into(), sender, ), @@ -1097,25 +1068,3 @@ pub mod pallet { } } } - -#[cfg(test)] -mod tests { - use parity_scale_codec::{Decode, Encode}; - - use crate::Domain; - - #[test] - fn test_domain_encode_decode() { - test_domain_identity(Domain::Centrifuge); - test_domain_identity(Domain::EVM(1284)); - test_domain_identity(Domain::EVM(1)); - } - - /// Test that decode . encode results in the original value - fn test_domain_identity(domain: Domain) { - let encoded = domain.encode(); - let decoded: Domain = Domain::decode(&mut encoded.as_slice()).expect(""); - - assert_eq!(domain, decoded); - } -} diff --git a/pallets/liquidity-pools/src/mock.rs b/pallets/liquidity-pools/src/mock.rs new file mode 100644 index 0000000000..aaff960192 --- /dev/null +++ b/pallets/liquidity-pools/src/mock.rs @@ -0,0 +1,141 @@ +use cfg_primitives::{PoolId, TrancheId}; +use cfg_traits::Millis; +use cfg_types::{ + domain_address::{Domain, DomainAddress}, + permissions::PermissionScope, + tokens::{AssetStringLimit, CurrencyId, CustomMetadata, TrancheCurrency}, +}; +use frame_support::derive_impl; +use orml_traits::parameter_type_with_key; +use sp_runtime::{traits::IdentityLookup, AccountId32, DispatchResult, FixedU64}; + +use crate::pallet as pallet_liquidity_pools; + +pub type Balance = u128; +pub type AccountId = AccountId32; +pub type Ratio = FixedU64; + +frame_support::construct_runtime!( + pub enum Runtime { + System: frame_system, + Time: cfg_mocks::time::pallet, + Permissions: cfg_mocks::permissions::pallet, + Pools: cfg_mocks::pools::pallet, + AssetRegistry: cfg_mocks::asset_registry::pallet, + ForeignInvestment: cfg_mocks::foreign_investment::pallet, + Gateway: cfg_mocks::outbound_queue::pallet, + DomainAddressToAccountId: cfg_mocks::converter::pallet::, + DomainAccountToDomainAddress: cfg_mocks::converter::pallet::, + TransferFilter: cfg_mocks::pre_conditions::pallet, + Tokens: orml_tokens, + LiquidityPools: pallet_liquidity_pools, + } +); + +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] +impl frame_system::Config for Runtime { + type AccountId = AccountId; + type Block = frame_system::mocking::MockBlock; + type Lookup = IdentityLookup; +} + +impl cfg_mocks::time::pallet::Config for Runtime { + type Moment = Millis; +} + +impl cfg_mocks::permissions::pallet::Config for Runtime { + type Scope = PermissionScope; +} + +impl cfg_mocks::pools::pallet::Config for Runtime { + type Balance = Balance; + type BalanceRatio = Ratio; + type CurrencyId = CurrencyId; + type PoolId = PoolId; + type TrancheCurrency = TrancheCurrency; + type TrancheId = TrancheId; +} + +impl cfg_mocks::asset_registry::pallet::Config for Runtime { + type AssetId = CurrencyId; + type Balance = Balance; + type CustomMetadata = CustomMetadata; + type StringLimit = AssetStringLimit; +} + +impl cfg_mocks::foreign_investment::pallet::Config for Runtime { + type Amount = Balance; + type CurrencyId = CurrencyId; + type InvestmentId = TrancheCurrency; + type TrancheAmount = Balance; +} + +impl cfg_mocks::outbound_queue::pallet::Config for Runtime { + type Destination = Domain; + type Message = crate::MessageOf; + type Sender = AccountId; +} + +impl cfg_mocks::converter::pallet::Config for Runtime { + type From = DomainAddress; + type To = AccountId; +} + +impl cfg_mocks::converter::pallet::Config for Runtime { + type From = (Domain, [u8; 32]); + type To = DomainAddress; +} + +impl cfg_mocks::pre_conditions::pallet::Config for Runtime { + type Conditions = (AccountId, DomainAddress, CurrencyId); + type Result = DispatchResult; +} + +parameter_type_with_key! { + pub ExistentialDeposits: |_currency_id: CurrencyId| -> Balance { + Default::default() + }; +} + +impl orml_tokens::Config for Runtime { + type Amount = i64; + type Balance = Balance; + type CurrencyHooks = (); + type CurrencyId = CurrencyId; + type DustRemovalWhitelist = frame_support::traits::Nothing; + type ExistentialDeposits = ExistentialDeposits; + type MaxLocks = (); + type MaxReserves = (); + type ReserveIdentifier = [u8; 8]; + type RuntimeEvent = RuntimeEvent; + type WeightInfo = (); +} + +frame_support::parameter_types! { + pub CurrencyPrefix: [u8; 12] = [1; 12]; + pub TreasuryAccount: AccountId = [2; 32].into(); +} + +impl pallet_liquidity_pools::Config for Runtime { + type AssetRegistry = AssetRegistry; + type Balance = Balance; + type BalanceRatio = Ratio; + type CurrencyId = CurrencyId; + type DomainAccountToDomainAddress = DomainAccountToDomainAddress; + type DomainAddressToAccountId = DomainAddressToAccountId; + type ForeignInvestment = ForeignInvestment; + type GeneralCurrencyPrefix = CurrencyPrefix; + type OutboundQueue = Gateway; + type Permission = Permissions; + type PoolId = PoolId; + type PoolInspect = Pools; + type PreTransferFilter = TransferFilter; + type RuntimeEvent = RuntimeEvent; + type Time = Time; + type Tokens = Tokens; + type TrancheCurrency = TrancheCurrency; + type TrancheId = TrancheId; + type TrancheTokenPrice = Pools; + type TreasuryAccount = TreasuryAccount; + type WeightInfo = (); +} diff --git a/pallets/liquidity-pools/src/routers.rs b/pallets/liquidity-pools/src/routers.rs deleted file mode 100644 index 15d16e4dec..0000000000 --- a/pallets/liquidity-pools/src/routers.rs +++ /dev/null @@ -1,35 +0,0 @@ -use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; -use scale_info::TypeInfo; -use sp_core::H160; -use sp_runtime::{traits::ConstU32, BoundedVec}; -use sp_std::boxed::Box; -use staging_xcm::VersionedLocation; - -#[allow(clippy::derive_partial_eq_without_eq)] // XcmDomain does not impl Eq -#[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen)] -#[cfg_attr(feature = "std", derive(Debug))] -pub enum Router { - // An XCM-based router - Xcm(XcmDomain), -} - -/// XcmDomain gathers all the required fields to build and send remote -/// calls to a specific XCM-based Domain. -#[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo, MaxEncodedLen)] -#[cfg_attr(feature = "std", derive(Debug))] -pub struct XcmDomain { - /// the xcm multilocation of the domain - pub location: Box, - /// The ethereum_xcm::Call::transact call index on a given domain. - /// It should contain the pallet index + the `transact` call index, to which - /// we will append the eth_tx param. You can obtain this value by building - /// an ethereum_xcm::transact call with Polkadot JS on the target chain. - pub ethereum_xcm_transact_call_index: - BoundedVec>, - /// The LiquidityPoolsXcmRouter contract address on a given domain - pub contract_address: H160, - /// The currency in which execution fees will be paid on - pub fee_currency: CurrencyId, - /// The max gas_limit we want to propose for a remote evm execution - pub max_gas_limit: u64, -} diff --git a/pallets/liquidity-pools/src/tests.rs b/pallets/liquidity-pools/src/tests.rs new file mode 100644 index 0000000000..439fe35362 --- /dev/null +++ b/pallets/liquidity-pools/src/tests.rs @@ -0,0 +1,632 @@ +use cfg_primitives::{PoolId, TrancheId}; +use cfg_traits::{liquidity_pools::InboundQueue, Millis}; +use cfg_types::{ + domain_address::DomainAddress, + permissions::{PermissionScope, PoolRole, Role}, + tokens::{AssetMetadata, CrossChainTransferability, CurrencyId, CustomMetadata}, +}; +use cfg_utils::vec_to_fixed_array; +use frame_support::{ + assert_noop, assert_ok, + traits::{ + fungibles::{Inspect as _, Mutate as _}, + PalletInfo as _, + }, +}; +use sp_runtime::{DispatchError, TokenError}; +use staging_xcm::{ + v4::{Junction::*, Location, NetworkId}, + VersionedLocation, +}; + +use crate::{mock::*, Error, GeneralCurrencyIndexOf, Message}; + +const CHAIN_ID: u64 = 1; +const ALICE: AccountId = AccountId::new([0; 32]); +const CONTRACT_ACCOUNT: [u8; 20] = [1; 20]; +const CONTRACT_ACCOUNT_ID: AccountId = AccountId::new([1; 32]); +const EVM_ADDRESS: DomainAddress = DomainAddress::EVM(CHAIN_ID, CONTRACT_ACCOUNT); +const AMOUNT: Balance = 100; +const CURRENCY_ID: CurrencyId = CurrencyId::ForeignAsset(1); +const POOL_ID: PoolId = 1; +const TRANCHE_ID: TrancheId = [1; 16]; +const NOW: Millis = 0; +const NAME: &[u8] = b"Token name"; +const SYMBOL: &[u8] = b"Token symbol"; +const DECIMALS: u8 = 6; +const TRANCHE_CURRENCY: CurrencyId = CurrencyId::Tranche(POOL_ID, TRANCHE_ID); + +mod util { + use super::*; + + pub fn default_metadata() -> AssetMetadata { + AssetMetadata { + decimals: DECIMALS as u32, + name: Vec::from(NAME).try_into().unwrap(), + symbol: Vec::from(SYMBOL).try_into().unwrap(), + ..cfg_types::tokens::default_metadata() + } + } + + pub fn transferable_metadata() -> AssetMetadata { + AssetMetadata { + additional: CustomMetadata { + transferability: CrossChainTransferability::LiquidityPools, + ..Default::default() + }, + ..default_metadata() + } + } + + pub fn wrapped_transferable_metadata() -> AssetMetadata { + let pallet_index = PalletInfo::index::(); + AssetMetadata { + location: Some(VersionedLocation::V4(Location::new( + 0, + [ + PalletInstance(pallet_index.unwrap() as u8), + GlobalConsensus(NetworkId::Ethereum { chain_id: CHAIN_ID }), + AccountKey20 { + network: None, + key: CONTRACT_ACCOUNT, + }, + ], + ))), + ..transferable_metadata() + } + } + + pub fn currency_index(currency_id: CurrencyId) -> u128 { + GeneralCurrencyIndexOf::::try_from(currency_id) + .unwrap() + .index + } +} + +mod transfer { + use super::*; + + #[test] + fn success() { + System::externalities().execute_with(|| { + AssetRegistry::mock_metadata(|_| Some(util::wrapped_transferable_metadata())); + TransferFilter::mock_check(|_| Ok(())); + Tokens::mint_into(CURRENCY_ID, &ALICE, AMOUNT).unwrap(); + Gateway::mock_submit(|sender, destination, msg| { + assert_eq!(sender, ALICE); + assert_eq!(destination, EVM_ADDRESS.domain()); + assert_eq!( + msg, + Message::Transfer { + currency: util::currency_index(CURRENCY_ID), + sender: ALICE.into(), + receiver: EVM_ADDRESS.address(), + amount: AMOUNT + } + ); + Ok(()) + }); + + assert_ok!(LiquidityPools::transfer( + RuntimeOrigin::signed(ALICE), + CurrencyId::ForeignAsset(1), + EVM_ADDRESS, + AMOUNT + )); + + assert_eq!(Tokens::total_issuance(CURRENCY_ID), 0); + }) + } + + mod erroring_out_when { + use super::*; + + #[test] + fn with_zero_balance() { + System::externalities().execute_with(|| { + assert_noop!( + LiquidityPools::transfer( + RuntimeOrigin::signed(ALICE), + CURRENCY_ID, + EVM_ADDRESS, + 0 + ), + Error::::InvalidTransferAmount, + ); + }) + } + + #[test] + fn with_tranche_currency() { + System::externalities().execute_with(|| { + assert_noop!( + LiquidityPools::transfer( + RuntimeOrigin::signed(ALICE), + CurrencyId::Tranche(42, [0; 16]), + EVM_ADDRESS, + AMOUNT + ), + Error::::InvalidTransferCurrency, + ); + }) + } + + #[test] + fn with_no_metadata() { + System::externalities().execute_with(|| { + AssetRegistry::mock_metadata(|_| None); + + assert_noop!( + LiquidityPools::transfer( + RuntimeOrigin::signed(ALICE), + CURRENCY_ID, + EVM_ADDRESS, + AMOUNT + ), + Error::::AssetNotFound, + ); + }) + } + + #[test] + fn with_unsupported_token() { + System::externalities().execute_with(|| { + AssetRegistry::mock_metadata(|_| Some(util::default_metadata())); + + assert_noop!( + LiquidityPools::transfer( + RuntimeOrigin::signed(ALICE), + CurrencyId::Native, + EVM_ADDRESS, + AMOUNT + ), + TokenError::Unsupported, + ); + }) + } + + #[test] + fn with_no_transferible_asset() { + System::externalities().execute_with(|| { + AssetRegistry::mock_metadata(|_| Some(util::default_metadata())); + + assert_noop!( + LiquidityPools::transfer( + RuntimeOrigin::signed(ALICE), + CURRENCY_ID, + EVM_ADDRESS, + AMOUNT + ), + Error::::AssetNotLiquidityPoolsTransferable, + ); + }) + } + + #[test] + fn with_wrong_location() { + System::externalities().execute_with(|| { + AssetRegistry::mock_metadata(|_| Some(util::transferable_metadata())); + + assert_noop!( + LiquidityPools::transfer( + RuntimeOrigin::signed(ALICE), + CURRENCY_ID, + EVM_ADDRESS, + AMOUNT + ), + Error::::AssetNotLiquidityPoolsWrappedToken + ); + }) + } + + #[test] + fn with_wrong_domain() { + System::externalities().execute_with(|| { + AssetRegistry::mock_metadata(|_| Some(util::wrapped_transferable_metadata())); + + assert_noop!( + LiquidityPools::transfer( + RuntimeOrigin::signed(ALICE), + CURRENCY_ID, + DomainAddress::Centrifuge([2; 32]), + AMOUNT + ), + Error::::InvalidDomain + ); + }) + } + + #[test] + fn without_satisfy_filter() { + System::externalities().execute_with(|| { + AssetRegistry::mock_metadata(|_| Some(util::wrapped_transferable_metadata())); + TransferFilter::mock_check(|_| Err(DispatchError::Other("Err"))); + + assert_noop!( + LiquidityPools::transfer( + RuntimeOrigin::signed(ALICE), + CURRENCY_ID, + EVM_ADDRESS, + AMOUNT + ), + DispatchError::Other("Err"), + ); + }) + } + + #[test] + fn without_sufficient_balance() { + System::externalities().execute_with(|| { + AssetRegistry::mock_metadata(|_| Some(util::wrapped_transferable_metadata())); + TransferFilter::mock_check(|_| Ok(())); + + assert_noop!( + LiquidityPools::transfer( + RuntimeOrigin::signed(ALICE), + CURRENCY_ID, + EVM_ADDRESS, + AMOUNT + ), + Error::::BalanceTooLow + ); + }) + } + } +} + +mod transfer_tranche_tokens { + use super::*; + + #[test] + fn success() { + System::externalities().execute_with(|| { + DomainAddressToAccountId::mock_convert(|_| CONTRACT_ACCOUNT_ID); + Time::mock_now(|| NOW); + Permissions::mock_has(move |scope, who, role| { + assert_eq!(who, CONTRACT_ACCOUNT_ID); + assert!(matches!(scope, PermissionScope::Pool(POOL_ID))); + assert!(matches!( + role, + Role::PoolRole(PoolRole::TrancheInvestor(TRANCHE_ID, NOW)) + )); + true + }); + Pools::mock_pool_exists(|_| true); + Pools::mock_tranche_exists(|_, _| true); + TransferFilter::mock_check(|_| Ok(())); + Tokens::mint_into(TRANCHE_CURRENCY, &ALICE, AMOUNT).unwrap(); + Gateway::mock_submit(|sender, destination, msg| { + assert_eq!(sender, ALICE); + assert_eq!(destination, EVM_ADDRESS.domain()); + assert_eq!( + msg, + Message::TransferTrancheTokens { + pool_id: POOL_ID, + tranche_id: TRANCHE_ID, + sender: ALICE.into(), + domain: EVM_ADDRESS.domain(), + receiver: EVM_ADDRESS.address(), + amount: AMOUNT + } + ); + Ok(()) + }); + + assert_ok!(LiquidityPools::transfer_tranche_tokens( + RuntimeOrigin::signed(ALICE), + POOL_ID, + TRANCHE_ID, + EVM_ADDRESS, + AMOUNT + )); + + let destination = EVM_ADDRESS.domain().into_account(); + assert_eq!(Tokens::balance(TRANCHE_CURRENCY, &ALICE), 0); + assert_eq!(Tokens::balance(TRANCHE_CURRENCY, &destination), AMOUNT); + }) + } + + mod erroring_out_when { + use super::*; + + #[test] + fn with_zero_balance() { + System::externalities().execute_with(|| { + assert_noop!( + LiquidityPools::transfer_tranche_tokens( + RuntimeOrigin::signed(ALICE), + POOL_ID, + TRANCHE_ID, + EVM_ADDRESS, + 0 + ), + Error::::InvalidTransferAmount, + ); + }) + } + + #[test] + fn with_wrong_permissions() { + System::externalities().execute_with(|| { + DomainAddressToAccountId::mock_convert(|_| CONTRACT_ACCOUNT_ID); + Time::mock_now(|| NOW); + Permissions::mock_has(|_, _, _| false); + + assert_noop!( + LiquidityPools::transfer_tranche_tokens( + RuntimeOrigin::signed(ALICE), + POOL_ID, + TRANCHE_ID, + EVM_ADDRESS, + AMOUNT + ), + Error::::UnauthorizedTransfer, + ); + }) + } + + #[test] + fn with_wrong_pool() { + System::externalities().execute_with(|| { + DomainAddressToAccountId::mock_convert(|_| CONTRACT_ACCOUNT_ID); + Time::mock_now(|| NOW); + Permissions::mock_has(move |_, _, _| true); + Pools::mock_pool_exists(|_| false); + + assert_noop!( + LiquidityPools::transfer_tranche_tokens( + RuntimeOrigin::signed(ALICE), + POOL_ID, + TRANCHE_ID, + EVM_ADDRESS, + AMOUNT + ), + Error::::PoolNotFound, + ); + }) + } + + #[test] + fn with_wrong_tranche() { + System::externalities().execute_with(|| { + DomainAddressToAccountId::mock_convert(|_| CONTRACT_ACCOUNT_ID); + Time::mock_now(|| NOW); + Permissions::mock_has(move |_, _, _| true); + Pools::mock_pool_exists(|_| true); + Pools::mock_tranche_exists(|_, _| false); + + assert_noop!( + LiquidityPools::transfer_tranche_tokens( + RuntimeOrigin::signed(ALICE), + POOL_ID, + TRANCHE_ID, + EVM_ADDRESS, + AMOUNT + ), + Error::::TrancheNotFound, + ); + }) + } + + #[test] + fn without_satisfy_filter() { + System::externalities().execute_with(|| { + DomainAddressToAccountId::mock_convert(|_| CONTRACT_ACCOUNT_ID); + Time::mock_now(|| NOW); + Permissions::mock_has(move |_, _, _| true); + Pools::mock_pool_exists(|_| true); + Pools::mock_tranche_exists(|_, _| true); + TransferFilter::mock_check(|_| Err(DispatchError::Other("Err"))); + + assert_noop!( + LiquidityPools::transfer_tranche_tokens( + RuntimeOrigin::signed(ALICE), + POOL_ID, + TRANCHE_ID, + EVM_ADDRESS, + AMOUNT + ), + DispatchError::Other("Err"), + ); + }) + } + } +} + +mod add_pool { + use super::*; + + #[test] + fn success() { + System::externalities().execute_with(|| { + Permissions::mock_has(move |scope, who, role| { + assert_eq!(who, ALICE); + assert!(matches!(scope, PermissionScope::Pool(POOL_ID))); + assert!(matches!(role, Role::PoolRole(PoolRole::PoolAdmin))); + true + }); + Pools::mock_pool_exists(|_| true); + Gateway::mock_submit(|sender, destination, msg| { + assert_eq!(sender, ALICE); + assert_eq!(destination, EVM_ADDRESS.domain()); + assert_eq!(msg, Message::AddPool { pool_id: POOL_ID }); + Ok(()) + }); + + assert_ok!(LiquidityPools::add_pool( + RuntimeOrigin::signed(ALICE), + POOL_ID, + EVM_ADDRESS.domain(), + )); + }) + } + + mod erroring_out_when { + use super::*; + + #[test] + fn with_wrong_pool() { + System::externalities().execute_with(|| { + Pools::mock_pool_exists(|_| false); + + assert_noop!( + LiquidityPools::add_pool( + RuntimeOrigin::signed(ALICE), + POOL_ID, + EVM_ADDRESS.domain(), + ), + Error::::PoolNotFound + ); + }) + } + + #[test] + fn with_wrong_permissions() { + System::externalities().execute_with(|| { + Pools::mock_pool_exists(|_| true); + Permissions::mock_has(move |_, _, _| false); + + assert_noop!( + LiquidityPools::add_pool( + RuntimeOrigin::signed(ALICE), + POOL_ID, + EVM_ADDRESS.domain(), + ), + Error::::NotPoolAdmin + ); + }) + } + } +} + +mod add_tranche { + use super::*; + + #[test] + fn success() { + System::externalities().execute_with(|| { + Permissions::mock_has(move |scope, who, role| { + assert_eq!(who, ALICE); + assert!(matches!(scope, PermissionScope::Pool(POOL_ID))); + assert!(matches!(role, Role::PoolRole(PoolRole::PoolAdmin))); + true + }); + Pools::mock_pool_exists(|_| true); + Pools::mock_tranche_exists(|_, _| true); + AssetRegistry::mock_metadata(|_| Some(util::default_metadata())); + Gateway::mock_submit(|sender, destination, msg| { + assert_eq!(sender, ALICE); + assert_eq!(destination, EVM_ADDRESS.domain()); + assert_eq!( + msg, + Message::AddTranche { + pool_id: POOL_ID, + tranche_id: TRANCHE_ID, + token_name: vec_to_fixed_array(NAME), + token_symbol: vec_to_fixed_array(SYMBOL), + decimals: DECIMALS, + restriction_set: 1 + } + ); + Ok(()) + }); + + assert_ok!(LiquidityPools::add_tranche( + RuntimeOrigin::signed(ALICE), + POOL_ID, + TRANCHE_ID, + EVM_ADDRESS.domain(), + )); + }) + } + + mod erroring_out_when { + use super::*; + + #[test] + fn with_wrong_permissions() { + System::externalities().execute_with(|| { + Permissions::mock_has(move |_, _, _| false); + + assert_noop!( + LiquidityPools::add_tranche( + RuntimeOrigin::signed(ALICE), + POOL_ID, + TRANCHE_ID, + EVM_ADDRESS.domain(), + ), + Error::::NotPoolAdmin + ); + }) + } + + #[test] + fn with_wrong_pool() { + System::externalities().execute_with(|| { + Permissions::mock_has(move |_, _, _| true); + Pools::mock_pool_exists(|_| false); + + assert_noop!( + LiquidityPools::add_tranche( + RuntimeOrigin::signed(ALICE), + POOL_ID, + TRANCHE_ID, + EVM_ADDRESS.domain(), + ), + Error::::PoolNotFound + ); + }) + } + + #[test] + fn with_wrong_tranche() { + System::externalities().execute_with(|| { + Permissions::mock_has(move |_, _, _| true); + Pools::mock_pool_exists(|_| true); + Pools::mock_tranche_exists(|_, _| false); + + assert_noop!( + LiquidityPools::add_tranche( + RuntimeOrigin::signed(ALICE), + POOL_ID, + TRANCHE_ID, + EVM_ADDRESS.domain(), + ), + Error::::TrancheNotFound, + ); + }) + } + + #[test] + fn with_no_metadata() { + System::externalities().execute_with(|| { + Permissions::mock_has(move |_, _, _| true); + Pools::mock_pool_exists(|_| true); + Pools::mock_tranche_exists(|_, _| true); + AssetRegistry::mock_metadata(|_| None); + + assert_noop!( + LiquidityPools::add_tranche( + RuntimeOrigin::signed(ALICE), + POOL_ID, + TRANCHE_ID, + EVM_ADDRESS.domain(), + ), + Error::::TrancheMetadataNotFound, + ); + }) + } + } +} + +#[test] +fn receiving_output_message() { + System::externalities().execute_with(|| { + let msg = Message::AddPool { pool_id: 123 }; + + assert_noop!( + LiquidityPools::submit(EVM_ADDRESS, msg), + Error::::InvalidIncomingMessage, + ); + }) +} diff --git a/runtime/altair/src/lib.rs b/runtime/altair/src/lib.rs index 64983606ee..47e5215723 100644 --- a/runtime/altair/src/lib.rs +++ b/runtime/altair/src/lib.rs @@ -1779,12 +1779,10 @@ parameter_types! { } impl pallet_liquidity_pools::Config for Runtime { - type AdminOrigin = EnsureRoot; type AssetRegistry = OrmlAssetRegistry; type Balance = Balance; type BalanceRatio = Ratio; type CurrencyId = CurrencyId; - type DomainAccountToAccountId = AccountConverter; type DomainAccountToDomainAddress = AccountConverter; type DomainAddressToAccountId = AccountConverter; type ForeignInvestment = ForeignInvestments; diff --git a/runtime/centrifuge/src/lib.rs b/runtime/centrifuge/src/lib.rs index 0d9855ff58..e4e1da995d 100644 --- a/runtime/centrifuge/src/lib.rs +++ b/runtime/centrifuge/src/lib.rs @@ -1877,12 +1877,10 @@ parameter_types! { } impl pallet_liquidity_pools::Config for Runtime { - type AdminOrigin = EnsureRootOr; type AssetRegistry = OrmlAssetRegistry; type Balance = Balance; type BalanceRatio = Ratio; type CurrencyId = CurrencyId; - type DomainAccountToAccountId = AccountConverter; type DomainAccountToDomainAddress = AccountConverter; type DomainAddressToAccountId = AccountConverter; type ForeignInvestment = ForeignInvestments; diff --git a/runtime/common/src/account_conversion.rs b/runtime/common/src/account_conversion.rs index 9e896c9db5..ded709ec11 100644 --- a/runtime/common/src/account_conversion.rs +++ b/runtime/common/src/account_conversion.rs @@ -13,7 +13,7 @@ use cfg_primitives::AccountId; use cfg_types::domain_address::{Domain, DomainAddress}; use pallet_evm::AddressMapping; -use sp_core::{crypto::AccountId32, Get, H160}; +use sp_core::{Get, H160}; use sp_runtime::traits::Convert; use staging_xcm::v4::{Junction::AccountKey20, Location, NetworkId::Ethereum}; use staging_xcm_executor::traits::ConvertLocation; @@ -61,10 +61,15 @@ impl AccountConverter { } } - pub fn into_account_id(address: H160) -> AccountId { + pub fn evm_address_to_account(address: H160) -> AccountId { let chain_id = pallet_evm_chain_id::Pallet::::get(); Self::convert_evm_address(chain_id, address.0) } + + pub fn domain_account_to_account(domain: Domain, account_id: AccountId) -> AccountId { + let domain_address = Self::convert((domain, account_id.into())); + Self::convert(domain_address) + } } impl Convert for AccountConverter { @@ -89,20 +94,6 @@ impl Convert<(Domain, [u8; 32]), DomainAddress> for AccountConverter { } } -impl Convert<(Domain, [u8; 32]), AccountId32> for AccountConverter { - fn convert((domain, account): (Domain, [u8; 32])) -> AccountId32 { - match domain { - Domain::Centrifuge => AccountId32::new(account), - // EVM AccountId20 addresses are right-padded to 32 bytes - Domain::EVM(chain_id) => { - let mut bytes20 = [0; 20]; - bytes20.copy_from_slice(&account[..20]); - Self::convert_evm_address(chain_id, bytes20) - } - } - } -} - // A type that use AccountConverter to carry along with it the Runtime type and // offer an `AddressMapping` implementation. // Required by `pallet_evm` @@ -110,7 +101,7 @@ pub struct RuntimeAccountConverter(sp_std::marker::PhantomData); impl AddressMapping for RuntimeAccountConverter { fn into_account_id(address: H160) -> AccountId { - AccountConverter::into_account_id::(address) + AccountConverter::evm_address_to_account::(address) } } diff --git a/runtime/common/src/gateway.rs b/runtime/common/src/gateway.rs index 4129eec96c..5b75077ac7 100644 --- a/runtime/common/src/gateway.rs +++ b/runtime/common/src/gateway.rs @@ -25,5 +25,5 @@ pub fn get_gateway_account>::as_ref(&sender_account)[0..20]); - AccountConverter::into_account_id::(truncated_sender_account) + AccountConverter::evm_address_to_account::(truncated_sender_account) } diff --git a/runtime/common/src/xcm.rs b/runtime/common/src/xcm.rs index dbba874d87..aa82c339de 100644 --- a/runtime/common/src/xcm.rs +++ b/runtime/common/src/xcm.rs @@ -272,10 +272,7 @@ pub type LocationToAccountId = ( #[cfg(test)] mod test { - use cfg_mocks::{ - pallet_mock_liquidity_pools, pallet_mock_routers, pallet_mock_try_convert, MessageMock, - RouterMock, - }; + use cfg_mocks::{pallet_mock_liquidity_pools, pallet_mock_routers, MessageMock, RouterMock}; use cfg_primitives::OutboundMessageNonce; use frame_support::{assert_ok, derive_impl, traits::EnsureOrigin}; use frame_system::EnsureRoot; @@ -288,18 +285,14 @@ mod test { type AccountId = u64; - pub fn new_test_ext() -> sp_io::TestExternalities { - System::externalities() - } - // For testing the pallet, we construct a mock runtime. frame_support::construct_runtime!( pub enum Runtime { System: frame_system, Gateway: pallet_liquidity_pools_gateway, MockLP: pallet_mock_liquidity_pools, - MockParaAsEvmChain: pallet_mock_try_convert::, - MockOriginRecovery: pallet_mock_try_convert::, + MockParaAsEvmChain: cfg_mocks::converter::pallet::, + MockOriginRecovery: cfg_mocks::converter::pallet::, } ); @@ -308,14 +301,12 @@ mod test { type Block = frame_system::mocking::MockBlock; } - impl pallet_mock_try_convert::Config for Runtime { - type Error = (); + impl cfg_mocks::converter::pallet::Config for Runtime { type From = ParaId; type To = EVMChainId; } - impl pallet_mock_try_convert::Config for Runtime { - type Error = DispatchError; + impl cfg_mocks::converter::pallet::Config for Runtime { type From = (Vec, Vec); type To = DomainAddress; } @@ -348,7 +339,7 @@ mod test { #[test] fn lp_instance_relayer_converts_correctly() { - new_test_ext().execute_with(|| { + System::externalities().execute_with(|| { let expected_address = DomainAddress::EVM(RELAYER_EVM_ID, RELAYER_ADDRESS); assert_ok!(Gateway::add_relayer( @@ -387,7 +378,7 @@ mod test { #[test] fn lp_instance_relayer_fails_with_wrong_location() { - new_test_ext().execute_with(|| { + System::externalities().execute_with(|| { let expected_address = DomainAddress::EVM(RELAYER_EVM_ID, RELAYER_ADDRESS); assert_ok!(Gateway::add_relayer( @@ -415,7 +406,7 @@ mod test { #[test] fn lp_instance_relayer_fails_if_relayer_not_set() { - new_test_ext().execute_with(|| { + System::externalities().execute_with(|| { MockParaAsEvmChain::mock_try_convert(|from| { assert_eq!(from, RELAYER_PARA_ID); Ok(RELAYER_EVM_ID) @@ -445,7 +436,7 @@ mod test { #[test] fn lp_instance_relayer_fails_if_para_to_evm_fails() { - new_test_ext().execute_with(|| { + System::externalities().execute_with(|| { let expected_address = DomainAddress::EVM(RELAYER_EVM_ID, RELAYER_ADDRESS); assert_ok!(Gateway::add_relayer( @@ -455,7 +446,7 @@ mod test { MockParaAsEvmChain::mock_try_convert(|from| { assert_eq!(from, RELAYER_PARA_ID); - Err(()) + Err(DispatchError::Other("")) }); let location = Location::new( @@ -482,7 +473,7 @@ mod test { #[test] fn lp_instance_relayer_fails_if_wrong_para() { - new_test_ext().execute_with(|| { + System::externalities().execute_with(|| { let expected_address = DomainAddress::EVM(RELAYER_EVM_ID, RELAYER_ADDRESS); assert_ok!(Gateway::add_relayer( @@ -492,7 +483,7 @@ mod test { MockParaAsEvmChain::mock_try_convert(|from| { assert_eq!(from, 1); - Err(()) + Err(DispatchError::Other("")) }); let location = Location::new( @@ -519,7 +510,7 @@ mod test { #[test] fn lp_instance_relayer_fails_if_wrong_address() { - new_test_ext().execute_with(|| { + System::externalities().execute_with(|| { let expected_address = DomainAddress::EVM(RELAYER_EVM_ID, RELAYER_ADDRESS); assert_ok!(Gateway::add_relayer( diff --git a/runtime/development/src/lib.rs b/runtime/development/src/lib.rs index 00bddcbde6..0e46c15183 100644 --- a/runtime/development/src/lib.rs +++ b/runtime/development/src/lib.rs @@ -1882,12 +1882,10 @@ parameter_types! { } impl pallet_liquidity_pools::Config for Runtime { - type AdminOrigin = EnsureRoot; type AssetRegistry = OrmlAssetRegistry; type Balance = Balance; type BalanceRatio = Ratio; type CurrencyId = CurrencyId; - type DomainAccountToAccountId = AccountConverter; type DomainAccountToDomainAddress = AccountConverter; type DomainAddressToAccountId = AccountConverter; type ForeignInvestment = ForeignInvestments; diff --git a/runtime/integration-tests/src/generic/cases/assets.rs b/runtime/integration-tests/src/generic/cases/assets.rs index 56cf7e24bd..093cb4f842 100644 --- a/runtime/integration-tests/src/generic/cases/assets.rs +++ b/runtime/integration-tests/src/generic/cases/assets.rs @@ -1,11 +1,9 @@ -use cfg_types::tokens::CurrencyId; +use cfg_types::tokens::{default_metadata, CurrencyId}; use frame_support::{assert_noop, assert_ok, dispatch::RawOrigin}; use sp_runtime::{DispatchError, DispatchError::BadOrigin}; use crate::{ - generic::{ - config::Runtime, env::Env, envs::runtime_env::RuntimeEnv, utils::currency::default_metadata, - }, + generic::{config::Runtime, env::Env, envs::runtime_env::RuntimeEnv}, utils::orml_asset_registry, }; diff --git a/runtime/integration-tests/src/generic/cases/currency_conversions.rs b/runtime/integration-tests/src/generic/cases/currency_conversions.rs index a690165203..4cbed8080f 100644 --- a/runtime/integration-tests/src/generic/cases/currency_conversions.rs +++ b/runtime/integration-tests/src/generic/cases/currency_conversions.rs @@ -1,4 +1,4 @@ -use cfg_types::tokens::CurrencyId; +use cfg_types::tokens::{default_metadata, CurrencyId}; use orml_traits::asset_registry::AssetMetadata; use runtime_common::xcm::CurrencyIdConvert; use sp_runtime::traits::Convert; @@ -12,7 +12,7 @@ use crate::generic::{ env::Env, envs::runtime_env::RuntimeEnv, utils::{ - currency::{default_metadata, CurrencyInfo, CustomCurrency}, + currency::{CurrencyInfo, CustomCurrency}, genesis::{self, Genesis}, xcm::transferable_custom, }, diff --git a/runtime/integration-tests/src/generic/cases/liquidity_pools.rs b/runtime/integration-tests/src/generic/cases/liquidity_pools.rs index 19985385f8..b9da600a28 100644 --- a/runtime/integration-tests/src/generic/cases/liquidity_pools.rs +++ b/runtime/integration-tests/src/generic/cases/liquidity_pools.rs @@ -3,7 +3,7 @@ use cfg_primitives::{ }; use cfg_traits::{ investments::{Investment, OrderManager, TrancheCurrency}, - liquidity_pools::{Codec, InboundQueue, OutboundQueue}, + liquidity_pools::{InboundQueue, OutboundQueue}, IdentityCurrencyConversion, Permissions, PoolInspect, PoolMutate, Seconds, }; use cfg_types::{ @@ -30,7 +30,7 @@ use liquidity_pools_gateway_routers::{ use orml_traits::MultiCurrency; use pallet_investments::CollectOutcome; use pallet_liquidity_pools::Message; -use pallet_liquidity_pools_gateway::{Call as LiquidityPoolsGatewayCall, GatewayOrigin}; +use pallet_liquidity_pools_gateway::Call as LiquidityPoolsGatewayCall; use pallet_pool_system::tranches::{TrancheInput, TrancheLoc, TrancheType}; use polkadot_core_primitives::BlakeTwo256; use runtime_common::{ @@ -52,10 +52,7 @@ use crate::{ config::Runtime, env::{Blocks, Env}, envs::fudge_env::{handle::SIBLING_ID, FudgeEnv, FudgeSupport}, - utils::{ - democracy::execute_via_democracy, genesis, genesis::Genesis, - xcm::enable_para_to_sibling_communication, - }, + utils::{genesis, genesis::Genesis, xcm::enable_para_to_sibling_communication}, }, utils::{accounts::Keyring, orml_asset_registry}, }; @@ -522,7 +519,7 @@ mod utils { // are transferred from this account instead of minting assert_ok!(orml_tokens::Pallet::::mint_into( default_investment_id::().into(), - &Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()), + &DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain().into_account(), amount )); @@ -702,128 +699,6 @@ mod add_allow_upgrade { use super::*; - #[test_runtimes([development])] - fn add_pool() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .add(genesis::tokens::(vec![( - GLMR_CURRENCY_ID, - DEFAULT_BALANCE_GLMR, - )])) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let pool_id = POOL_ID; - - // Verify that the pool must exist before we can call - // pallet_liquidity_pools::Pallet::::add_pool - assert_noop!( - pallet_liquidity_pools::Pallet::::add_pool( - RawOrigin::Signed(Keyring::Alice.into()).into(), - pool_id, - Domain::EVM(MOONBEAM_EVM_CHAIN_ID), - ), - pallet_liquidity_pools::Error::::PoolNotFound - ); - - // Now create the pool - create_ausd_pool::(pool_id); - - // Verify ALICE can't call `add_pool` given she is not the `PoolAdmin` - assert_noop!( - pallet_liquidity_pools::Pallet::::add_pool( - RawOrigin::Signed(Keyring::Alice.into()).into(), - pool_id, - Domain::EVM(MOONBEAM_EVM_CHAIN_ID), - ), - pallet_liquidity_pools::Error::::NotPoolAdmin - ); - - // Verify that it works if it's BOB calling it (the pool admin) - assert_ok!(pallet_liquidity_pools::Pallet::::add_pool( - RawOrigin::Signed(POOL_ADMIN.into()).into(), - pool_id, - Domain::EVM(MOONBEAM_EVM_CHAIN_ID), - )); - }); - } - - #[test_runtimes([development])] - fn add_tranche() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .add(genesis::tokens::(vec![( - GLMR_CURRENCY_ID, - DEFAULT_BALANCE_GLMR, - )])) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - // Now create the pool - let pool_id = POOL_ID; - create_ausd_pool::(pool_id); - - // Verify we can't call pallet_liquidity_pools::Pallet::::add_tranche with a - // non-existing tranche_id - let nonexistent_tranche = [71u8; 16]; - - assert_noop!( - pallet_liquidity_pools::Pallet::::add_tranche( - RawOrigin::Signed(Keyring::Alice.into()).into(), - pool_id, - nonexistent_tranche, - Domain::EVM(MOONBEAM_EVM_CHAIN_ID), - ), - pallet_liquidity_pools::Error::::TrancheNotFound - ); - let tranche_id = default_tranche_id::(pool_id); - - // Verify ALICE can't call `add_tranche` given she is not the `PoolAdmin` - assert_noop!( - pallet_liquidity_pools::Pallet::::add_tranche( - RawOrigin::Signed(Keyring::Alice.into()).into(), - pool_id, - tranche_id, - Domain::EVM(MOONBEAM_EVM_CHAIN_ID), - ), - pallet_liquidity_pools::Error::::NotPoolAdmin - ); - - // Finally, verify we can call pallet_liquidity_pools::Pallet::::add_tranche - // successfully when called by the PoolAdmin with the right pool + tranche id - // pair. - assert_ok!(pallet_liquidity_pools::Pallet::::add_tranche( - RawOrigin::Signed(POOL_ADMIN.into()).into(), - pool_id, - tranche_id, - Domain::EVM(MOONBEAM_EVM_CHAIN_ID), - )); - - // Edge case: Should throw if tranche exists but metadata does not exist - let tranche_currency_id = CurrencyId::Tranche(pool_id, tranche_id); - - orml_asset_registry::Metadata::::remove(tranche_currency_id); - - assert_noop!( - pallet_liquidity_pools::Pallet::::update_tranche_token_metadata( - RawOrigin::Signed(POOL_ADMIN.into()).into(), - pool_id, - tranche_id, - Domain::EVM(MOONBEAM_EVM_CHAIN_ID), - ), - pallet_liquidity_pools::Error::::TrancheMetadataNotFound - ); - }); - } - #[test_runtimes([development])] fn update_member() { let mut env = FudgeEnv::::from_parachain_storage( @@ -1670,8 +1545,8 @@ mod foreign_investments { env.parachain_state_mut(|| { let pool_id = POOL_ID; let amount = 10 * decimals(12); - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let investor = + AccountConverter::domain_account_to_account(DOMAIN_MOONBEAM, Keyring::Bob.id()); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; @@ -1720,8 +1595,8 @@ mod foreign_investments { let invest_amount: u128 = 10 * decimals(12); let decrease_amount = invest_amount / 3; let final_amount = invest_amount - decrease_amount; - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let investor = + AccountConverter::domain_account_to_account(DOMAIN_MOONBEAM, Keyring::Bob.id()); let currency_id: CurrencyId = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; @@ -1811,8 +1686,8 @@ mod foreign_investments { env.parachain_state_mut(|| { let pool_id = POOL_ID; let invest_amount = 10 * decimals(12); - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let investor = + AccountConverter::domain_account_to_account(DOMAIN_MOONBEAM, Keyring::Bob.id()); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; @@ -1911,12 +1786,12 @@ mod foreign_investments { env.parachain_state_mut(|| { let pool_id = POOL_ID; let amount = 10 * decimals(12); - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let investor = + AccountConverter::domain_account_to_account(DOMAIN_MOONBEAM, Keyring::Bob.id()); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let sending_domain_locator = - Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()); + DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain().into_account(); enable_liquidity_pool_transferability::(currency_id); // Create new pool @@ -2058,12 +1933,12 @@ mod foreign_investments { env.parachain_state_mut(|| { let pool_id = POOL_ID; let invest_amount = 10 * decimals(12); - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let investor = + AccountConverter::domain_account_to_account(DOMAIN_MOONBEAM, Keyring::Bob.id()); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let sending_domain_locator = - Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()); + DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain().into_account(); create_currency_pool::(pool_id, currency_id, currency_decimals.into()); do_initial_increase_investment::( pool_id, @@ -2290,8 +2165,8 @@ mod foreign_investments { env.parachain_state_mut(|| { let pool_id = POOL_ID; let amount = 10 * decimals(12); - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let investor = + AccountConverter::domain_account_to_account(DOMAIN_MOONBEAM, Keyring::Bob.id()); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; @@ -2313,7 +2188,7 @@ mod foreign_investments { // Increasing again should just bump redeeming amount assert_ok!(orml_tokens::Pallet::::mint_into( default_investment_id::().into(), - &Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()), + &DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain().into_account(), amount )); let msg = LiquidityPoolMessage::IncreaseRedeemOrder { @@ -2345,12 +2220,12 @@ mod foreign_investments { let redeem_amount = 10 * decimals(12); let decrease_amount = redeem_amount / 3; let final_amount = redeem_amount - decrease_amount; - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let investor = + AccountConverter::domain_account_to_account(DOMAIN_MOONBEAM, Keyring::Bob.id()); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let sending_domain_locator = - Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()); + DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain().into_account(); // Create new pool create_currency_pool::(pool_id, currency_id, currency_decimals.into()); @@ -2463,12 +2338,12 @@ mod foreign_investments { env.parachain_state_mut(|| { let pool_id = POOL_ID; let redeem_amount = 10 * decimals(12); - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let investor = + AccountConverter::domain_account_to_account(DOMAIN_MOONBEAM, Keyring::Bob.id()); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let sending_domain_locator = - Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()); + DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain().into_account(); // Create new pool create_currency_pool::(pool_id, currency_id, currency_decimals.into()); @@ -2561,8 +2436,8 @@ mod foreign_investments { env.parachain_state_mut(|| { let pool_id = POOL_ID; let amount = 10 * decimals(12); - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let investor = + AccountConverter::domain_account_to_account(DOMAIN_MOONBEAM, Keyring::Bob.id()); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let pool_account = pallet_pool_system::pool_types::PoolLocator { pool_id } @@ -2711,8 +2586,8 @@ mod foreign_investments { env.parachain_state_mut(|| { let pool_id = POOL_ID; let redeem_amount = 10 * decimals(12); - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let investor = + AccountConverter::domain_account_to_account(DOMAIN_MOONBEAM, Keyring::Bob.id()); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let pool_account = pallet_pool_system::pool_types::PoolLocator { pool_id } @@ -2922,8 +2797,10 @@ mod foreign_investments { let pool_id = POOL_ID; let invest_amount: u128 = 10 * decimals(12); let decrease_amount = invest_amount + 1; - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let investor = AccountConverter::domain_account_to_account( + DOMAIN_MOONBEAM, + Keyring::Bob.id(), + ); let currency_id: CurrencyId = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; create_currency_pool::(pool_id, currency_id, currency_decimals.into()); @@ -2968,8 +2845,10 @@ mod foreign_investments { let pool_id = POOL_ID; let redeem_amount: u128 = 10 * decimals(12); let decrease_amount = redeem_amount + 1; - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let investor = AccountConverter::domain_account_to_account( + DOMAIN_MOONBEAM, + Keyring::Bob.id(), + ); let currency_id: CurrencyId = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; create_currency_pool::(pool_id, currency_id, currency_decimals.into()); @@ -3016,8 +2895,10 @@ mod foreign_investments { env.parachain_state_mut(|| { let pool_id = POOL_ID; let amount: u128 = 10 * decimals(12); - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let investor = AccountConverter::domain_account_to_account( + DOMAIN_MOONBEAM, + Keyring::Bob.id(), + ); let currency_id: CurrencyId = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; create_currency_pool::(pool_id, currency_id, currency_decimals.into()); @@ -3095,8 +2976,10 @@ mod foreign_investments { env.parachain_state_mut(|| { let pool_id = POOL_ID; let amount: u128 = 10 * decimals(12); - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let investor = AccountConverter::domain_account_to_account( + DOMAIN_MOONBEAM, + Keyring::Bob.id(), + ); let currency_id: CurrencyId = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; create_currency_pool::(pool_id, currency_id, currency_decimals.into()); @@ -3111,7 +2994,7 @@ mod foreign_investments { // Mint more into DomainLocator required for subsequent invest attempt assert_ok!(orml_tokens::Pallet::::mint_into( default_investment_id::().into(), - &Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()), + &DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain().into_account(), 1, )); @@ -3184,8 +3067,10 @@ mod foreign_investments { env.parachain_state_mut(|| { let pool_id = POOL_ID; - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let investor = AccountConverter::domain_account_to_account( + DOMAIN_MOONBEAM, + Keyring::Bob.id(), + ); let pool_currency = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let foreign_currency: CurrencyId = USDT_CURRENCY_ID; @@ -3260,8 +3145,10 @@ mod foreign_investments { env.parachain_state_mut(|| { let pool_id = POOL_ID; - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let investor = AccountConverter::domain_account_to_account( + DOMAIN_MOONBEAM, + Keyring::Bob.id(), + ); let pool_currency = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let foreign_currency: CurrencyId = USDT_CURRENCY_ID; @@ -3277,7 +3164,7 @@ mod foreign_investments { enable_usdt_trading::(pool_currency, amount, true, true, true); assert_ok!(orml_tokens::Pallet::::mint_into( default_investment_id::().into(), - &Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()), + &DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain().into_account(), amount, )); @@ -3340,8 +3227,10 @@ mod foreign_investments { env.parachain_state_mut(|| { let pool_id = POOL_ID; - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let investor = AccountConverter::domain_account_to_account( + DOMAIN_MOONBEAM, + Keyring::Bob.id(), + ); let pool_currency = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let foreign_currency: CurrencyId = USDT_CURRENCY_ID; @@ -3357,7 +3246,7 @@ mod foreign_investments { enable_usdt_trading::(pool_currency, amount, true, true, true); assert_ok!(orml_tokens::Pallet::::mint_into( default_investment_id::().into(), - &Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()), + &DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain().into_account(), amount, )); @@ -3413,14 +3302,14 @@ mod foreign_investments { env.parachain_state_mut(|| { let pool_id = POOL_ID; - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let investor = + AccountConverter::domain_account_to_account(DOMAIN_MOONBEAM, Keyring::Bob.id()); let pool_currency: CurrencyId = AUSD_CURRENCY_ID; let foreign_currency: CurrencyId = USDT_CURRENCY_ID; let pool_currency_decimals = currency_decimals::AUSD; let invest_amount_pool_denominated: u128 = 6 * decimals(18); let sending_domain_locator = - Domain::convert(DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain()); + DEFAULT_DOMAIN_ADDRESS_MOONBEAM.domain().into_account(); let trader: AccountId = Keyring::Alice.into(); create_currency_pool::(pool_id, pool_currency, pool_currency_decimals.into()); @@ -3527,8 +3416,8 @@ mod foreign_investments { env.parachain_state_mut(|| { let pool_id = POOL_ID; - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let investor = + AccountConverter::domain_account_to_account(DOMAIN_MOONBEAM, Keyring::Bob.id()); let pool_currency: CurrencyId = AUSD_CURRENCY_ID; let foreign_currency: CurrencyId = USDT_CURRENCY_ID; let pool_currency_decimals = currency_decimals::AUSD; @@ -3666,8 +3555,8 @@ mod foreign_investments { env.parachain_state_mut(|| { let pool_id = POOL_ID; - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let investor = + AccountConverter::domain_account_to_account(DOMAIN_MOONBEAM, Keyring::Bob.id()); let trader: AccountId = Keyring::Alice.into(); let pool_currency: CurrencyId = AUSD_CURRENCY_ID; let foreign_currency: CurrencyId = USDT_CURRENCY_ID; @@ -3781,8 +3670,8 @@ mod foreign_investments { env.parachain_state_mut(|| { let pool_id = POOL_ID; - let investor: AccountId = - AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); + let investor = + AccountConverter::domain_account_to_account(DOMAIN_MOONBEAM, Keyring::Bob.id()); let pool_currency: CurrencyId = AUSD_CURRENCY_ID; let foreign_currency: CurrencyId = USDT_CURRENCY_ID; let pool_currency_decimals = currency_decimals::AUSD; @@ -3868,118 +3757,6 @@ mod foreign_investments { } } -mod transfers { - use super::*; - - // TODO: Must be moved to lp/transfers.rs (?) or to UT? It seems more an UT. - - #[test_runtimes([development])] - fn transfer_non_tranche_tokens_from_local() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .storage(), - ); - - setup_test(&mut env); - - env.parachain_state_mut(|| { - let initial_balance = 2 * AUSD_ED; - let amount = initial_balance / 2; - let dest_address = DEFAULT_DOMAIN_ADDRESS_MOONBEAM; - let currency_id = AUSD_CURRENCY_ID; - let source_account = Keyring::Charlie; - - // Mint sufficient balance - assert_eq!( - orml_tokens::Pallet::::free_balance(currency_id, &source_account.into()), - 0 - ); - assert_ok!(orml_tokens::Pallet::::mint_into( - currency_id, - &source_account.into(), - initial_balance - )); - assert_eq!( - orml_tokens::Pallet::::free_balance(currency_id, &source_account.into()), - initial_balance - ); - - // Only `ForeignAsset` can be transferred - assert_noop!( - pallet_liquidity_pools::Pallet::::transfer( - RawOrigin::Signed(source_account.into()).into(), - CurrencyId::Tranche(42u64, [0u8; 16]), - dest_address.clone(), - amount, - ), - pallet_liquidity_pools::Error::::InvalidTransferCurrency - ); - assert_noop!( - pallet_liquidity_pools::Pallet::::transfer( - RawOrigin::Signed(source_account.into()).into(), - CurrencyId::Staking(cfg_types::tokens::StakingCurrency::BlockRewards), - dest_address.clone(), - amount, - ), - pallet_liquidity_pools::Error::::AssetNotFound - ); - assert_noop!( - pallet_liquidity_pools::Pallet::::transfer( - RawOrigin::Signed(source_account.into()).into(), - CurrencyId::Native, - dest_address.clone(), - amount, - ), - pallet_liquidity_pools::Error::::AssetNotFound - ); - - // Cannot transfer as long as cross chain transferability is disabled - assert_noop!( - pallet_liquidity_pools::Pallet::::transfer( - RawOrigin::Signed(source_account.into()).into(), - currency_id, - dest_address.clone(), - initial_balance, - ), - pallet_liquidity_pools::Error::::AssetNotLiquidityPoolsTransferable - ); - - // Enable LiquidityPools transferability - enable_liquidity_pool_transferability::(currency_id); - - // Cannot transfer more than owned - assert_noop!( - pallet_liquidity_pools::Pallet::::transfer( - RawOrigin::Signed(source_account.into()).into(), - currency_id, - dest_address.clone(), - initial_balance.saturating_add(1), - ), - pallet_liquidity_pools::Error::::BalanceTooLow - ); - - let pre_total_issuance = orml_tokens::Pallet::::total_issuance(currency_id); - - assert_ok!(pallet_liquidity_pools::Pallet::::transfer( - RawOrigin::Signed(source_account.into()).into(), - currency_id, - dest_address.clone(), - amount, - )); - - assert_eq!( - orml_tokens::Pallet::::total_issuance(currency_id), - pre_total_issuance - amount - ); - assert_eq!( - orml_tokens::Pallet::::free_balance(currency_id, &source_account.into()), - initial_balance - amount - ); - }); - } -} - mod routers { use super::*; @@ -4294,189 +4071,3 @@ mod routers { } } } - -mod gateway { - use super::*; - - #[test_runtimes([development])] - fn set_domain_router() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .add(genesis::council_members::(get_council_members())) - .storage(), - ); - - let test_domain = Domain::EVM(1); - - let axelar_contract_address = H160::from_low_u64_be(1); - let axelar_contract_code: Vec = vec![0, 0, 0]; - let axelar_contract_hash = BlakeTwo256::hash_of(&axelar_contract_code); - let liquidity_pools_contract_address = H160::from_low_u64_be(2); - - env.parachain_state_mut(|| { - pallet_evm::AccountCodes::::insert(axelar_contract_address, axelar_contract_code) - }); - - let evm_domain = EVMDomain { - target_contract_address: axelar_contract_address, - target_contract_hash: axelar_contract_hash, - fee_values: FeeValues { - value: U256::from(10), - gas_limit: U256::from(1_000_000), - gas_price: U256::from(10), - }, - }; - - let axelar_evm_router = AxelarEVMRouter:: { - router: EVMRouter { - evm_domain, - _marker: Default::default(), - }, - evm_chain: BoundedVec::>::try_from( - "ethereum".as_bytes().to_vec(), - ) - .unwrap(), - _marker: Default::default(), - liquidity_pools_contract_address, - }; - - let test_router = DomainRouter::::AxelarEVM(axelar_evm_router); - - let set_domain_router_call = - set_domain_router_call(test_domain.clone(), test_router.clone()); - - let council_threshold = 2; - let voting_period = 3; - - execute_via_democracy::( - &mut env, - get_council_members(), - set_domain_router_call, - council_threshold, - voting_period, - 0, - 0, - ); - - env.parachain_state(|| { - let router = pallet_liquidity_pools_gateway::Pallet::::domain_routers(test_domain) - .expect("domain router is set"); - - assert!(router.eq(&test_router)); - }); - } - - #[test_runtimes([development])] - fn add_remove_instances() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .add(genesis::council_members::(get_council_members())) - .storage(), - ); - - let test_instance = DomainAddress::EVM(1, [0; 20]); - - let add_instance_call = add_instance_call::(test_instance.clone()); - - let council_threshold = 2; - let voting_period = 3; - - let (prop_index, ref_index) = execute_via_democracy::( - &mut env, - get_council_members(), - add_instance_call, - council_threshold, - voting_period, - 0, - 0, - ); - - env.parachain_state(|| { - assert!( - pallet_liquidity_pools_gateway::Allowlist::::contains_key( - test_instance.domain(), - test_instance.clone() - ) - ); - }); - - let remove_instance_call = remove_instance_call::(test_instance.clone()); - - execute_via_democracy::( - &mut env, - get_council_members(), - remove_instance_call, - council_threshold, - voting_period, - prop_index, - ref_index, - ); - - env.parachain_state(|| { - assert!( - !pallet_liquidity_pools_gateway::Allowlist::::contains_key( - test_instance.domain(), - test_instance.clone() - ) - ); - }); - } - - #[test_runtimes([development])] - fn process_msg() { - let mut env = FudgeEnv::::from_parachain_storage( - Genesis::default() - .add(genesis::balances::(cfg(1_000))) - .add(genesis::council_members::(get_council_members())) - .storage(), - ); - - let test_instance = DomainAddress::EVM(1, [0; 20]); - - let add_instance_call = add_instance_call::(test_instance.clone()); - - let council_threshold = 2; - let voting_period = 3; - - execute_via_democracy::( - &mut env, - get_council_members(), - add_instance_call, - council_threshold, - voting_period, - 0, - 0, - ); - - env.parachain_state(|| { - assert!( - pallet_liquidity_pools_gateway::Allowlist::::contains_key( - test_instance.domain(), - test_instance.clone() - ) - ); - }); - - let msg = LiquidityPoolMessage::AddPool { pool_id: 123 }; - - let encoded_msg = msg.serialize(); - - let gateway_msg = BoundedVec::< - u8, - ::MaxIncomingMessageSize, - >::try_from(encoded_msg) - .unwrap(); - - env.parachain_state_mut(|| { - assert_noop!( - pallet_liquidity_pools_gateway::Pallet::::process_msg( - GatewayOrigin::Domain(test_instance).into(), - gateway_msg, - ), - pallet_liquidity_pools::Error::::InvalidIncomingMessage, - ); - }); - } -} diff --git a/runtime/integration-tests/src/generic/cases/lp/transfers.rs b/runtime/integration-tests/src/generic/cases/lp/transfers.rs index 864f3f43c0..0aff7d8415 100644 --- a/runtime/integration-tests/src/generic/cases/lp/transfers.rs +++ b/runtime/integration-tests/src/generic/cases/lp/transfers.rs @@ -10,15 +10,13 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -use cfg_primitives::{Balance, PoolId}; -use cfg_traits::Seconds; +use cfg_primitives::Balance; use cfg_types::{ domain_address::{Domain, DomainAddress}, - permissions::PoolRole, tokens::CurrencyId, }; use ethabi::{ethereum_types::U256, Token}; -use frame_support::{assert_noop, traits::OriginTrait}; +use frame_support::traits::OriginTrait; use frame_system::pallet_prelude::OriginFor; use pallet_liquidity_pools::Message; use sp_core::ByteArray; @@ -344,48 +342,3 @@ fn transfer_tranche_tokens_domain_to_local() { ); }); } - -#[test_runtimes(all)] -fn transferring_invalid_tranche_tokens_should_fail() { - const INVALID_POOL_ID: PoolId = 100; - const INVALID_TRANCHE_ID: [u8; 16] = [0; 16]; - let mut env = super::setup_full::(); - - env.state_mut(|_| { - crate::generic::utils::pool::give_role::( - lp::utils::remote_account_of::(Keyring::TrancheInvestor(1)), - POOL_A, - PoolRole::TrancheInvestor(INVALID_TRANCHE_ID, Seconds::MAX), - ); - crate::generic::utils::pool::give_role::( - lp::utils::remote_account_of::(Keyring::TrancheInvestor(1)), - INVALID_POOL_ID, - PoolRole::TrancheInvestor(INVALID_TRANCHE_ID, Seconds::MAX), - ); - }); - - let destination = DomainAddress::EVM(EVM_DOMAIN_CHAIN_ID, Keyring::TrancheInvestor(1).into()); - env.state(|_evm| { - assert_noop!( - pallet_liquidity_pools::Pallet::::transfer_tranche_tokens( - OriginFor::::signed(Keyring::TrancheInvestor(1).into()), - INVALID_POOL_ID, - INVALID_TRANCHE_ID, - destination.clone(), - AMOUNT - ), - pallet_liquidity_pools::Error::::PoolNotFound - ); - - assert_noop!( - pallet_liquidity_pools::Pallet::::transfer_tranche_tokens( - OriginFor::::signed(Keyring::TrancheInvestor(1).into()), - POOL_A, - INVALID_TRANCHE_ID, - destination, - AMOUNT - ), - pallet_liquidity_pools::Error::::TrancheNotFound - ); - }); -} diff --git a/runtime/integration-tests/src/generic/cases/restricted_transfers.rs b/runtime/integration-tests/src/generic/cases/restricted_transfers.rs index 3d7725c20a..30f3e2d6e7 100644 --- a/runtime/integration-tests/src/generic/cases/restricted_transfers.rs +++ b/runtime/integration-tests/src/generic/cases/restricted_transfers.rs @@ -15,7 +15,8 @@ use cfg_types::{ domain_address::DomainAddress, locations::RestrictedTransferLocation, tokens::{ - AssetMetadata, CrossChainTransferability, CurrencyId, CustomMetadata, FilterCurrency, + default_metadata, AssetMetadata, CrossChainTransferability, CurrencyId, CustomMetadata, + FilterCurrency, }, }; use cumulus_primitives_core::WeightLimit; @@ -33,7 +34,7 @@ use crate::{ env::Env, envs::runtime_env::RuntimeEnv, utils::{ - currency::{cfg, default_metadata, CurrencyInfo, CustomCurrency}, + currency::{cfg, CurrencyInfo, CustomCurrency}, genesis, genesis::Genesis, xcm::{account_location, transferable_metadata}, diff --git a/runtime/integration-tests/src/generic/utils/currency.rs b/runtime/integration-tests/src/generic/utils/currency.rs index bec217c89e..40e0a3d2da 100644 --- a/runtime/integration-tests/src/generic/utils/currency.rs +++ b/runtime/integration-tests/src/generic/utils/currency.rs @@ -9,17 +9,6 @@ use staging_xcm::VersionedLocation; use crate::generic::config::Runtime; -pub fn default_metadata() -> AssetMetadata { - AssetMetadata { - decimals: 0, - name: Default::default(), - symbol: Default::default(), - existential_deposit: 0, - location: None, - additional: Default::default(), - } -} - const fn amount_pow(amount: Balance, exp: u32) -> Balance { amount * 10u128.pow(exp) } diff --git a/runtime/integration-tests/src/generic/utils/democracy.rs b/runtime/integration-tests/src/generic/utils/democracy.rs deleted file mode 100644 index 0edc63b782..0000000000 --- a/runtime/integration-tests/src/generic/utils/democracy.rs +++ /dev/null @@ -1,276 +0,0 @@ -use std::ops::Add; - -use cfg_primitives::{Balance, BlockNumber, CouncilCollective}; -use frame_support::{dispatch::GetDispatchInfo, traits::Bounded, weights::Weight}; -use pallet_collective::{Call as CouncilCall, MemberCount, ProposalIndex}; -use pallet_democracy::{ - AccountVote, Call as DemocracyCall, Conviction, PropIndex, ReferendumIndex, ReferendumInfo, - Vote, -}; -use pallet_preimage::Call as PreimageCall; -use parity_scale_codec::Encode; -use sp_core::H256; -use sp_runtime::traits::{BlakeTwo256, Hash}; - -use crate::{ - generic::{ - config::Runtime, - env::{Blocks, Env}, - envs::fudge_env::FudgeSupport, - }, - utils::accounts::Keyring, -}; - -pub fn note_preimage(call: T::RuntimeCallExt) -> T::RuntimeCallExt { - let encoded_call = call.encode(); - - PreimageCall::note_preimage { - bytes: encoded_call, - } - .into() -} - -pub fn external_propose_majority(call: T::RuntimeCallExt) -> T::RuntimeCallExt { - let hash = BlakeTwo256::hash_of(&call); - - DemocracyCall::external_propose_majority { - proposal: Bounded::Legacy { - hash, - dummy: Default::default(), - }, - } - .into() -} - -pub fn fast_track( - proposal_hash: H256, - voting_period: BlockNumber, - delay: BlockNumber, -) -> T::RuntimeCallExt { - DemocracyCall::fast_track { - proposal_hash, - voting_period, - delay, - } - .into() -} - -pub fn execute_via_democracy( - env: &mut impl Env, - council_members: Vec, - original_call: T::RuntimeCallExt, - council_threshold: MemberCount, - voting_period: BlockNumber, - starting_prop_index: PropIndex, - starting_ref_index: ReferendumIndex, -) -> (PropIndex, ReferendumIndex) { - let original_call_hash = BlakeTwo256::hash_of(&original_call); - - env.submit_later( - council_members[0].into(), - note_preimage::(original_call.clone()), - ) - .expect("Preimage noting is successful"); - - env.pass(Blocks::UntilEvent { - event: pallet_preimage::Event::::Noted { - hash: original_call_hash, - } - .into(), - limit: 3, - }); - - let external_propose_majority_call = external_propose_majority::(original_call); - - execute_collective_proposal::( - env, - &council_members, - external_propose_majority_call, - council_threshold, - starting_prop_index, - ); - - let fast_track_call = fast_track::(original_call_hash, voting_period, 0); - - execute_collective_proposal::( - env, - &council_members, - fast_track_call, - council_threshold, - starting_prop_index + 1, - ); - - let vote = AccountVote::::Standard { - vote: Vote { - aye: true, - conviction: Conviction::Locked2x, - }, - balance: 1_000_000u128, - }; - - execute_democracy_vote(env, &council_members, starting_ref_index, vote); - - (starting_prop_index + 2, starting_ref_index + 1) -} - -pub fn democracy_vote( - ref_index: ReferendumIndex, - vote: AccountVote, -) -> T::RuntimeCallExt { - DemocracyCall::vote { ref_index, vote }.into() -} - -fn execute_democracy_vote( - env: &mut impl Env, - voters: &Vec, - referendum_index: ReferendumIndex, - acc_vote: AccountVote, -) { - for acc in voters { - let ref_info = env.parachain_state(|| { - pallet_democracy::ReferendumInfoOf::::get(referendum_index).unwrap() - }); - - if let ReferendumInfo::Finished { .. } = ref_info { - // Referendum might be finished by the time all voters get to vote. - break; - } - - env.submit_later(*acc, democracy_vote::(referendum_index, acc_vote)) - .expect("Voting is successful"); - - env.pass(Blocks::UntilEvent { - event: pallet_democracy::Event::::Voted { - voter: acc.id(), - ref_index: referendum_index, - vote: acc_vote, - } - .into(), - limit: 3, - }); - } -} - -pub fn collective_propose( - proposal: T::RuntimeCallExt, - threshold: MemberCount, -) -> T::RuntimeCallExt { - let proposal_len = proposal.encode().len(); - - CouncilCall::propose { - threshold, - proposal: Box::new(proposal), - length_bound: proposal_len as u32, - } - .into() -} - -pub fn collective_vote( - proposal: H256, - index: ProposalIndex, - approve: bool, -) -> T::RuntimeCallExt { - CouncilCall::vote { - proposal, - index, - approve, - } - .into() -} - -pub fn collective_close( - proposal_hash: H256, - index: ProposalIndex, - proposal_weight_bound: Weight, - length_bound: u32, -) -> T::RuntimeCallExt { - CouncilCall::close { - proposal_hash, - index, - proposal_weight_bound, - length_bound, - } - .into() -} - -fn execute_collective_proposal( - env: &mut impl Env, - council_members: &Vec, - proposal: T::RuntimeCallExt, - council_threshold: MemberCount, - prop_index: PropIndex, -) { - let prop_hash = BlakeTwo256::hash_of(&proposal); - - env.submit_later( - council_members[0].into(), - collective_propose::(proposal.clone(), council_threshold), - ) - .expect("Collective proposal is successful"); - - env.pass(Blocks::UntilEvent { - event: pallet_collective::Event::::Proposed { - account: council_members[0].into(), - proposal_index: prop_index, - proposal_hash: prop_hash, - threshold: council_threshold, - } - .into(), - limit: 3, - }); - - for (index, acc) in council_members.iter().enumerate() { - env.submit_later(*acc, collective_vote::(prop_hash, prop_index, true)) - .expect("Collective voting is successful"); - - env.pass(Blocks::UntilEvent { - event: pallet_collective::Event::::Voted { - account: council_members[0].into(), - proposal_hash: prop_hash, - voted: true, - yes: (index + 1) as u32, - no: 0, - } - .into(), - limit: 3, - }); - } - - let proposal_weight = env.parachain_state(|| { - let external_proposal = - pallet_collective::ProposalOf::::get(prop_hash).unwrap(); - - external_proposal.get_dispatch_info().weight - }); - - env.submit_later( - council_members[0].into(), - collective_close::( - prop_hash, - prop_index, - proposal_weight.add(1.into()), - (proposal.encoded_size() + 1) as u32, - ), - ) - .expect("Collective close is successful"); - - env.pass(Blocks::UntilEvent { - event: pallet_collective::Event::::Closed { - proposal_hash: prop_hash, - yes: council_members.len() as u32, - no: 0, - } - .into(), - limit: 3, - }); - - env.check_event(pallet_collective::Event::::Approved { - proposal_hash: prop_hash, - }) - .expect("Approved event is present."); - env.check_event(pallet_collective::Event::::Executed { - proposal_hash: prop_hash, - result: Ok(()), - }) - .expect("Executed event is present."); -} diff --git a/runtime/integration-tests/src/generic/utils/mod.rs b/runtime/integration-tests/src/generic/utils/mod.rs index 992b4916ec..ddc868451d 100644 --- a/runtime/integration-tests/src/generic/utils/mod.rs +++ b/runtime/integration-tests/src/generic/utils/mod.rs @@ -9,7 +9,6 @@ //! Divide this utilities into files when it grows pub mod currency; -pub mod democracy; pub mod evm; pub mod genesis; pub mod pool; diff --git a/runtime/integration-tests/src/generic/utils/xcm.rs b/runtime/integration-tests/src/generic/utils/xcm.rs index 9f6b4d7f07..0380bf0ddf 100644 --- a/runtime/integration-tests/src/generic/utils/xcm.rs +++ b/runtime/integration-tests/src/generic/utils/xcm.rs @@ -1,5 +1,7 @@ use cfg_primitives::AccountId; -use cfg_types::tokens::{AssetMetadata, CrossChainTransferability, CustomMetadata}; +use cfg_types::tokens::{ + default_metadata, AssetMetadata, CrossChainTransferability, CustomMetadata, +}; use frame_support::{assert_ok, dispatch::RawOrigin}; use polkadot_parachain_primitives::primitives::Id; use staging_xcm::{ @@ -15,7 +17,6 @@ use crate::generic::{ handle::{PARA_ID, SIBLING_ID}, FudgeEnv, FudgeSupport, RelayRuntime, }, - utils::currency::default_metadata, }; pub fn enable_relay_to_para_communication(env: &mut FudgeEnv) { diff --git a/runtime/integration-tests/src/utils/accounts.rs b/runtime/integration-tests/src/utils/accounts.rs index 46f28d84b8..4a111daa34 100644 --- a/runtime/integration-tests/src/utils/accounts.rs +++ b/runtime/integration-tests/src/utils/accounts.rs @@ -14,6 +14,7 @@ use ethabi::ethereum_types::{H160, H256}; use frame_support::traits::OriginTrait; +use runtime_common::account_conversion::AccountConverter; use sp_core::{ecdsa, ed25519, sr25519, Hasher, Pair as PairT}; use sp_runtime::AccountId32; @@ -44,7 +45,7 @@ impl Keyring { /// NOTE: Needs to be executed in an externalities environment pub fn id_ecdsa(self) -> AccountId32 { - runtime_common::account_conversion::AccountConverter::into_account_id::(self.into()) + AccountConverter::evm_address_to_account::(self.into()) } pub fn as_multi(self) -> sp_runtime::MultiSigner { From de2886f2fddbc32ce70a6c0f1584b9ffae35430a Mon Sep 17 00:00:00 2001 From: Guillermo Perez Date: Tue, 25 Jun 2024 14:16:00 +0200 Subject: [PATCH 21/21] Script to upgrade a Centrifuge parachain live (#1884) * Add script to upgrade a live parachain (testnet) with sudo * Separate council upgrades and rename folder * use development wasm for demo * use development wasm for demo * remove council proposal and adapt to producion live parachains * fix: upgrade script * fix: bash script * refactor: remove unused config * refactor: replace npm lock with yarn lock * refactor: remove unused noise * feat: improve error catching --------- Co-authored-by: William Freudenberger --- .../README.md | 0 .../index.js | 0 .../package.json | 0 .../yarn.lock | 0 .../runtime-upgrade-remote/configs/demo.json | 7 + .../configs/development.json | 7 + scripts/js/runtime-upgrade-remote/index.js | 148 +++++ .../js/runtime-upgrade-remote/package.json | 16 + .../runtime-upgrade-remote/perform-upgrade.sh | 40 ++ scripts/js/runtime-upgrade-remote/yarn.lock | 564 ++++++++++++++++++ 10 files changed, 782 insertions(+) rename scripts/js/{upgrade => runtime-upgrade-local}/README.md (100%) rename scripts/js/{upgrade => runtime-upgrade-local}/index.js (100%) rename scripts/js/{upgrade => runtime-upgrade-local}/package.json (100%) rename scripts/js/{upgrade => runtime-upgrade-local}/yarn.lock (100%) create mode 100644 scripts/js/runtime-upgrade-remote/configs/demo.json create mode 100644 scripts/js/runtime-upgrade-remote/configs/development.json create mode 100644 scripts/js/runtime-upgrade-remote/index.js create mode 100644 scripts/js/runtime-upgrade-remote/package.json create mode 100644 scripts/js/runtime-upgrade-remote/perform-upgrade.sh create mode 100644 scripts/js/runtime-upgrade-remote/yarn.lock diff --git a/scripts/js/upgrade/README.md b/scripts/js/runtime-upgrade-local/README.md similarity index 100% rename from scripts/js/upgrade/README.md rename to scripts/js/runtime-upgrade-local/README.md diff --git a/scripts/js/upgrade/index.js b/scripts/js/runtime-upgrade-local/index.js similarity index 100% rename from scripts/js/upgrade/index.js rename to scripts/js/runtime-upgrade-local/index.js diff --git a/scripts/js/upgrade/package.json b/scripts/js/runtime-upgrade-local/package.json similarity index 100% rename from scripts/js/upgrade/package.json rename to scripts/js/runtime-upgrade-local/package.json diff --git a/scripts/js/upgrade/yarn.lock b/scripts/js/runtime-upgrade-local/yarn.lock similarity index 100% rename from scripts/js/upgrade/yarn.lock rename to scripts/js/runtime-upgrade-local/yarn.lock diff --git a/scripts/js/runtime-upgrade-remote/configs/demo.json b/scripts/js/runtime-upgrade-remote/configs/demo.json new file mode 100644 index 0000000000..8a82088e39 --- /dev/null +++ b/scripts/js/runtime-upgrade-remote/configs/demo.json @@ -0,0 +1,7 @@ +{ + "endpoint": "wss://fullnode.demo.k-f.dev", + "wasmFile": "./development.wasm", + "privateKey": "", + "sudo": true, + "councilMembers": [] + } \ No newline at end of file diff --git a/scripts/js/runtime-upgrade-remote/configs/development.json b/scripts/js/runtime-upgrade-remote/configs/development.json new file mode 100644 index 0000000000..d018cedb4a --- /dev/null +++ b/scripts/js/runtime-upgrade-remote/configs/development.json @@ -0,0 +1,7 @@ +{ + "endpoint": "wss://fullnode.development.cntrfg.com", + "wasmFile": "./development.wasm", + "privateKey": "//Alice", + "sudo": true, + "councilMembers": [] +} \ No newline at end of file diff --git a/scripts/js/runtime-upgrade-remote/index.js b/scripts/js/runtime-upgrade-remote/index.js new file mode 100644 index 0000000000..a784aa96ba --- /dev/null +++ b/scripts/js/runtime-upgrade-remote/index.js @@ -0,0 +1,148 @@ +const { ApiPromise, WsProvider, Keyring } = require('@polkadot/api'); +const { u8aToHex } = require('@polkadot/util'); +const { blake2AsHex, blake2AsU8a } = require('@polkadot/util-crypto'); +const fs = require('fs'); +const path = require('path'); + +// Load configuration +const configPath = path.resolve(__dirname, 'config.json'); +const config = JSON.parse(fs.readFileSync(configPath, 'utf8')); + +const run = async () => { + let exitCode = 0; + try { + // Validate configuration + if (!config.endpoint || !config.wasmFile || !config.privateKey) { + console.error("Missing configuration parameters. Please ensure 'endpoint', 'wasmFile', and 'privateKey' are specified in the corresponding configs/*.json."); + process.exit(1); + } + + console.log("Configuration loaded:", config); + + const wsProvider = new WsProvider(config.endpoint); + const api = await ApiPromise.create({ provider: wsProvider }); + + console.log("Connected to the parachain at:", config.endpoint); + + const keyring = new Keyring({ type: "sr25519" }); + let user; + if (config.privateKey.startsWith('//')) { + user = keyring.addFromUri(config.privateKey); + } else { + user = keyring.addFromSeed(config.privateKey); + } + + console.log(`Using account: ${user.address}`); + + const wasm = fs.readFileSync(config.wasmFile); + const wasmHash = blake2AsHex(wasm); + const wasmBytes = u8aToHex(wasm); + + console.log("WASM file loaded and ready for deployment"); + + if (config.sudo) { + console.log("Using sudo to perform the runtime upgrade"); + await sudoAuthorize(api, user, wasmHash); + await enactUpgrade(api, user, wasmBytes); + } else { + console.error("Unsupported"); + } + // Check for specific events or transaction success as needed + } catch (error) { + console.error('Error:', error); + exitCode = 1; + } finally { + process.exit(exitCode); + } +}; + +async function sudoAuthorize(api, sudoAccount, wasmHex) { + const nonce = await api.rpc.system.accountNextIndex(sudoAccount.address) + + return new Promise(async (resolve, reject) => { + try { + // Authorize the upgrade + const authorizeTx = api.tx.sudo.sudo( + api.tx.parachainSystem.authorizeUpgrade(wasmHex, true) + ); + + const unsub = await authorizeTx.signAndSend(sudoAccount, { nonce }, ({ status, dispatchError, events }) => { + console.log(`Authorizing upgrade with status ${status}`); + if (status.isInBlock) { + console.log(`Authorization included in block ${status.asInBlock}`); + resolve(); + unsub(); + } + checkError(api, reject, dispatchError, events) + }); + } + catch (error) { + reject(error) + } + }); +} + +async function enactUpgrade(api, sudoAccount, wasmFile) { + const nonce = await api.rpc.system.accountNextIndex(sudoAccount.address) + + return new Promise(async (resolve, reject) => { + try { + // Enact the authorized upgrade + const enactTx = api.tx.parachainSystem.enactAuthorizedUpgrade(wasmFile); + + const unsub = await enactTx.signAndSend(sudoAccount, { nonce }, ({ status, dispatchError, events }) => { + console.log(`Enacting upgrade with status ${status}`); + if (status.isInBlock) { + console.log(`Enactment included in block ${status}`); + resolve(); + unsub(); + } + checkError(api, reject, dispatchError, events) + }); + } + catch (error) { + reject(error) + } + }); +} + +function checkError(api, reject, dispatchError, events) { + if (dispatchError) { + if (dispatchError.isModule) { + // for module errors, we have the section indexed, lookup + const decoded = api.registry.findMetaError(dispatchError.asModule); + const { docs, name, section } = decoded; + + console.error(`${section}.${name}: ${docs.join(' ')}`); + } else { + // Other, CannotLookup, BadOrigin, no extra info + console.error(dispatchError.toString()); + } + reject(dispatchError) + } else if (events) { + events + // find/filter for failed events + .filter(({ event }) => + api.events.system.ExtrinsicFailed.is(event) + ) + // we know that data for system.ExtrinsicFailed is + // (DispatchError, DispatchInfo) + .forEach(({ event: { data: [error, info] } }) => { + if (error.isModule) { + // for module errors, we have the section indexed, lookup + const decoded = api.registry.findMetaError(error.asModule); + const { docs, method, section } = decoded; + const error = `${section}.${method}: ${docs.join(' ')}` + + console.error(error); + reject(error) + } else { + // Other, CannotLookup, BadOrigin, no extra info + console.error(error.toString()); + reject(error.toString()) + } + }); + } +} + +run(); \ No newline at end of file diff --git a/scripts/js/runtime-upgrade-remote/package.json b/scripts/js/runtime-upgrade-remote/package.json new file mode 100644 index 0000000000..c16a0daa5f --- /dev/null +++ b/scripts/js/runtime-upgrade-remote/package.json @@ -0,0 +1,16 @@ +{ + "name": "parachain-upgrade", + "version": "1.0.0", + "description": "Script to handle parachain upgrades", + "main": "index.js", + "scripts": { + "start": "node index.js" + }, + "dependencies": { + "@polkadot/api": "^11.3.1", + "@polkadot/util": "^12.5.1", + "@polkadot/util-crypto": "^12.5.1" + }, + "author": "", + "license": "ISC" +} diff --git a/scripts/js/runtime-upgrade-remote/perform-upgrade.sh b/scripts/js/runtime-upgrade-remote/perform-upgrade.sh new file mode 100644 index 0000000000..34f3422842 --- /dev/null +++ b/scripts/js/runtime-upgrade-remote/perform-upgrade.sh @@ -0,0 +1,40 @@ +#!/bin/bash +echo "Please select the environment (development, demo):" +read -r ENVIRONMENT + +# Check if the privateKey is empty for demo environment +if [ "$ENVIRONMENT" == "demo" ]; then + PRIVATE_KEY=$(jq -r '.privateKey' ./configs/demo.json) + if [ -z "$PRIVATE_KEY" ]; then + echo "Error: privateKey is empty in ./configs/demo.json. Please retrieve it from 1Password." + exit 1 + fi +fi + +# # Install NVM and node if not present in your mac: +# brew install nvm && echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.zshrc && echo '[ -s "$NVM_DIR/nvm.sh" ] \ +# && \. "$NVM_DIR/nvm.sh"' >> ~/.zshrc && source ~/.zshrc && nvm install node + +# Define the tag and calculate the short git hash +TAG="v0.11.1-rc1" +GIT_HASH=$(git rev-parse --short=7 $TAG) + +# Download the WASM file from Google Cloud Storage +echo "Downloading WASM file..." +if [ "$ENVIRONMENT" == "demo" ]; then + gsutil cp gs://centrifuge-wasm-repo/development/development-"$GIT_HASH".wasm ./"${ENVIRONMENT}".wasm +else + gsutil cp gs://centrifuge-wasm-repo/"${ENVIRONMENT}"/"${ENVIRONMENT}"-"$GIT_HASH".wasm ./"${ENVIRONMENT}".wasm +fi + +# Copy the corresponding configuration file +echo "Copying configuration file..." +cp ./configs/"${ENVIRONMENT}".json ./config.json + +# Run the node script +echo "Running node index.js..." +node index.js +echo "Cleaning up..." +rm ./config.json +rm ./"${ENVIRONMENT}".wasm + diff --git a/scripts/js/runtime-upgrade-remote/yarn.lock b/scripts/js/runtime-upgrade-remote/yarn.lock new file mode 100644 index 0000000000..eabdc9b7d5 --- /dev/null +++ b/scripts/js/runtime-upgrade-remote/yarn.lock @@ -0,0 +1,564 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@noble/curves@^1.3.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.4.0.tgz#f05771ef64da724997f69ee1261b2417a49522d6" + integrity sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg== + dependencies: + "@noble/hashes" "1.4.0" + +"@noble/hashes@1.4.0", "@noble/hashes@^1.3.1", "@noble/hashes@^1.3.3": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.4.0.tgz#45814aa329f30e4fe0ba49426f49dfccdd066426" + integrity sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg== + +"@polkadot-api/json-rpc-provider-proxy@0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@polkadot-api/json-rpc-provider-proxy/-/json-rpc-provider-proxy-0.0.1.tgz#bb5c943642cdf0ec7bc48c0a2647558b9fcd7bdb" + integrity sha512-gmVDUP8LpCH0BXewbzqXF2sdHddq1H1q+XrAW2of+KZj4woQkIGBRGTJHeBEVHe30EB+UejR1N2dT4PO/RvDdg== + +"@polkadot-api/json-rpc-provider@0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@polkadot-api/json-rpc-provider/-/json-rpc-provider-0.0.1.tgz#333645d40ccd9bccfd1f32503f17e4e63e76e297" + integrity sha512-/SMC/l7foRjpykLTUTacIH05H3mr9ip8b5xxfwXlVezXrNVLp3Cv0GX6uItkKd+ZjzVPf3PFrDF2B2/HLSNESA== + +"@polkadot-api/metadata-builders@0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@polkadot-api/metadata-builders/-/metadata-builders-0.0.1.tgz#a76b48febef9ea72be8273d889e2677101045a05" + integrity sha512-GCI78BHDzXAF/L2pZD6Aod/yl82adqQ7ftNmKg51ixRL02JpWUA+SpUKTJE5MY1p8kiJJIo09P2um24SiJHxNA== + dependencies: + "@polkadot-api/substrate-bindings" "0.0.1" + "@polkadot-api/utils" "0.0.1" + +"@polkadot-api/observable-client@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@polkadot-api/observable-client/-/observable-client-0.1.0.tgz#472045ea06a2bc4bccdc2db5c063eadcbf6f5351" + integrity sha512-GBCGDRztKorTLna/unjl/9SWZcRmvV58o9jwU2Y038VuPXZcr01jcw/1O3x+yeAuwyGzbucI/mLTDa1QoEml3A== + dependencies: + "@polkadot-api/metadata-builders" "0.0.1" + "@polkadot-api/substrate-bindings" "0.0.1" + "@polkadot-api/substrate-client" "0.0.1" + "@polkadot-api/utils" "0.0.1" + +"@polkadot-api/substrate-bindings@0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@polkadot-api/substrate-bindings/-/substrate-bindings-0.0.1.tgz#c4b7f4d6c3672d2c15cbc6c02964f014b73cbb0b" + integrity sha512-bAe7a5bOPnuFVmpv7y4BBMRpNTnMmE0jtTqRUw/+D8ZlEHNVEJQGr4wu3QQCl7k1GnSV1wfv3mzIbYjErEBocg== + dependencies: + "@noble/hashes" "^1.3.1" + "@polkadot-api/utils" "0.0.1" + "@scure/base" "^1.1.1" + scale-ts "^1.6.0" + +"@polkadot-api/substrate-client@0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@polkadot-api/substrate-client/-/substrate-client-0.0.1.tgz#0e8010a0abe2fb47d6fa7ab94e45e1d0de083314" + integrity sha512-9Bg9SGc3AwE+wXONQoW8GC00N3v6lCZLW74HQzqB6ROdcm5VAHM4CB/xRzWSUF9CXL78ugiwtHx3wBcpx4H4Wg== + +"@polkadot-api/utils@0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@polkadot-api/utils/-/utils-0.0.1.tgz#908b22becac705149d7cc946532143d0fb003bfc" + integrity sha512-3j+pRmlF9SgiYDabSdZsBSsN5XHbpXOAce1lWj56IEEaFZVjsiCaxDOA7C9nCcgfVXuvnbxqqEGQvnY+QfBAUw== + +"@polkadot/api-augment@11.3.1": + version "11.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/api-augment/-/api-augment-11.3.1.tgz#c7deeac438b017613e244c25505216a9d4c3977e" + integrity sha512-Yj+6rb6h0WwY3yJ+UGhjGW+tyMRFUMsKQuGw+eFsXdjiNU9UoXsAqA2dG7Q1F+oeX/g+y2gLGBezNoCwbl6HfA== + dependencies: + "@polkadot/api-base" "11.3.1" + "@polkadot/rpc-augment" "11.3.1" + "@polkadot/types" "11.3.1" + "@polkadot/types-augment" "11.3.1" + "@polkadot/types-codec" "11.3.1" + "@polkadot/util" "^12.6.2" + tslib "^2.6.2" + +"@polkadot/api-base@11.3.1": + version "11.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/api-base/-/api-base-11.3.1.tgz#6c74c88d4a4b3d22344bb8715a135493f5a3dd33" + integrity sha512-b8UkNL00NN7+3QaLCwL5cKg+7YchHoKCAhwKusWHNBZkkO6Oo2BWilu0dZkPJOyqV9P389Kbd9+oH+SKs9u2VQ== + dependencies: + "@polkadot/rpc-core" "11.3.1" + "@polkadot/types" "11.3.1" + "@polkadot/util" "^12.6.2" + rxjs "^7.8.1" + tslib "^2.6.2" + +"@polkadot/api-derive@11.3.1": + version "11.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-11.3.1.tgz#3617655b6dab56d5beb8efbf7383ab457370df35" + integrity sha512-9dopzrh4cRuft1nANmBvMY/hEhFDu0VICMTOGxQLOl8NMfcOFPTLAN0JhSBUoicGZhV+c4vpv01NBx/7/IL1HA== + dependencies: + "@polkadot/api" "11.3.1" + "@polkadot/api-augment" "11.3.1" + "@polkadot/api-base" "11.3.1" + "@polkadot/rpc-core" "11.3.1" + "@polkadot/types" "11.3.1" + "@polkadot/types-codec" "11.3.1" + "@polkadot/util" "^12.6.2" + "@polkadot/util-crypto" "^12.6.2" + rxjs "^7.8.1" + tslib "^2.6.2" + +"@polkadot/api@11.3.1", "@polkadot/api@^11.3.1": + version "11.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-11.3.1.tgz#6092aea8147ea03873b3f383cceae0390a67f71d" + integrity sha512-q4kFIIHTLvKxM24b0Eo8hJevsPMme+aITJGrDML9BgdZYTRN14+cu5nXiCsQvaEamdyYj+uCXWe2OV9X7pPxsA== + dependencies: + "@polkadot/api-augment" "11.3.1" + "@polkadot/api-base" "11.3.1" + "@polkadot/api-derive" "11.3.1" + "@polkadot/keyring" "^12.6.2" + "@polkadot/rpc-augment" "11.3.1" + "@polkadot/rpc-core" "11.3.1" + "@polkadot/rpc-provider" "11.3.1" + "@polkadot/types" "11.3.1" + "@polkadot/types-augment" "11.3.1" + "@polkadot/types-codec" "11.3.1" + "@polkadot/types-create" "11.3.1" + "@polkadot/types-known" "11.3.1" + "@polkadot/util" "^12.6.2" + "@polkadot/util-crypto" "^12.6.2" + eventemitter3 "^5.0.1" + rxjs "^7.8.1" + tslib "^2.6.2" + +"@polkadot/keyring@^12.6.2": + version "12.6.2" + resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-12.6.2.tgz#6067e6294fee23728b008ac116e7e9db05cecb9b" + integrity sha512-O3Q7GVmRYm8q7HuB3S0+Yf/q/EB2egKRRU3fv9b3B7V+A52tKzA+vIwEmNVaD1g5FKW9oB97rmpggs0zaKFqHw== + dependencies: + "@polkadot/util" "12.6.2" + "@polkadot/util-crypto" "12.6.2" + tslib "^2.6.2" + +"@polkadot/networks@12.6.2", "@polkadot/networks@^12.6.2": + version "12.6.2" + resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-12.6.2.tgz#791779fee1d86cc5b6cd371858eea9b7c3f8720d" + integrity sha512-1oWtZm1IvPWqvMrldVH6NI2gBoCndl5GEwx7lAuQWGr7eNL+6Bdc5K3Z9T0MzFvDGoi2/CBqjX9dRKo39pDC/w== + dependencies: + "@polkadot/util" "12.6.2" + "@substrate/ss58-registry" "^1.44.0" + tslib "^2.6.2" + +"@polkadot/rpc-augment@11.3.1": + version "11.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-augment/-/rpc-augment-11.3.1.tgz#b589ef5b7ab578cf274077604543071ce9889301" + integrity sha512-2PaDcKNju4QYQpxwVkWbRU3M0t340nMX9cMo+8awgvgL1LliV/fUDZueMKLuSS910JJMTPQ7y2pK4eQgMt08gQ== + dependencies: + "@polkadot/rpc-core" "11.3.1" + "@polkadot/types" "11.3.1" + "@polkadot/types-codec" "11.3.1" + "@polkadot/util" "^12.6.2" + tslib "^2.6.2" + +"@polkadot/rpc-core@11.3.1": + version "11.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-11.3.1.tgz#c23e23ee5c403c4edb207d603ae4dc16e69bc710" + integrity sha512-KKNepsDd/mpmXcA6v/h14eFFPEzLGd7nrvx2UUXUxoZ0Fq2MH1hplP3s93k1oduNY/vOXJR2K9S4dKManA6GVQ== + dependencies: + "@polkadot/rpc-augment" "11.3.1" + "@polkadot/rpc-provider" "11.3.1" + "@polkadot/types" "11.3.1" + "@polkadot/util" "^12.6.2" + rxjs "^7.8.1" + tslib "^2.6.2" + +"@polkadot/rpc-provider@11.3.1": + version "11.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-11.3.1.tgz#1d1289bf42d065b5f04f9baa46ef90d96940819e" + integrity sha512-pqERChoHo45hd3WAgW8UuzarRF+G/o/eXEbl0PXLubiayw4X4qCmIzmtntUcKYgxGNcYGZaG87ZU8OjN97m6UA== + dependencies: + "@polkadot/keyring" "^12.6.2" + "@polkadot/types" "11.3.1" + "@polkadot/types-support" "11.3.1" + "@polkadot/util" "^12.6.2" + "@polkadot/util-crypto" "^12.6.2" + "@polkadot/x-fetch" "^12.6.2" + "@polkadot/x-global" "^12.6.2" + "@polkadot/x-ws" "^12.6.2" + eventemitter3 "^5.0.1" + mock-socket "^9.3.1" + nock "^13.5.0" + tslib "^2.6.2" + optionalDependencies: + "@substrate/connect" "0.8.10" + +"@polkadot/types-augment@11.3.1": + version "11.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-augment/-/types-augment-11.3.1.tgz#1f7f553f0ca6eb8fbc0306901edc045fe18729e1" + integrity sha512-eR3HVpvUmB3v7q2jTWVmVfAVfb1/kuNn7ij94Zqadg/fuUq0pKqIOKwkUj3OxRM3A/5BnW3MbgparjKD3r+fyw== + dependencies: + "@polkadot/types" "11.3.1" + "@polkadot/types-codec" "11.3.1" + "@polkadot/util" "^12.6.2" + tslib "^2.6.2" + +"@polkadot/types-codec@11.3.1": + version "11.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-codec/-/types-codec-11.3.1.tgz#2767cf482cd49afdd5dce9701615f68ec59cec5e" + integrity sha512-i7IiiuuL+Z/jFoKTA9xeh4wGQnhnNNjMT0+1ohvlOvnFsoKZKFQQOaDPPntGJVL1JDCV+KjkN2uQKZSeW8tguQ== + dependencies: + "@polkadot/util" "^12.6.2" + "@polkadot/x-bigint" "^12.6.2" + tslib "^2.6.2" + +"@polkadot/types-create@11.3.1": + version "11.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-create/-/types-create-11.3.1.tgz#3ac2c8283f61555f9e572ca30e3485b95a0a54e2" + integrity sha512-pBXtpz5FehcRJ6j5MzFUIUN8ZWM7z6HbqK1GxBmYbJVRElcGcOg7a/rL2pQVphU0Rx1E8bSO4thzGf4wUxSX7w== + dependencies: + "@polkadot/types-codec" "11.3.1" + "@polkadot/util" "^12.6.2" + tslib "^2.6.2" + +"@polkadot/types-known@11.3.1": + version "11.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-11.3.1.tgz#fc34ed29ac2474db6b66805a15d12008226346bb" + integrity sha512-3BIof7u6tn9bk3ZCIxA07iNoQ3uj4+vn3DTOjCKECozkRlt6V+kWRvqh16Hc0SHMg/QjcMb2fIu/WZhka1McUQ== + dependencies: + "@polkadot/networks" "^12.6.2" + "@polkadot/types" "11.3.1" + "@polkadot/types-codec" "11.3.1" + "@polkadot/types-create" "11.3.1" + "@polkadot/util" "^12.6.2" + tslib "^2.6.2" + +"@polkadot/types-support@11.3.1": + version "11.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-support/-/types-support-11.3.1.tgz#dee02a67784baa13177fe9957f5d8d62e8a7e570" + integrity sha512-jTFz1GKyF7nI29yIOq4v0NiWTOf5yX4HahJNeFD8TcxoLhF+6tH/XXqrUXJEfbaTlSrRWiW1LZYlb+snctqKHA== + dependencies: + "@polkadot/util" "^12.6.2" + tslib "^2.6.2" + +"@polkadot/types@11.3.1": + version "11.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-11.3.1.tgz#bab61b701218158099e3f548d20efc27cbf1287f" + integrity sha512-5c7uRFXQTT11Awi6T0yFIdAfD6xGDAOz06Kp7M5S9OGNZY28wSPk5x6BYfNphWPaIBmHHewYJB5qmnrdYQAWKQ== + dependencies: + "@polkadot/keyring" "^12.6.2" + "@polkadot/types-augment" "11.3.1" + "@polkadot/types-codec" "11.3.1" + "@polkadot/types-create" "11.3.1" + "@polkadot/util" "^12.6.2" + "@polkadot/util-crypto" "^12.6.2" + rxjs "^7.8.1" + tslib "^2.6.2" + +"@polkadot/util-crypto@12.6.2", "@polkadot/util-crypto@^12.5.1", "@polkadot/util-crypto@^12.6.2": + version "12.6.2" + resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-12.6.2.tgz#d2d51010e8e8ca88951b7d864add797dad18bbfc" + integrity sha512-FEWI/dJ7wDMNN1WOzZAjQoIcCP/3vz3wvAp5QQm+lOrzOLj0iDmaIGIcBkz8HVm3ErfSe/uKP0KS4jgV/ib+Mg== + dependencies: + "@noble/curves" "^1.3.0" + "@noble/hashes" "^1.3.3" + "@polkadot/networks" "12.6.2" + "@polkadot/util" "12.6.2" + "@polkadot/wasm-crypto" "^7.3.2" + "@polkadot/wasm-util" "^7.3.2" + "@polkadot/x-bigint" "12.6.2" + "@polkadot/x-randomvalues" "12.6.2" + "@scure/base" "^1.1.5" + tslib "^2.6.2" + +"@polkadot/util@12.6.2", "@polkadot/util@^12.5.1", "@polkadot/util@^12.6.2": + version "12.6.2" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-12.6.2.tgz#9396eff491221e1f0fd28feac55fc16ecd61a8dc" + integrity sha512-l8TubR7CLEY47240uki0TQzFvtnxFIO7uI/0GoWzpYD/O62EIAMRsuY01N4DuwgKq2ZWD59WhzsLYmA5K6ksdw== + dependencies: + "@polkadot/x-bigint" "12.6.2" + "@polkadot/x-global" "12.6.2" + "@polkadot/x-textdecoder" "12.6.2" + "@polkadot/x-textencoder" "12.6.2" + "@types/bn.js" "^5.1.5" + bn.js "^5.2.1" + tslib "^2.6.2" + +"@polkadot/wasm-bridge@7.3.2": + version "7.3.2" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-bridge/-/wasm-bridge-7.3.2.tgz#e1b01906b19e06cbca3d94f10f5666f2ae0baadc" + integrity sha512-AJEXChcf/nKXd5Q/YLEV5dXQMle3UNT7jcXYmIffZAo/KI394a+/24PaISyQjoNC0fkzS1Q8T5pnGGHmXiVz2g== + dependencies: + "@polkadot/wasm-util" "7.3.2" + tslib "^2.6.2" + +"@polkadot/wasm-crypto-asmjs@7.3.2": + version "7.3.2" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-7.3.2.tgz#c6d41bc4b48b5359d57a24ca3066d239f2d70a34" + integrity sha512-QP5eiUqUFur/2UoF2KKKYJcesc71fXhQFLT3D4ZjG28Mfk2ZPI0QNRUfpcxVQmIUpV5USHg4geCBNuCYsMm20Q== + dependencies: + tslib "^2.6.2" + +"@polkadot/wasm-crypto-init@7.3.2": + version "7.3.2" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-init/-/wasm-crypto-init-7.3.2.tgz#7e1fe79ba978fb0a4a0f74a92d976299d38bc4b8" + integrity sha512-FPq73zGmvZtnuJaFV44brze3Lkrki3b4PebxCy9Fplw8nTmisKo9Xxtfew08r0njyYh+uiJRAxPCXadkC9sc8g== + dependencies: + "@polkadot/wasm-bridge" "7.3.2" + "@polkadot/wasm-crypto-asmjs" "7.3.2" + "@polkadot/wasm-crypto-wasm" "7.3.2" + "@polkadot/wasm-util" "7.3.2" + tslib "^2.6.2" + +"@polkadot/wasm-crypto-wasm@7.3.2": + version "7.3.2" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-7.3.2.tgz#44e08ed5cf6499ce4a3aa7247071a5d01f6a74f4" + integrity sha512-15wd0EMv9IXs5Abp1ZKpKKAVyZPhATIAHfKsyoWCEFDLSOA0/K0QGOxzrAlsrdUkiKZOq7uzSIgIDgW8okx2Mw== + dependencies: + "@polkadot/wasm-util" "7.3.2" + tslib "^2.6.2" + +"@polkadot/wasm-crypto@^7.3.2": + version "7.3.2" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto/-/wasm-crypto-7.3.2.tgz#61bbcd9e591500705c8c591e6aff7654bdc8afc9" + integrity sha512-+neIDLSJ6jjVXsjyZ5oLSv16oIpwp+PxFqTUaZdZDoA2EyFRQB8pP7+qLsMNk+WJuhuJ4qXil/7XiOnZYZ+wxw== + dependencies: + "@polkadot/wasm-bridge" "7.3.2" + "@polkadot/wasm-crypto-asmjs" "7.3.2" + "@polkadot/wasm-crypto-init" "7.3.2" + "@polkadot/wasm-crypto-wasm" "7.3.2" + "@polkadot/wasm-util" "7.3.2" + tslib "^2.6.2" + +"@polkadot/wasm-util@7.3.2", "@polkadot/wasm-util@^7.3.2": + version "7.3.2" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-util/-/wasm-util-7.3.2.tgz#4fe6370d2b029679b41a5c02cd7ebf42f9b28de1" + integrity sha512-bmD+Dxo1lTZyZNxbyPE380wd82QsX+43mgCm40boyKrRppXEyQmWT98v/Poc7chLuskYb6X8IQ6lvvK2bGR4Tg== + dependencies: + tslib "^2.6.2" + +"@polkadot/x-bigint@12.6.2", "@polkadot/x-bigint@^12.6.2": + version "12.6.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-bigint/-/x-bigint-12.6.2.tgz#59b7a615f205ae65e1ac67194aefde94d3344580" + integrity sha512-HSIk60uFPX4GOFZSnIF7VYJz7WZA7tpFJsne7SzxOooRwMTWEtw3fUpFy5cYYOeLh17/kHH1Y7SVcuxzVLc74Q== + dependencies: + "@polkadot/x-global" "12.6.2" + tslib "^2.6.2" + +"@polkadot/x-fetch@^12.6.2": + version "12.6.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-12.6.2.tgz#b1bca028db90263bafbad2636c18d838d842d439" + integrity sha512-8wM/Z9JJPWN1pzSpU7XxTI1ldj/AfC8hKioBlUahZ8gUiJaOF7K9XEFCrCDLis/A1BoOu7Ne6WMx/vsJJIbDWw== + dependencies: + "@polkadot/x-global" "12.6.2" + node-fetch "^3.3.2" + tslib "^2.6.2" + +"@polkadot/x-global@12.6.2", "@polkadot/x-global@^12.6.2": + version "12.6.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-12.6.2.tgz#31d4de1c3d4c44e4be3219555a6d91091decc4ec" + integrity sha512-a8d6m+PW98jmsYDtAWp88qS4dl8DyqUBsd0S+WgyfSMtpEXu6v9nXDgPZgwF5xdDvXhm+P0ZfVkVTnIGrScb5g== + dependencies: + tslib "^2.6.2" + +"@polkadot/x-randomvalues@12.6.2": + version "12.6.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-12.6.2.tgz#13fe3619368b8bf5cb73781554859b5ff9d900a2" + integrity sha512-Vr8uG7rH2IcNJwtyf5ebdODMcr0XjoCpUbI91Zv6AlKVYOGKZlKLYJHIwpTaKKB+7KPWyQrk4Mlym/rS7v9feg== + dependencies: + "@polkadot/x-global" "12.6.2" + tslib "^2.6.2" + +"@polkadot/x-textdecoder@12.6.2": + version "12.6.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-12.6.2.tgz#b86da0f8e8178f1ca31a7158257e92aea90b10e4" + integrity sha512-M1Bir7tYvNappfpFWXOJcnxUhBUFWkUFIdJSyH0zs5LmFtFdbKAeiDXxSp2Swp5ddOZdZgPac294/o2TnQKN1w== + dependencies: + "@polkadot/x-global" "12.6.2" + tslib "^2.6.2" + +"@polkadot/x-textencoder@12.6.2": + version "12.6.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-12.6.2.tgz#81d23bd904a2c36137a395c865c5fefa21abfb44" + integrity sha512-4N+3UVCpI489tUJ6cv3uf0PjOHvgGp9Dl+SZRLgFGt9mvxnvpW/7+XBADRMtlG4xi5gaRK7bgl5bmY6OMDsNdw== + dependencies: + "@polkadot/x-global" "12.6.2" + tslib "^2.6.2" + +"@polkadot/x-ws@^12.6.2": + version "12.6.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-12.6.2.tgz#b99094d8e53a03be1de903d13ba59adaaabc767a" + integrity sha512-cGZWo7K5eRRQCRl2LrcyCYsrc3lRbTlixZh3AzgU8uX4wASVGRlNWi/Hf4TtHNe1ExCDmxabJzdIsABIfrr7xw== + dependencies: + "@polkadot/x-global" "12.6.2" + tslib "^2.6.2" + ws "^8.15.1" + +"@scure/base@^1.1.1", "@scure/base@^1.1.5": + version "1.1.7" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.7.tgz#fe973311a5c6267846aa131bc72e96c5d40d2b30" + integrity sha512-PPNYBslrLNNUQ/Yad37MHYsNQtK67EhWb6WtSvNLLPo7SdVZgkUjD6Dg+5On7zNwmskf8OX7I7Nx5oN+MIWE0g== + +"@substrate/connect-extension-protocol@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@substrate/connect-extension-protocol/-/connect-extension-protocol-2.0.0.tgz#badaa6e6b5f7c7d56987d778f4944ddb83cd9ea7" + integrity sha512-nKu8pDrE3LNCEgJjZe1iGXzaD6OSIDD4Xzz/yo4KO9mQ6LBvf49BVrt4qxBFGL6++NneLiWUZGoh+VSd4PyVIg== + +"@substrate/connect-known-chains@^1.1.4": + version "1.1.6" + resolved "https://registry.yarnpkg.com/@substrate/connect-known-chains/-/connect-known-chains-1.1.6.tgz#2627d329b82b46c7d745752c48c73e1b8ce6ac81" + integrity sha512-JwtdGbnK3ZqrY1qp3Ifr/p648sp9hG0Q715h4nRghnqZJnMQIiLKaFkcLnvrAiYQD3zNTYDztHidy5Q/u0TcbQ== + +"@substrate/connect@0.8.10": + version "0.8.10" + resolved "https://registry.yarnpkg.com/@substrate/connect/-/connect-0.8.10.tgz#810b6589f848828aa840c731a1f36b84fe0e5956" + integrity sha512-DIyQ13DDlXqVFnLV+S6/JDgiGowVRRrh18kahieJxhgvzcWicw5eLc6jpfQ0moVVLBYkO7rctB5Wreldwpva8w== + dependencies: + "@substrate/connect-extension-protocol" "^2.0.0" + "@substrate/connect-known-chains" "^1.1.4" + "@substrate/light-client-extension-helpers" "^0.0.6" + smoldot "2.0.22" + +"@substrate/light-client-extension-helpers@^0.0.6": + version "0.0.6" + resolved "https://registry.yarnpkg.com/@substrate/light-client-extension-helpers/-/light-client-extension-helpers-0.0.6.tgz#bec1c7997241226db50b44ad85a992b4348d21c3" + integrity sha512-girltEuxQ1BvkJWmc8JJlk4ZxnlGXc/wkLcNguhY+UoDEMBK0LsdtfzQKIfrIehi4QdeSBlFEFBoI4RqPmsZzA== + dependencies: + "@polkadot-api/json-rpc-provider" "0.0.1" + "@polkadot-api/json-rpc-provider-proxy" "0.0.1" + "@polkadot-api/observable-client" "0.1.0" + "@polkadot-api/substrate-client" "0.0.1" + "@substrate/connect-extension-protocol" "^2.0.0" + "@substrate/connect-known-chains" "^1.1.4" + rxjs "^7.8.1" + +"@substrate/ss58-registry@^1.44.0": + version "1.49.0" + resolved "https://registry.yarnpkg.com/@substrate/ss58-registry/-/ss58-registry-1.49.0.tgz#ed9507316d13f49b2bccb65f08ec97180f71fc39" + integrity sha512-leW6Ix4LD7XgvxT7+aobPWSw+WvPcN2Rxof1rmd0mNC5t2n99k1N7UNEvz7YEFSOUeHWmKIY7F5q8KeIqYoHfA== + +"@types/bn.js@^5.1.5": + version "5.1.5" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.5.tgz#2e0dacdcce2c0f16b905d20ff87aedbc6f7b4bf0" + integrity sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A== + dependencies: + "@types/node" "*" + +"@types/node@*": + version "20.14.8" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.8.tgz#45c26a2a5de26c3534a9504530ddb3b27ce031ac" + integrity sha512-DO+2/jZinXfROG7j7WKFn/3C6nFwxy2lLpgLjEXJz+0XKphZlTLJ14mo8Vfg8X5BWN6XjyESXq+LcYdT7tR3bA== + dependencies: + undici-types "~5.26.4" + +bn.js@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== + +data-uri-to-buffer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" + integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== + +debug@^4.1.0: + version "4.3.5" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" + integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== + dependencies: + ms "2.1.2" + +eventemitter3@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" + integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== + +fetch-blob@^3.1.2, fetch-blob@^3.1.4: + version "3.2.0" + resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9" + integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ== + dependencies: + node-domexception "^1.0.0" + web-streams-polyfill "^3.0.3" + +formdata-polyfill@^4.0.10: + version "4.0.10" + resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423" + integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g== + dependencies: + fetch-blob "^3.1.2" + +json-stringify-safe@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== + +mock-socket@^9.3.1: + version "9.3.1" + resolved "https://registry.yarnpkg.com/mock-socket/-/mock-socket-9.3.1.tgz#24fb00c2f573c84812aa4a24181bb025de80cc8e" + integrity sha512-qxBgB7Qa2sEQgHFjj0dSigq7fX4k6Saisd5Nelwp2q8mlbAFh5dHV9JTTlF8viYJLSSWgMCZFUom8PJcMNBoJw== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +nock@^13.5.0: + version "13.5.4" + resolved "https://registry.yarnpkg.com/nock/-/nock-13.5.4.tgz#8918f0addc70a63736170fef7106a9721e0dc479" + integrity sha512-yAyTfdeNJGGBFxWdzSKCBYxs5FxLbCg5X5Q4ets974hcQzG1+qCxvIyOo4j2Ry6MUlhWVMX4OoYDefAIIwupjw== + dependencies: + debug "^4.1.0" + json-stringify-safe "^5.0.1" + propagate "^2.0.0" + +node-domexception@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" + integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== + +node-fetch@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b" + integrity sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA== + dependencies: + data-uri-to-buffer "^4.0.0" + fetch-blob "^3.1.4" + formdata-polyfill "^4.0.10" + +propagate@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/propagate/-/propagate-2.0.1.tgz#40cdedab18085c792334e64f0ac17256d38f9a45" + integrity sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag== + +rxjs@^7.8.1: + version "7.8.1" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" + integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== + dependencies: + tslib "^2.1.0" + +scale-ts@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/scale-ts/-/scale-ts-1.6.0.tgz#e9641093c5a9e50f964ddb1607139034e3e932e9" + integrity sha512-Ja5VCjNZR8TGKhUumy9clVVxcDpM+YFjAnkMuwQy68Hixio3VRRvWdE3g8T/yC+HXA0ZDQl2TGyUmtmbcVl40Q== + +smoldot@2.0.22: + version "2.0.22" + resolved "https://registry.yarnpkg.com/smoldot/-/smoldot-2.0.22.tgz#1e924d2011a31c57416e79a2b97a460f462a31c7" + integrity sha512-B50vRgTY6v3baYH6uCgL15tfaag5tcS2o/P5q1OiXcKGv1axZDfz2dzzMuIkVpyMR2ug11F6EAtQlmYBQd292g== + dependencies: + ws "^8.8.1" + +tslib@^2.1.0, tslib@^2.6.2: + version "2.6.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" + integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== + +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + +web-streams-polyfill@^3.0.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz#2073b91a2fdb1fbfbd401e7de0ac9f8214cecb4b" + integrity sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw== + +ws@^8.15.1, ws@^8.8.1: + version "8.17.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" + integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==