pallet_dynamic_evm_base_fee/weights.rs
1
2// This file is part of Astar.
3
4// Copyright (C) Stake Technologies Pte.Ltd.
5// SPDX-License-Identifier: GPL-3.0-or-later
6
7// Astar is free software: you can redistribute it and/or modify
8// it under the terms of the GNU General Public License as published by
9// the Free Software Foundation, either version 3 of the License, or
10// (at your option) any later version.
11
12// Astar is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16
17// You should have received a copy of the GNU General Public License
18// along with Astar. If not, see <http://www.gnu.org/licenses/>.
19
20//! Autogenerated weights for pallet_dynamic_evm_base_fee
21//!
22//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
23//! DATE: 2023-09-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
24//! WORST CASE MAP SIZE: `1000000`
25//! HOSTNAME: `devserver-01`, CPU: `Intel(R) Xeon(R) E-2236 CPU @ 3.40GHz`
26//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("shibuya-dev"), DB CACHE: 1024
27
28// Executed Command:
29// ./target/release/astar-collator
30// benchmark
31// pallet
32// --chain=shibuya-dev
33// --steps=50
34// --repeat=20
35// --pallet=pallet_dynamic_evm_base_fee
36// --extrinsic=*
37// --execution=wasm
38// --wasm-execution=compiled
39// --heap-pages=4096
40// --output=./benchmark-results/dynamic_evm_base_fee_weights.rs
41// --template=./scripts/templates/weight-template.hbs
42
43#![cfg_attr(rustfmt, rustfmt_skip)]
44#![allow(unused_parens)]
45#![allow(unused_imports)]
46
47use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
48use core::marker::PhantomData;
49
50/// Weight functions needed for pallet_dynamic_evm_base_fee.
51pub trait WeightInfo {
52 fn base_fee_per_gas_adjustment() -> Weight;
53 fn set_base_fee_per_gas() -> Weight;
54 fn min_gas_price() -> Weight;
55}
56
57/// Weights for pallet_dynamic_evm_base_fee using the Substrate node and recommended hardware.
58pub struct SubstrateWeight<T>(PhantomData<T>);
59impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
60 /// Storage: DynamicEvmBaseFee BaseFeePerGas (r:1 w:1)
61 /// Proof: DynamicEvmBaseFee BaseFeePerGas (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)
62 /// Storage: TransactionPayment NextFeeMultiplier (r:1 w:0)
63 /// Proof: TransactionPayment NextFeeMultiplier (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
64 fn base_fee_per_gas_adjustment() -> Weight {
65 // Proof Size summary in bytes:
66 // Measured: `165`
67 // Estimated: `1517`
68 // Minimum execution time: 8_560_000 picoseconds.
69 Weight::from_parts(8_778_000, 1517)
70 .saturating_add(T::DbWeight::get().reads(2_u64))
71 .saturating_add(T::DbWeight::get().writes(1_u64))
72 }
73 /// Storage: DynamicEvmBaseFee BaseFeePerGas (r:0 w:1)
74 /// Proof: DynamicEvmBaseFee BaseFeePerGas (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)
75 fn set_base_fee_per_gas() -> Weight {
76 // Proof Size summary in bytes:
77 // Measured: `0`
78 // Estimated: `0`
79 // Minimum execution time: 7_883_000 picoseconds.
80 Weight::from_parts(8_060_000, 0)
81 .saturating_add(T::DbWeight::get().writes(1_u64))
82 }
83 /// Storage: DynamicEvmBaseFee BaseFeePerGas (r:1 w:0)
84 /// Proof: DynamicEvmBaseFee BaseFeePerGas (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)
85 fn min_gas_price() -> Weight {
86 // Proof Size summary in bytes:
87 // Measured: `98`
88 // Estimated: `1517`
89 // Minimum execution time: 4_201_000 picoseconds.
90 Weight::from_parts(4_399_000, 1517)
91 .saturating_add(T::DbWeight::get().reads(1_u64))
92 }
93}
94
95// For backwards compatibility and tests
96impl WeightInfo for () {
97 /// Storage: DynamicEvmBaseFee BaseFeePerGas (r:1 w:1)
98 /// Proof: DynamicEvmBaseFee BaseFeePerGas (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)
99 /// Storage: TransactionPayment NextFeeMultiplier (r:1 w:0)
100 /// Proof: TransactionPayment NextFeeMultiplier (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
101 fn base_fee_per_gas_adjustment() -> Weight {
102 // Proof Size summary in bytes:
103 // Measured: `165`
104 // Estimated: `1517`
105 // Minimum execution time: 8_560_000 picoseconds.
106 Weight::from_parts(8_778_000, 1517)
107 .saturating_add(RocksDbWeight::get().reads(2_u64))
108 .saturating_add(RocksDbWeight::get().writes(1_u64))
109 }
110 /// Storage: DynamicEvmBaseFee BaseFeePerGas (r:0 w:1)
111 /// Proof: DynamicEvmBaseFee BaseFeePerGas (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)
112 fn set_base_fee_per_gas() -> Weight {
113 // Proof Size summary in bytes:
114 // Measured: `0`
115 // Estimated: `0`
116 // Minimum execution time: 7_883_000 picoseconds.
117 Weight::from_parts(8_060_000, 0)
118 .saturating_add(RocksDbWeight::get().writes(1_u64))
119 }
120 /// Storage: DynamicEvmBaseFee BaseFeePerGas (r:1 w:0)
121 /// Proof: DynamicEvmBaseFee BaseFeePerGas (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)
122 fn min_gas_price() -> Weight {
123 // Proof Size summary in bytes:
124 // Measured: `98`
125 // Estimated: `1517`
126 // Minimum execution time: 4_201_000 picoseconds.
127 Weight::from_parts(4_399_000, 1517)
128 .saturating_add(RocksDbWeight::get().reads(1_u64))
129 }
130}