Refund referendum submission deposit (#12788)

* optinal submission deposit and migration

* refund submission deposit call, test, bench

* try runtime fixes

* assert for bench

* Only refund cancelled/approved referenda deposits

* update storage version

Co-authored-by: Gav <gavin@parity.io>
This commit is contained in:
Muharem Ismailov
2022-12-07 13:20:48 +01:00
committed by GitHub
parent 1657feae3b
commit 198faaa6f9
8 changed files with 593 additions and 241 deletions
+239 -231
View File
@@ -1,8 +1,3 @@
// This file is part of Substrate.
// Copyright (C) 2022 Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
@@ -18,24 +13,22 @@
//! Autogenerated weights for pallet_referenda
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-11-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
//! DATE: 2022-11-27, STEPS: `20`, REPEAT: 1, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `cob`, CPU: `<UNKNOWN>`
//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/substrate
// ./target/release/substrate
// benchmark
// pallet
// --chain=dev
// --steps=50
// --repeat=20
// --pallet=pallet_referenda
// --steps=20
// --repeat=1
// --pallet=pallet-referenda
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --output=./frame/referenda/src/weights.rs
// --header=./HEADER-APACHE2
// --output=./frame/referenda/src/._weights.rs
// --template=./.maintain/frame-weight-template.hbs
#![cfg_attr(rustfmt, rustfmt_skip)]
@@ -54,6 +47,7 @@ pub trait WeightInfo {
fn place_decision_deposit_passing() -> Weight;
fn place_decision_deposit_failing() -> Weight;
fn refund_decision_deposit() -> Weight;
fn refund_submission_deposit() -> Weight;
fn cancel() -> Weight;
fn kill() -> Weight;
fn one_fewer_deciding_queue_empty() -> Weight;
@@ -83,231 +77,238 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Scheduler Agenda (r:1 w:1)
// Storage: Referenda ReferendumInfoFor (r:0 w:1)
fn submit() -> Weight {
// Minimum execution time: 41_475 nanoseconds.
Weight::from_ref_time(42_153_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
// Minimum execution time: 29_000 nanoseconds.
Weight::from_ref_time(29_000_000)
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(3))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:2 w:2)
fn place_decision_deposit_preparing() -> Weight {
// Minimum execution time: 52_291 nanoseconds.
Weight::from_ref_time(53_147_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
// Minimum execution time: 35_000 nanoseconds.
Weight::from_ref_time(35_000_000)
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Referenda DecidingCount (r:1 w:0)
// Storage: Referenda TrackQueue (r:1 w:1)
fn place_decision_deposit_queued() -> Weight {
// Minimum execution time: 57_322 nanoseconds.
Weight::from_ref_time(58_145_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
// Minimum execution time: 40_000 nanoseconds.
Weight::from_ref_time(40_000_000)
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Referenda DecidingCount (r:1 w:0)
// Storage: Referenda TrackQueue (r:1 w:1)
fn place_decision_deposit_not_queued() -> Weight {
// Minimum execution time: 57_170 nanoseconds.
Weight::from_ref_time(58_012_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
// Minimum execution time: 39_000 nanoseconds.
Weight::from_ref_time(39_000_000)
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Referenda DecidingCount (r:1 w:1)
// Storage: Scheduler Agenda (r:2 w:2)
fn place_decision_deposit_passing() -> Weight {
// Minimum execution time: 67_805 nanoseconds.
Weight::from_ref_time(68_844_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
// Minimum execution time: 43_000 nanoseconds.
Weight::from_ref_time(43_000_000)
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Referenda DecidingCount (r:1 w:1)
// Storage: Scheduler Agenda (r:2 w:2)
fn place_decision_deposit_failing() -> Weight {
// Minimum execution time: 63_408 nanoseconds.
Weight::from_ref_time(64_049_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
// Minimum execution time: 84_000 nanoseconds.
Weight::from_ref_time(84_000_000)
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
fn refund_decision_deposit() -> Weight {
// Minimum execution time: 36_639 nanoseconds.
Weight::from_ref_time(37_329_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
// Minimum execution time: 25_000 nanoseconds.
Weight::from_ref_time(25_000_000)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
fn refund_submission_deposit() -> Weight {
// Minimum execution time: 25_000 nanoseconds.
Weight::from_ref_time(25_000_000)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:2 w:2)
fn cancel() -> Weight {
// Minimum execution time: 42_442 nanoseconds.
Weight::from_ref_time(43_006_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
// Minimum execution time: 26_000 nanoseconds.
Weight::from_ref_time(26_000_000)
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:2 w:2)
fn kill() -> Weight {
// Minimum execution time: 74_681 nanoseconds.
Weight::from_ref_time(75_567_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
// Minimum execution time: 47_000 nanoseconds.
Weight::from_ref_time(47_000_000)
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
// Storage: Referenda TrackQueue (r:1 w:0)
// Storage: Referenda DecidingCount (r:1 w:1)
fn one_fewer_deciding_queue_empty() -> Weight {
// Minimum execution time: 14_262 nanoseconds.
Weight::from_ref_time(14_504_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
// Minimum execution time: 8_000 nanoseconds.
Weight::from_ref_time(8_000_000)
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: Referenda TrackQueue (r:1 w:1)
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:2 w:2)
fn one_fewer_deciding_failing() -> Weight {
// Minimum execution time: 88_618 nanoseconds.
Weight::from_ref_time(89_443_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
// Minimum execution time: 88_000 nanoseconds.
Weight::from_ref_time(88_000_000)
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
// Storage: Referenda TrackQueue (r:1 w:1)
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:2 w:2)
fn one_fewer_deciding_passing() -> Weight {
// Minimum execution time: 89_784 nanoseconds.
Weight::from_ref_time(90_619_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
// Minimum execution time: 75_000 nanoseconds.
Weight::from_ref_time(75_000_000)
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Referenda TrackQueue (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_requeued_insertion() -> Weight {
// Minimum execution time: 73_179 nanoseconds.
Weight::from_ref_time(74_025_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
// Minimum execution time: 72_000 nanoseconds.
Weight::from_ref_time(72_000_000)
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Referenda TrackQueue (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_requeued_slide() -> Weight {
// Minimum execution time: 73_168 nanoseconds.
Weight::from_ref_time(73_769_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
// Minimum execution time: 56_000 nanoseconds.
Weight::from_ref_time(56_000_000)
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Referenda DecidingCount (r:1 w:0)
// Storage: Referenda TrackQueue (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_queued() -> Weight {
// Minimum execution time: 75_027 nanoseconds.
Weight::from_ref_time(76_220_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
// Minimum execution time: 55_000 nanoseconds.
Weight::from_ref_time(55_000_000)
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Referenda DecidingCount (r:1 w:0)
// Storage: Referenda TrackQueue (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_not_queued() -> Weight {
// Minimum execution time: 74_815 nanoseconds.
Weight::from_ref_time(75_803_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
// Minimum execution time: 60_000 nanoseconds.
Weight::from_ref_time(60_000_000)
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_no_deposit() -> Weight {
// Minimum execution time: 31_877 nanoseconds.
Weight::from_ref_time(32_236_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
// Minimum execution time: 22_000 nanoseconds.
Weight::from_ref_time(22_000_000)
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_preparing() -> Weight {
// Minimum execution time: 33_322 nanoseconds.
Weight::from_ref_time(33_762_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
// Minimum execution time: 21_000 nanoseconds.
Weight::from_ref_time(21_000_000)
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
fn nudge_referendum_timed_out() -> Weight {
// Minimum execution time: 25_393 nanoseconds.
Weight::from_ref_time(25_913_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
// Minimum execution time: 17_000 nanoseconds.
Weight::from_ref_time(17_000_000)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Referenda DecidingCount (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_begin_deciding_failing() -> Weight {
// Minimum execution time: 47_114 nanoseconds.
Weight::from_ref_time(47_586_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
// Minimum execution time: 29_000 nanoseconds.
Weight::from_ref_time(29_000_000)
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Referenda DecidingCount (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_begin_deciding_passing() -> Weight {
// Minimum execution time: 48_443 nanoseconds.
Weight::from_ref_time(50_003_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
// Minimum execution time: 39_000 nanoseconds.
Weight::from_ref_time(39_000_000)
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_begin_confirming() -> Weight {
// Minimum execution time: 44_556 nanoseconds.
Weight::from_ref_time(45_167_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
// Minimum execution time: 31_000 nanoseconds.
Weight::from_ref_time(31_000_000)
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_end_confirming() -> Weight {
// Minimum execution time: 45_474 nanoseconds.
Weight::from_ref_time(46_105_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
// Minimum execution time: 30_000 nanoseconds.
Weight::from_ref_time(30_000_000)
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_continue_not_confirming() -> Weight {
// Minimum execution time: 42_795 nanoseconds.
Weight::from_ref_time(43_123_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
// Minimum execution time: 28_000 nanoseconds.
Weight::from_ref_time(28_000_000)
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_continue_confirming() -> Weight {
// Minimum execution time: 41_928 nanoseconds.
Weight::from_ref_time(42_272_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
// Minimum execution time: 30_000 nanoseconds.
Weight::from_ref_time(30_000_000)
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:2 w:2)
// Storage: Scheduler Lookup (r:1 w:1)
fn nudge_referendum_approved() -> Weight {
// Minimum execution time: 55_186 nanoseconds.
Weight::from_ref_time(55_714_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
// Minimum execution time: 45_000 nanoseconds.
Weight::from_ref_time(45_000_000)
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_rejected() -> Weight {
// Minimum execution time: 44_892 nanoseconds.
Weight::from_ref_time(45_353_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
// Minimum execution time: 30_000 nanoseconds.
Weight::from_ref_time(30_000_000)
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
}
@@ -317,230 +318,237 @@ impl WeightInfo for () {
// Storage: Scheduler Agenda (r:1 w:1)
// Storage: Referenda ReferendumInfoFor (r:0 w:1)
fn submit() -> Weight {
// Minimum execution time: 41_475 nanoseconds.
Weight::from_ref_time(42_153_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
// Minimum execution time: 29_000 nanoseconds.
Weight::from_ref_time(29_000_000)
.saturating_add(RocksDbWeight::get().reads(2))
.saturating_add(RocksDbWeight::get().writes(3))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:2 w:2)
fn place_decision_deposit_preparing() -> Weight {
// Minimum execution time: 52_291 nanoseconds.
Weight::from_ref_time(53_147_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
// Minimum execution time: 35_000 nanoseconds.
Weight::from_ref_time(35_000_000)
.saturating_add(RocksDbWeight::get().reads(3))
.saturating_add(RocksDbWeight::get().writes(3))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Referenda DecidingCount (r:1 w:0)
// Storage: Referenda TrackQueue (r:1 w:1)
fn place_decision_deposit_queued() -> Weight {
// Minimum execution time: 57_322 nanoseconds.
Weight::from_ref_time(58_145_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
// Minimum execution time: 40_000 nanoseconds.
Weight::from_ref_time(40_000_000)
.saturating_add(RocksDbWeight::get().reads(3))
.saturating_add(RocksDbWeight::get().writes(2))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Referenda DecidingCount (r:1 w:0)
// Storage: Referenda TrackQueue (r:1 w:1)
fn place_decision_deposit_not_queued() -> Weight {
// Minimum execution time: 57_170 nanoseconds.
Weight::from_ref_time(58_012_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
// Minimum execution time: 39_000 nanoseconds.
Weight::from_ref_time(39_000_000)
.saturating_add(RocksDbWeight::get().reads(3))
.saturating_add(RocksDbWeight::get().writes(2))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Referenda DecidingCount (r:1 w:1)
// Storage: Scheduler Agenda (r:2 w:2)
fn place_decision_deposit_passing() -> Weight {
// Minimum execution time: 67_805 nanoseconds.
Weight::from_ref_time(68_844_000 as u64)
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(4 as u64))
// Minimum execution time: 43_000 nanoseconds.
Weight::from_ref_time(43_000_000)
.saturating_add(RocksDbWeight::get().reads(4))
.saturating_add(RocksDbWeight::get().writes(4))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Referenda DecidingCount (r:1 w:1)
// Storage: Scheduler Agenda (r:2 w:2)
fn place_decision_deposit_failing() -> Weight {
// Minimum execution time: 63_408 nanoseconds.
Weight::from_ref_time(64_049_000 as u64)
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(4 as u64))
// Minimum execution time: 84_000 nanoseconds.
Weight::from_ref_time(84_000_000)
.saturating_add(RocksDbWeight::get().reads(4))
.saturating_add(RocksDbWeight::get().writes(4))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
fn refund_decision_deposit() -> Weight {
// Minimum execution time: 36_639 nanoseconds.
Weight::from_ref_time(37_329_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
// Minimum execution time: 25_000 nanoseconds.
Weight::from_ref_time(25_000_000)
.saturating_add(RocksDbWeight::get().reads(1))
.saturating_add(RocksDbWeight::get().writes(1))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
fn refund_submission_deposit() -> Weight {
// Minimum execution time: 25_000 nanoseconds.
Weight::from_ref_time(25_000_000)
.saturating_add(RocksDbWeight::get().reads(1))
.saturating_add(RocksDbWeight::get().writes(1))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:2 w:2)
fn cancel() -> Weight {
// Minimum execution time: 42_442 nanoseconds.
Weight::from_ref_time(43_006_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
// Minimum execution time: 26_000 nanoseconds.
Weight::from_ref_time(26_000_000)
.saturating_add(RocksDbWeight::get().reads(3))
.saturating_add(RocksDbWeight::get().writes(3))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:2 w:2)
fn kill() -> Weight {
// Minimum execution time: 74_681 nanoseconds.
Weight::from_ref_time(75_567_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
// Minimum execution time: 47_000 nanoseconds.
Weight::from_ref_time(47_000_000)
.saturating_add(RocksDbWeight::get().reads(3))
.saturating_add(RocksDbWeight::get().writes(3))
}
// Storage: Referenda TrackQueue (r:1 w:0)
// Storage: Referenda DecidingCount (r:1 w:1)
fn one_fewer_deciding_queue_empty() -> Weight {
// Minimum execution time: 14_262 nanoseconds.
Weight::from_ref_time(14_504_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
// Minimum execution time: 8_000 nanoseconds.
Weight::from_ref_time(8_000_000)
.saturating_add(RocksDbWeight::get().reads(2))
.saturating_add(RocksDbWeight::get().writes(1))
}
// Storage: Referenda TrackQueue (r:1 w:1)
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:2 w:2)
fn one_fewer_deciding_failing() -> Weight {
// Minimum execution time: 88_618 nanoseconds.
Weight::from_ref_time(89_443_000 as u64)
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(4 as u64))
// Minimum execution time: 88_000 nanoseconds.
Weight::from_ref_time(88_000_000)
.saturating_add(RocksDbWeight::get().reads(4))
.saturating_add(RocksDbWeight::get().writes(4))
}
// Storage: Referenda TrackQueue (r:1 w:1)
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:2 w:2)
fn one_fewer_deciding_passing() -> Weight {
// Minimum execution time: 89_784 nanoseconds.
Weight::from_ref_time(90_619_000 as u64)
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(4 as u64))
// Minimum execution time: 75_000 nanoseconds.
Weight::from_ref_time(75_000_000)
.saturating_add(RocksDbWeight::get().reads(4))
.saturating_add(RocksDbWeight::get().writes(4))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Referenda TrackQueue (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_requeued_insertion() -> Weight {
// Minimum execution time: 73_179 nanoseconds.
Weight::from_ref_time(74_025_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
// Minimum execution time: 72_000 nanoseconds.
Weight::from_ref_time(72_000_000)
.saturating_add(RocksDbWeight::get().reads(3))
.saturating_add(RocksDbWeight::get().writes(3))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Referenda TrackQueue (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_requeued_slide() -> Weight {
// Minimum execution time: 73_168 nanoseconds.
Weight::from_ref_time(73_769_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
// Minimum execution time: 56_000 nanoseconds.
Weight::from_ref_time(56_000_000)
.saturating_add(RocksDbWeight::get().reads(3))
.saturating_add(RocksDbWeight::get().writes(3))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Referenda DecidingCount (r:1 w:0)
// Storage: Referenda TrackQueue (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_queued() -> Weight {
// Minimum execution time: 75_027 nanoseconds.
Weight::from_ref_time(76_220_000 as u64)
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
// Minimum execution time: 55_000 nanoseconds.
Weight::from_ref_time(55_000_000)
.saturating_add(RocksDbWeight::get().reads(4))
.saturating_add(RocksDbWeight::get().writes(3))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Referenda DecidingCount (r:1 w:0)
// Storage: Referenda TrackQueue (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_not_queued() -> Weight {
// Minimum execution time: 74_815 nanoseconds.
Weight::from_ref_time(75_803_000 as u64)
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
// Minimum execution time: 60_000 nanoseconds.
Weight::from_ref_time(60_000_000)
.saturating_add(RocksDbWeight::get().reads(4))
.saturating_add(RocksDbWeight::get().writes(3))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_no_deposit() -> Weight {
// Minimum execution time: 31_877 nanoseconds.
Weight::from_ref_time(32_236_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
// Minimum execution time: 22_000 nanoseconds.
Weight::from_ref_time(22_000_000)
.saturating_add(RocksDbWeight::get().reads(2))
.saturating_add(RocksDbWeight::get().writes(2))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_preparing() -> Weight {
// Minimum execution time: 33_322 nanoseconds.
Weight::from_ref_time(33_762_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
// Minimum execution time: 21_000 nanoseconds.
Weight::from_ref_time(21_000_000)
.saturating_add(RocksDbWeight::get().reads(2))
.saturating_add(RocksDbWeight::get().writes(2))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
fn nudge_referendum_timed_out() -> Weight {
// Minimum execution time: 25_393 nanoseconds.
Weight::from_ref_time(25_913_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
// Minimum execution time: 17_000 nanoseconds.
Weight::from_ref_time(17_000_000)
.saturating_add(RocksDbWeight::get().reads(1))
.saturating_add(RocksDbWeight::get().writes(1))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Referenda DecidingCount (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_begin_deciding_failing() -> Weight {
// Minimum execution time: 47_114 nanoseconds.
Weight::from_ref_time(47_586_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
// Minimum execution time: 29_000 nanoseconds.
Weight::from_ref_time(29_000_000)
.saturating_add(RocksDbWeight::get().reads(3))
.saturating_add(RocksDbWeight::get().writes(3))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Referenda DecidingCount (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_begin_deciding_passing() -> Weight {
// Minimum execution time: 48_443 nanoseconds.
Weight::from_ref_time(50_003_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
// Minimum execution time: 39_000 nanoseconds.
Weight::from_ref_time(39_000_000)
.saturating_add(RocksDbWeight::get().reads(3))
.saturating_add(RocksDbWeight::get().writes(3))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_begin_confirming() -> Weight {
// Minimum execution time: 44_556 nanoseconds.
Weight::from_ref_time(45_167_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
// Minimum execution time: 31_000 nanoseconds.
Weight::from_ref_time(31_000_000)
.saturating_add(RocksDbWeight::get().reads(2))
.saturating_add(RocksDbWeight::get().writes(2))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_end_confirming() -> Weight {
// Minimum execution time: 45_474 nanoseconds.
Weight::from_ref_time(46_105_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
// Minimum execution time: 30_000 nanoseconds.
Weight::from_ref_time(30_000_000)
.saturating_add(RocksDbWeight::get().reads(2))
.saturating_add(RocksDbWeight::get().writes(2))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_continue_not_confirming() -> Weight {
// Minimum execution time: 42_795 nanoseconds.
Weight::from_ref_time(43_123_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
// Minimum execution time: 28_000 nanoseconds.
Weight::from_ref_time(28_000_000)
.saturating_add(RocksDbWeight::get().reads(2))
.saturating_add(RocksDbWeight::get().writes(2))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_continue_confirming() -> Weight {
// Minimum execution time: 41_928 nanoseconds.
Weight::from_ref_time(42_272_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
// Minimum execution time: 30_000 nanoseconds.
Weight::from_ref_time(30_000_000)
.saturating_add(RocksDbWeight::get().reads(2))
.saturating_add(RocksDbWeight::get().writes(2))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:2 w:2)
// Storage: Scheduler Lookup (r:1 w:1)
fn nudge_referendum_approved() -> Weight {
// Minimum execution time: 55_186 nanoseconds.
Weight::from_ref_time(55_714_000 as u64)
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(4 as u64))
// Minimum execution time: 45_000 nanoseconds.
Weight::from_ref_time(45_000_000)
.saturating_add(RocksDbWeight::get().reads(4))
.saturating_add(RocksDbWeight::get().writes(4))
}
// Storage: Referenda ReferendumInfoFor (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn nudge_referendum_rejected() -> Weight {
// Minimum execution time: 44_892 nanoseconds.
Weight::from_ref_time(45_353_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
// Minimum execution time: 30_000 nanoseconds.
Weight::from_ref_time(30_000_000)
.saturating_add(RocksDbWeight::get().reads(2))
.saturating_add(RocksDbWeight::get().writes(2))
}
}