Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix vanilla rutime
  • Loading branch information
mclyk committed Nov 24, 2022
commit 508420423e90a2fb16bbbcaeee4978e7711b8240
2 changes: 1 addition & 1 deletion runtime/vanilla/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ pub mod fee {
fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
// in vanilla, extrinsic base weight (smallest non-zero weight) is mapped to 12 CENTS
let p = super::currency::CENTS * 12;
let q = Balance::from(ExtrinsicBaseWeight::get());
let q = Balance::from(ExtrinsicBaseWeight::get().ref_time());
smallvec![WeightToFeeCoefficient {
degree: 1,
negative: false,
Expand Down
348 changes: 170 additions & 178 deletions runtime/vanilla/src/lib.rs

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions runtime/vanilla/src/precompiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use frame_support::weights::GetDispatchInfo;
use frame_support::weights::PostDispatchInfo;
use frame_support::dispatch::GetDispatchInfo;
use frame_support::dispatch::PostDispatchInfo;
use pallet_evm::{
ExitRevert, Precompile, PrecompileFailure, PrecompileHandle, PrecompileResult, PrecompileSet,
};
Expand Down Expand Up @@ -66,7 +66,7 @@ where
+ pallet_balances::Config,
R::RuntimeCall: Dispatchable<PostInfo = PostDispatchInfo> + GetDispatchInfo,
<R as frame_system::Config>::RuntimeCall: From<polkadot_runtime_common::BalancesCall<R>>,
<<R as frame_system::Config>::RuntimeCall as Dispatchable>::Origin:
<<R as frame_system::Config>::RuntimeCall as Dispatchable>::RuntimeOrigin:
From<Option<<R as frame_system::Config>::AccountId>>,
<R as pallet_balances::Config>::Balance: TryFrom<sp_core::U256>,
<R as pallet_balances::Config>::Balance: Into<sp_core::U256>,
Expand Down
20 changes: 10 additions & 10 deletions runtime/vanilla/src/weights/frame_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-05-30, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("vanilla-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kerria-dev"), DB CACHE: 1024

// Executed Command:
// ./target/release/parallel
// benchmark
// pallet
// --chain=vanilla-dev
// --chain=kerria-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=frame_system
// --extrinsic=*
// --steps=50
// --repeat=20
// --output=./runtime/vanilla/src/weights/frame_system.rs
// --output=./runtime/kerria/src/weights/frame_system.rs

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
Expand All @@ -32,36 +32,36 @@ impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> {
Weight::from_ref_time(0 as u64)
}
fn remark_with_event(b: u32, ) -> Weight {
Weight::from_ref_time(17_860_000 as u64)
Weight::from_ref_time(13_176_000 as u64)
// Standard Error: 0
.saturating_add((2_000 as u64).saturating_mul(b as u64))
.saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(b as u64))
}
// Storage: System Digest (r:1 w:1)
// Storage: unknown [0x3a686561707061676573] (r:0 w:1)
fn set_heap_pages() -> Weight {
Weight::from_ref_time(9_241_000 as u64)
Weight::from_ref_time(9_294_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Skipped Metadata (r:0 w:0)
fn set_storage(i: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
// Standard Error: 1_000
.saturating_add((1_058_000 as u64).saturating_mul(i as u64))
.saturating_add(Weight::from_ref_time(1_048_000 as u64).saturating_mul(i as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64)))
}
// Storage: Skipped Metadata (r:0 w:0)
fn kill_storage(i: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
// Standard Error: 1_000
.saturating_add((752_000 as u64).saturating_mul(i as u64))
.saturating_add(Weight::from_ref_time(757_000 as u64).saturating_mul(i as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64)))
}
// Storage: Skipped Metadata (r:0 w:0)
fn kill_prefix(p: u32, ) -> Weight {
Weight::from_ref_time(1_225_000 as u64)
Weight::from_ref_time(0 as u64)
// Standard Error: 1_000
.saturating_add((1_483_000 as u64).saturating_mul(p as u64))
.saturating_add(Weight::from_ref_time(1_505_000 as u64).saturating_mul(p as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64)))
}
}
1 change: 0 additions & 1 deletion runtime/vanilla/src/weights/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ pub mod pallet_farming;
pub mod pallet_liquid_staking;
pub mod pallet_loans;
pub mod pallet_membership;
pub mod pallet_multisig;
pub mod pallet_router;
pub mod pallet_streaming;
pub mod pallet_timestamp;
Expand Down
16 changes: 8 additions & 8 deletions runtime/vanilla/src/weights/pallet_amm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-05-30, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("vanilla-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kerria-dev"), DB CACHE: 1024

// Executed Command:
// ./target/release/parallel
// benchmark
// pallet
// --chain=vanilla-dev
// --chain=kerria-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_amm
// --extrinsic=*
// --steps=50
// --repeat=20
// --output=./runtime/vanilla/src/weights/pallet_amm.rs
// --output=./runtime/kerria/src/weights/pallet_amm.rs

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
Expand All @@ -33,7 +33,7 @@ impl<T: frame_system::Config> pallet_amm::WeightInfo for WeightInfo<T> {
// Storage: Assets Asset (r:3 w:3)
// Storage: Assets Account (r:5 w:5)
fn add_liquidity() -> Weight {
Weight::from_ref_time(209_348_000 as u64)
Weight::from_ref_time(214_746_000 as u64)
.saturating_add(T::DbWeight::get().reads(10 as u64))
.saturating_add(T::DbWeight::get().writes(10 as u64))
}
Expand All @@ -42,7 +42,7 @@ impl<T: frame_system::Config> pallet_amm::WeightInfo for WeightInfo<T> {
// Storage: Assets Asset (r:3 w:3)
// Storage: Assets Account (r:5 w:5)
fn remove_liquidity() -> Weight {
Weight::from_ref_time(226_453_000 as u64)
Weight::from_ref_time(233_479_000 as u64)
.saturating_add(T::DbWeight::get().reads(10 as u64))
.saturating_add(T::DbWeight::get().writes(10 as u64))
}
Expand All @@ -52,16 +52,16 @@ impl<T: frame_system::Config> pallet_amm::WeightInfo for WeightInfo<T> {
// Storage: Assets Account (r:6 w:6)
// Storage: System Account (r:2 w:2)
fn create_pool() -> Weight {
Weight::from_ref_time(278_326_000 as u64)
Weight::from_ref_time(286_985_000 as u64)
.saturating_add(T::DbWeight::get().reads(13 as u64))
.saturating_add(T::DbWeight::get().writes(13 as u64))
}
// Storage: AMM ProtocolFee (r:0 w:1)
fn update_protocol_fee() -> Weight {
(4_067_000 as u64).saturating_add(T::DbWeight::get().writes(1 as u64))
Weight::from_ref_time(4_067_000 as u64).saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: AMM ProtocolFeeReceiver (r:0 w:1)
fn update_protocol_fee_receiver() -> Weight {
(4_114_000 as u64).saturating_add(T::DbWeight::get().writes(1 as u64))
Weight::from_ref_time(4_114_000 as u64).saturating_add(T::DbWeight::get().writes(1 as u64))
}
}
49 changes: 24 additions & 25 deletions runtime/vanilla/src/weights/pallet_liquid_staking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-05-30, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("vanilla-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kerria-dev"), DB CACHE: 1024

// Executed Command:
// ./target/release/parallel
// benchmark
// pallet
// --chain=vanilla-dev
// --chain=kerria-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_liquid_staking
// --extrinsic=*
// --steps=50
// --repeat=20
// --output=./runtime/vanilla/src/weights/pallet_liquid_staking.rs
// --output=./runtime/kerria/src/weights/pallet_liquid_staking.rs

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
Expand All @@ -40,7 +40,7 @@ impl<T: frame_system::Config> pallet_liquid_staking::WeightInfo for WeightInfo<T
// Storage: LiquidStaking MatchingPool (r:1 w:1)
// Storage: LiquidStaking TotalReserves (r:1 w:1)
fn stake() -> Weight {
Weight::from_ref_time(255_230_000 as u64)
Weight::from_ref_time(263_966_000 as u64)
.saturating_add(T::DbWeight::get().reads(17 as u64))
.saturating_add(T::DbWeight::get().writes(11 as u64))
}
Expand All @@ -53,7 +53,7 @@ impl<T: frame_system::Config> pallet_liquid_staking::WeightInfo for WeightInfo<T
// Storage: Assets Account (r:1 w:1)
// Storage: LiquidStaking MatchingPool (r:1 w:1)
fn unstake() -> Weight {
Weight::from_ref_time(113_116_000 as u64)
Weight::from_ref_time(116_043_000 as u64)
.saturating_add(T::DbWeight::get().reads(8 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
Expand All @@ -74,7 +74,7 @@ impl<T: frame_system::Config> pallet_liquid_staking::WeightInfo for WeightInfo<T
// Storage: LiquidStaking XcmRequests (r:0 w:1)
// Storage: PolkadotXcm Queries (r:0 w:1)
fn bond() -> Weight {
Weight::from_ref_time(185_924_000 as u64)
Weight::from_ref_time(191_015_000 as u64)
.saturating_add(T::DbWeight::get().reads(14 as u64))
.saturating_add(T::DbWeight::get().writes(9 as u64))
}
Expand All @@ -93,7 +93,7 @@ impl<T: frame_system::Config> pallet_liquid_staking::WeightInfo for WeightInfo<T
// Storage: LiquidStaking XcmRequests (r:0 w:1)
// Storage: PolkadotXcm Queries (r:0 w:1)
fn nominate() -> Weight {
Weight::from_ref_time(171_810_000 as u64)
Weight::from_ref_time(174_652_000 as u64)
.saturating_add(T::DbWeight::get().reads(12 as u64))
.saturating_add(T::DbWeight::get().writes(8 as u64))
}
Expand All @@ -114,7 +114,7 @@ impl<T: frame_system::Config> pallet_liquid_staking::WeightInfo for WeightInfo<T
// Storage: LiquidStaking XcmRequests (r:0 w:1)
// Storage: PolkadotXcm Queries (r:0 w:1)
fn bond_extra() -> Weight {
Weight::from_ref_time(190_442_000 as u64)
Weight::from_ref_time(192_979_000 as u64)
.saturating_add(T::DbWeight::get().reads(14 as u64))
.saturating_add(T::DbWeight::get().writes(9 as u64))
}
Expand All @@ -123,7 +123,7 @@ impl<T: frame_system::Config> pallet_liquid_staking::WeightInfo for WeightInfo<T
// Storage: LiquidStaking IsUpdated (r:1 w:1)
// Storage: LiquidStaking XcmRequests (r:1 w:0)
fn force_set_staking_ledger() -> Weight {
Weight::from_ref_time(70_417_000 as u64)
Weight::from_ref_time(70_741_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
Expand All @@ -143,7 +143,7 @@ impl<T: frame_system::Config> pallet_liquid_staking::WeightInfo for WeightInfo<T
// Storage: LiquidStaking XcmRequests (r:0 w:1)
// Storage: PolkadotXcm Queries (r:0 w:1)
fn unbond() -> Weight {
Weight::from_ref_time(180_378_000 as u64)
Weight::from_ref_time(183_113_000 as u64)
.saturating_add(T::DbWeight::get().reads(13 as u64))
.saturating_add(T::DbWeight::get().writes(9 as u64))
}
Expand All @@ -163,7 +163,7 @@ impl<T: frame_system::Config> pallet_liquid_staking::WeightInfo for WeightInfo<T
// Storage: LiquidStaking XcmRequests (r:0 w:1)
// Storage: PolkadotXcm Queries (r:0 w:1)
fn rebond() -> Weight {
Weight::from_ref_time(178_826_000 as u64)
Weight::from_ref_time(179_752_000 as u64)
.saturating_add(T::DbWeight::get().reads(13 as u64))
.saturating_add(T::DbWeight::get().writes(9 as u64))
}
Expand All @@ -183,21 +183,21 @@ impl<T: frame_system::Config> pallet_liquid_staking::WeightInfo for WeightInfo<T
// Storage: LiquidStaking XcmRequests (r:0 w:1)
// Storage: PolkadotXcm Queries (r:0 w:1)
fn withdraw_unbonded() -> Weight {
Weight::from_ref_time(184_703_000 as u64)
Weight::from_ref_time(184_199_000 as u64)
.saturating_add(T::DbWeight::get().reads(13 as u64))
.saturating_add(T::DbWeight::get().writes(8 as u64))
}
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: LiquidStaking ReserveFactor (r:1 w:1)
fn update_reserve_factor() -> Weight {
Weight::from_ref_time(35_456_000 as u64)
Weight::from_ref_time(37_115_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: LiquidStaking StakingLedgerCap (r:1 w:1)
fn update_staking_ledger_cap() -> Weight {
Weight::from_ref_time(35_101_000 as u64)
Weight::from_ref_time(36_387_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
Expand All @@ -210,7 +210,7 @@ impl<T: frame_system::Config> pallet_liquid_staking::WeightInfo for WeightInfo<T
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:1 w:1)
fn notification_received() -> Weight {
Weight::from_ref_time(126_898_000 as u64)
Weight::from_ref_time(128_865_000 as u64)
.saturating_add(T::DbWeight::get().reads(8 as u64))
.saturating_add(T::DbWeight::get().writes(6 as u64))
}
Expand All @@ -223,22 +223,22 @@ impl<T: frame_system::Config> pallet_liquid_staking::WeightInfo for WeightInfo<T
// Storage: LiquidStaking TotalReserves (r:1 w:0)
// Storage: LiquidStaking MatchingPool (r:1 w:0)
fn claim_for() -> Weight {
Weight::from_ref_time(145_723_000 as u64)
Weight::from_ref_time(147_691_000 as u64)
.saturating_add(T::DbWeight::get().reads(9 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: LiquidStaking EraStartBlock (r:0 w:1)
fn force_set_era_start_block() -> Weight {
Weight::from_ref_time(11_481_000 as u64)
Weight::from_ref_time(11_484_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: LiquidStaking CurrentEra (r:0 w:1)
// Storage: LiquidStaking IsMatched (r:0 w:1)
fn force_set_current_era() -> Weight {
Weight::from_ref_time(12_985_000 as u64)
Weight::from_ref_time(13_328_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
Expand All @@ -247,7 +247,7 @@ impl<T: frame_system::Config> pallet_liquid_staking::WeightInfo for WeightInfo<T
// Storage: LiquidStaking IsMatched (r:1 w:0)
// Storage: LiquidStaking EraStartBlock (r:1 w:0)
fn on_initialize() -> Weight {
Weight::from_ref_time(18_550_000 as u64)
Weight::from_ref_time(18_562_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
Expand All @@ -274,7 +274,7 @@ impl<T: frame_system::Config> pallet_liquid_staking::WeightInfo for WeightInfo<T
// Storage: LiquidStaking XcmRequests (r:0 w:2)
// Storage: PolkadotXcm Queries (r:0 w:2)
fn force_advance_era() -> Weight {
Weight::from_ref_time(430_626_000 as u64)
Weight::from_ref_time(426_868_000 as u64)
.saturating_add(T::DbWeight::get().reads(22 as u64))
.saturating_add(T::DbWeight::get().writes(15 as u64))
}
Expand All @@ -297,7 +297,7 @@ impl<T: frame_system::Config> pallet_liquid_staking::WeightInfo for WeightInfo<T
// Storage: LiquidStaking XcmRequests (r:0 w:2)
// Storage: PolkadotXcm Queries (r:0 w:2)
fn force_matching() -> Weight {
Weight::from_ref_time(362_397_000 as u64)
Weight::from_ref_time(358_694_000 as u64)
.saturating_add(T::DbWeight::get().reads(18 as u64))
.saturating_add(T::DbWeight::get().writes(12 as u64))
}
Expand All @@ -307,7 +307,7 @@ impl<T: frame_system::Config> pallet_liquid_staking::WeightInfo for WeightInfo<T
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:2 w:2)
fn reduce_reserves() -> Weight {
Weight::from_ref_time(114_960_000 as u64)
Weight::from_ref_time(120_292_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
Expand All @@ -320,7 +320,7 @@ impl<T: frame_system::Config> pallet_liquid_staking::WeightInfo for WeightInfo<T
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:1 w:1)
fn cancel_unstake() -> Weight {
Weight::from_ref_time(108_382_000 as u64)
Weight::from_ref_time(109_728_000 as u64)
.saturating_add(T::DbWeight::get().reads(8 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
Expand All @@ -330,11 +330,10 @@ impl<T: frame_system::Config> pallet_liquid_staking::WeightInfo for WeightInfo<T
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}

fn fast_match_unstake(n: u32, ) -> Weight {
Weight::from_ref_time(21_480_000 as u64)
// Standard Error: 38_000
.saturating_add((82_727_000 as u64).saturating_mul(n as u64))
.saturating_add(Weight::from_ref_time(82_727_000 as u64).saturating_mul(n as u64))
.saturating_add(T::DbWeight::get().reads(7 as u64))
.saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(n as u64)))
.saturating_add(T::DbWeight::get().writes(4 as u64))
Expand Down
Loading