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
update heiko-runtime and weight
  • Loading branch information
mclyk committed Nov 24, 2022
commit 12fea6437f4b08bbf0cd1d68c02cf01939f9d268
2 changes: 1 addition & 1 deletion precompiles/assets-erc20/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ impl pallet_balances::Config for Runtime {
parameter_types! {
pub const PrecompilesValue: Erc20AssetsPrecompileSet<Runtime> =
Erc20AssetsPrecompileSet(PhantomData);
pub WeightPerGas: u64 = 20_000;
pub WeightPerGas: u64 = 1;
}

impl pallet_evm::Config for Runtime {
Expand Down
2 changes: 1 addition & 1 deletion precompiles/balances-erc20/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ impl pallet_balances::Config for Runtime {
parameter_types! {
pub BlockGasLimit: U256 = U256::max_value();
pub const PrecompilesValue: Precompiles<Runtime> = Precompiles(PhantomData);
pub WeightPerGas: u64 = 20_000;
pub WeightPerGas: u64 = 1;
}

impl pallet_evm::Config for Runtime {
Expand Down
2 changes: 1 addition & 1 deletion runtime/heiko/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 heiko, 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
263 changes: 132 additions & 131 deletions runtime/heiko/src/lib.rs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions runtime/heiko/src/weights/cumulus_pallet_xcmp_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo<T> {
// Storage: XcmpQueue QueueConfig (r:1 w:1)
fn set_config_with_u32() -> Weight {
(10_012_000 as u64)
Weight::from_ref_time(10_012_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: XcmpQueue QueueConfig (r:1 w:1)
fn set_config_with_weight() -> Weight {
(10_079_000 as u64)
Weight::from_ref_time(10_079_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
Expand Down
22 changes: 11 additions & 11 deletions runtime/heiko/src/weights/frame_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,45 +31,45 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> {
/// The range of component `b` is `[0, 3932160]`.
fn remark(b: u32, ) -> Weight {
(3_703_000 as u64)
Weight::from_ref_time(3_703_000 as u64)
// Standard Error: 0
.saturating_add((1_000 as u64).saturating_mul(b as u64))
.saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(b as u64))
}
/// The range of component `b` is `[0, 3932160]`.
fn remark_with_event(b: u32, ) -> Weight {
(0 as u64)
Weight::from_ref_time(0 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 {
(9_860_000 as u64)
Weight::from_ref_time(9_860_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)
/// The range of component `i` is `[1, 1000]`.
fn set_storage(i: u32, ) -> Weight {
(0 as u64)
Weight::from_ref_time(0 as u64)
// Standard Error: 1_000
.saturating_add((1_021_000 as u64).saturating_mul(i as u64))
.saturating_add(Weight::from_ref_time(1_021_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)
/// The range of component `i` is `[1, 1000]`.
fn kill_storage(i: u32, ) -> Weight {
(0 as u64)
Weight::from_ref_time(0 as u64)
// Standard Error: 2_000
.saturating_add((799_000 as u64).saturating_mul(i as u64))
.saturating_add(Weight::from_ref_time(799_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)
/// The range of component `p` is `[1, 1000]`.
fn kill_prefix(p: u32, ) -> Weight {
(0 as u64)
Weight::from_ref_time(0 as u64)
// Standard Error: 2_000
.saturating_add((1_572_000 as u64).saturating_mul(p as u64))
.saturating_add(Weight::from_ref_time(1_572_000 as u64).saturating_mul(p as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64)))
}
}
6 changes: 3 additions & 3 deletions runtime/heiko/src/weights/orml_oracle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,17 @@ impl<T: frame_system::Config> orml_oracle::WeightInfo for WeightInfo<T> {
// Storage: ParallelOracle Values (r:1 w:0)
// Storage: ParallelOracle RawValues (r:0 w:1)
fn feed_values(c: u32, ) -> Weight {
(18_441_000 as u64)
Weight::from_ref_time(18_441_000 as u64)
// Standard Error: 88_000
.saturating_add((6_603_000 as u64).saturating_mul(c as u64))
.saturating_add(Weight::from_ref_time(6_603_000 as u64).saturating_mul(c as u64))
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(c as u64)))
.saturating_add(T::DbWeight::get().writes(2 as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(c as u64)))
}
// Storage: ParallelOracle HasDispatched (r:0 w:1)
fn on_finalize() -> Weight {
(3_578_000 as u64)
Weight::from_ref_time(3_578_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
}
10 changes: 5 additions & 5 deletions runtime/heiko/src/weights/orml_vesting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl<T: frame_system::Config> orml_vesting::WeightInfo for WeightInfo<T> {
// Storage: ParachainSystem ValidationData (r:1 w:0)
// Storage: Vesting VestingSchedules (r:1 w:1)
fn vested_transfer() -> Weight {
(21_960_000 as u64)
Weight::from_ref_time(21_960_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
Expand All @@ -60,19 +60,19 @@ impl<T: frame_system::Config> orml_vesting::WeightInfo for WeightInfo<T> {
// Storage: Vesting VestingSchedules (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
fn claim(i: u32, ) -> Weight {
(32_915_000 as u64)
Weight::from_ref_time(32_915_000 as u64)
// Standard Error: 0
.saturating_add((15_000 as u64).saturating_mul(i as u64))
.saturating_add(Weight::from_ref_time(15_000 as u64).saturating_mul(i as u64))
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: System Account (r:1 w:0)
// Storage: Vesting VestingSchedules (r:0 w:1)
fn update_vesting_schedules(i: u32, ) -> Weight {
(27_534_000 as u64)
Weight::from_ref_time(27_534_000 as u64)
// Standard Error: 0
.saturating_add((60_000 as u64).saturating_mul(i as u64))
.saturating_add(Weight::from_ref_time(60_000 as u64).saturating_mul(i as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
Expand Down
10 changes: 5 additions & 5 deletions runtime/heiko/src/weights/pallet_amm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,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 {
(161_720_000 as u64)
Weight::from_ref_time(161_720_000 as u64)
.saturating_add(T::DbWeight::get().reads(10 as u64))
.saturating_add(T::DbWeight::get().writes(9 as u64))
}
Expand All @@ -43,7 +43,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 {
(174_864_000 as u64)
Weight::from_ref_time(174_864_000 as u64)
.saturating_add(T::DbWeight::get().reads(10 as u64))
.saturating_add(T::DbWeight::get().writes(9 as u64))
}
Expand All @@ -53,18 +53,18 @@ impl<T: frame_system::Config> pallet_amm::WeightInfo for WeightInfo<T> {
// Storage: System Account (r:2 w:2)
// Storage: AMM ProtocolFee (r:1 w:0)
fn create_pool() -> Weight {
(217_145_000 as u64)
Weight::from_ref_time(217_145_000 as u64)
.saturating_add(T::DbWeight::get().reads(13 as u64))
.saturating_add(T::DbWeight::get().writes(12 as u64))
}
// Storage: AMM ProtocolFee (r:0 w:1)
fn update_protocol_fee() -> Weight {
(22_954_000 as u64)
Weight::from_ref_time(22_954_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 {
(24_118_000 as u64)
Weight::from_ref_time(24_118_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
}
10 changes: 5 additions & 5 deletions runtime/heiko/src/weights/pallet_asset_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ impl<T: frame_system::Config> pallet_asset_registry::WeightInfo for WeightInfo<T
// Storage: AssetRegistry AssetIdType (r:1 w:1)
// Storage: AssetRegistry AssetTypeId (r:0 w:1)
fn register_asset() -> Weight {
(30_282_000 as u64)
Weight::from_ref_time(30_282_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: AssetRegistry AssetTypeId (r:1 w:0)
// Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1)
// Storage: AssetRegistry AssetTypeUnitsPerSecond (r:0 w:1)
fn update_asset_units_per_second() -> Weight {
(37_353_000 as u64)
Weight::from_ref_time(37_353_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
Expand All @@ -49,14 +49,14 @@ impl<T: frame_system::Config> pallet_asset_registry::WeightInfo for WeightInfo<T
// Storage: AssetRegistry AssetTypeUnitsPerSecond (r:1 w:2)
// Storage: AssetRegistry AssetTypeId (r:0 w:2)
fn update_asset_type() -> Weight {
(51_300_000 as u64)
Weight::from_ref_time(51_300_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(6 as u64))
}
// Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1)
// Storage: AssetRegistry AssetTypeUnitsPerSecond (r:0 w:1)
fn remove_fee_payment_asset() -> Weight {
(31_517_000 as u64)
Weight::from_ref_time(31_517_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
Expand All @@ -65,7 +65,7 @@ impl<T: frame_system::Config> pallet_asset_registry::WeightInfo for WeightInfo<T
// Storage: AssetRegistry AssetTypeUnitsPerSecond (r:0 w:1)
// Storage: AssetRegistry AssetTypeId (r:0 w:1)
fn deregister_asset() -> Weight {
(40_159_000 as u64)
Weight::from_ref_time(40_159_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
}
Expand Down
Loading