1
// Copyright 2025 Moonbeam foundation
2
// This file is part of Moonbeam.
3

            
4
// Moonbeam is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8

            
9
// Moonbeam is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
// GNU General Public License for more details.
13

            
14
// You should have received a copy of the GNU General Public License
15
// along with Moonbeam.  If not, see <http://www.gnu.org/licenses/>.
16

            
17

            
18
//! Autogenerated weights for `pallet_randomness`
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 51.0.0
21
//! DATE: 2026-02-09, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
24
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
25

            
26
// Executed Command:
27
// ./frame-omni-bencher
28
// v1
29
// benchmark
30
// pallet
31
// --runtime=./target/production/wbuild/moonriver-runtime/moonriver_runtime.wasm
32
// --genesis-builder=runtime
33
// --genesis-builder-preset=development
34
// --steps=50
35
// --repeat=20
36
// --pallet=pallet_randomness
37
// --extrinsic=*
38
// --wasm-execution=compiled
39
// --header=./file_header.txt
40
// --template=./benchmarking/frame-weight-template.hbs
41
// --disable-log-color
42
// --output=./runtime/moonriver/src/weights
43

            
44
#![cfg_attr(rustfmt, rustfmt_skip)]
45
#![allow(unused_parens)]
46
#![allow(unused_imports)]
47

            
48
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
49
use sp_std::marker::PhantomData;
50

            
51
/// Weights for `pallet_randomness`.
52
pub struct WeightInfo<T>(PhantomData<T>);
53
impl<T: frame_system::Config> pallet_randomness::WeightInfo for WeightInfo<T> {
54
	/// Storage: `Randomness::RelayEpoch` (r:1 w:1)
55
	/// Proof: `Randomness::RelayEpoch` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
56
	/// Storage: `ParachainSystem::ValidationData` (r:1 w:0)
57
	/// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
58
	/// Storage: `ParachainSystem::RelayStateProof` (r:1 w:0)
59
	/// Proof: `ParachainSystem::RelayStateProof` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
60
	/// Storage: `Randomness::RandomnessResults` (r:1 w:1)
61
	/// Proof: `Randomness::RandomnessResults` (`max_values`: None, `max_size`: None, mode: `Measured`)
62
	/// Storage: `Randomness::InherentIncluded` (r:0 w:1)
63
	/// Proof: `Randomness::InherentIncluded` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
64
	fn set_babe_randomness_results() -> Weight {
65
		// Proof Size summary in bytes:
66
		//  Measured:  `263`
67
		//  Estimated: `3728`
68
		// Minimum execution time: 15_705_000 picoseconds.
69
		Weight::from_parts(16_272_000, 3728)
70
			.saturating_add(T::DbWeight::get().reads(4_u64))
71
			.saturating_add(T::DbWeight::get().writes(3_u64))
72
	}
73
	/// Storage: `Randomness::NotFirstBlock` (r:1 w:0)
74
	/// Proof: `Randomness::NotFirstBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
75
	/// Storage: `System::Digest` (r:1 w:0)
76
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
77
	/// Storage: `AuthorMapping::MappingWithDeposit` (r:1 w:0)
78
	/// Proof: `AuthorMapping::MappingWithDeposit` (`max_values`: None, `max_size`: None, mode: `Measured`)
79
	/// Storage: `Randomness::LocalVrfOutput` (r:1 w:1)
80
	/// Proof: `Randomness::LocalVrfOutput` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
81
	/// Storage: `Randomness::RandomnessResults` (r:1 w:1)
82
	/// Proof: `Randomness::RandomnessResults` (`max_values`: None, `max_size`: None, mode: `Measured`)
83
	fn on_initialize() -> Weight {
84
		// Proof Size summary in bytes:
85
		//  Measured:  `686`
86
		//  Estimated: `4151`
87
		// Minimum execution time: 635_199_000 picoseconds.
88
		Weight::from_parts(649_256_000, 4151)
89
			.saturating_add(T::DbWeight::get().reads(5_u64))
90
			.saturating_add(T::DbWeight::get().writes(2_u64))
91
	}
92
	/// Storage: `Parameters::Parameters` (r:1 w:0)
93
	/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
94
	/// Storage: `Randomness::RequestCount` (r:1 w:1)
95
	/// Proof: `Randomness::RequestCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
96
	/// Storage: `System::Account` (r:2 w:2)
97
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
98
	/// Storage: `Randomness::RandomnessResults` (r:1 w:1)
99
	/// Proof: `Randomness::RandomnessResults` (`max_values`: None, `max_size`: None, mode: `Measured`)
100
	/// Storage: `Randomness::Requests` (r:0 w:1)
101
	/// Proof: `Randomness::Requests` (`max_values`: None, `max_size`: None, mode: `Measured`)
102
	fn request_randomness() -> Weight {
103
		// Proof Size summary in bytes:
104
		//  Measured:  `483`
105
		//  Estimated: `6172`
106
		// Minimum execution time: 64_680_000 picoseconds.
107
		Weight::from_parts(66_788_000, 6172)
108
			.saturating_add(T::DbWeight::get().reads(5_u64))
109
			.saturating_add(T::DbWeight::get().writes(5_u64))
110
	}
111
	/// Storage: `Randomness::Requests` (r:1 w:0)
112
	/// Proof: `Randomness::Requests` (`max_values`: None, `max_size`: None, mode: `Measured`)
113
	/// Storage: `Randomness::RandomnessResults` (r:1 w:0)
114
	/// Proof: `Randomness::RandomnessResults` (`max_values`: None, `max_size`: None, mode: `Measured`)
115
	/// The range of component `x` is `[1, 100]`.
116
	fn prepare_fulfillment(x: u32, ) -> Weight {
117
		// Proof Size summary in bytes:
118
		//  Measured:  `412`
119
		//  Estimated: `3877`
120
		// Minimum execution time: 11_477_000 picoseconds.
121
		Weight::from_parts(12_062_712, 3877)
122
			// Standard Error: 1_765
123
			.saturating_add(Weight::from_parts(294_496, 0).saturating_mul(x.into()))
124
			.saturating_add(T::DbWeight::get().reads(2_u64))
125
	}
126
	/// Storage: `System::Account` (r:2 w:2)
127
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
128
	/// Storage: `Randomness::RandomnessResults` (r:1 w:1)
129
	/// Proof: `Randomness::RandomnessResults` (`max_values`: None, `max_size`: None, mode: `Measured`)
130
	/// Storage: `Randomness::Requests` (r:0 w:1)
131
	/// Proof: `Randomness::Requests` (`max_values`: None, `max_size`: None, mode: `Measured`)
132
	fn finish_fulfillment() -> Weight {
133
		// Proof Size summary in bytes:
134
		//  Measured:  `673`
135
		//  Estimated: `6172`
136
		// Minimum execution time: 59_060_000 picoseconds.
137
		Weight::from_parts(59_864_000, 6172)
138
			.saturating_add(T::DbWeight::get().reads(3_u64))
139
			.saturating_add(T::DbWeight::get().writes(4_u64))
140
	}
141
	/// Storage: `Randomness::Requests` (r:1 w:1)
142
	/// Proof: `Randomness::Requests` (`max_values`: None, `max_size`: None, mode: `Measured`)
143
	/// Storage: `System::Account` (r:2 w:2)
144
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
145
	fn increase_fee() -> Weight {
146
		// Proof Size summary in bytes:
147
		//  Measured:  `759`
148
		//  Estimated: `6172`
149
		// Minimum execution time: 56_005_000 picoseconds.
150
		Weight::from_parts(56_663_000, 6172)
151
			.saturating_add(T::DbWeight::get().reads(3_u64))
152
			.saturating_add(T::DbWeight::get().writes(3_u64))
153
	}
154
	/// Storage: `Randomness::Requests` (r:1 w:1)
155
	/// Proof: `Randomness::Requests` (`max_values`: None, `max_size`: None, mode: `Measured`)
156
	/// Storage: `System::Account` (r:2 w:2)
157
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
158
	/// Storage: `Randomness::RandomnessResults` (r:1 w:1)
159
	/// Proof: `Randomness::RandomnessResults` (`max_values`: None, `max_size`: None, mode: `Measured`)
160
	fn execute_request_expiration() -> Weight {
161
		// Proof Size summary in bytes:
162
		//  Measured:  `802`
163
		//  Estimated: `6172`
164
		// Minimum execution time: 60_947_000 picoseconds.
165
		Weight::from_parts(62_288_000, 6172)
166
			.saturating_add(T::DbWeight::get().reads(4_u64))
167
			.saturating_add(T::DbWeight::get().writes(4_u64))
168
	}
169
}