inital commit, which is clearly not initial

Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
Uncle Stretch
2024-10-03 15:38:52 +03:00
commit 66719626bb
178 changed files with 41709 additions and 0 deletions

301
runtime/casper/Cargo.toml Executable file
View File

@@ -0,0 +1,301 @@
[package]
name = "casper-runtime"
version = "3.5.17"
build = "build.rs"
description = "Runtime of the Casper Network"
edition.workspace = true
authors.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
[build-dependencies]
substrate-wasm-builder = { workspace = true }
[dependencies]
codec = { features = ["derive", "max-encoded-len"], workspace = true }
scale-info = { features = ["derive"], workspace = true }
log = { workspace = true }
serde_json = { workspace = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
frame-system-rpc-runtime-api = { workspace = true }
frame-executive = { workspace = true }
frame-election-provider-support = { workspace = true }
authority-discovery-primitives = { workspace = true }
babe-primitives = { workspace = true }
grandpa-primitives = { workspace = true }
block-builder-api = { workspace = true }
inherents = { workspace = true }
offchain-primitives = { workspace = true }
sp-transaction-pool = { workspace = true }
sp-arithmetic = { workspace = true }
sp-api = { workspace = true }
sp-genesis-builder = { workspace = true }
sp-std = { workspace = true }
sp-application-crypto = { workspace = true }
sp-io = { workspace = true }
sp-runtime = { workspace = true }
sp-staking = { workspace = true }
sp-core = { workspace = true }
sp-session = { workspace = true }
sp-storage = { workspace = true }
sp-version = { workspace = true }
sp-npos-elections = { workspace = true }
pallet-alliance = { workspace = true }
pallet-authority-discovery = { workspace = true }
pallet-authorship = { workspace = true }
pallet-babe = { workspace = true }
pallet-bags-list = { workspace = true }
pallet-balances = { workspace = true }
pallet-bounties = { workspace = true }
pallet-child-bounties = { workspace = true }
pallet-collective = { workspace = true }
pallet-core-fellowship = { workspace = true }
pallet-election-provider-multi-phase = { workspace = true }
pallet-fast-unstake = { workspace = true }
pallet-grandpa = { workspace = true }
pallet-identity = { workspace = true }
pallet-indices = { workspace = true }
pallet-multisig = { workspace = true }
pallet-nomination-pools = { workspace = true }
pallet-nomination-pools-runtime-api = { workspace = true }
pallet-offences = { workspace = true }
pallet-preimage = { workspace = true }
pallet-proxy = { workspace = true }
pallet-ranked-collective = { workspace = true }
pallet-referenda = { workspace = true }
pallet-salary = { workspace = true }
pallet-scheduler = { workspace = true }
pallet-session = { workspace = true }
pallet-staking = { workspace = true }
pallet-staking-reward-fn = { workspace = true }
pallet-staking-reward-curve = { workspace = true }
pallet-staking-runtime-api = { workspace = true }
pallet-timestamp = { workspace = true }
pallet-transaction-payment = { workspace = true }
pallet-transaction-payment-rpc-runtime-api = { workspace = true }
pallet-treasury = { workspace = true }
pallet-utility = { workspace = true }
pallet-vesting = { workspace = true }
pallet-whitelist = { workspace = true }
# Ghost pallets
ghost-networks = { workspace = true }
ghost-claims = { workspace = true }
ghost-slow-clap = { workspace = true }
casper-runtime-constants = { workspace = true }
runtime-common = { workspace = true }
primitives = { workspace = true }
# Benchmarking
frame-benchmarking = { optional = true, workspace = true }
frame-try-runtime = { optional = true, workspace = true }
frame-system-benchmarking = { optional = true, workspace = true }
pallet-election-provider-support-benchmarking = { optional = true, workspace = true }
pallet-offences-benchmarking = { optional = true, workspace = true }
pallet-session-benchmarking = { optional = true, workspace = true }
pallet-nomination-pools-benchmarking = { optional = true, workspace = true }
sp-debug-derive = { workspace = true }
[dev-dependencies]
keyring = { workspace = true }
sp-trie = { workspace = true }
separator = { workspace = true }
remote-externalities = { workspace = true }
tokio = { features = ["macros"], workspace = true }
sp-tracing = { workspace = true }
[features]
default = [ "std" ]
no_std = []
only-staking = []
# A feature that should be neabled when the runtime should be build for
# on-chain deployment. This will disable stuff that shouldn't be part of the
# on-chain wasm to make it smaller like logging for example.
on-chain-release-build = [ "sp-api/disable-logging" ]
# Set timing constants (e.g. session period) to faster versions to speed up testing.
fast-runtime = []
force-debug = ["sp-debug-derive/force-debug"]
std = [
"authority-discovery-primitives/std",
"babe-primitives/std",
"grandpa-primitives/std",
"block-builder-api/std",
"codec/std",
"frame-benchmarking?/std",
"frame-election-provider-support/std",
"frame-executive/std",
"frame-support/std",
"frame-system-benchmarking?/std",
"frame-system-rpc-runtime-api/std",
"frame-system/std",
"frame-try-runtime?/std",
"inherents/std",
"log/std",
"keyring/std",
"offchain-primitives/std",
"pallet-alliance/std",
"pallet-authority-discovery/std",
"pallet-authorship/std",
"pallet-babe/std",
"pallet-bags-list/std",
"pallet-balances/std",
"pallet-bounties/std",
"pallet-child-bounties/std",
"pallet-core-fellowship/std",
"pallet-collective/std",
"pallet-election-provider-multi-phase/std",
"pallet-election-provider-support-benchmarking?/std",
"pallet-fast-unstake/std",
"pallet-grandpa/std",
"pallet-identity/std",
"pallet-indices/std",
"pallet-multisig/std",
"pallet-nomination-pools/std",
"pallet-nomination-pools-benchmarking?/std",
"pallet-nomination-pools-runtime-api/std",
"pallet-offences/std",
"pallet-offences-benchmarking?/std",
"pallet-preimage/std",
"pallet-proxy/std",
"pallet-ranked-collective/std",
"pallet-referenda/std",
"pallet-salary/std",
"pallet-scheduler/std",
"pallet-session/std",
"pallet-session-benchmarking?/std",
"pallet-staking/std",
"pallet-staking-reward-fn/std",
"pallet-staking-runtime-api/std",
"pallet-timestamp/std",
"pallet-transaction-payment/std",
"pallet-transaction-payment-rpc-runtime-api/std",
"pallet-treasury/std",
"pallet-utility/std",
"pallet-vesting/std",
"pallet-whitelist/std",
"scale-info/std",
"sp-api/std",
"sp-application-crypto/std",
"sp-arithmetic/std",
"sp-core/std",
"sp-debug-derive/std",
"sp-genesis-builder/std",
"sp-io/std",
"sp-npos-elections/std",
"sp-runtime/std",
"sp-session/std",
"sp-staking/std",
"sp-std/std",
"sp-storage/std",
"sp-tracing/std",
"sp-trie/std",
"sp-version/std",
"sp-transaction-pool/std",
"ghost-networks/std",
"ghost-claims/std",
"ghost-slow-clap/std",
"casper-runtime-constants/std",
"runtime-common/std",
"primitives/std",
]
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"frame-election-provider-support/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"frame-system-benchmarking/runtime-benchmarks",
"pallet-alliance/runtime-benchmarks",
"pallet-babe/runtime-benchmarks",
"pallet-bags-list/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-bounties/runtime-benchmarks",
"pallet-child-bounties/runtime-benchmarks",
"pallet-core-fellowship/runtime-benchmarks",
"pallet-collective/runtime-benchmarks",
"pallet-election-provider-multi-phase/runtime-benchmarks",
"pallet-election-provider-support-benchmarking/runtime-benchmarks",
"pallet-fast-unstake/runtime-benchmarks",
"pallet-grandpa/runtime-benchmarks",
"pallet-identity/runtime-benchmarks",
"pallet-indices/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-nomination-pools/runtime-benchmarks",
"pallet-nomination-pools-benchmarking/runtime-benchmarks",
"pallet-offences/runtime-benchmarks",
"pallet-offences-benchmarking/runtime-benchmarks",
"pallet-preimage/runtime-benchmarks",
"pallet-proxy/runtime-benchmarks",
"pallet-ranked-collective/runtime-benchmarks",
"pallet-referenda/runtime-benchmarks",
"pallet-salary/runtime-benchmarks",
"pallet-scheduler/runtime-benchmarks",
"pallet-session-benchmarking/runtime-benchmarks",
"pallet-staking/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"pallet-treasury/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"pallet-vesting/runtime-benchmarks",
"pallet-whitelist/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"sp-staking/runtime-benchmarks",
"ghost-networks/runtime-benchmarks",
"ghost-claims/runtime-benchmarks",
"ghost-slow-clap/runtime-benchmarks",
"runtime-common/runtime-benchmarks",
]
try-runtime = [
"frame-election-provider-support/try-runtime",
"frame-executive/try-runtime",
"frame-support/try-runtime",
"frame-system/try-runtime",
"frame-try-runtime",
"frame-try-runtime/try-runtime",
"pallet-alliance/try-runtime",
"pallet-authority-discovery/try-runtime",
"pallet-authorship/try-runtime",
"pallet-babe/try-runtime",
"pallet-bags-list/try-runtime",
"pallet-balances/try-runtime",
"pallet-bounties/try-runtime",
"pallet-child-bounties/try-runtime",
"pallet-core-fellowship/try-runtime",
"pallet-collective/try-runtime",
"pallet-election-provider-multi-phase/try-runtime",
"pallet-fast-unstake/try-runtime",
"pallet-grandpa/try-runtime",
"pallet-identity/try-runtime",
"pallet-indices/try-runtime",
"pallet-multisig/try-runtime",
"pallet-nomination-pools/try-runtime",
"pallet-offences/try-runtime",
"pallet-preimage/try-runtime",
"pallet-proxy/try-runtime",
"pallet-ranked-collective/try-runtime",
"pallet-referenda/try-runtime",
"pallet-salary/try-runtime",
"pallet-scheduler/try-runtime",
"pallet-session/try-runtime",
"pallet-staking/try-runtime",
"pallet-timestamp/try-runtime",
"pallet-transaction-payment/try-runtime",
"pallet-treasury/try-runtime",
"pallet-utility/try-runtime",
"pallet-vesting/try-runtime",
"pallet-whitelist/try-runtime",
"sp-runtime/try-runtime",
"ghost-networks/try-runtime",
"ghost-claims/try-runtime",
"ghost-slow-clap/try-runtime",
"runtime-common/try-runtime",
]

7
runtime/casper/build.rs Executable file
View File

@@ -0,0 +1,7 @@
fn main() {
substrate_wasm_builder::WasmBuilder::new()
.with_current_project()
.import_memory()
.export_heap_base()
.build()
}

View File

@@ -0,0 +1,30 @@
[package]
name = "casper-runtime-constants"
version = "0.3.25"
authors.workspace = true
edition.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true
[dependencies]
smallvec = { workspace = true }
frame-support = { workspace = true }
primitives = { workspace = true }
runtime-common = { workspace = true }
sp-runtime = { workspace = true }
sp-weights = { workspace = true }
sp-core = { workspace = true }
[features]
default = ["std"]
std = [
"frame-support/std",
"primitives/std",
"runtime-common/std",
"sp-core/std",
"sp-runtime/std",
"sp-weights/std",
]

View File

@@ -0,0 +1,110 @@
#![cfg_attr(not(feature = "std"), no_std)]
pub mod weights;
pub use self::currency::CSPR;
/// Monetary constants.
pub mod currency {
use primitives::Balance;
/// Constant values used within runtime.
pub const FTSO: Balance = 1_000_000_000; // 10^9
pub const STNK: Balance = 1_000 * FTSO; // 10^12
pub const STRH: Balance = 1_000 * STNK; // 10^15
pub const CSPR: Balance = 1_000 * STRH; // 10^18
/// The existential deposit.
pub const EXISTENTIAL_DEPOSIT: Balance = STNK;
pub const fn deposit(items: u32, bytes: u32) -> Balance {
(items as Balance) * 200 * STRH + (bytes as Balance) * 1000 * STNK
}
}
/// Time and blocks.
pub mod time {
use primitives::{BlockNumber, Moment};
use runtime_common::prod_or_fast;
pub const MILLISECS_PER_BLOCK: Moment = 6_000;
pub const SLOT_DURATION: Moment = MILLISECS_PER_BLOCK;
pub const EPOCH_DURATION_IN_SLOTS: BlockNumber = prod_or_fast!(4 * HOURS, 1 * MINUTES);
// These time units are defined in number of blocks.
pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber);
pub const HOURS: BlockNumber = MINUTES * 60;
pub const DAYS: BlockNumber = HOURS * 24;
pub const WEEKS: BlockNumber = DAYS * 7;
// 1 in 4 blocks (on average, not counting collisions) woll be primary babe
// blocks.The choice of is done on accordance to the slot duration and expected
// target block tim, for safely resisting network delays of maximum two
// seconds.
pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4);
}
/// Fee-related.
pub mod fee {
use crate::weights::ExtrinsicBaseWeight;
use frame_support::weights::{
WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial,
};
use primitives::Balance;
use smallvec::smallvec;
pub use sp_runtime::Perbill;
/// The block saturation level. Fees will be updates based on this value.
pub const TARGET_BLOCK_FULLNESS: Perbill = Perbill::from_percent(25);
/// Handles converting a weight scalar to a fee value, based on the scale
/// and granularity of the node's balance type.
///
/// This should typically create a mapping between the following ranges:
/// - [0, `MAXIMUM_BLOCK_WEIGHT`]
/// - [Balance::min, Balance::max]
///
/// Yet, it can be used for any other sort of change to weight-fee.
pub struct WeightToFee;
impl WeightToFeePolynomial for WeightToFee {
type Balance = Balance;
fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
let p = super::currency::STRH;
let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time());
smallvec![WeightToFeeCoefficient {
degree: 1,
negative: false,
coeff_frac: Perbill::from_rational(p % q, q),
coeff_integer: p / q,
}]
}
}
}
#[cfg(test)]
mod tests {
use super::{
currency::{STNK, STRH, CSPR},
fee::WeightToFee,
};
use crate::weights::ExtrinsicBaseWeight;
use frame_support::weights::WeightToFee as WeightToFeeT;
use runtime_common::MAXIMUM_BLOCK_WEIGHT;
#[test]
fn full_block_fee_is_correct() {
let full_block = WeightToFee::weight_to_fee(&MAXIMUM_BLOCK_WEIGHT);
assert!(full_block >= 10 * CSPR);
assert!(full_block <= 100 * CSPR);
}
#[test]
fn extrinsic_base_fee_is_correct() {
println!("Base: {}", ExtrinsicBaseWeight::get());
let x = WeightToFee::weight_to_fee(&ExtrinsicBaseWeight::get());
let y = STNK / 10;
assert!(x.max(y) - x.min(y) < STRH);
}
}

View File

@@ -0,0 +1,79 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-07-30 (Y/M/D)
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//!
//! SHORT-NAME: `block`, LONG-NAME: `BlockExecution`, RUNTIME: `Development`
//! WARMUPS: `10`, REPEAT: `100`
//! WEIGHT-PATH: `./runtime/casper/constants/src/weights/`
//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0`
// Executed Command:
// ./target/release/ghost
// benchmark
// overhead
// --chain=casper-dev
// --wasm-execution=compiled
// --weight-path=./runtime/casper/constants/src/weights/
// --header=./file_header.txt
// --warmup=10
// --repeat=100
use sp_core::parameter_types;
use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight};
parameter_types! {
/// Time to execute an empty block.
/// Calculated by multiplying the *Average* with `1.0` and adding `0`.
///
/// Stats nanoseconds:
/// Min, Max: 64_363_191, 66_078_314
/// Average: 64_551_214
/// Median: 64_500_078
/// Std-Dev: 229678.99
///
/// Percentiles nanoseconds:
/// 99th: 65_668_012
/// 95th: 64_888_421
/// 75th: 64_563_448
pub const BlockExecutionWeight: Weight =
Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(64_551_214), 0);
}
#[cfg(test)]
mod test_weights {
use sp_weights::constants;
/// Checks that the weight exists and is sane.
// NOTE: If this test fails but you are sure that the generated values are fine,
// you can delete it.
#[test]
fn sane() {
let w = super::BlockExecutionWeight::get();
// At least 100 µs.
assert!(
w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS,
"Weight should be at least 100 µs."
);
// At most 50 ms.
assert!(
w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS,
"Weight should be at most 50 ms."
);
}
}

View File

@@ -0,0 +1,79 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-07-30 (Y/M/D)
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//!
//! SHORT-NAME: `extrinsic`, LONG-NAME: `ExtrinsicBase`, RUNTIME: `Development`
//! WARMUPS: `10`, REPEAT: `100`
//! WEIGHT-PATH: `./runtime/casper/constants/src/weights/`
//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0`
// Executed Command:
// ./target/release/ghost
// benchmark
// overhead
// --chain=casper-dev
// --wasm-execution=compiled
// --weight-path=./runtime/casper/constants/src/weights/
// --header=./file_header.txt
// --warmup=10
// --repeat=100
use sp_core::parameter_types;
use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight};
parameter_types! {
/// Time to execute a NO-OP extrinsic, for example `System::remark`.
/// Calculated by multiplying the *Average* with `1.0` and adding `0`.
///
/// Stats nanoseconds:
/// Min, Max: 402_868, 1_292_427
/// Average: 565_926
/// Median: 414_626
/// Std-Dev: 283192.19
///
/// Percentiles nanoseconds:
/// 99th: 1_251_123
/// 95th: 1_196_903
/// 75th: 491_329
pub const ExtrinsicBaseWeight: Weight =
Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(565_926), 0);
}
#[cfg(test)]
mod test_weights {
use sp_weights::constants;
/// Checks that the weight exists and is sane.
// NOTE: If this test fails but you are sure that the generated values are fine,
// you can delete it.
#[test]
fn sane() {
let w = super::ExtrinsicBaseWeight::get();
// At least 10 µs.
assert!(
w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS,
"Weight should be at least 10 µs."
);
// At most 1 ms.
assert!(
w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
"Weight should be at most 1 ms."
);
}
}

View File

@@ -0,0 +1,9 @@
pub mod block_weights;
pub mod extrinsic_weights;
pub mod rocksdb_weights;
pub mod paritydb_weights;
pub use block_weights::BlockExecutionWeight;
pub use extrinsic_weights::ExtrinsicBaseWeight;
pub use rocksdb_weights::constants::RocksDbWeight;
pub use paritydb_weights::constants::ParityDbWeight;

View File

@@ -0,0 +1,83 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-07-30 (Y/M/D)
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//!
//! DATABASE: `ParityDb`, RUNTIME: `Development`
//! BLOCK-NUM: `BlockId::Number(0)`
//! SKIP-WRITE: `false`, SKIP-READ: `false`, WARMUPS: `1`
//! STATE-VERSION: `V0`, STATE-CACHE-SIZE: ``
//! WEIGHT-PATH: `./runtime/casper/constants/src/weights/`
//! METRIC: `Average`, WEIGHT-MUL: `1.1`, WEIGHT-ADD: `0`
// Executed Command:
// ./target/release/ghost
// benchmark
// storage
// --chain=casper-dev
// --state-version=0
// --mul=1.1
// --database=paritydb
// --weight-path=./runtime/casper/constants/src/weights/
// --header=./file_header.txt
/// Storage DB weights for the `Development` runtime and `ParityDb`.
pub mod constants {
use frame_support::weights::constants;
use sp_core::parameter_types;
use sp_weights::RuntimeDbWeight;
parameter_types! {
/// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights
/// are available for brave runtime engineers who may want to try this out as default.
pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight {
read: 40_820 * constants::WEIGHT_REF_TIME_PER_NANOS,
write: 293_659 * constants::WEIGHT_REF_TIME_PER_NANOS,
};
}
#[cfg(test)]
mod test_db_weights {
use super::constants::ParityDbWeight as W;
use sp_weights::constants;
/// Checks that all weights exist and have sane values.
// NOTE: If this test fails but you are sure that the generated values are fine,
// you can delete it.
#[test]
fn bound() {
// At least 1 µs.
assert!(
W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
"Read weight should be at least 1 µs."
);
assert!(
W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
"Write weight should be at least 1 µs."
);
// At most 1 ms.
assert!(
W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
"Read weight should be at most 1 ms."
);
assert!(
W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
"Write weight should be at most 1 ms."
);
}
}
}

View File

@@ -0,0 +1,82 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-07-30 (Y/M/D)
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//!
//! DATABASE: `RocksDb`, RUNTIME: `Development`
//! BLOCK-NUM: `BlockId::Number(0)`
//! SKIP-WRITE: `false`, SKIP-READ: `false`, WARMUPS: `1`
//! STATE-VERSION: `V0`, STATE-CACHE-SIZE: ``
//! WEIGHT-PATH: `./runtime/casper/constants/src/weights/`
//! METRIC: `Average`, WEIGHT-MUL: `1.1`, WEIGHT-ADD: `0`
// Executed Command:
// ./target/release/ghost
// benchmark
// storage
// --chain=casper-dev
// --state-version=0
// --mul=1.1
// --weight-path=./runtime/casper/constants/src/weights/
// --header=./file_header.txt
/// Storage DB weights for the `Development` runtime and `RocksDb`.
pub mod constants {
use frame_support::weights::constants;
use sp_core::parameter_types;
use sp_weights::RuntimeDbWeight;
parameter_types! {
/// By default, Substrate uses `RocksDB`, so this will be the weight used throughout
/// the runtime.
pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight {
read: 31_627 * constants::WEIGHT_REF_TIME_PER_NANOS,
write: 412_279 * constants::WEIGHT_REF_TIME_PER_NANOS,
};
}
#[cfg(test)]
mod test_db_weights {
use super::constants::RocksDbWeight as W;
use sp_weights::constants;
/// Checks that all weights exist and have sane values.
// NOTE: If this test fails but you are sure that the generated values are fine,
// you can delete it.
#[test]
fn bound() {
// At least 1 µs.
assert!(
W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
"Read weight should be at least 1 µs."
);
assert!(
W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
"Write weight should be at least 1 µs."
);
// At most 1 ms.
assert!(
W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
"Read weight should be at most 1 ms."
);
assert!(
W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
"Write weight should be at most 1 ms."
);
}
}
}

View File

@@ -0,0 +1,222 @@
//! Autogenerated bag thresholds.
//!
//! Generated on 2024-06-30T17:36:29.986756974+00:00
//! Arguments
//! Total issuance: 50000000000000000000000000
//! Minimum balance: 1000000000000
//! for the casper runtime.
/// Existential weight for this runtime.
#[cfg(any(test, feature = "std"))]
#[allow(unused)]
pub const EXISTENTIAL_WEIGHT: u64 = 368_934;
/// Constant ratio between bags for this runtime.
#[cfg(any(test, feature = "std"))]
#[allow(unused)]
pub const CONSTANT_RATIO: f64 = 1.1717610304252650;
/// Upper thresholds delimiting the bag list.
pub const THRESHOLDS: [u64; 200] = [
368_934,
432_302,
506_555,
593_561,
695_512,
814_974,
954_955,
1_118_979,
1_311_176,
1_536_385,
1_800_276,
2_109_493,
2_471_822,
2_896_385,
3_393_871,
3_976_806,
4_659_866,
5_460_249,
6_398_107,
7_497_052,
8_784_753,
10_293_631,
12_061_676,
14_133_402,
16_560_970,
19_405_499,
22_738_608,
26_644_215,
31_220_653,
36_583_145,
42_866_704,
50_229_533,
58_857_009,
68_966_350,
80_812_081,
94_692_447,
110_956_919,
130_014_994,
152_346_503,
178_513_695,
209_175_391,
245_103_572,
287_202_814,
336_533_065,
394_336_331,
462_067_946,
541_433_213,
634_430_340,
743_400_749,
871_088_028,
1_020_707_005,
1_196_024_692,
1_401_455_126,
1_642_170_503,
1_924_231_401,
2_254_739_369,
2_642_015_726,
3_095_811_069,
3_627_550_768,
4_250_622_626,
4_980_713_948,
5_836_206_508,
6_838_639_352,
8_013_251_094,
9_389_615_359,
11_002_385_368,
12_892_166_416,
15_106_538_204,
17_701_252_772,
20_741_638_188,
24_304_243_336,
28_478_765_215,
33_370_307_274,
39_102_025_637,
45_818_229_852,
53_688_016_224,
62_909_525_212,
73_714_930_086,
86_376_282_435,
101_212_361_710,
118_596_701_249,
138_966_992_861,
162_836_106_750,
190_805_004_236,
223_577_868_374,
261_979_833_426,
306_977_759_566,
359_704_575_867,
421_487_804_467,
493_882_984_074,
578_712_834_328,
678_113_147_073,
794_586_559_959,
931_065_566_260,
1_090_986_347_314,
1_278_375_286_509,
1_497_950_342_990,
1_755_239_837_428,
2_056_721_640_548,
2_409_986_268_826,
2_823_927_993_670,
3_308_968_775_710,
3_877_320_662_271,
4_543_293_254_512,
5_323_653_985_431,
6_238_050_279_596,
7_309_504_223_464,
8_564_992_200_784,
10_036_124_086_775,
11_759_939_101_395,
13_779_838_359_189,
16_146_677_594_857,
18_920_047_576_494,
22_169_774_443_928,
25_977_677_746_713,
30_439_630_444_544,
35_667_972_735_463,
41_794_340_485_686,
48_972_979_473_452,
57_384_628_890_807,
67_241_071_879_663,
78_790_467_672_613,
92_323_599_587_750,
108_181_196_185_512,
126_762_509_914_973,
148_535_369_237_262,
174_047_957_312_051,
203_942_613_803_381,
238_972_007_297_872,
280_018_085_514_148,
328_114_280_419_768,
384_471_527_321_912,
450_508_753_023_899,
527_888_600_658_885,
618_559_290_657_806,
724_803_671_800_312,
849_296_697_324_749,
995_172_773_194_022,
1_166_104_674_168_996,
1_366_396_014_587_981,
1_601_089_602_022_588,
1_876_094_401_869_165,
2_198_334_309_509_284,
2_575_922_475_729_812,
3_018_365_574_456_765,
3_536_803_155_725_606,
4_144_288_110_164_365,
4_856_115_306_345_371,
5_690_206_675_227_153,
6_667_562_437_096_890,
7_812_789_831_717_443,
9_154_722_663_709_264,
10_727_147_261_685_494,
12_569_653_128_876_154,
14_728_629_702_380_078,
17_258_434_316_813_044,
20_222_760_778_595_608,
23_696_243_007_970_824,
27_766_334_124_227_376,
32_535_508_284_536_868,
38_123_840_712_898_664,
44_672_030_877_514_808,
52_344_944_932_226_008,
61_335_766_611_338_904,
71_870_861_086_426_040,
84_215_474_244_181_664,
98_680_410_878_114_672,
115_629_859_933_328_176,
135_490_563_823_405_696,
158_762_562_678_613_984,
186_031_784_037_248_448,
217_984_794_955_336_608,
255_426_087_953_905_344,
299_298_336_018_362_496,
350_706_126_617_443_648,
410_943_772_301_709_248,
481_527_898_079_096_320,
564_235_626_031_673_920,
661_149_318_561_518_720,
774_709_006_782_606_976,
907_773_824_067_321_216,
1_063_693_991_482_207_616,
1_246_395_167_516_354_560,
1_460_477_285_806_034_432,
1_711_330_369_328_773_120,
2_005_270_236_962_732_544,
2_349_697_519_144_566_784,
2_753_283_986_220_526_592,
3_226_190_880_747_145_216,
3_780_324_750_772_868_096,
4_429_637_225_307_749_376,
5_190_476_279_536_719_872,
6_081_997_833_707_842_560,
7_126_648_048_669_730_816,
8_350_728_460_987_448_320,
9_785_058_186_248_239_104,
11_465_749_863_089_412_096,
13_435_118_874_171_990_016,
15_742_748_735_885_697_024,
18_446_744_073_709_551_615,
];

164
runtime/casper/src/cult/mod.rs Executable file
View File

@@ -0,0 +1,164 @@
use super::*;
use frame_support::{
parameter_types,
traits::{
EitherOf, EitherOfDiverse, MapSuccess, OriginTrait, TryWithMorphedArg,
tokens::pay::PayFromAccount,
},
};
use frame_system::EnsureRootWithSuccess;
use sp_core::{ConstU128, ConstU32};
use sp_runtime::traits::{ConstU16, TakeFirst};
use pallet_ranked_collective::EnsureOfRank;
use crate::{
// weights,
RuntimeCall, RuntimeEvent, Scheduler, DAYS, CSPR, AccountId, Balance,
TreasuryAccount, Balances, Preimage, Runtime,
};
mod origins;
pub use origins::{
pallet_cult_origins, Geniuses, Degens, Zombies, Skeletons, Ghosts,
EnsureCanRetainAt, EnsureCanPromoteTo, EnsureCult, ToVoice, CultTreasurySpender,
};
mod tracks;
pub use tracks::TracksInfo;
pub mod ranks {
use pallet_ranked_collective::Rank;
pub const LEVEL_1: Rank = 1;
pub const LEVEL_2: Rank = 2;
pub const LEVEL_3: Rank = 3;
pub const LEVEL_4: Rank = 4;
pub const LEVEL_5: Rank = 5;
}
impl pallet_cult_origins::Config for Runtime {}
parameter_types! {
pub const VoteLockingPeriod: BlockNumber = prod_or_fast!(7 * DAYS, 1);
}
impl pallet_whitelist::Config for Runtime {
type RuntimeCall = RuntimeCall;
type RuntimeEvent = RuntimeEvent;
type WhitelistOrigin = EitherOfDiverse<
EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>,
Skeletons,
>;
type DispatchWhitelistedOrigin = EitherOf<
EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>,
Geniuses,
>;
type Preimages = Preimage;
type WeightInfo = weights::pallet_whitelist::WeightInfo<Runtime>;
}
parameter_types! {
pub const AlarmInterval: BlockNumber = 1;
pub const UndecidingTimeout: BlockNumber = 7 * DAYS;
pub const SubmissionDeposit: Balance = CSPR;
}
pub type CultReferendaInstance = pallet_referenda::Instance1;
impl pallet_referenda::Config<CultReferendaInstance> for Runtime {
type WeightInfo = ();
type RuntimeCall = RuntimeCall;
type RuntimeEvent = RuntimeEvent;
type Scheduler = Scheduler;
type Currency = Balances;
type SubmitOrigin = EitherOf<
pallet_ranked_collective::EnsureMember<Runtime, CultCollectiveInstance, 3>,
MapSuccess<
TryWithMorphedArg<
RuntimeOrigin,
<RuntimeOrigin as OriginTrait>::PalletsOrigin,
ToVoice,
EnsureOfRank<Runtime, CultCollectiveInstance>,
(AccountId, u16),
>,
TakeFirst,
>
>;
type CancelOrigin = Skeletons;
type KillOrigin = Ghosts;
type Slash = Treasury;
type Votes = pallet_ranked_collective::Votes;
type Tally = pallet_ranked_collective::TallyOf<Runtime, CultCollectiveInstance>;
type SubmissionDeposit = SubmissionDeposit;
type MaxQueued = ConstU32<100>;
type UndecidingTimeout = UndecidingTimeout;
type AlarmInterval = AlarmInterval;
type Tracks = TracksInfo;
type Preimages = Preimage;
}
pub type CultCollectiveInstance = pallet_ranked_collective::Instance1;
impl pallet_ranked_collective::Config<CultCollectiveInstance> for Runtime {
type WeightInfo = weights::pallet_ranked_collective::WeightInfo<Runtime>;
type RuntimeEvent = RuntimeEvent;
#[cfg(not(feature = "runtime-benchmarks"))]
type PromoteOrigin = frame_system::EnsureNever<pallet_ranked_collective::Rank>;
#[cfg(feature = "runtime-benchmarks")]
type PromoteOrigin = EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>;
#[cfg(not(feature = "runtime-benchmarks"))]
type AddOrigin = frame_system::EnsureNever<pallet_ranked_collective::Rank>;
#[cfg(feature = "runtime-benchmarks")]
type AddOrigin = EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>;
#[cfg(not(feature = "runtime-benchmarks"))]
type RemoveOrigin = frame_system::EnsureNever<pallet_ranked_collective::Rank>;
#[cfg(feature = "runtime-benchmarks")]
type RemoveOrigin = EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>;
type DemoteOrigin = EitherOf<EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>, Ghosts>;
type ExchangeOrigin = EitherOf<EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>, Ghosts>;
type Polls = CultReferenda;
type MinRankOfClass = tracks::MinRankOfClass;
type MemberSwappedHandler = (crate::CultCore, crate::CultSalary);
type VoteWeight = pallet_ranked_collective::Geometric;
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkSetup = (crate::CultCore, crate::CultSalary);
}
pub type CultCoreInstance = pallet_core_fellowship::Instance1;
impl pallet_core_fellowship::Config<CultCoreInstance> for Runtime {
type WeightInfo = weights::pallet_core_fellowship::WeightInfo<Runtime>;
type RuntimeEvent = RuntimeEvent;
type Members = pallet_ranked_collective::Pallet<Runtime, CultCollectiveInstance>;
type Balance = Balance;
type ParamsOrigin = EitherOf<EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>, Skeletons>;
type InductOrigin = EitherOf<EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>, Zombies>;
type ApproveOrigin = EitherOf<EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>, EnsureCanRetainAt>;
type PromoteOrigin = EitherOf<EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>, EnsureCanPromoteTo>;
type EvidenceSize = ConstU32<65536>;
}
pub type CultSalaryInstance = pallet_salary::Instance1;
impl pallet_salary::Config<CultSalaryInstance> for Runtime {
type WeightInfo = weights::pallet_salary::WeightInfo<Runtime>;
type RuntimeEvent = RuntimeEvent;
type Paymaster = PayFromAccount<Balances, TreasuryAccount>;
type Members = pallet_ranked_collective::Pallet<Runtime, CultCollectiveInstance>;
#[cfg(not(feature = "runtime-benchmarks"))]
type Salary = pallet_core_fellowship::Pallet<Runtime, CultCoreInstance>;
#[cfg(feature = "runtime-benchmarks")]
type Salary = frame_support::traits::tokens::ConvertRank<
crate::impls::benchmarks::RankToSalary<Balances>,
>;
type RegistrationPeriod = ConstU32<{ 15 * DAYS }>;
type PayoutPeriod = ConstU32<{ 15 * DAYS }>;
type Budget = ConstU128<{ 100 * CSPR }>;
}

View File

@@ -0,0 +1,168 @@
//! Custom origins for general governance interventions.
use super::ranks;
pub use pallet_cult_origins::*;
#[frame_support::pallet]
pub mod pallet_cult_origins {
use crate::{Balance, CSPR};
use super::ranks;
use frame_support::pallet_prelude::*;
use pallet_ranked_collective::Rank;
#[pallet::config]
pub trait Config: frame_system::Config {}
#[pallet::pallet]
pub struct Pallet<T>(_);
#[derive(PartialEq, Eq, Clone, MaxEncodedLen, Encode, Decode, TypeInfo, RuntimeDebug)]
#[pallet::origin]
pub enum Origin {
Geniuses,
Degens,
Zombies,
Skeletons,
Ghosts,
RetainAt1Level,
RetainAt2Level,
RetainAt3Level,
RetainAt4Level,
RetainAt5Level,
PromoteTo1Level,
PromoteTo2Level,
PromoteTo3Level,
PromoteTo4Level,
PromoteTo5Level,
}
impl Origin {
pub fn as_voice(&self) -> Option<pallet_ranked_collective::Rank> {
Some(match &self {
Origin::Geniuses => ranks::LEVEL_1,
Origin::Degens => ranks::LEVEL_2,
Origin::Zombies => ranks::LEVEL_3,
Origin::Skeletons => ranks::LEVEL_4,
Origin::Ghosts => ranks::LEVEL_5,
_ => return None,
})
}
}
pub struct ToVoice;
impl<'a, O: 'a + TryInto<&'a Origin>> sp_runtime::traits::TryMorph<O> for ToVoice {
type Outcome = pallet_ranked_collective::Rank;
fn try_morph(o: O) -> Result<pallet_ranked_collective::Rank, ()> {
o.try_into().ok().and_then(Origin::as_voice).ok_or(())
}
}
macro_rules! decl_unit_ensures {
( $name:ident: $success_type:ty = $success:expr ) => {
pub struct $name;
impl<O: Into<Result<Origin, O>> + From<Origin>> EnsureOrigin<O> for $name {
type Success = $success_type;
fn try_origin(o: O) -> Result<Self::Success, O> {
o.into().and_then(|o| match o {
Origin::$name => Ok($success),
r => Err(O::from(r)),
})
}
#[cfg(feature = "runtime-benchmarks")]
fn try_successful_origin() -> Result<O, ()> {
Ok(O::from(Origin::$name))
}
}
};
( $name:ident ) => { decl_unit_ensures! { $name : () = () } };
( $name:ident: $success_type:ty = $success:expr, $( $rest:tt )* ) => {
decl_unit_ensures! { $name: $success_type = $success }
decl_unit_ensures! { $( $rest )* }
};
( $name:ident, $( $rest:tt )* ) => {
decl_unit_ensures! { $name }
decl_unit_ensures! { $( $rest )* }
};
() => {}
}
decl_unit_ensures!(
Geniuses: Rank = ranks::LEVEL_1,
Degens: Rank = ranks::LEVEL_2,
Zombies: Rank = ranks::LEVEL_3,
Skeletons: Rank = ranks::LEVEL_4,
Ghosts: Rank = ranks::LEVEL_5,
);
macro_rules! decl_ensure {
(
$vis:vis type $name:ident: EnsureOrigin<Success = $success_type:ty> {
$( $item:ident = $success:expr, )*
}
) => {
$vis struct $name;
impl<O: Into<Result<Origin, O>> + From<Origin>> EnsureOrigin<O> for $name {
type Success = $success_type;
fn try_origin(o: O) -> Result<Self::Success, O> {
o.into().and_then(|o| match o {
$(
Origin::$item => Ok($success),
)*
r => Err(O::from(r)),
})
}
#[cfg(feature = "runtime-benchmarks")]
fn try_successful_origin() -> Result<O, ()> {
// By convention the more privileged origins go later,
// so for greatest chance of success, we want the last one.
let _result: Result<O, ()> = Err(());
$(
let _result: Result<O, ()> = Ok(O::from(Origin::$item));
)*
_result
}
}
}
}
decl_ensure! {
pub type EnsureCult: EnsureOrigin<Success = Rank> {
Geniuses = ranks::LEVEL_1,
Degens = ranks::LEVEL_2,
Zombies = ranks::LEVEL_3,
Skeletons = ranks::LEVEL_4,
Ghosts = ranks::LEVEL_5,
}
}
decl_ensure! {
pub type EnsureCanRetainAt: EnsureOrigin<Success = Rank> {
RetainAt1Level = ranks::LEVEL_1,
RetainAt2Level = ranks::LEVEL_2,
RetainAt3Level = ranks::LEVEL_3,
RetainAt4Level = ranks::LEVEL_4,
RetainAt5Level = ranks::LEVEL_5,
}
}
decl_ensure! {
pub type EnsureCanPromoteTo: EnsureOrigin<Success = Rank> {
PromoteTo1Level = ranks::LEVEL_1,
PromoteTo2Level = ranks::LEVEL_2,
PromoteTo3Level = ranks::LEVEL_3,
PromoteTo4Level = ranks::LEVEL_4,
PromoteTo5Level = ranks::LEVEL_5,
}
}
decl_ensure! {
pub type CultTreasurySpender: EnsureOrigin<Success = Balance> {
Geniuses = 50 * CSPR,
Degens = 100 * CSPR,
Zombies = 500 * CSPR,
Skeletons = 1_000 * CSPR,
Ghosts = 10_000 * CSPR,
}
}
}

377
runtime/casper/src/cult/tracks.rs Executable file
View File

@@ -0,0 +1,377 @@
use crate::{Balance, BlockNumber, RuntimeOrigin, DAYS, CSPR, HOURS, MINUTES};
use pallet_ranked_collective::Rank;
use sp_runtime::{traits::Convert, Perbill};
pub type TrackId = u16;
pub mod constants {
use super::TrackId;
pub const GENIUSES: TrackId = 1;
pub const DEGENS: TrackId = 2;
pub const ZOMBIES: TrackId = 3;
pub const SKELETONS: TrackId = 4;
pub const GHOSTS: TrackId = 5;
pub const RETAIN_AT_GENIUSES: TrackId = 10;
pub const RETAIN_AT_DEGENS: TrackId = 11;
pub const RETAIN_AT_ZOMBIES: TrackId = 12;
pub const RETAIN_AT_SKELETONS: TrackId = 13;
pub const RETAIN_AT_GHOSTS: TrackId = 14;
pub const PROMOTE_TO_GENIUSES: TrackId = 20;
pub const PROMOTE_TO_DEGENS: TrackId = 21;
pub const PROMOTE_TO_ZOMBIES: TrackId = 22;
pub const PROMOTE_TO_SKELETONS: TrackId = 23;
pub const PROMOTE_TO_GHOSTS: TrackId = 24;
}
/// Convert the track ID (defined above) into the minimum rank required.
pub struct MinRankOfClass;
impl Convert<TrackId, Rank> for MinRankOfClass {
fn convert(a: TrackId) -> Rank {
match a {
regular @ 1..=5 => regular,
retention @ 10..=13 => retention - 8,
promotion @ 20..=23 => promotion - 18,
14 | 24 => 5,
_ => Rank::MAX,
}
}
}
const RETAIN_MAX_DECIDING: u32 = 25;
const RETAIN_DECISION_DEPOSIT: Balance = 5 * CSPR;
const RETAIN_PREPARE_PERIOD: BlockNumber = 0;
const RETAIN_DECISION_PERIOD: BlockNumber = 14 * DAYS;
const RETAIN_CONFIRM_PERIOD: BlockNumber = HOURS;
const RETAIN_MIN_ENACTMENT_PERIOD: BlockNumber = 0;
const RETAIN_MIN_APPROVAL: pallet_referenda::Curve = pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(60),
ceil: Perbill::from_percent(100),
};
const RETAIN_MIN_SUPPORT: pallet_referenda::Curve = pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(10),
ceil: Perbill::from_percent(100),
};
const PROMOTE_MAX_DECIDING: u32 = 10;
const PROMOTE_DECISION_DEPOSIT: Balance = 5 * CSPR;
const PROMOTE_PREPARE_PERIOD: BlockNumber = 0;
const PROMOTE_DECISION_PERIOD: BlockNumber = 30 * DAYS;
const PROMOTE_CONFIRM_PERIOD: BlockNumber = HOURS;
const PROMOTE_MIN_ENACTMENT_PERIOD: BlockNumber = 0;
const PROMOTE_MIN_APPROVAL: pallet_referenda::Curve = pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(60),
ceil: Perbill::from_percent(100),
};
const PROMOTE_MIN_SUPPORT: pallet_referenda::Curve = pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(10),
ceil: Perbill::from_percent(100),
};
const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo<Balance, BlockNumber>); 15] = [
(
constants::GENIUSES,
pallet_referenda::TrackInfo {
name: "geniuses",
max_deciding: 10,
decision_deposit: 5 * CSPR,
prepare_period: 30 * MINUTES,
decision_period: 7 * DAYS,
confirm_period: 30 * MINUTES,
min_enactment_period: 5 * MINUTES,
min_approval: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(0),
ceil: Perbill::from_percent(100),
},
},
),
(
constants::DEGENS,
pallet_referenda::TrackInfo {
name: "degens",
max_deciding: 10,
decision_deposit: 5 * CSPR,
prepare_period: 30 * MINUTES,
decision_period: 7 * DAYS,
confirm_period: 30 * MINUTES,
min_enactment_period: 5 * MINUTES,
min_approval: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(0),
ceil: Perbill::from_percent(100),
},
},
),
(
constants::ZOMBIES,
pallet_referenda::TrackInfo {
name: "zombies",
max_deciding: 10,
decision_deposit: 5 * CSPR,
prepare_period: 30 * MINUTES,
decision_period: 7 * DAYS,
confirm_period: 30 * MINUTES,
min_enactment_period: 5 * MINUTES,
min_approval: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(0),
ceil: Perbill::from_percent(100),
},
},
),
(
constants::SKELETONS,
pallet_referenda::TrackInfo {
name: "skeletons",
max_deciding: 10,
decision_deposit: 5 * CSPR,
prepare_period: 30 * MINUTES,
decision_period: 7 * DAYS,
confirm_period: 30 * MINUTES,
min_enactment_period: 5 * MINUTES,
min_approval: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(0),
ceil: Perbill::from_percent(100),
},
},
),
(
constants::GHOSTS,
pallet_referenda::TrackInfo {
name: "skeletons",
max_deciding: 10,
decision_deposit: 5 * CSPR,
prepare_period: 30 * MINUTES,
decision_period: 7 * DAYS,
confirm_period: 30 * MINUTES,
min_enactment_period: 5 * MINUTES,
min_approval: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(0),
ceil: Perbill::from_percent(100),
},
},
),
(
constants::RETAIN_AT_GENIUSES,
pallet_referenda::TrackInfo {
name: "retain a genius",
max_deciding: RETAIN_MAX_DECIDING,
decision_deposit: RETAIN_DECISION_DEPOSIT,
prepare_period: RETAIN_PREPARE_PERIOD,
decision_period: RETAIN_DECISION_PERIOD,
confirm_period: RETAIN_CONFIRM_PERIOD,
min_enactment_period: RETAIN_MIN_ENACTMENT_PERIOD,
min_approval: RETAIN_MIN_APPROVAL,
min_support: RETAIN_MIN_SUPPORT,
},
),
(
constants::RETAIN_AT_DEGENS,
pallet_referenda::TrackInfo {
name: "retain a degen",
max_deciding: RETAIN_MAX_DECIDING,
decision_deposit: RETAIN_DECISION_DEPOSIT,
prepare_period: RETAIN_PREPARE_PERIOD,
decision_period: RETAIN_DECISION_PERIOD,
confirm_period: RETAIN_CONFIRM_PERIOD,
min_enactment_period: RETAIN_MIN_ENACTMENT_PERIOD,
min_approval: RETAIN_MIN_APPROVAL,
min_support: RETAIN_MIN_SUPPORT,
},
),
(
constants::RETAIN_AT_ZOMBIES,
pallet_referenda::TrackInfo {
name: "retain a zombie",
max_deciding: RETAIN_MAX_DECIDING,
decision_deposit: RETAIN_DECISION_DEPOSIT,
prepare_period: RETAIN_PREPARE_PERIOD,
decision_period: RETAIN_DECISION_PERIOD,
confirm_period: RETAIN_CONFIRM_PERIOD,
min_enactment_period: RETAIN_MIN_ENACTMENT_PERIOD,
min_approval: RETAIN_MIN_APPROVAL,
min_support: RETAIN_MIN_SUPPORT,
},
),
(
constants::RETAIN_AT_SKELETONS,
pallet_referenda::TrackInfo {
name: "retain a skeleton",
max_deciding: RETAIN_MAX_DECIDING,
decision_deposit: RETAIN_DECISION_DEPOSIT,
prepare_period: RETAIN_PREPARE_PERIOD,
decision_period: RETAIN_DECISION_PERIOD,
confirm_period: RETAIN_CONFIRM_PERIOD,
min_enactment_period: RETAIN_MIN_ENACTMENT_PERIOD,
min_approval: RETAIN_MIN_APPROVAL,
min_support: RETAIN_MIN_SUPPORT,
},
),
(
constants::RETAIN_AT_GHOSTS,
pallet_referenda::TrackInfo {
name: "retain a ghost",
max_deciding: RETAIN_MAX_DECIDING,
decision_deposit: RETAIN_DECISION_DEPOSIT,
prepare_period: RETAIN_PREPARE_PERIOD,
decision_period: RETAIN_DECISION_PERIOD,
confirm_period: RETAIN_CONFIRM_PERIOD,
min_enactment_period: RETAIN_MIN_ENACTMENT_PERIOD,
min_approval: RETAIN_MIN_APPROVAL,
min_support: RETAIN_MIN_SUPPORT,
},
),
(
constants::PROMOTE_TO_GENIUSES,
pallet_referenda::TrackInfo {
name: "promote to genius",
max_deciding: PROMOTE_MAX_DECIDING,
decision_deposit: PROMOTE_DECISION_DEPOSIT,
prepare_period: PROMOTE_PREPARE_PERIOD,
decision_period: PROMOTE_DECISION_PERIOD,
confirm_period: PROMOTE_CONFIRM_PERIOD,
min_enactment_period: PROMOTE_MIN_ENACTMENT_PERIOD,
min_approval: PROMOTE_MIN_APPROVAL,
min_support: PROMOTE_MIN_SUPPORT,
},
),
(
constants::PROMOTE_TO_DEGENS,
pallet_referenda::TrackInfo {
name: "promote to degen",
max_deciding: PROMOTE_MAX_DECIDING,
decision_deposit: PROMOTE_DECISION_DEPOSIT,
prepare_period: PROMOTE_PREPARE_PERIOD,
decision_period: PROMOTE_DECISION_PERIOD,
confirm_period: PROMOTE_CONFIRM_PERIOD,
min_enactment_period: PROMOTE_MIN_ENACTMENT_PERIOD,
min_approval: PROMOTE_MIN_APPROVAL,
min_support: PROMOTE_MIN_SUPPORT,
},
),
(
constants::PROMOTE_TO_ZOMBIES,
pallet_referenda::TrackInfo {
name: "promote to zombie",
max_deciding: PROMOTE_MAX_DECIDING,
decision_deposit: PROMOTE_DECISION_DEPOSIT,
prepare_period: PROMOTE_PREPARE_PERIOD,
decision_period: PROMOTE_DECISION_PERIOD,
confirm_period: PROMOTE_CONFIRM_PERIOD,
min_enactment_period: PROMOTE_MIN_ENACTMENT_PERIOD,
min_approval: PROMOTE_MIN_APPROVAL,
min_support: PROMOTE_MIN_SUPPORT,
},
),
(
constants::PROMOTE_TO_SKELETONS,
pallet_referenda::TrackInfo {
name: "promote to skeleton",
max_deciding: PROMOTE_MAX_DECIDING,
decision_deposit: PROMOTE_DECISION_DEPOSIT,
prepare_period: PROMOTE_PREPARE_PERIOD,
decision_period: PROMOTE_DECISION_PERIOD,
confirm_period: PROMOTE_CONFIRM_PERIOD,
min_enactment_period: PROMOTE_MIN_ENACTMENT_PERIOD,
min_approval: PROMOTE_MIN_APPROVAL,
min_support: PROMOTE_MIN_SUPPORT,
},
),
(
constants::PROMOTE_TO_GHOSTS,
pallet_referenda::TrackInfo {
name: "promote to ghost",
max_deciding: PROMOTE_MAX_DECIDING,
decision_deposit: PROMOTE_DECISION_DEPOSIT,
prepare_period: PROMOTE_PREPARE_PERIOD,
decision_period: PROMOTE_DECISION_PERIOD,
confirm_period: PROMOTE_CONFIRM_PERIOD,
min_enactment_period: PROMOTE_MIN_ENACTMENT_PERIOD,
min_approval: PROMOTE_MIN_APPROVAL,
min_support: PROMOTE_MIN_SUPPORT,
},
),
];
pub struct TracksInfo;
impl pallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
type Id = TrackId;
type RuntimeOrigin = <RuntimeOrigin as frame_support::traits::OriginTrait>::PalletsOrigin;
fn tracks() -> &'static [(Self::Id, pallet_referenda::TrackInfo<Balance, BlockNumber>)] {
&TRACKS_DATA[..]
}
fn track_for(id: &Self::RuntimeOrigin) -> Result<Self::Id, ()> {
use super::origins::Origin;
use constants as tracks;
#[cfg(feature = "runtime-benchmarks")]
{
// For benchmark we enable root origin.
// It is important that this is NOT availiable in production!
let root: Self::RuntimeOrigin = frame_system::RawOrigin::Root.into();
if &root == id {
return Ok(tracks::GHOSTS)
}
}
match Origin::try_from(id.clone()) {
Ok(Origin::Geniuses) => Ok(tracks::GENIUSES),
Ok(Origin::Degens) => Ok(tracks::DEGENS),
Ok(Origin::Zombies) => Ok(tracks::ZOMBIES),
Ok(Origin::Skeletons) => Ok(tracks::SKELETONS),
Ok(Origin::Ghosts) => Ok(tracks::GHOSTS),
Ok(Origin::RetainAt1Level) => Ok(tracks::RETAIN_AT_GENIUSES),
Ok(Origin::RetainAt2Level) => Ok(tracks::RETAIN_AT_DEGENS),
Ok(Origin::RetainAt3Level) => Ok(tracks::RETAIN_AT_ZOMBIES),
Ok(Origin::RetainAt4Level) => Ok(tracks::RETAIN_AT_SKELETONS),
Ok(Origin::RetainAt5Level) => Ok(tracks::RETAIN_AT_GHOSTS),
Ok(Origin::PromoteTo1Level) => Ok(tracks::PROMOTE_TO_GENIUSES),
Ok(Origin::PromoteTo2Level) => Ok(tracks::PROMOTE_TO_GENIUSES),
Ok(Origin::PromoteTo3Level) => Ok(tracks::PROMOTE_TO_ZOMBIES),
Ok(Origin::PromoteTo4Level) => Ok(tracks::PROMOTE_TO_SKELETONS),
Ok(Origin::PromoteTo5Level) => Ok(tracks::PROMOTE_TO_GHOSTS),
_ => Err(()),
}
}
}
pallet_referenda::impl_tracksinfo_get!(TracksInfo, Balance, BlockNumber);

View File

@@ -0,0 +1,237 @@
use codec::Encode;
use crate::{opaque::SessionKeys, BABE_GENESIS_EPOCH_CONFIG};
use primitives::{AccountId, AccountPublic};
use casper_runtime_constants::currency::CSPR;
use ghost_slow_clap::sr25519::AuthorityId as SlowClapId;
use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
use babe_primitives::AuthorityId as BabeId;
use grandpa_primitives::AuthorityId as GrandpaId;
#[cfg(not(feature = "std"))]
use sp_std::alloc::format;
use sp_std::vec::Vec;
use sp_std::prelude::*;
use sp_core::{sr25519, Pair, Public};
use sp_runtime::traits::IdentifyAccount;
#[derive(Encode, Clone)]
struct PreparedNetworkData {
chain_name: Vec<u8>,
default_endpoint: Vec<u8>,
finality_delay: Option<u64>,
release_delay: Option<u64>,
network_type: u8,
gatekeeper: Vec<u8>,
topic_name: Vec<u8>,
incoming_fee: u32,
outgoing_fee: u32,
}
fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {
TPublic::Pair::from_string(&format!("//{}", seed), None)
.expect("static values are valid; qed")
.public()
}
fn get_account_id_from_seed<TPublic: Public>(seed: &str) -> AccountId
where
AccountPublic: From<<TPublic::Pair as Pair>::Public>,
{
AccountPublic::from(get_from_seed::<TPublic>(seed)).into_account()
}
fn get_authority_keys_from_seed(
seed: &str,
) -> (
AccountId,
AccountId,
BabeId,
GrandpaId,
AuthorityDiscoveryId,
SlowClapId,
) {
(
get_account_id_from_seed::<sr25519::Public>(&format!("{}//stash", seed)),
get_account_id_from_seed::<sr25519::Public>(seed),
get_from_seed::<BabeId>(seed),
get_from_seed::<GrandpaId>(seed),
get_from_seed::<AuthorityDiscoveryId>(seed),
get_from_seed::<SlowClapId>(seed),
)
}
fn testnet_accounts() -> Vec<AccountId> {
Vec::from([
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_account_id_from_seed::<sr25519::Public>("Bob"),
get_account_id_from_seed::<sr25519::Public>("Charlie"),
get_account_id_from_seed::<sr25519::Public>("Dave"),
get_account_id_from_seed::<sr25519::Public>("Eve"),
get_account_id_from_seed::<sr25519::Public>("Feride"),
get_account_id_from_seed::<sr25519::Public>("Alice//stash"),
get_account_id_from_seed::<sr25519::Public>("Bob//stash"),
get_account_id_from_seed::<sr25519::Public>("Charlie//stash"),
get_account_id_from_seed::<sr25519::Public>("Dave//stash"),
get_account_id_from_seed::<sr25519::Public>("Eve//stash"),
get_account_id_from_seed::<sr25519::Public>("Feride//stash"),
])
}
fn testnet_evm_accounts() -> Vec<(AccountId, u128, u8)> {
vec![
// 01c928771aea942a1e7ac06adf2b73dfbc9a25d9eaa516e3673116af7f345198
(get_account_id_from_seed::<sr25519::Public>("1A69d2D5568D1878023EeB121a73d33B9116A760"), 1337 * CSPR, 1),
// b19a435901872f817185f7234a1484eae837613f9d10cf21927a23c2d8cb9139
(get_account_id_from_seed::<sr25519::Public>("2f86cfBED3fbc1eCf2989B9aE5fc019a837A9C12"), 1337 * CSPR, 2),
// d3baf57b74d65719b2dc33f5a464176022d0cc5edbca002234229f3e733875fc
(get_account_id_from_seed::<sr25519::Public>("e83f67361Ac74D42A48E2DAfb6706eb047D8218D"), 69 * CSPR, 3),
// c4683d566436af6b58b4a59c8f501319226e85b21869bf93d5eeb4596d4791d4
(get_account_id_from_seed::<sr25519::Public>("827ee4ad9b259b6fa1390ed60921508c78befd63"), 69 * CSPR, 4),
]
}
fn testnet_evm_networks() -> Vec<(u32, Vec<u8>)> {
vec![
(1, PreparedNetworkData {
chain_name: "ethereum-mainnet".into(),
default_endpoint: "https://nd-422-757-666.p2pify.com/0a9d79d93fb2f4a4b1e04695da2b77a7/".into(),
finality_delay: Some(40),
release_delay: Some(80),
network_type: Default::default(),
gatekeeper: "0x4d224452801aced8b2f0aebe155379bb5d594381".into(),
topic_name: "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef".into(),
incoming_fee: 0,
outgoing_fee: 0,
}.encode()),
(56, PreparedNetworkData {
chain_name: "bnb-mainnet".into(),
default_endpoint: "https://bsc-mainnet.core.chainstack.com/35848e183f3e3303c8cfeacbea831cab/".into(),
finality_delay: Some(20),
release_delay: Some(40),
network_type: Default::default(),
gatekeeper: "0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82".into(),
topic_name: "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef".into(),
incoming_fee: 0,
outgoing_fee: 0,
}.encode())
]
}
fn casper_session_keys(
babe: BabeId,
grandpa: GrandpaId,
authority_discovery: AuthorityDiscoveryId,
slow_clap: SlowClapId,
) -> SessionKeys {
SessionKeys { babe, grandpa, authority_discovery, slow_clap }
}
fn casper_testnet_genesis(
initial_authorities: Vec<(
AccountId,
AccountId,
BabeId,
GrandpaId,
AuthorityDiscoveryId,
SlowClapId,
)>,
endowed_accounts: Option<Vec<AccountId>>,
ghost_accounts: Option<Vec<(AccountId, u128, u8)>>,
evm_networks: Option<Vec<(u32, Vec<u8>)>>,
) -> serde_json::Value {
let endowed_accounts: Vec<AccountId> =
endowed_accounts.unwrap_or_else(testnet_accounts);
let ghost_accounts: Vec<(AccountId, u128, u8)> =
ghost_accounts.unwrap_or_else(testnet_evm_accounts);
let evm_networks: Vec<(u32, Vec<u8>)> =
evm_networks.unwrap_or_else(testnet_evm_networks);
const ENDOWMENT: u128 = 1_000 * CSPR;
serde_json::json!({
"balances": {
"balances": endowed_accounts
.iter()
.map(|k| (k.clone(), ENDOWMENT))
.chain(ghost_accounts
.iter()
.map(|k| (k.0.clone(), k.1.clone())))
.collect::<Vec<_>>(),
},
"session": {
"keys": initial_authorities
.iter()
.map(|x| {
(
x.0.clone(),
x.0.clone(),
casper_session_keys(
x.2.clone(),
x.3.clone(),
x.4.clone(),
x.5.clone(),
),
)
})
.collect::<Vec<_>>(),
},
"babe": {
"epochConfig": Some(BABE_GENESIS_EPOCH_CONFIG),
},
"ghostNetworks": {
"networks": evm_networks,
},
"ghostClaims": {
"total": ghost_accounts
.iter()
.fold(0, |acc, k| acc + k.1),
"membersAndRanks": ghost_accounts
.iter()
.map(|k| (k.0.clone(), k.2.clone()))
.collect::<Vec<_>>(),
},
})
}
// development
fn casper_development_config_genesis() -> serde_json::Value {
casper_testnet_genesis(
vec![get_authority_keys_from_seed("Alice")],
None, None, None,
)
}
// local
fn casper_local_config_genesis() -> serde_json::Value {
casper_testnet_genesis(
vec![
get_authority_keys_from_seed("Alice"),
get_authority_keys_from_seed("Bob"),
],
None, None, None,
)
}
/// Provides the JSON representation of predefined genesis config for given `id`.
pub fn get_preset(id: &sp_genesis_builder::PresetId) -> Option<sp_std::vec::Vec<u8>> {
let patch = match id.try_into() {
Ok("development") => casper_development_config_genesis(),
Ok("local_testnet") => casper_local_config_genesis(),
_ => return None,
};
Some(serde_json::to_string(&patch)
.expect("serialization to json is expected to work; qed")
.into_bytes())
}
/// Returns a list of identifiers for available builtin `RuntimeGenesisConfig` presets.
pub fn preset_names() -> Vec<sp_genesis_builder::PresetId> {
Vec::from([
sp_genesis_builder::PresetId::from("local_testnet"),
sp_genesis_builder::PresetId::from("development"),
])
}

View File

@@ -0,0 +1,93 @@
use super::*;
use frame_support::{
dispatch::DispatchResultWithPostInfo,
traits::PrivilegeCmp,
};
use pallet_alliance::{ProposalIndex, ProposalProvider};
use sp_runtime::DispatchError;
use sp_std::{cmp::Ordering, marker::PhantomData};
type AccountIdOf<T> = <T as frame_system::Config>::AccountId;
type ProposalOf<T, I> = <T as pallet_collective::Config<I>>::Proposal;
type HashOf<T> = <T as frame_system::Config>::Hash;
/// Proposal provider for alliance pallet.
/// Adapter from collective pallet to alliance proposal provider trait.
pub struct AllianceProposalProvider<T, I = ()>(PhantomData<(T, I)>);
impl <T, I> ProposalProvider<AccountIdOf<T>, HashOf<T>, ProposalOf<T, I>> for AllianceProposalProvider<T, I>
where
T: pallet_collective::Config<I> + frame_system::Config,
I: 'static,
{
fn propose_proposal(
who: AccountIdOf<T>,
threshold: u32,
proposal: Box<ProposalOf<T, I>>,
length_bound: u32,
) -> Result<(u32, u32), DispatchError> {
pallet_collective::Pallet::<T, I>::do_propose_proposed(who, threshold, proposal, length_bound)
}
fn vote_proposal(
who: AccountIdOf<T>,
proposal: HashOf<T>,
index: ProposalIndex,
approve: bool,
) -> Result<bool, DispatchError> {
pallet_collective::Pallet::<T, I>::do_vote(who, proposal, index, approve)
}
fn close_proposal(
proposal_hash: HashOf<T>,
proposal_index: ProposalIndex,
proposal_weight_bound: Weight,
length_bound: u32,
) -> DispatchResultWithPostInfo {
pallet_collective::Pallet::<T, I>::do_close(
proposal_hash,
proposal_index,
proposal_weight_bound,
length_bound,
)
}
fn proposal_of(proposal_hash: HashOf<T>) -> Option<ProposalOf<T, I>> {
pallet_collective::ProposalOf::<T, I>::get(proposal_hash)
}
}
/// Used the compare the privilege of an origin inside the scheduler.
pub struct EqualOrGreatestRootCmp;
impl PrivilegeCmp<OriginCaller> for EqualOrGreatestRootCmp {
fn cmp_privilege(left: &OriginCaller, right: &OriginCaller) -> Option<Ordering> {
if left == right {
return Some(Ordering::Equal)
}
match (left, right) {
// Root is greater than anything
(OriginCaller::system(frame_system::RawOrigin::Root), _) => Some(Ordering::Greater),
// For every other we don't care, as they are not used for `ScheduleOrigin`.
_ => None,
}
}
}
#[cfg(feature = "runtime-benchmarks")]
pub mod benchmarks {
use super::*;
use frame_support::traits::fungible;
use pallet_ranked_collective::Rank;
use sp_runtime::traits::Convert;
/// Rank to salary conversion helper type
pub struct RankToSalary<Fungible>(PhantomData<Fungible>);
impl<Fungible> Convert<Rank, Balance> for RankToSalary<Fungible>
where
Fungible: fungible::Inspect<AccountId, Balance = Balance>,
{
fn convert(r: Rank) -> Balance {
Balance::from(r).saturating_mul(Fungible::minimum_balance())
}
}
}

1915
runtime/casper/src/lib.rs Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,104 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `frame_benchmarking::baseline`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=frame_benchmarking::baseline
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/frame_benchmarking::baseline.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `frame_benchmarking::baseline`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> frame_benchmarking::baseline::WeightInfo for WeightInfo<T> {
/// The range of component `i` is `[0, 1000000]`.
fn addition(_i: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 581_000 picoseconds.
Weight::from_parts(630_062, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// The range of component `i` is `[0, 1000000]`.
fn subtraction(_i: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 577_000 picoseconds.
Weight::from_parts(639_502, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// The range of component `i` is `[0, 1000000]`.
fn multiplication(_i: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 588_000 picoseconds.
Weight::from_parts(643_988, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// The range of component `i` is `[0, 1000000]`.
fn division(_i: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 587_000 picoseconds.
Weight::from_parts(646_411, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn hashing() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 86_383_930_000 picoseconds.
Weight::from_parts(86_405_327_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// The range of component `i` is `[0, 100]`.
fn sr25519_verification(i: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 617_000 picoseconds.
Weight::from_parts(9_197_912, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 11_936
.saturating_add(Weight::from_parts(134_040_960, 0).saturating_mul(i.into()))
}
}

View File

@@ -0,0 +1,79 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `frame_election_provider_support`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=frame_election_provider_support
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/frame_election_provider_support.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `frame_election_provider_support`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> frame_election_provider_support::WeightInfo for WeightInfo<T> {
/// The range of component `v` is `[1000, 2000]`.
/// The range of component `t` is `[500, 1000]`.
/// The range of component `d` is `[5, 16]`.
fn phragmen(v: u32, _t: u32, d: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 25_492_475_000 picoseconds.
Weight::from_parts(25_652_778_000, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 610_576
.saturating_add(Weight::from_parts(26_134_836, 0).saturating_mul(v.into()))
// Standard Error: 62_423_156
.saturating_add(Weight::from_parts(6_191_776_057, 0).saturating_mul(d.into()))
}
/// The range of component `v` is `[1000, 2000]`.
/// The range of component `t` is `[500, 1000]`.
/// The range of component `d` is `[5, 16]`.
fn phragmms(v: u32, _t: u32, d: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 17_311_486_000 picoseconds.
Weight::from_parts(17_425_500_000, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 525_907
.saturating_add(Weight::from_parts(21_191_580, 0).saturating_mul(v.into()))
// Standard Error: 53_766_908
.saturating_add(Weight::from_parts(5_509_535_886, 0).saturating_mul(d.into()))
}
}

View File

@@ -0,0 +1,170 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `frame_system`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=frame_system
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/frame_system.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `frame_system`.
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 {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 10_130_000 picoseconds.
Weight::from_parts(10_233_000, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 0
.saturating_add(Weight::from_parts(1_073, 0).saturating_mul(b.into()))
}
/// The range of component `b` is `[0, 3932160]`.
fn remark_with_event(b: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 24_295_000 picoseconds.
Weight::from_parts(25_129_000, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 61
.saturating_add(Weight::from_parts(6_128, 0).saturating_mul(b.into()))
}
/// Storage: `System::Digest` (r:1 w:1)
/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1)
/// Proof: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1)
fn set_heap_pages() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `1485`
// Minimum execution time: 17_361_000 picoseconds.
Weight::from_parts(18_127_000, 0)
.saturating_add(Weight::from_parts(0, 1485))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `System::Digest` (r:1 w:1)
/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
/// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
fn set_code() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `1485`
// Minimum execution time: 276_621_374_000 picoseconds.
Weight::from_parts(465_333_875_000, 0)
.saturating_add(Weight::from_parts(0, 1485))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Skipped::Metadata` (r:0 w:0)
/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `i` is `[0, 1000]`.
fn set_storage(i: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 10_235_000 picoseconds.
Weight::from_parts(216_405_157, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 33_989
.saturating_add(Weight::from_parts(2_132_990, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
}
/// Storage: `Skipped::Metadata` (r:0 w:0)
/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `i` is `[0, 1000]`.
fn kill_storage(i: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 10_172_000 picoseconds.
Weight::from_parts(10_294_000, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 2_842
.saturating_add(Weight::from_parts(1_680_628, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
}
/// Storage: `Skipped::Metadata` (r:0 w:0)
/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `p` is `[0, 1000]`.
fn kill_prefix(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `88 + p * (69 ±0)`
// Estimated: `102 + p * (70 ±0)`
// Minimum execution time: 19_692_000 picoseconds.
Weight::from_parts(19_817_000, 0)
.saturating_add(Weight::from_parts(0, 102))
// Standard Error: 5_183
.saturating_add(Weight::from_parts(3_138_053, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into())))
.saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into()))
}
/// Storage: `System::AuthorizedUpgrade` (r:0 w:1)
/// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
fn authorize_upgrade() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 41_596_000 picoseconds.
Weight::from_parts(42_415_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::AuthorizedUpgrade` (r:1 w:1)
/// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
/// Storage: `System::Digest` (r:1 w:1)
/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
/// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
fn apply_authorized_upgrade() -> Weight {
// Proof Size summary in bytes:
// Measured: `22`
// Estimated: `1518`
// Minimum execution time: 281_871_139_000 picoseconds.
Weight::from_parts(288_412_158_000, 0)
.saturating_add(Weight::from_parts(0, 1518))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(3))
}
}

View File

@@ -0,0 +1,71 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `ghost_claims`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-08-02, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=ghost_claims
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/ghost_claims.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `ghost_claims`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> ghost_claims::WeightInfo for WeightInfo<T> {
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `GhostClaims::Total` (r:1 w:1)
/// Proof: `GhostClaims::Total` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `CultCollective::Members` (r:2 w:2)
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::MemberCount` (r:6 w:6)
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::IdToIndex` (r:6 w:12)
/// Proof: `CultCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::IndexToId` (r:0 w:6)
/// Proof: `CultCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
fn claim() -> Weight {
// Proof Size summary in bytes:
// Measured: `896`
// Estimated: `16164`
// Minimum execution time: 754_086_000 picoseconds.
Weight::from_parts(756_147_000, 0)
.saturating_add(Weight::from_parts(0, 16164))
.saturating_add(T::DbWeight::get().reads(17))
.saturating_add(T::DbWeight::get().writes(29))
}
}

View File

@@ -0,0 +1,191 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `ghost_networks`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-08-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=ghost_networks
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/ghost_networks.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `ghost_networks`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> ghost_networks::WeightInfo for WeightInfo<T> {
/// Storage: `GhostNetworks::Networks` (r:1 w:1)
/// Proof: `GhostNetworks::Networks` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `i` is `[1, 20]`.
/// The range of component `j` is `[1, 150]`.
fn register_network(i: u32, j: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `109`
// Estimated: `3574`
// Minimum execution time: 44_464_000 picoseconds.
Weight::from_parts(44_802_179, 0)
.saturating_add(Weight::from_parts(0, 3574))
// Standard Error: 11_381
.saturating_add(Weight::from_parts(42_872, 0).saturating_mul(i.into()))
// Standard Error: 1_492
.saturating_add(Weight::from_parts(8_794, 0).saturating_mul(j.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `GhostNetworks::Networks` (r:1 w:1)
/// Proof: `GhostNetworks::Networks` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `n` is `[1, 20]`.
fn update_network_name(_n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `295`
// Estimated: `3760`
// Minimum execution time: 50_224_000 picoseconds.
Weight::from_parts(54_405_362, 0)
.saturating_add(Weight::from_parts(0, 3760))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `GhostNetworks::Networks` (r:1 w:1)
/// Proof: `GhostNetworks::Networks` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `n` is `[1, 150]`.
fn update_network_endpoint(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `295`
// Estimated: `3760`
// Minimum execution time: 50_598_000 picoseconds.
Weight::from_parts(54_951_352, 0)
.saturating_add(Weight::from_parts(0, 3760))
// Standard Error: 10_596
.saturating_add(Weight::from_parts(11_691, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `GhostNetworks::Networks` (r:1 w:1)
/// Proof: `GhostNetworks::Networks` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn update_network_finality_delay() -> Weight {
// Proof Size summary in bytes:
// Measured: `295`
// Estimated: `3760`
// Minimum execution time: 49_089_000 picoseconds.
Weight::from_parts(50_797_000, 0)
.saturating_add(Weight::from_parts(0, 3760))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `GhostNetworks::Networks` (r:1 w:1)
/// Proof: `GhostNetworks::Networks` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn update_network_release_delay() -> Weight {
// Proof Size summary in bytes:
// Measured: `295`
// Estimated: `3760`
// Minimum execution time: 49_606_000 picoseconds.
Weight::from_parts(50_371_000, 0)
.saturating_add(Weight::from_parts(0, 3760))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `GhostNetworks::Networks` (r:1 w:1)
/// Proof: `GhostNetworks::Networks` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn update_network_type() -> Weight {
// Proof Size summary in bytes:
// Measured: `295`
// Estimated: `3760`
// Minimum execution time: 48_135_000 picoseconds.
Weight::from_parts(48_619_000, 0)
.saturating_add(Weight::from_parts(0, 3760))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `GhostNetworks::Networks` (r:1 w:1)
/// Proof: `GhostNetworks::Networks` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn update_network_gatekeeper() -> Weight {
// Proof Size summary in bytes:
// Measured: `295`
// Estimated: `3760`
// Minimum execution time: 50_027_000 picoseconds.
Weight::from_parts(51_212_000, 0)
.saturating_add(Weight::from_parts(0, 3760))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `GhostNetworks::Networks` (r:1 w:1)
/// Proof: `GhostNetworks::Networks` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn update_network_topic_name() -> Weight {
// Proof Size summary in bytes:
// Measured: `295`
// Estimated: `3760`
// Minimum execution time: 50_686_000 picoseconds.
Weight::from_parts(52_276_000, 0)
.saturating_add(Weight::from_parts(0, 3760))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `GhostNetworks::Networks` (r:1 w:1)
/// Proof: `GhostNetworks::Networks` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn update_incoming_network_fee() -> Weight {
// Proof Size summary in bytes:
// Measured: `295`
// Estimated: `3760`
// Minimum execution time: 48_485_000 picoseconds.
Weight::from_parts(49_672_000, 0)
.saturating_add(Weight::from_parts(0, 3760))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `GhostNetworks::Networks` (r:1 w:1)
/// Proof: `GhostNetworks::Networks` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn update_outgoing_network_fee() -> Weight {
// Proof Size summary in bytes:
// Measured: `295`
// Estimated: `3760`
// Minimum execution time: 48_926_000 picoseconds.
Weight::from_parts(49_482_000, 0)
.saturating_add(Weight::from_parts(0, 3760))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `GhostNetworks::Networks` (r:1 w:1)
/// Proof: `GhostNetworks::Networks` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn remove_network() -> Weight {
// Proof Size summary in bytes:
// Measured: `295`
// Estimated: `3760`
// Minimum execution time: 45_163_000 picoseconds.
Weight::from_parts(45_822_000, 0)
.saturating_add(Weight::from_parts(0, 3760))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
}

View File

@@ -0,0 +1,125 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `ghost_slow_clap`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-08-02, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=ghost_slow_clap
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/ghost_slow_clap.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `ghost_slow_clap`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> ghost_slow_clap::WeightInfo for WeightInfo<T> {
/// Storage: `GhostSlowClaps::Authorities` (r:1 w:0)
/// Proof: `GhostSlowClaps::Authorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `GhostSlowClaps::AuthorityInfoInSession` (r:1 w:0)
/// Proof: `GhostSlowClaps::AuthorityInfoInSession` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `GhostSlowClaps::ApplausesForTransaction` (r:1 w:0)
/// Proof: `GhostSlowClaps::ApplausesForTransaction` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `GhostSlowClaps::ReceivedClaps` (r:1 w:0)
/// Proof: `GhostSlowClaps::ReceivedClaps` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `k` is `[1, 100]`.
/// The range of component `j` is `[1, 20]`.
fn slow_clap(k: u32, j: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `372 + j * (19 ±0)`
// Estimated: `3853 + j * (19 ±0)`
// Minimum execution time: 95_459_000 picoseconds.
Weight::from_parts(96_224_000, 0)
.saturating_add(Weight::from_parts(0, 3853))
// Standard Error: 152_014
.saturating_add(Weight::from_parts(32_092_278, 0).saturating_mul(k.into()))
// Standard Error: 761_228
.saturating_add(Weight::from_parts(22_412_712, 0).saturating_mul(j.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(Weight::from_parts(0, 19).saturating_mul(j.into()))
}
/// Storage: `GhostSlowClaps::CurrentCompanionId` (r:1 w:1)
/// Proof: `GhostSlowClaps::CurrentCompanionId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `GhostNetworks::Networks` (r:1 w:0)
/// Proof: `GhostNetworks::Networks` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `GhostSlowClaps::Companions` (r:0 w:1)
/// Proof: `GhostSlowClaps::Companions` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `GhostSlowClaps::CompanionDetails` (r:0 w:1)
/// Proof: `GhostSlowClaps::CompanionDetails` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn propose_companion() -> Weight {
// Proof Size summary in bytes:
// Measured: `634`
// Estimated: `4099`
// Minimum execution time: 167_770_000 picoseconds.
Weight::from_parts(168_826_000, 0)
.saturating_add(Weight::from_parts(0, 4099))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `GhostSlowClaps::Companions` (r:1 w:0)
/// Proof: `GhostSlowClaps::Companions` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `GhostNetworks::Networks` (r:1 w:0)
/// Proof: `GhostNetworks::Networks` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `GhostSlowClaps::CompanionDetails` (r:1 w:0)
/// Proof: `GhostSlowClaps::CompanionDetails` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `GhostSlowClaps::ReleaseBlocks` (r:0 w:1)
/// Proof: `GhostSlowClaps::ReleaseBlocks` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn release_companion() -> Weight {
// Proof Size summary in bytes:
// Measured: `839`
// Estimated: `4304`
// Minimum execution time: 82_884_000 picoseconds.
Weight::from_parts(84_135_000, 0)
.saturating_add(Weight::from_parts(0, 4304))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `GhostSlowClaps::ReleaseBlocks` (r:1 w:0)
/// Proof: `GhostSlowClaps::ReleaseBlocks` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `GhostSlowClaps::Companions` (r:1 w:1)
/// Proof: `GhostSlowClaps::Companions` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `GhostSlowClaps::CompanionDetails` (r:1 w:1)
/// Proof: `GhostSlowClaps::CompanionDetails` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn kill_companion() -> Weight {
// Proof Size summary in bytes:
// Measured: `514`
// Estimated: `3979`
// Minimum execution time: 152_418_000 picoseconds.
Weight::from_parts(153_436_000, 0)
.saturating_add(Weight::from_parts(0, 3979))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
}

View File

@@ -0,0 +1,28 @@
pub mod frame_election_provider_support;
pub mod frame_system;
pub mod ghost_claims;
pub mod ghost_networks;
pub mod ghost_slow_clap;
pub mod pallet_alliance;
pub mod pallet_bags_list;
pub mod pallet_balances;
pub mod pallet_collective;
pub mod pallet_core_fellowship;
pub mod pallet_election_provider_multi_phase;
pub mod pallet_fast_unstake;
pub mod pallet_identity;
pub mod pallet_indices;
pub mod pallet_multisig;
pub mod pallet_nomination_pools;
pub mod pallet_preimage;
pub mod pallet_proxy;
pub mod pallet_ranked_collective;
// pub mod pallet_referenda;
pub mod pallet_salary;
pub mod pallet_scheduler;
pub mod pallet_session;
pub mod pallet_staking;
pub mod pallet_timestamp;
pub mod pallet_utility;
pub mod pallet_vesting;
pub mod pallet_whitelist;

View File

@@ -0,0 +1,483 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_alliance`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_alliance
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_alliance.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_alliance`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_alliance::WeightInfo for WeightInfo<T> {
/// Storage: `Alliance::Members` (r:1 w:0)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::ProposalOf` (r:1 w:1)
/// Proof: `AllianceMotion::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:1)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalCount` (r:1 w:1)
/// Proof: `AllianceMotion::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Voting` (r:0 w:1)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `b` is `[1, 1024]`.
/// The range of component `m` is `[2, 100]`.
/// The range of component `p` is `[1, 100]`.
fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `471 + m * (32 ±0) + p * (36 ±0)`
// Estimated: `6676 + m * (33 ±0) + p * (36 ±0)`
// Minimum execution time: 97_002_000 picoseconds.
Weight::from_parts(98_453_208, 0)
.saturating_add(Weight::from_parts(0, 6676))
// Standard Error: 326
.saturating_add(Weight::from_parts(1_861, 0).saturating_mul(b.into()))
// Standard Error: 3_409
.saturating_add(Weight::from_parts(104_553, 0).saturating_mul(m.into()))
// Standard Error: 3_366
.saturating_add(Weight::from_parts(554_928, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
.saturating_add(Weight::from_parts(0, 33).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into()))
}
/// Storage: `Alliance::Members` (r:1 w:0)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Voting` (r:1 w:1)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `m` is `[5, 100]`.
fn vote(m: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `944 + m * (64 ±0)`
// Estimated: `6676 + m * (64 ±0)`
// Minimum execution time: 83_771_000 picoseconds.
Weight::from_parts(86_230_346, 0)
.saturating_add(Weight::from_parts(0, 6676))
// Standard Error: 2_403
.saturating_add(Weight::from_parts(129_802, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into()))
}
/// Storage: `Alliance::Members` (r:1 w:0)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Voting` (r:1 w:1)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Members` (r:1 w:0)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:1)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalOf` (r:0 w:1)
/// Proof: `AllianceMotion::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `m` is `[4, 100]`.
/// The range of component `p` is `[1, 100]`.
fn close_early_disapproved(m: u32, p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `429 + m * (96 ±0) + p * (36 ±0)`
// Estimated: `6676 + m * (97 ±0) + p * (36 ±0)`
// Minimum execution time: 113_902_000 picoseconds.
Weight::from_parts(107_712_061, 0)
.saturating_add(Weight::from_parts(0, 6676))
// Standard Error: 4_237
.saturating_add(Weight::from_parts(184_456, 0).saturating_mul(m.into()))
// Standard Error: 4_132
.saturating_add(Weight::from_parts(590_832, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
.saturating_add(Weight::from_parts(0, 97).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into()))
}
/// Storage: `Alliance::Members` (r:1 w:0)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Voting` (r:1 w:1)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Members` (r:1 w:0)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalOf` (r:1 w:1)
/// Proof: `AllianceMotion::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:1)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// The range of component `b` is `[1, 1024]`.
/// The range of component `m` is `[4, 100]`.
/// The range of component `p` is `[1, 100]`.
fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `679 + m * (96 ±0) + p * (42 ±0)`
// Estimated: `6676 + m * (98 ±0) + p * (41 ±0)`
// Minimum execution time: 161_378_000 picoseconds.
Weight::from_parts(156_939_196, 0)
.saturating_add(Weight::from_parts(0, 6676))
// Standard Error: 327
.saturating_add(Weight::from_parts(3_093, 0).saturating_mul(b.into()))
// Standard Error: 3_460
.saturating_add(Weight::from_parts(142_907, 0).saturating_mul(m.into()))
// Standard Error: 3_373
.saturating_add(Weight::from_parts(574_727, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(3))
.saturating_add(Weight::from_parts(0, 98).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 41).saturating_mul(p.into()))
}
/// Storage: `Alliance::Members` (r:1 w:0)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Voting` (r:1 w:1)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Members` (r:1 w:0)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Prime` (r:1 w:0)
/// Proof: `AllianceMotion::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalOf` (r:1 w:1)
/// Proof: `AllianceMotion::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:1)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Alliance::Rule` (r:0 w:1)
/// Proof: `Alliance::Rule` (`max_values`: Some(1), `max_size`: Some(87), added: 582, mode: `MaxEncodedLen`)
/// The range of component `m` is `[2, 100]`.
/// The range of component `p` is `[1, 100]`.
fn close_disapproved(m: u32, p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `647 + m * (96 ±0) + p * (41 ±0)`
// Estimated: `6676 + m * (109 ±0) + p * (43 ±0)`
// Minimum execution time: 163_874_000 picoseconds.
Weight::from_parts(155_209_353, 0)
.saturating_add(Weight::from_parts(0, 6676))
// Standard Error: 12_962
.saturating_add(Weight::from_parts(325_062, 0).saturating_mul(m.into()))
// Standard Error: 12_804
.saturating_add(Weight::from_parts(638_122, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(4))
.saturating_add(Weight::from_parts(0, 109).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 43).saturating_mul(p.into()))
}
/// Storage: `Alliance::Members` (r:1 w:0)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Voting` (r:1 w:1)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Members` (r:1 w:0)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Prime` (r:1 w:0)
/// Proof: `AllianceMotion::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:1)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalOf` (r:0 w:1)
/// Proof: `AllianceMotion::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `b` is `[1, 1024]`.
/// The range of component `m` is `[5, 100]`.
/// The range of component `p` is `[1, 100]`.
fn close_approved(b: u32, m: u32, p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `428 + m * (96 ±0) + p * (37 ±0)`
// Estimated: `6676 + m * (97 ±0) + p * (36 ±0)`
// Minimum execution time: 117_142_000 picoseconds.
Weight::from_parts(110_028_926, 0)
.saturating_add(Weight::from_parts(0, 6676))
// Standard Error: 331
.saturating_add(Weight::from_parts(2_288, 0).saturating_mul(b.into()))
// Standard Error: 3_551
.saturating_add(Weight::from_parts(172_027, 0).saturating_mul(m.into()))
// Standard Error: 3_423
.saturating_add(Weight::from_parts(582_787, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(3))
.saturating_add(Weight::from_parts(0, 97).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into()))
}
/// Storage: `Alliance::Members` (r:2 w:2)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Members` (r:1 w:1)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// The range of component `m` is `[1, 100]`.
/// The range of component `z` is `[0, 100]`.
fn init_members(m: u32, z: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `115`
// Estimated: `12362`
// Minimum execution time: 94_196_000 picoseconds.
Weight::from_parts(65_225_469, 0)
.saturating_add(Weight::from_parts(0, 12362))
// Standard Error: 3_118
.saturating_add(Weight::from_parts(383_319, 0).saturating_mul(m.into()))
// Standard Error: 3_081
.saturating_add(Weight::from_parts(322_848, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Alliance::Members` (r:2 w:2)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:0)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Alliance::DepositOf` (r:200 w:50)
/// Proof: `Alliance::DepositOf` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:50 w:50)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Members` (r:0 w:1)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Prime` (r:0 w:1)
/// Proof: `AllianceMotion::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// The range of component `x` is `[1, 100]`.
/// The range of component `y` is `[0, 100]`.
/// The range of component `z` is `[0, 50]`.
fn disband(x: u32, y: u32, z: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0 + x * (48 ±0) + y * (51 ±0) + z * (251 ±0)`
// Estimated: `12362 + x * (2539 ±0) + y * (2539 ±0) + z * (2603 ±1)`
// Minimum execution time: 1_234_256_000 picoseconds.
Weight::from_parts(16_239_078, 0)
.saturating_add(Weight::from_parts(0, 12362))
// Standard Error: 21_211
.saturating_add(Weight::from_parts(6_672_158, 0).saturating_mul(x.into()))
// Standard Error: 20_961
.saturating_add(Weight::from_parts(6_811_767, 0).saturating_mul(y.into()))
// Standard Error: 41_888
.saturating_add(Weight::from_parts(64_921_111, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into())))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(y.into())))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(z.into())))
.saturating_add(T::DbWeight::get().writes(4))
.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(z.into())))
.saturating_add(Weight::from_parts(0, 2539).saturating_mul(x.into()))
.saturating_add(Weight::from_parts(0, 2539).saturating_mul(y.into()))
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(z.into()))
}
/// Storage: `Alliance::Rule` (r:0 w:1)
/// Proof: `Alliance::Rule` (`max_values`: Some(1), `max_size`: Some(87), added: 582, mode: `MaxEncodedLen`)
fn set_rule() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 24_181_000 picoseconds.
Weight::from_parts(24_667_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Alliance::Announcements` (r:1 w:1)
/// Proof: `Alliance::Announcements` (`max_values`: Some(1), `max_size`: Some(8702), added: 9197, mode: `MaxEncodedLen`)
fn announce() -> Weight {
// Proof Size summary in bytes:
// Measured: `180`
// Estimated: `10187`
// Minimum execution time: 38_619_000 picoseconds.
Weight::from_parts(39_318_000, 0)
.saturating_add(Weight::from_parts(0, 10187))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Alliance::Announcements` (r:1 w:1)
/// Proof: `Alliance::Announcements` (`max_values`: Some(1), `max_size`: Some(8702), added: 9197, mode: `MaxEncodedLen`)
fn remove_announcement() -> Weight {
// Proof Size summary in bytes:
// Measured: `253`
// Estimated: `10187`
// Minimum execution time: 42_291_000 picoseconds.
Weight::from_parts(42_908_000, 0)
.saturating_add(Weight::from_parts(0, 10187))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Alliance::Members` (r:3 w:1)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `Alliance::UnscrupulousAccounts` (r:1 w:0)
/// Proof: `Alliance::UnscrupulousAccounts` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Alliance::DepositOf` (r:0 w:1)
/// Proof: `Alliance::DepositOf` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
fn join_alliance() -> Weight {
// Proof Size summary in bytes:
// Measured: `440`
// Estimated: `18048`
// Minimum execution time: 157_993_000 picoseconds.
Weight::from_parts(158_860_000, 0)
.saturating_add(Weight::from_parts(0, 18048))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Alliance::Members` (r:3 w:1)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `Alliance::UnscrupulousAccounts` (r:1 w:0)
/// Proof: `Alliance::UnscrupulousAccounts` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
fn nominate_ally() -> Weight {
// Proof Size summary in bytes:
// Measured: `339`
// Estimated: `18048`
// Minimum execution time: 92_924_000 picoseconds.
Weight::from_parts(93_984_000, 0)
.saturating_add(Weight::from_parts(0, 18048))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Alliance::Members` (r:2 w:2)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:0)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Members` (r:0 w:1)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Prime` (r:0 w:1)
/// Proof: `AllianceMotion::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn elevate_ally() -> Weight {
// Proof Size summary in bytes:
// Measured: `340`
// Estimated: `12362`
// Minimum execution time: 89_941_000 picoseconds.
Weight::from_parts(90_683_000, 0)
.saturating_add(Weight::from_parts(0, 12362))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `Alliance::Members` (r:4 w:2)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:0)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Members` (r:0 w:1)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Prime` (r:0 w:1)
/// Proof: `AllianceMotion::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Alliance::RetiringMembers` (r:0 w:1)
/// Proof: `Alliance::RetiringMembers` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
fn give_retirement_notice() -> Weight {
// Proof Size summary in bytes:
// Measured: `340`
// Estimated: `23734`
// Minimum execution time: 115_079_000 picoseconds.
Weight::from_parts(116_006_000, 0)
.saturating_add(Weight::from_parts(0, 23734))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `Alliance::RetiringMembers` (r:1 w:1)
/// Proof: `Alliance::RetiringMembers` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `Alliance::Members` (r:1 w:1)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `Alliance::DepositOf` (r:1 w:1)
/// Proof: `Alliance::DepositOf` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn retire() -> Weight {
// Proof Size summary in bytes:
// Measured: `621`
// Estimated: `6676`
// Minimum execution time: 141_769_000 picoseconds.
Weight::from_parts(142_752_000, 0)
.saturating_add(Weight::from_parts(0, 6676))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `Alliance::Members` (r:3 w:1)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:0)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Alliance::DepositOf` (r:1 w:1)
/// Proof: `Alliance::DepositOf` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Members` (r:0 w:1)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Prime` (r:0 w:1)
/// Proof: `AllianceMotion::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn kick_member() -> Weight {
// Proof Size summary in bytes:
// Measured: `604`
// Estimated: `18048`
// Minimum execution time: 211_219_000 picoseconds.
Weight::from_parts(212_953_000, 0)
.saturating_add(Weight::from_parts(0, 18048))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `Alliance::UnscrupulousAccounts` (r:1 w:1)
/// Proof: `Alliance::UnscrupulousAccounts` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
/// Storage: `Alliance::UnscrupulousWebsites` (r:1 w:1)
/// Proof: `Alliance::UnscrupulousWebsites` (`max_values`: Some(1), `max_size`: Some(25702), added: 26197, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 100]`.
/// The range of component `l` is `[0, 255]`.
fn add_unscrupulous_items(n: u32, l: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `180`
// Estimated: `27187`
// Minimum execution time: 21_699_000 picoseconds.
Weight::from_parts(21_893_000, 0)
.saturating_add(Weight::from_parts(0, 27187))
// Standard Error: 10_128
.saturating_add(Weight::from_parts(3_357_496, 0).saturating_mul(n.into()))
// Standard Error: 3_966
.saturating_add(Weight::from_parts(216_176, 0).saturating_mul(l.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Alliance::UnscrupulousAccounts` (r:1 w:1)
/// Proof: `Alliance::UnscrupulousAccounts` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
/// Storage: `Alliance::UnscrupulousWebsites` (r:1 w:1)
/// Proof: `Alliance::UnscrupulousWebsites` (`max_values`: Some(1), `max_size`: Some(25702), added: 26197, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 100]`.
/// The range of component `l` is `[0, 255]`.
fn remove_unscrupulous_items(n: u32, l: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0 + l * (100 ±0) + n * (289 ±0)`
// Estimated: `27187`
// Minimum execution time: 21_895_000 picoseconds.
Weight::from_parts(22_138_000, 0)
.saturating_add(Weight::from_parts(0, 27187))
// Standard Error: 632_441
.saturating_add(Weight::from_parts(63_177_711, 0).saturating_mul(n.into()))
// Standard Error: 247_692
.saturating_add(Weight::from_parts(273_557, 0).saturating_mul(l.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Alliance::Members` (r:3 w:2)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:0)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Members` (r:0 w:1)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Prime` (r:0 w:1)
/// Proof: `AllianceMotion::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn abdicate_fellow_status() -> Weight {
// Proof Size summary in bytes:
// Measured: `340`
// Estimated: `18048`
// Minimum execution time: 111_710_000 picoseconds.
Weight::from_parts(113_642_000, 0)
.saturating_add(Weight::from_parts(0, 18048))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
}

View File

@@ -0,0 +1,60 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_babe`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_babe
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_babe.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_babe`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_babe::WeightInfo for WeightInfo<T> {
/// The range of component `x` is `[0, 1]`.
fn check_equivocation_proof(x: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 295_685_000 picoseconds.
Weight::from_parts(296_671_979, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 68_488
.saturating_add(Weight::from_parts(188_520, 0).saturating_mul(x.into()))
}
}

View File

@@ -0,0 +1,105 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_bags_list`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_bags_list
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_bags_list.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_bags_list`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_bags_list::WeightInfo for WeightInfo<T> {
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:0)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListNodes` (r:4 w:4)
/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListBags` (r:1 w:1)
/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
fn rebag_non_terminal() -> Weight {
// Proof Size summary in bytes:
// Measured: `1612`
// Estimated: `11506`
// Minimum execution time: 216_814_000 picoseconds.
Weight::from_parts(218_794_000, 0)
.saturating_add(Weight::from_parts(0, 11506))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:0)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListNodes` (r:3 w:3)
/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListBags` (r:2 w:2)
/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
fn rebag_terminal() -> Weight {
// Proof Size summary in bytes:
// Measured: `1506`
// Estimated: `8877`
// Minimum execution time: 210_157_000 picoseconds.
Weight::from_parts(214_628_000, 0)
.saturating_add(Weight::from_parts(0, 8877))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `VoterList::ListNodes` (r:4 w:4)
/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:2 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:2 w:0)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `VoterList::CounterForListNodes` (r:1 w:1)
/// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListBags` (r:1 w:1)
/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
fn put_in_front_of() -> Weight {
// Proof Size summary in bytes:
// Measured: `1815`
// Estimated: `11506`
// Minimum execution time: 255_261_000 picoseconds.
Weight::from_parts(258_576_000, 0)
.saturating_add(Weight::from_parts(0, 11506))
.saturating_add(T::DbWeight::get().reads(10))
.saturating_add(T::DbWeight::get().writes(6))
}
}

View File

@@ -0,0 +1,173 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_balances`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_balances
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_balances.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_balances`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn transfer_allow_death() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 190_705_000 picoseconds.
Weight::from_parts(192_096_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn transfer_keep_alive() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 151_366_000 picoseconds.
Weight::from_parts(152_572_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn force_set_balance_creating() -> Weight {
// Proof Size summary in bytes:
// Measured: `240`
// Estimated: `3593`
// Minimum execution time: 60_457_000 picoseconds.
Weight::from_parts(62_112_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn force_set_balance_killing() -> Weight {
// Proof Size summary in bytes:
// Measured: `240`
// Estimated: `3593`
// Minimum execution time: 81_215_000 picoseconds.
Weight::from_parts(82_316_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn force_transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `140`
// Estimated: `6196`
// Minimum execution time: 201_571_000 picoseconds.
Weight::from_parts(204_225_000, 0)
.saturating_add(Weight::from_parts(0, 6196))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn transfer_all() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 187_576_000 picoseconds.
Weight::from_parts(188_504_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn force_unreserve() -> Weight {
// Proof Size summary in bytes:
// Measured: `240`
// Estimated: `3593`
// Minimum execution time: 73_195_000 picoseconds.
Weight::from_parts(74_326_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:999 w:999)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `u` is `[1, 1000]`.
fn upgrade_accounts(u: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0 + u * (135 ±0)`
// Estimated: `990 + u * (2603 ±0)`
// Minimum execution time: 70_352_000 picoseconds.
Weight::from_parts(70_896_000, 0)
.saturating_add(Weight::from_parts(0, 990))
// Standard Error: 33_025
.saturating_add(Weight::from_parts(54_012_098, 0).saturating_mul(u.into()))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into())))
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into()))
}
fn force_adjust_total_issuance() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 24_157_000 picoseconds.
Weight::from_parts(24_793_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn burn_allow_death() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 117_793_000 picoseconds.
Weight::from_parts(119_425_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn burn_keep_alive() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 80_675_000 picoseconds.
Weight::from_parts(81_648_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
}

View File

@@ -0,0 +1,63 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_bounties`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-08-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_bounties
// --extrinsic=approve_bounty
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_bounties.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_bounties`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_bounties::WeightInfo for WeightInfo<T> {
/// Storage: `Bounties::Bounties` (r:1 w:1)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
/// Storage: `Bounties::BountyApprovals` (r:1 w:1)
/// Proof: `Bounties::BountyApprovals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
fn approve_bounty() -> Weight {
// Proof Size summary in bytes:
// Measured: `302`
// Estimated: `3642`
// Minimum execution time: 52_739_000 picoseconds.
Weight::from_parts(53_443_000, 0)
.saturating_add(Weight::from_parts(0, 3642))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
}

View File

@@ -0,0 +1,297 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_collective`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_collective
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_collective.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_collective`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> {
/// Storage: `AllianceMotion::Members` (r:1 w:1)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:0)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Voting` (r:100 w:100)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Prime` (r:0 w:1)
/// Proof: `AllianceMotion::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// The range of component `m` is `[0, 100]`.
/// The range of component `n` is `[0, 100]`.
/// The range of component `p` is `[0, 100]`.
fn set_members(m: u32, _n: u32, p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0 + m * (3232 ±0) + p * (3190 ±0)`
// Estimated: `15691 + m * (1967 ±23) + p * (4332 ±23)`
// Minimum execution time: 55_767_000 picoseconds.
Weight::from_parts(56_636_000, 0)
.saturating_add(Weight::from_parts(0, 15691))
// Standard Error: 160_794
.saturating_add(Weight::from_parts(11_373_581, 0).saturating_mul(m.into()))
// Standard Error: 160_794
.saturating_add(Weight::from_parts(24_336_121, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into())))
.saturating_add(T::DbWeight::get().writes(2))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into())))
.saturating_add(Weight::from_parts(0, 1967).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 4332).saturating_mul(p.into()))
}
/// Storage: `AllianceMotion::Members` (r:1 w:0)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// The range of component `b` is `[2, 1024]`.
/// The range of component `m` is `[1, 100]`.
fn execute(b: u32, m: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `32 + m * (32 ±0)`
// Estimated: `1518 + m * (32 ±0)`
// Minimum execution time: 53_501_000 picoseconds.
Weight::from_parts(50_367_784, 0)
.saturating_add(Weight::from_parts(0, 1518))
// Standard Error: 53
.saturating_add(Weight::from_parts(4_666, 0).saturating_mul(b.into()))
// Standard Error: 547
.saturating_add(Weight::from_parts(38_691, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into()))
}
/// Storage: `AllianceMotion::Members` (r:1 w:0)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalOf` (r:1 w:0)
/// Proof: `AllianceMotion::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `b` is `[2, 1024]`.
/// The range of component `m` is `[1, 100]`.
fn propose_execute(b: u32, m: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `32 + m * (32 ±0)`
// Estimated: `3498 + m * (32 ±0)`
// Minimum execution time: 64_064_000 picoseconds.
Weight::from_parts(59_986_733, 0)
.saturating_add(Weight::from_parts(0, 3498))
// Standard Error: 80
.saturating_add(Weight::from_parts(5_165, 0).saturating_mul(b.into()))
// Standard Error: 833
.saturating_add(Weight::from_parts(50_309, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into()))
}
/// Storage: `AllianceMotion::Members` (r:1 w:0)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalOf` (r:1 w:1)
/// Proof: `AllianceMotion::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:1)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalCount` (r:1 w:1)
/// Proof: `AllianceMotion::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Voting` (r:0 w:1)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `b` is `[2, 1024]`.
/// The range of component `m` is `[2, 100]`.
/// The range of component `p` is `[1, 100]`.
fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `322 + m * (32 ±0) + p * (36 ±0)`
// Estimated: `3714 + m * (33 ±0) + p * (36 ±0)`
// Minimum execution time: 81_966_000 picoseconds.
Weight::from_parts(76_356_962, 0)
.saturating_add(Weight::from_parts(0, 3714))
// Standard Error: 250
.saturating_add(Weight::from_parts(10_378, 0).saturating_mul(b.into()))
// Standard Error: 2_613
.saturating_add(Weight::from_parts(46_062, 0).saturating_mul(m.into()))
// Standard Error: 2_579
.saturating_add(Weight::from_parts(612_264, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
.saturating_add(Weight::from_parts(0, 33).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into()))
}
/// Storage: `AllianceMotion::Members` (r:1 w:0)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Voting` (r:1 w:1)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `m` is `[5, 100]`.
fn vote(m: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `771 + m * (64 ±0)`
// Estimated: `4235 + m * (64 ±0)`
// Minimum execution time: 73_065_000 picoseconds.
Weight::from_parts(75_774_038, 0)
.saturating_add(Weight::from_parts(0, 4235))
// Standard Error: 3_051
.saturating_add(Weight::from_parts(101_825, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into()))
}
/// Storage: `AllianceMotion::Voting` (r:1 w:1)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Members` (r:1 w:0)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:1)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalOf` (r:0 w:1)
/// Proof: `AllianceMotion::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `m` is `[4, 100]`.
/// The range of component `p` is `[1, 100]`.
fn close_early_disapproved(m: u32, p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `360 + m * (64 ±0) + p * (36 ±0)`
// Estimated: `3805 + m * (65 ±0) + p * (36 ±0)`
// Minimum execution time: 86_413_000 picoseconds.
Weight::from_parts(84_843_269, 0)
.saturating_add(Weight::from_parts(0, 3805))
// Standard Error: 3_251
.saturating_add(Weight::from_parts(54_550, 0).saturating_mul(m.into()))
// Standard Error: 3_170
.saturating_add(Weight::from_parts(539_260, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
.saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into()))
}
/// Storage: `AllianceMotion::Voting` (r:1 w:1)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Members` (r:1 w:0)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalOf` (r:1 w:1)
/// Proof: `AllianceMotion::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:1)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// The range of component `b` is `[2, 1024]`.
/// The range of component `m` is `[4, 100]`.
/// The range of component `p` is `[1, 100]`.
fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `662 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)`
// Estimated: `3979 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)`
// Minimum execution time: 123_381_000 picoseconds.
Weight::from_parts(119_321_351, 0)
.saturating_add(Weight::from_parts(0, 3979))
// Standard Error: 643
.saturating_add(Weight::from_parts(11_500, 0).saturating_mul(b.into()))
// Standard Error: 6_632
.saturating_add(Weight::from_parts(717_414, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
.saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into()))
}
/// Storage: `AllianceMotion::Voting` (r:1 w:1)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Members` (r:1 w:0)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Prime` (r:1 w:0)
/// Proof: `AllianceMotion::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:1)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalOf` (r:0 w:1)
/// Proof: `AllianceMotion::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `m` is `[4, 100]`.
/// The range of component `p` is `[1, 100]`.
fn close_disapproved(m: u32, p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `458 + m * (48 ±0) + p * (36 ±0)`
// Estimated: `3898 + m * (49 ±0) + p * (36 ±0)`
// Minimum execution time: 93_038_000 picoseconds.
Weight::from_parts(92_223_927, 0)
.saturating_add(Weight::from_parts(0, 3898))
// Standard Error: 3_126
.saturating_add(Weight::from_parts(42_141, 0).saturating_mul(m.into()))
// Standard Error: 3_048
.saturating_add(Weight::from_parts(555_724, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
.saturating_add(Weight::from_parts(0, 49).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into()))
}
/// Storage: `AllianceMotion::Voting` (r:1 w:1)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Members` (r:1 w:0)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Prime` (r:1 w:0)
/// Proof: `AllianceMotion::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalOf` (r:1 w:1)
/// Proof: `AllianceMotion::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:1)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// The range of component `b` is `[2, 1024]`.
/// The range of component `m` is `[4, 100]`.
/// The range of component `p` is `[1, 100]`.
fn close_approved(b: u32, m: u32, p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `682 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)`
// Estimated: `3999 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)`
// Minimum execution time: 129_214_000 picoseconds.
Weight::from_parts(128_136_995, 0)
.saturating_add(Weight::from_parts(0, 3999))
// Standard Error: 628
.saturating_add(Weight::from_parts(8_498, 0).saturating_mul(b.into()))
// Standard Error: 6_472
.saturating_add(Weight::from_parts(726_573, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(3))
.saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into()))
}
/// Storage: `AllianceMotion::Proposals` (r:1 w:1)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Voting` (r:0 w:1)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalOf` (r:0 w:1)
/// Proof: `AllianceMotion::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `p` is `[1, 100]`.
fn disapprove_proposal(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `189 + p * (32 ±0)`
// Estimated: `1674 + p * (32 ±0)`
// Minimum execution time: 51_418_000 picoseconds.
Weight::from_parts(52_271_519, 0)
.saturating_add(Weight::from_parts(0, 1674))
// Standard Error: 2_554
.saturating_add(Weight::from_parts(524_745, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(3))
.saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into()))
}
}

View File

@@ -0,0 +1,226 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_core_fellowship`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_core_fellowship
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_core_fellowship.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_core_fellowship`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_core_fellowship::WeightInfo for WeightInfo<T> {
/// Storage: `CultCore::Params` (r:0 w:1)
/// Proof: `CultCore::Params` (`max_values`: Some(1), `max_size`: Some(364), added: 859, mode: `MaxEncodedLen`)
fn set_params() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 24_436_000 picoseconds.
Weight::from_parts(24_940_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `CultCore::Member` (r:1 w:1)
/// Proof: `CultCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::Members` (r:1 w:1)
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `CultCore::Params` (r:1 w:0)
/// Proof: `CultCore::Params` (`max_values`: Some(1), `max_size`: Some(364), added: 859, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::MemberCount` (r:1 w:1)
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::IdToIndex` (r:1 w:1)
/// Proof: `CultCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `CultCore::MemberEvidence` (r:1 w:1)
/// Proof: `CultCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::IndexToId` (r:0 w:1)
/// Proof: `CultCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
fn bump_offboard() -> Weight {
// Proof Size summary in bytes:
// Measured: `66884`
// Estimated: `69046`
// Minimum execution time: 387_602_000 picoseconds.
Weight::from_parts(391_884_000, 0)
.saturating_add(Weight::from_parts(0, 69046))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(6))
}
/// Storage: `CultCore::Member` (r:1 w:1)
/// Proof: `CultCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::Members` (r:1 w:1)
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `CultCore::Params` (r:1 w:0)
/// Proof: `CultCore::Params` (`max_values`: Some(1), `max_size`: Some(364), added: 859, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::MemberCount` (r:1 w:1)
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::IdToIndex` (r:1 w:1)
/// Proof: `CultCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `CultCore::MemberEvidence` (r:1 w:1)
/// Proof: `CultCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::IndexToId` (r:0 w:1)
/// Proof: `CultCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
fn bump_demote() -> Weight {
// Proof Size summary in bytes:
// Measured: `66925`
// Estimated: `69046`
// Minimum execution time: 395_467_000 picoseconds.
Weight::from_parts(399_507_000, 0)
.saturating_add(Weight::from_parts(0, 69046))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(6))
}
/// Storage: `CultCollective::Members` (r:1 w:0)
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `CultCore::Member` (r:1 w:1)
/// Proof: `CultCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
fn set_active() -> Weight {
// Proof Size summary in bytes:
// Measured: `565`
// Estimated: `3514`
// Minimum execution time: 66_931_000 picoseconds.
Weight::from_parts(68_036_000, 0)
.saturating_add(Weight::from_parts(0, 3514))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `CultCore::Member` (r:1 w:1)
/// Proof: `CultCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::Members` (r:1 w:1)
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::MemberCount` (r:1 w:1)
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::IndexToId` (r:0 w:1)
/// Proof: `CultCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::IdToIndex` (r:0 w:1)
/// Proof: `CultCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
fn induct() -> Weight {
// Proof Size summary in bytes:
// Measured: `530`
// Estimated: `3514`
// Minimum execution time: 113_787_000 picoseconds.
Weight::from_parts(115_087_000, 0)
.saturating_add(Weight::from_parts(0, 3514))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `CultCollective::Members` (r:1 w:1)
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `CultCore::Member` (r:1 w:1)
/// Proof: `CultCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `CultCore::Params` (r:1 w:0)
/// Proof: `CultCore::Params` (`max_values`: Some(1), `max_size`: Some(364), added: 859, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::MemberCount` (r:1 w:1)
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `CultCore::MemberEvidence` (r:1 w:1)
/// Proof: `CultCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::IndexToId` (r:0 w:1)
/// Proof: `CultCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::IdToIndex` (r:0 w:1)
/// Proof: `CultCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
fn promote() -> Weight {
// Proof Size summary in bytes:
// Measured: `66636`
// Estimated: `69046`
// Minimum execution time: 366_918_000 picoseconds.
Weight::from_parts(369_534_000, 0)
.saturating_add(Weight::from_parts(0, 69046))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(6))
}
/// Storage: `CultCollective::Members` (r:1 w:0)
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `CultCore::Member` (r:1 w:1)
/// Proof: `CultCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `CultCore::MemberEvidence` (r:0 w:1)
/// Proof: `CultCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
fn offboard() -> Weight {
// Proof Size summary in bytes:
// Measured: `552`
// Estimated: `3514`
// Minimum execution time: 69_301_000 picoseconds.
Weight::from_parts(70_382_000, 0)
.saturating_add(Weight::from_parts(0, 3514))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `CultCore::Member` (r:1 w:1)
/// Proof: `CultCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::Members` (r:1 w:0)
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
fn import() -> Weight {
// Proof Size summary in bytes:
// Measured: `490`
// Estimated: `3514`
// Minimum execution time: 63_841_000 picoseconds.
Weight::from_parts(64_810_000, 0)
.saturating_add(Weight::from_parts(0, 3514))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `CultCollective::Members` (r:1 w:0)
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `CultCore::Member` (r:1 w:1)
/// Proof: `CultCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `CultCore::MemberEvidence` (r:1 w:1)
/// Proof: `CultCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
fn approve() -> Weight {
// Proof Size summary in bytes:
// Measured: `66172`
// Estimated: `69046`
// Minimum execution time: 301_638_000 picoseconds.
Weight::from_parts(303_373_000, 0)
.saturating_add(Weight::from_parts(0, 69046))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `CultCore::Member` (r:1 w:0)
/// Proof: `CultCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `CultCore::MemberEvidence` (r:1 w:1)
/// Proof: `CultCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
fn submit_evidence() -> Weight {
// Proof Size summary in bytes:
// Measured: `151`
// Estimated: `69046`
// Minimum execution time: 253_463_000 picoseconds.
Weight::from_parts(255_091_000, 0)
.saturating_add(Weight::from_parts(0, 69046))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
}

View File

@@ -0,0 +1,268 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_election_provider_multi_phase`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-08-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_election_provider_multi_phase
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_election_provider_multi_phase.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_election_provider_multi_phase`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_election_provider_multi_phase::WeightInfo for WeightInfo<T> {
/// Storage: `Staking::CurrentEra` (r:1 w:0)
/// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::CurrentPlannedSession` (r:1 w:0)
/// Proof: `Staking::CurrentPlannedSession` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::ErasStartSessionIndex` (r:1 w:0)
/// Proof: `Staking::ErasStartSessionIndex` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`)
/// Storage: `Babe::EpochIndex` (r:1 w:0)
/// Proof: `Babe::EpochIndex` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Babe::GenesisSlot` (r:1 w:0)
/// Proof: `Babe::GenesisSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Babe::CurrentSlot` (r:1 w:0)
/// Proof: `Babe::CurrentSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Staking::ForceEra` (r:1 w:0)
/// Proof: `Staking::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:0)
/// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn on_initialize_nothing() -> Weight {
// Proof Size summary in bytes:
// Measured: `918`
// Estimated: `3481`
// Minimum execution time: 59_356_000 picoseconds.
Weight::from_parts(60_470_000, 0)
.saturating_add(Weight::from_parts(0, 3481))
.saturating_add(T::DbWeight::get().reads(8))
}
/// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0)
/// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:1)
/// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn on_initialize_open_signed() -> Weight {
// Proof Size summary in bytes:
// Measured: `43`
// Estimated: `1528`
// Minimum execution time: 38_516_000 picoseconds.
Weight::from_parts(39_173_000, 0)
.saturating_add(Weight::from_parts(0, 1528))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0)
/// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:1)
/// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn on_initialize_open_unsigned() -> Weight {
// Proof Size summary in bytes:
// Measured: `43`
// Estimated: `1528`
// Minimum execution time: 41_540_000 picoseconds.
Weight::from_parts(42_546_000, 0)
.saturating_add(Weight::from_parts(0, 1528))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `ElectionProviderMultiPhase::QueuedSolution` (r:0 w:1)
/// Proof: `ElectionProviderMultiPhase::QueuedSolution` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn finalize_signed_phase_accept_solution() -> Weight {
// Proof Size summary in bytes:
// Measured: `174`
// Estimated: `3593`
// Minimum execution time: 104_874_000 picoseconds.
Weight::from_parts(106_341_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn finalize_signed_phase_reject_solution() -> Weight {
// Proof Size summary in bytes:
// Measured: `174`
// Estimated: `3593`
// Minimum execution time: 72_128_000 picoseconds.
Weight::from_parts(72_889_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `ElectionProviderMultiPhase::SnapshotMetadata` (r:0 w:1)
/// Proof: `ElectionProviderMultiPhase::SnapshotMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ElectionProviderMultiPhase::DesiredTargets` (r:0 w:1)
/// Proof: `ElectionProviderMultiPhase::DesiredTargets` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ElectionProviderMultiPhase::Snapshot` (r:0 w:1)
/// Proof: `ElectionProviderMultiPhase::Snapshot` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// The range of component `v` is `[1000, 2000]`.
/// The range of component `t` is `[500, 1000]`.
fn create_snapshot_internal(v: u32, _t: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 935_144_000 picoseconds.
Weight::from_parts(946_333_000, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 4_610
.saturating_add(Weight::from_parts(742_473, 0).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `ElectionProviderMultiPhase::SignedSubmissionIndices` (r:1 w:1)
/// Proof: `ElectionProviderMultiPhase::SignedSubmissionIndices` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ElectionProviderMultiPhase::SignedSubmissionNextIndex` (r:1 w:1)
/// Proof: `ElectionProviderMultiPhase::SignedSubmissionNextIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ElectionProviderMultiPhase::SnapshotMetadata` (r:1 w:1)
/// Proof: `ElectionProviderMultiPhase::SnapshotMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ElectionProviderMultiPhase::SignedSubmissionsMap` (r:1 w:0)
/// Proof: `ElectionProviderMultiPhase::SignedSubmissionsMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `ElectionProviderMultiPhase::QueuedSolution` (r:1 w:1)
/// Proof: `ElectionProviderMultiPhase::QueuedSolution` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:1)
/// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:1)
/// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ElectionProviderMultiPhase::DesiredTargets` (r:0 w:1)
/// Proof: `ElectionProviderMultiPhase::DesiredTargets` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ElectionProviderMultiPhase::Snapshot` (r:0 w:1)
/// Proof: `ElectionProviderMultiPhase::Snapshot` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// The range of component `a` is `[500, 800]`.
/// The range of component `d` is `[200, 400]`.
fn elect_queued(a: u32, d: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `266 + a * (768 ±0) + d * (48 ±0)`
// Estimated: `3818 + a * (768 ±0) + d * (49 ±0)`
// Minimum execution time: 807_366_000 picoseconds.
Weight::from_parts(33_682_717, 0)
.saturating_add(Weight::from_parts(0, 3818))
// Standard Error: 11_235
.saturating_add(Weight::from_parts(1_310_189, 0).saturating_mul(a.into()))
// Standard Error: 16_841
.saturating_add(Weight::from_parts(317_382, 0).saturating_mul(d.into()))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(8))
.saturating_add(Weight::from_parts(0, 768).saturating_mul(a.into()))
.saturating_add(Weight::from_parts(0, 49).saturating_mul(d.into()))
}
/// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:0)
/// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0)
/// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ElectionProviderMultiPhase::SnapshotMetadata` (r:1 w:0)
/// Proof: `ElectionProviderMultiPhase::SnapshotMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ElectionProviderMultiPhase::SignedSubmissionIndices` (r:1 w:1)
/// Proof: `ElectionProviderMultiPhase::SignedSubmissionIndices` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ElectionProviderMultiPhase::SignedSubmissionNextIndex` (r:1 w:1)
/// Proof: `ElectionProviderMultiPhase::SignedSubmissionNextIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `ElectionProviderMultiPhase::SignedSubmissionsMap` (r:0 w:1)
/// Proof: `ElectionProviderMultiPhase::SignedSubmissionsMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn submit() -> Weight {
// Proof Size summary in bytes:
// Measured: `1157`
// Estimated: `2642`
// Minimum execution time: 177_774_000 picoseconds.
Weight::from_parts(180_008_000, 0)
.saturating_add(Weight::from_parts(0, 2642))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:0)
/// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0)
/// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ElectionProviderMultiPhase::DesiredTargets` (r:1 w:0)
/// Proof: `ElectionProviderMultiPhase::DesiredTargets` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ElectionProviderMultiPhase::QueuedSolution` (r:1 w:1)
/// Proof: `ElectionProviderMultiPhase::QueuedSolution` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ElectionProviderMultiPhase::SnapshotMetadata` (r:1 w:0)
/// Proof: `ElectionProviderMultiPhase::SnapshotMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ElectionProviderMultiPhase::Snapshot` (r:1 w:0)
/// Proof: `ElectionProviderMultiPhase::Snapshot` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ElectionProviderMultiPhase::MinimumUntrustedScore` (r:1 w:0)
/// Proof: `ElectionProviderMultiPhase::MinimumUntrustedScore` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// The range of component `v` is `[1000, 2000]`.
/// The range of component `t` is `[500, 1000]`.
/// The range of component `a` is `[500, 800]`.
/// The range of component `d` is `[200, 400]`.
fn submit_unsigned(v: u32, t: u32, a: u32, _d: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `148 + t * (32 ±0) + v * (553 ±0)`
// Estimated: `1633 + t * (32 ±0) + v * (553 ±0)`
// Minimum execution time: 13_641_128_000 picoseconds.
Weight::from_parts(13_688_484_000, 0)
.saturating_add(Weight::from_parts(0, 1633))
// Standard Error: 44_289
.saturating_add(Weight::from_parts(251_513, 0).saturating_mul(v.into()))
// Standard Error: 131_245
.saturating_add(Weight::from_parts(12_905_812, 0).saturating_mul(a.into()))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(Weight::from_parts(0, 32).saturating_mul(t.into()))
.saturating_add(Weight::from_parts(0, 553).saturating_mul(v.into()))
}
/// Storage: `ElectionProviderMultiPhase::DesiredTargets` (r:1 w:0)
/// Proof: `ElectionProviderMultiPhase::DesiredTargets` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ElectionProviderMultiPhase::Snapshot` (r:1 w:0)
/// Proof: `ElectionProviderMultiPhase::Snapshot` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0)
/// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ElectionProviderMultiPhase::MinimumUntrustedScore` (r:1 w:0)
/// Proof: `ElectionProviderMultiPhase::MinimumUntrustedScore` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// The range of component `v` is `[1000, 2000]`.
/// The range of component `t` is `[500, 1000]`.
/// The range of component `a` is `[500, 800]`.
/// The range of component `d` is `[200, 400]`.
fn feasibility_check(v: u32, t: u32, a: u32, _d: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `123 + t * (32 ±0) + v * (553 ±0)`
// Estimated: `1608 + t * (32 ±0) + v * (553 ±0)`
// Minimum execution time: 11_846_347_000 picoseconds.
Weight::from_parts(11_874_580_000, 0)
.saturating_add(Weight::from_parts(0, 1608))
// Standard Error: 35_292
.saturating_add(Weight::from_parts(270_578, 0).saturating_mul(v.into()))
// Standard Error: 104_585
.saturating_add(Weight::from_parts(10_407_792, 0).saturating_mul(a.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(Weight::from_parts(0, 32).saturating_mul(t.into()))
.saturating_add(Weight::from_parts(0, 553).saturating_mul(v.into()))
}
}

View File

@@ -0,0 +1,207 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_fast_unstake`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-08-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_fast_unstake
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_fast_unstake.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_fast_unstake`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_fast_unstake::WeightInfo for WeightInfo<T> {
/// Storage: `FastUnstake::ErasToCheckPerBlock` (r:1 w:0)
/// Proof: `FastUnstake::ErasToCheckPerBlock` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::ValidatorCount` (r:1 w:0)
/// Proof: `Staking::ValidatorCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `FastUnstake::Head` (r:1 w:1)
/// Proof: `FastUnstake::Head` (`max_values`: Some(1), `max_size`: Some(886), added: 1381, mode: `MaxEncodedLen`)
/// Storage: `FastUnstake::CounterForQueue` (r:1 w:0)
/// Proof: `FastUnstake::CounterForQueue` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:0)
/// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Staking::CurrentEra` (r:1 w:0)
/// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::SlashingSpans` (r:16 w:0)
/// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Staking::Bonded` (r:16 w:16)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:16 w:16)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::VirtualStakers` (r:16 w:16)
/// Proof: `Staking::VirtualStakers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:16 w:16)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:16 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:16 w:16)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Staking::Validators` (r:16 w:0)
/// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
/// Storage: `Staking::Nominators` (r:16 w:0)
/// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(558), added: 3033, mode: `MaxEncodedLen`)
/// Storage: `Staking::Payee` (r:0 w:16)
/// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// The range of component `b` is `[1, 16]`.
fn on_idle_unstake(b: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1002 + b * (469 ±0)`
// Estimated: `2493 + b * (3774 ±0)`
// Minimum execution time: 325_757_000 picoseconds.
Weight::from_parts(88_951_336, 0)
.saturating_add(Weight::from_parts(0, 2493))
// Standard Error: 109_675
.saturating_add(Weight::from_parts(230_557_843, 0).saturating_mul(b.into()))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().reads((9_u64).saturating_mul(b.into())))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(T::DbWeight::get().writes((6_u64).saturating_mul(b.into())))
.saturating_add(Weight::from_parts(0, 3774).saturating_mul(b.into()))
}
/// Storage: `FastUnstake::ErasToCheckPerBlock` (r:1 w:0)
/// Proof: `FastUnstake::ErasToCheckPerBlock` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::ValidatorCount` (r:1 w:0)
/// Proof: `Staking::ValidatorCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `FastUnstake::Head` (r:1 w:1)
/// Proof: `FastUnstake::Head` (`max_values`: Some(1), `max_size`: Some(886), added: 1381, mode: `MaxEncodedLen`)
/// Storage: `FastUnstake::CounterForQueue` (r:1 w:0)
/// Proof: `FastUnstake::CounterForQueue` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:0)
/// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Staking::CurrentEra` (r:1 w:0)
/// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::ErasStakers` (r:1 w:0)
/// Proof: `Staking::ErasStakers` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Staking::ErasStakersPaged` (r:257 w:0)
/// Proof: `Staking::ErasStakersPaged` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `v` is `[1, 256]`.
/// The range of component `b` is `[1, 16]`.
fn on_idle_check(v: u32, b: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1526 + b * (67 ±0) + v * (19529 ±0)`
// Estimated: `4846 + b * (70 ±0) + v * (22005 ±0)`
// Minimum execution time: 2_395_049_000 picoseconds.
Weight::from_parts(2_403_480_000, 0)
.saturating_add(Weight::from_parts(0, 4846))
// Standard Error: 19_669_778
.saturating_add(Weight::from_parts(656_455_999, 0).saturating_mul(v.into()))
// Standard Error: 315_640_855
.saturating_add(Weight::from_parts(9_883_897_913, 0).saturating_mul(b.into()))
.saturating_add(T::DbWeight::get().reads(8))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into())))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(Weight::from_parts(0, 70).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(0, 22005).saturating_mul(v.into()))
}
/// Storage: `FastUnstake::ErasToCheckPerBlock` (r:1 w:0)
/// Proof: `FastUnstake::ErasToCheckPerBlock` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:1)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `FastUnstake::Queue` (r:1 w:1)
/// Proof: `FastUnstake::Queue` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// Storage: `FastUnstake::Head` (r:1 w:0)
/// Proof: `FastUnstake::Head` (`max_values`: Some(1), `max_size`: Some(886), added: 1381, mode: `MaxEncodedLen`)
/// Storage: `Staking::Validators` (r:1 w:0)
/// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
/// Storage: `Staking::Nominators` (r:1 w:1)
/// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(558), added: 3033, mode: `MaxEncodedLen`)
/// Storage: `Staking::CounterForNominators` (r:1 w:1)
/// Proof: `Staking::CounterForNominators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListNodes` (r:1 w:1)
/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListBags` (r:1 w:1)
/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
/// Storage: `VoterList::CounterForListNodes` (r:1 w:1)
/// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::CurrentEra` (r:1 w:0)
/// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::VirtualStakers` (r:1 w:0)
/// Proof: `Staking::VirtualStakers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `FastUnstake::CounterForQueue` (r:1 w:1)
/// Proof: `FastUnstake::CounterForQueue` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn register_fast_unstake() -> Weight {
// Proof Size summary in bytes:
// Measured: `1849`
// Estimated: `4764`
// Minimum execution time: 527_315_000 picoseconds.
Weight::from_parts(530_442_000, 0)
.saturating_add(Weight::from_parts(0, 4764))
.saturating_add(T::DbWeight::get().reads(16))
.saturating_add(T::DbWeight::get().writes(9))
}
/// Storage: `FastUnstake::ErasToCheckPerBlock` (r:1 w:0)
/// Proof: `FastUnstake::ErasToCheckPerBlock` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:0)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `FastUnstake::Queue` (r:1 w:1)
/// Proof: `FastUnstake::Queue` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// Storage: `FastUnstake::Head` (r:1 w:0)
/// Proof: `FastUnstake::Head` (`max_values`: Some(1), `max_size`: Some(886), added: 1381, mode: `MaxEncodedLen`)
/// Storage: `FastUnstake::CounterForQueue` (r:1 w:1)
/// Proof: `FastUnstake::CounterForQueue` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn deregister() -> Weight {
// Proof Size summary in bytes:
// Measured: `1243`
// Estimated: `4556`
// Minimum execution time: 167_411_000 picoseconds.
Weight::from_parts(168_605_000, 0)
.saturating_add(Weight::from_parts(0, 4556))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `FastUnstake::ErasToCheckPerBlock` (r:0 w:1)
/// Proof: `FastUnstake::ErasToCheckPerBlock` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn control() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 10_892_000 picoseconds.
Weight::from_parts(11_137_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
}

View File

@@ -0,0 +1,71 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_grandpa`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-08-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_grandpa
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_grandpa.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_grandpa`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_grandpa::WeightInfo for WeightInfo<T> {
/// The range of component `x` is `[0, 1]`.
fn check_equivocation_proof(x: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 273_518_000 picoseconds.
Weight::from_parts(274_286_032, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 48_031
.saturating_add(Weight::from_parts(120_967, 0).saturating_mul(x.into()))
}
/// Storage: `Grandpa::Stalled` (r:0 w:1)
/// Proof: `Grandpa::Stalled` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
fn note_stalled() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 11_923_000 picoseconds.
Weight::from_parts(12_217_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
}

View File

@@ -0,0 +1,434 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_identity`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-08-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_identity
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_identity.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_identity`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> {
/// Storage: `Identity::Registrars` (r:1 w:1)
/// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(5702), added: 6197, mode: `MaxEncodedLen`)
/// The range of component `r` is `[1, 99]`.
fn add_registrar(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `32 + r * (57 ±0)`
// Estimated: `7187`
// Minimum execution time: 36_029_000 picoseconds.
Weight::from_parts(37_138_493, 0)
.saturating_add(Weight::from_parts(0, 7187))
// Standard Error: 811
.saturating_add(Weight::from_parts(143_381, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Identity::IdentityOf` (r:1 w:1)
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(9253), added: 11728, mode: `MaxEncodedLen`)
/// The range of component `r` is `[1, 100]`.
fn set_identity(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `6978 + r * (5 ±0)`
// Estimated: `12718`
// Minimum execution time: 426_855_000 picoseconds.
Weight::from_parts(428_183_540, 0)
.saturating_add(Weight::from_parts(0, 12718))
// Standard Error: 5_161
.saturating_add(Weight::from_parts(202_583, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Identity::IdentityOf` (r:1 w:0)
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(9253), added: 11728, mode: `MaxEncodedLen`)
/// Storage: `Identity::SubsOf` (r:1 w:1)
/// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`)
/// Storage: `Identity::SuperOf` (r:100 w:100)
/// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 100]`.
fn set_subs_new(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `101`
// Estimated: `12718 + s * (2589 ±0)`
// Minimum execution time: 38_909_000 picoseconds.
Weight::from_parts(93_060_862, 0)
.saturating_add(Weight::from_parts(0, 12718))
// Standard Error: 13_890
.saturating_add(Weight::from_parts(13_055_562, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(s.into())))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
.saturating_add(Weight::from_parts(0, 2589).saturating_mul(s.into()))
}
/// Storage: `Identity::IdentityOf` (r:1 w:0)
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(9253), added: 11728, mode: `MaxEncodedLen`)
/// Storage: `Identity::SubsOf` (r:1 w:1)
/// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`)
/// Storage: `Identity::SuperOf` (r:0 w:100)
/// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
/// The range of component `p` is `[0, 100]`.
fn set_subs_old(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `194 + p * (32 ±0)`
// Estimated: `12718`
// Minimum execution time: 38_393_000 picoseconds.
Weight::from_parts(89_242_199, 0)
.saturating_add(Weight::from_parts(0, 12718))
// Standard Error: 12_183
.saturating_add(Weight::from_parts(5_292_462, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into())))
}
/// Storage: `Identity::SubsOf` (r:1 w:1)
/// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`)
/// Storage: `Identity::IdentityOf` (r:1 w:1)
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(9253), added: 11728, mode: `MaxEncodedLen`)
/// Storage: `Identity::SuperOf` (r:0 w:100)
/// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
/// The range of component `r` is `[1, 100]`.
/// The range of component `s` is `[0, 100]`.
fn clear_identity(r: u32, s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `7070 + r * (5 ±0) + s * (32 ±0)`
// Estimated: `12718`
// Minimum execution time: 210_961_000 picoseconds.
Weight::from_parts(188_823_375, 0)
.saturating_add(Weight::from_parts(0, 12718))
// Standard Error: 7_526
.saturating_add(Weight::from_parts(329_188, 0).saturating_mul(r.into()))
// Standard Error: 7_436
.saturating_add(Weight::from_parts(5_350_981, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
}
/// Storage: `Identity::Registrars` (r:1 w:0)
/// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(5702), added: 6197, mode: `MaxEncodedLen`)
/// Storage: `Identity::IdentityOf` (r:1 w:1)
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(9253), added: 11728, mode: `MaxEncodedLen`)
/// The range of component `r` is `[1, 100]`.
fn request_judgement(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `6968 + r * (57 ±0)`
// Estimated: `12718`
// Minimum execution time: 298_678_000 picoseconds.
Weight::from_parts(301_034_667, 0)
.saturating_add(Weight::from_parts(0, 12718))
// Standard Error: 3_406
.saturating_add(Weight::from_parts(174_545, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Identity::IdentityOf` (r:1 w:1)
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(9253), added: 11728, mode: `MaxEncodedLen`)
/// The range of component `r` is `[1, 100]`.
fn cancel_request(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `6999`
// Estimated: `12718`
// Minimum execution time: 292_089_000 picoseconds.
Weight::from_parts(294_952_996, 0)
.saturating_add(Weight::from_parts(0, 12718))
// Standard Error: 5_162
.saturating_add(Weight::from_parts(79_491, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Identity::Registrars` (r:1 w:1)
/// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(5702), added: 6197, mode: `MaxEncodedLen`)
/// The range of component `r` is `[1, 99]`.
fn set_fee(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `89 + r * (57 ±0)`
// Estimated: `7187`
// Minimum execution time: 26_819_000 picoseconds.
Weight::from_parts(27_445_527, 0)
.saturating_add(Weight::from_parts(0, 7187))
// Standard Error: 886
.saturating_add(Weight::from_parts(132_840, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Identity::Registrars` (r:1 w:1)
/// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(5702), added: 6197, mode: `MaxEncodedLen`)
/// The range of component `r` is `[1, 99]`.
fn set_account_id(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `89 + r * (57 ±0)`
// Estimated: `7187`
// Minimum execution time: 26_061_000 picoseconds.
Weight::from_parts(27_222_451, 0)
.saturating_add(Weight::from_parts(0, 7187))
// Standard Error: 1_137
.saturating_add(Weight::from_parts(133_491, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Identity::Registrars` (r:1 w:1)
/// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(5702), added: 6197, mode: `MaxEncodedLen`)
/// The range of component `r` is `[1, 99]`.
fn set_fields(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `89 + r * (57 ±0)`
// Estimated: `7187`
// Minimum execution time: 25_767_000 picoseconds.
Weight::from_parts(26_674_843, 0)
.saturating_add(Weight::from_parts(0, 7187))
// Standard Error: 1_009
.saturating_add(Weight::from_parts(133_509, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Identity::Registrars` (r:1 w:0)
/// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(5702), added: 6197, mode: `MaxEncodedLen`)
/// Storage: `Identity::IdentityOf` (r:1 w:1)
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(9253), added: 11728, mode: `MaxEncodedLen`)
/// The range of component `r` is `[1, 99]`.
fn provide_judgement(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `7046 + r * (57 ±0)`
// Estimated: `12718`
// Minimum execution time: 371_609_000 picoseconds.
Weight::from_parts(373_810_252, 0)
.saturating_add(Weight::from_parts(0, 12718))
// Standard Error: 2_210
.saturating_add(Weight::from_parts(154_120, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Identity::SubsOf` (r:1 w:1)
/// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`)
/// Storage: `Identity::IdentityOf` (r:1 w:1)
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(9253), added: 11728, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Identity::SuperOf` (r:0 w:100)
/// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
/// The range of component `r` is `[1, 100]`.
/// The range of component `s` is `[0, 100]`.
fn kill_identity(r: u32, s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `7277 + r * (5 ±0) + s * (32 ±0)`
// Estimated: `12718`
// Minimum execution time: 265_911_000 picoseconds.
Weight::from_parts(241_271_501, 0)
.saturating_add(Weight::from_parts(0, 12718))
// Standard Error: 7_518
.saturating_add(Weight::from_parts(346_780, 0).saturating_mul(r.into()))
// Standard Error: 7_429
.saturating_add(Weight::from_parts(5_410_067, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
}
/// Storage: `Identity::IdentityOf` (r:1 w:0)
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(9253), added: 11728, mode: `MaxEncodedLen`)
/// Storage: `Identity::SuperOf` (r:1 w:1)
/// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
/// Storage: `Identity::SubsOf` (r:1 w:1)
/// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 99]`.
fn add_sub(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `475 + s * (36 ±0)`
// Estimated: `12718`
// Minimum execution time: 110_179_000 picoseconds.
Weight::from_parts(121_789_579, 0)
.saturating_add(Weight::from_parts(0, 12718))
// Standard Error: 5_438
.saturating_add(Weight::from_parts(176_419, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Identity::IdentityOf` (r:1 w:0)
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(9253), added: 11728, mode: `MaxEncodedLen`)
/// Storage: `Identity::SuperOf` (r:1 w:1)
/// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
/// The range of component `s` is `[1, 100]`.
fn rename_sub(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `591 + s * (3 ±0)`
// Estimated: `12718`
// Minimum execution time: 50_639_000 picoseconds.
Weight::from_parts(55_486_355, 0)
.saturating_add(Weight::from_parts(0, 12718))
// Standard Error: 1_302
.saturating_add(Weight::from_parts(58_562, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Identity::IdentityOf` (r:1 w:0)
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(9253), added: 11728, mode: `MaxEncodedLen`)
/// Storage: `Identity::SuperOf` (r:1 w:1)
/// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
/// Storage: `Identity::SubsOf` (r:1 w:1)
/// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`)
/// The range of component `s` is `[1, 100]`.
fn remove_sub(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `638 + s * (35 ±0)`
// Estimated: `12718`
// Minimum execution time: 121_808_000 picoseconds.
Weight::from_parts(125_780_211, 0)
.saturating_add(Weight::from_parts(0, 12718))
// Standard Error: 1_897
.saturating_add(Weight::from_parts(146_144, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Identity::SuperOf` (r:1 w:1)
/// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
/// Storage: `Identity::SubsOf` (r:1 w:1)
/// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:0)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 99]`.
fn quit_sub(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `667 + s * (37 ±0)`
// Estimated: `6723`
// Minimum execution time: 88_672_000 picoseconds.
Weight::from_parts(93_095_231, 0)
.saturating_add(Weight::from_parts(0, 6723))
// Standard Error: 2_603
.saturating_add(Weight::from_parts(141_002, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Identity::UsernameAuthorities` (r:0 w:1)
/// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
fn add_username_authority() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 28_397_000 picoseconds.
Weight::from_parts(28_848_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Identity::UsernameAuthorities` (r:1 w:1)
/// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
fn remove_username_authority() -> Weight {
// Proof Size summary in bytes:
// Measured: `80`
// Estimated: `3517`
// Minimum execution time: 42_692_000 picoseconds.
Weight::from_parts(43_608_000, 0)
.saturating_add(Weight::from_parts(0, 3517))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Identity::UsernameAuthorities` (r:1 w:1)
/// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `Identity::AccountOfUsername` (r:1 w:1)
/// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`)
/// Storage: `Identity::PendingUsernames` (r:1 w:0)
/// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`)
/// Storage: `Identity::IdentityOf` (r:1 w:1)
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(9253), added: 11728, mode: `MaxEncodedLen`)
fn set_username_for() -> Weight {
// Proof Size summary in bytes:
// Measured: `80`
// Estimated: `12718`
// Minimum execution time: 238_398_000 picoseconds.
Weight::from_parts(243_093_000, 0)
.saturating_add(Weight::from_parts(0, 12718))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Identity::PendingUsernames` (r:1 w:1)
/// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`)
/// Storage: `Identity::IdentityOf` (r:1 w:1)
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(9253), added: 11728, mode: `MaxEncodedLen`)
/// Storage: `Identity::AccountOfUsername` (r:0 w:1)
/// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`)
fn accept_username() -> Weight {
// Proof Size summary in bytes:
// Measured: `115`
// Estimated: `12718`
// Minimum execution time: 86_312_000 picoseconds.
Weight::from_parts(87_506_000, 0)
.saturating_add(Weight::from_parts(0, 12718))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Identity::PendingUsernames` (r:1 w:1)
/// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`)
fn remove_expired_approval() -> Weight {
// Proof Size summary in bytes:
// Measured: `115`
// Estimated: `3550`
// Minimum execution time: 55_177_000 picoseconds.
Weight::from_parts(72_684_000, 0)
.saturating_add(Weight::from_parts(0, 3550))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Identity::AccountOfUsername` (r:1 w:0)
/// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`)
/// Storage: `Identity::IdentityOf` (r:1 w:1)
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(9253), added: 11728, mode: `MaxEncodedLen`)
fn set_primary_username() -> Weight {
// Proof Size summary in bytes:
// Measured: `257`
// Estimated: `12718`
// Minimum execution time: 70_554_000 picoseconds.
Weight::from_parts(71_242_000, 0)
.saturating_add(Weight::from_parts(0, 12718))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Identity::AccountOfUsername` (r:1 w:1)
/// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`)
/// Storage: `Identity::IdentityOf` (r:1 w:0)
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(9253), added: 11728, mode: `MaxEncodedLen`)
fn remove_dangling_username() -> Weight {
// Proof Size summary in bytes:
// Measured: `98`
// Estimated: `12718`
// Minimum execution time: 50_768_000 picoseconds.
Weight::from_parts(52_044_000, 0)
.saturating_add(Weight::from_parts(0, 12718))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
}

View File

@@ -0,0 +1,113 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_indices`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-08-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_indices
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_indices.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_indices`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_indices::WeightInfo for WeightInfo<T> {
/// Storage: `Indices::Accounts` (r:1 w:1)
/// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
fn claim() -> Weight {
// Proof Size summary in bytes:
// Measured: `142`
// Estimated: `3534`
// Minimum execution time: 88_097_000 picoseconds.
Weight::from_parts(89_172_000, 0)
.saturating_add(Weight::from_parts(0, 3534))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Indices::Accounts` (r:1 w:1)
/// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `341`
// Estimated: `3593`
// Minimum execution time: 131_395_000 picoseconds.
Weight::from_parts(132_310_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Indices::Accounts` (r:1 w:1)
/// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
fn free() -> Weight {
// Proof Size summary in bytes:
// Measured: `238`
// Estimated: `3534`
// Minimum execution time: 87_436_000 picoseconds.
Weight::from_parts(88_420_000, 0)
.saturating_add(Weight::from_parts(0, 3534))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Indices::Accounts` (r:1 w:1)
/// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn force_transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `378`
// Estimated: `3593`
// Minimum execution time: 99_599_000 picoseconds.
Weight::from_parts(100_359_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Indices::Accounts` (r:1 w:1)
/// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
fn freeze() -> Weight {
// Proof Size summary in bytes:
// Measured: `238`
// Estimated: `3534`
// Minimum execution time: 91_305_000 picoseconds.
Weight::from_parts(92_154_000, 0)
.saturating_add(Weight::from_parts(0, 3534))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
}

View File

@@ -0,0 +1,161 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_multisig`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-08-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_multisig
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_multisig.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_multisig`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
/// The range of component `z` is `[0, 10000]`.
fn as_multi_threshold_1(z: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 43_478_000 picoseconds.
Weight::from_parts(44_609_560, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 12
.saturating_add(Weight::from_parts(1_401, 0).saturating_mul(z.into()))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_create(s: u32, z: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `333 + s * (2 ±0)`
// Estimated: `6811`
// Minimum execution time: 142_936_000 picoseconds.
Weight::from_parts(124_108_455, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 2_855
.saturating_add(Weight::from_parts(221_355, 0).saturating_mul(s.into()))
// Standard Error: 27
.saturating_add(Weight::from_parts(4_474, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// The range of component `s` is `[3, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_approve(s: u32, z: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `320`
// Estimated: `6811`
// Minimum execution time: 87_713_000 picoseconds.
Weight::from_parts(68_239_498, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 2_226
.saturating_add(Weight::from_parts(220_950, 0).saturating_mul(s.into()))
// Standard Error: 21
.saturating_add(Weight::from_parts(4_503, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_complete(s: u32, z: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `456 + s * (33 ±0)`
// Estimated: `6811`
// Minimum execution time: 157_225_000 picoseconds.
Weight::from_parts(131_602_388, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 2_751
.saturating_add(Weight::from_parts(287_079, 0).saturating_mul(s.into()))
// Standard Error: 26
.saturating_add(Weight::from_parts(4_553, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_create(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `334 + s * (2 ±0)`
// Estimated: `6811`
// Minimum execution time: 117_684_000 picoseconds.
Weight::from_parts(118_769_220, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 5_547
.saturating_add(Weight::from_parts(245_256, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_approve(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `320`
// Estimated: `6811`
// Minimum execution time: 63_527_000 picoseconds.
Weight::from_parts(63_245_044, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 3_544
.saturating_add(Weight::from_parts(233_731, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
fn cancel_as_multi(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `525 + s * (1 ±0)`
// Estimated: `6811`
// Minimum execution time: 116_122_000 picoseconds.
Weight::from_parts(116_895_408, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 2_124
.saturating_add(Weight::from_parts(230_923, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
}

View File

@@ -0,0 +1,671 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_nomination_pools`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-08-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_nomination_pools
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_nomination_pools.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_nomination_pools`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo<T> {
/// Storage: `NominationPools::MinJoinBond` (r:1 w:0)
/// Proof: `NominationPools::MinJoinBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::PoolMembers` (r:1 w:1)
/// Proof: `NominationPools::PoolMembers` (`max_values`: None, `max_size`: Some(717), added: 3192, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::BondedPools` (r:1 w:1)
/// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:1)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::RewardPools` (r:1 w:1)
/// Proof: `NominationPools::RewardPools` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::GlobalMaxCommission` (r:1 w:0)
/// Proof: `NominationPools::GlobalMaxCommission` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::MaxPoolMembersPerPool` (r:1 w:0)
/// Proof: `NominationPools::MaxPoolMembersPerPool` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::MaxPoolMembers` (r:1 w:0)
/// Proof: `NominationPools::MaxPoolMembers` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::CounterForPoolMembers` (r:1 w:1)
/// Proof: `NominationPools::CounterForPoolMembers` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::VirtualStakers` (r:1 w:0)
/// Proof: `Staking::VirtualStakers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListNodes` (r:3 w:3)
/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListBags` (r:2 w:2)
/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::TotalValueLocked` (r:1 w:1)
/// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
fn join() -> Weight {
// Proof Size summary in bytes:
// Measured: `3318`
// Estimated: `8877`
// Minimum execution time: 716_606_000 picoseconds.
Weight::from_parts(721_123_000, 0)
.saturating_add(Weight::from_parts(0, 8877))
.saturating_add(T::DbWeight::get().reads(21))
.saturating_add(T::DbWeight::get().writes(13))
}
/// Storage: `NominationPools::PoolMembers` (r:1 w:1)
/// Proof: `NominationPools::PoolMembers` (`max_values`: None, `max_size`: Some(717), added: 3192, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::BondedPools` (r:1 w:1)
/// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::RewardPools` (r:1 w:1)
/// Proof: `NominationPools::RewardPools` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::GlobalMaxCommission` (r:1 w:0)
/// Proof: `NominationPools::GlobalMaxCommission` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:3 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:1)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::VirtualStakers` (r:1 w:0)
/// Proof: `Staking::VirtualStakers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListNodes` (r:3 w:3)
/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListBags` (r:2 w:2)
/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::TotalValueLocked` (r:1 w:1)
/// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
fn bond_extra_transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `3328`
// Estimated: `8877`
// Minimum execution time: 716_271_000 picoseconds.
Weight::from_parts(722_192_000, 0)
.saturating_add(Weight::from_parts(0, 8877))
.saturating_add(T::DbWeight::get().reads(18))
.saturating_add(T::DbWeight::get().writes(13))
}
/// Storage: `NominationPools::ClaimPermissions` (r:1 w:0)
/// Proof: `NominationPools::ClaimPermissions` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::PoolMembers` (r:1 w:1)
/// Proof: `NominationPools::PoolMembers` (`max_values`: None, `max_size`: Some(717), added: 3192, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::BondedPools` (r:1 w:1)
/// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::RewardPools` (r:1 w:1)
/// Proof: `NominationPools::RewardPools` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::GlobalMaxCommission` (r:1 w:0)
/// Proof: `NominationPools::GlobalMaxCommission` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:3 w:3)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:1)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::VirtualStakers` (r:1 w:0)
/// Proof: `Staking::VirtualStakers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListNodes` (r:2 w:2)
/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListBags` (r:2 w:2)
/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::TotalValueLocked` (r:1 w:1)
/// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
fn bond_extra_other() -> Weight {
// Proof Size summary in bytes:
// Measured: `3275`
// Estimated: `8799`
// Minimum execution time: 834_533_000 picoseconds.
Weight::from_parts(840_007_000, 0)
.saturating_add(Weight::from_parts(0, 8799))
.saturating_add(T::DbWeight::get().reads(18))
.saturating_add(T::DbWeight::get().writes(13))
}
/// Storage: `NominationPools::ClaimPermissions` (r:1 w:0)
/// Proof: `NominationPools::ClaimPermissions` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::PoolMembers` (r:1 w:1)
/// Proof: `NominationPools::PoolMembers` (`max_values`: None, `max_size`: Some(717), added: 3192, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::BondedPools` (r:1 w:1)
/// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::RewardPools` (r:1 w:1)
/// Proof: `NominationPools::RewardPools` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::GlobalMaxCommission` (r:1 w:0)
/// Proof: `NominationPools::GlobalMaxCommission` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn claim_payout() -> Weight {
// Proof Size summary in bytes:
// Measured: `1243`
// Estimated: `4182`
// Minimum execution time: 295_679_000 picoseconds.
Weight::from_parts(297_682_000, 0)
.saturating_add(Weight::from_parts(0, 4182))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `NominationPools::PoolMembers` (r:1 w:1)
/// Proof: `NominationPools::PoolMembers` (`max_values`: None, `max_size`: Some(717), added: 3192, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::BondedPools` (r:1 w:1)
/// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::RewardPools` (r:1 w:1)
/// Proof: `NominationPools::RewardPools` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:1)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::GlobalMaxCommission` (r:1 w:0)
/// Proof: `NominationPools::GlobalMaxCommission` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Staking::CurrentEra` (r:1 w:0)
/// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::Nominators` (r:1 w:0)
/// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(558), added: 3033, mode: `MaxEncodedLen`)
/// Storage: `Staking::MinNominatorBond` (r:1 w:0)
/// Proof: `Staking::MinNominatorBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `Staking::VirtualStakers` (r:1 w:0)
/// Proof: `Staking::VirtualStakers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListNodes` (r:3 w:3)
/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListBags` (r:2 w:2)
/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::SubPoolsStorage` (r:1 w:1)
/// Proof: `NominationPools::SubPoolsStorage` (`max_values`: None, `max_size`: Some(1197), added: 3672, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::CounterForSubPoolsStorage` (r:1 w:1)
/// Proof: `NominationPools::CounterForSubPoolsStorage` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn unbond() -> Weight {
// Proof Size summary in bytes:
// Measured: `3508`
// Estimated: `8877`
// Minimum execution time: 639_377_000 picoseconds.
Weight::from_parts(643_090_000, 0)
.saturating_add(Weight::from_parts(0, 8877))
.saturating_add(T::DbWeight::get().reads(21))
.saturating_add(T::DbWeight::get().writes(13))
}
/// Storage: `NominationPools::BondedPools` (r:1 w:0)
/// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:1)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::CurrentEra` (r:1 w:0)
/// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::VirtualStakers` (r:1 w:0)
/// Proof: `Staking::VirtualStakers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::ReversePoolIdLookup` (r:1 w:0)
/// Proof: `NominationPools::ReversePoolIdLookup` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::TotalValueLocked` (r:1 w:1)
/// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 100]`.
fn pool_withdraw_unbonded(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1739`
// Estimated: `4764`
// Minimum execution time: 262_375_000 picoseconds.
Weight::from_parts(265_593_485, 0)
.saturating_add(Weight::from_parts(0, 4764))
// Standard Error: 7_206
.saturating_add(Weight::from_parts(92_499, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(9))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `NominationPools::PoolMembers` (r:1 w:1)
/// Proof: `NominationPools::PoolMembers` (`max_values`: None, `max_size`: Some(717), added: 3192, mode: `MaxEncodedLen`)
/// Storage: `Staking::CurrentEra` (r:1 w:0)
/// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::BondedPools` (r:1 w:1)
/// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::SubPoolsStorage` (r:1 w:1)
/// Proof: `NominationPools::SubPoolsStorage` (`max_values`: None, `max_size`: Some(1197), added: 3672, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:1)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::VirtualStakers` (r:1 w:0)
/// Proof: `Staking::VirtualStakers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::ReversePoolIdLookup` (r:1 w:0)
/// Proof: `NominationPools::ReversePoolIdLookup` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::TotalValueLocked` (r:1 w:1)
/// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::CounterForPoolMembers` (r:1 w:1)
/// Proof: `NominationPools::CounterForPoolMembers` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::ClaimPermissions` (r:0 w:1)
/// Proof: `NominationPools::ClaimPermissions` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 100]`.
fn withdraw_unbonded_update(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `2129`
// Estimated: `4764`
// Minimum execution time: 517_498_000 picoseconds.
Weight::from_parts(523_574_962, 0)
.saturating_add(Weight::from_parts(0, 4764))
// Standard Error: 4_682
.saturating_add(Weight::from_parts(158_922, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(13))
.saturating_add(T::DbWeight::get().writes(9))
}
/// Storage: `NominationPools::PoolMembers` (r:1 w:1)
/// Proof: `NominationPools::PoolMembers` (`max_values`: None, `max_size`: Some(717), added: 3192, mode: `MaxEncodedLen`)
/// Storage: `Staking::CurrentEra` (r:1 w:0)
/// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::BondedPools` (r:1 w:1)
/// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::SubPoolsStorage` (r:1 w:1)
/// Proof: `NominationPools::SubPoolsStorage` (`max_values`: None, `max_size`: Some(1197), added: 3672, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:1)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:1)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::SlashingSpans` (r:1 w:0)
/// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Staking::VirtualStakers` (r:1 w:1)
/// Proof: `Staking::VirtualStakers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:2 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:2 w:1)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Staking::Validators` (r:1 w:0)
/// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
/// Storage: `Staking::Nominators` (r:1 w:0)
/// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(558), added: 3033, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::ReversePoolIdLookup` (r:1 w:1)
/// Proof: `NominationPools::ReversePoolIdLookup` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::TotalValueLocked` (r:1 w:1)
/// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::CounterForPoolMembers` (r:1 w:1)
/// Proof: `NominationPools::CounterForPoolMembers` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::CounterForReversePoolIdLookup` (r:1 w:1)
/// Proof: `NominationPools::CounterForReversePoolIdLookup` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::RewardPools` (r:1 w:1)
/// Proof: `NominationPools::RewardPools` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::CounterForRewardPools` (r:1 w:1)
/// Proof: `NominationPools::CounterForRewardPools` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::CounterForSubPoolsStorage` (r:1 w:1)
/// Proof: `NominationPools::CounterForSubPoolsStorage` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::Metadata` (r:1 w:1)
/// Proof: `NominationPools::Metadata` (`max_values`: None, `max_size`: Some(270), added: 2745, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::CounterForBondedPools` (r:1 w:1)
/// Proof: `NominationPools::CounterForBondedPools` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::Payee` (r:0 w:1)
/// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::ClaimPermissions` (r:0 w:1)
/// Proof: `NominationPools::ClaimPermissions` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 100]`.
fn withdraw_unbonded_kill(_s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `2487`
// Estimated: `8538`
// Minimum execution time: 915_305_000 picoseconds.
Weight::from_parts(924_951_139, 0)
.saturating_add(Weight::from_parts(0, 8538))
.saturating_add(T::DbWeight::get().reads(25))
.saturating_add(T::DbWeight::get().writes(21))
}
/// Storage: `NominationPools::LastPoolId` (r:1 w:1)
/// Proof: `NominationPools::LastPoolId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::MinNominatorBond` (r:1 w:0)
/// Proof: `Staking::MinNominatorBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::MinCreateBond` (r:1 w:0)
/// Proof: `NominationPools::MinCreateBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::MinJoinBond` (r:1 w:0)
/// Proof: `NominationPools::MinJoinBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::MaxPools` (r:1 w:0)
/// Proof: `NominationPools::MaxPools` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::CounterForBondedPools` (r:1 w:1)
/// Proof: `NominationPools::CounterForBondedPools` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::PoolMembers` (r:1 w:1)
/// Proof: `NominationPools::PoolMembers` (`max_values`: None, `max_size`: Some(717), added: 3192, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::MaxPoolMembersPerPool` (r:1 w:0)
/// Proof: `NominationPools::MaxPoolMembersPerPool` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::MaxPoolMembers` (r:1 w:0)
/// Proof: `NominationPools::MaxPoolMembers` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::CounterForPoolMembers` (r:1 w:1)
/// Proof: `NominationPools::CounterForPoolMembers` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:1)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:1)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::VirtualStakers` (r:1 w:0)
/// Proof: `Staking::VirtualStakers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:2 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:2 w:1)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::TotalValueLocked` (r:1 w:1)
/// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::RewardPools` (r:1 w:1)
/// Proof: `NominationPools::RewardPools` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::CounterForRewardPools` (r:1 w:1)
/// Proof: `NominationPools::CounterForRewardPools` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::ReversePoolIdLookup` (r:1 w:1)
/// Proof: `NominationPools::ReversePoolIdLookup` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::CounterForReversePoolIdLookup` (r:1 w:1)
/// Proof: `NominationPools::CounterForReversePoolIdLookup` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::BondedPools` (r:1 w:1)
/// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`)
/// Storage: `Staking::Payee` (r:0 w:1)
/// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn create() -> Weight {
// Proof Size summary in bytes:
// Measured: `1217`
// Estimated: `8538`
// Minimum execution time: 730_155_000 picoseconds.
Weight::from_parts(734_091_000, 0)
.saturating_add(Weight::from_parts(0, 8538))
.saturating_add(T::DbWeight::get().reads(25))
.saturating_add(T::DbWeight::get().writes(17))
}
/// Storage: `NominationPools::BondedPools` (r:1 w:0)
/// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::PoolMembers` (r:1 w:0)
/// Proof: `NominationPools::PoolMembers` (`max_values`: None, `max_size`: Some(717), added: 3192, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:0)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::MinNominatorBond` (r:1 w:0)
/// Proof: `Staking::MinNominatorBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::MinCreateBond` (r:1 w:0)
/// Proof: `NominationPools::MinCreateBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::MinJoinBond` (r:1 w:0)
/// Proof: `NominationPools::MinJoinBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `Staking::Nominators` (r:1 w:1)
/// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(558), added: 3033, mode: `MaxEncodedLen`)
/// Storage: `Staking::MaxNominatorsCount` (r:1 w:0)
/// Proof: `Staking::MaxNominatorsCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::Validators` (r:17 w:0)
/// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
/// Storage: `Staking::CurrentEra` (r:1 w:0)
/// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListNodes` (r:1 w:1)
/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListBags` (r:1 w:1)
/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
/// Storage: `VoterList::CounterForListNodes` (r:1 w:1)
/// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::CounterForNominators` (r:1 w:1)
/// Proof: `Staking::CounterForNominators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// The range of component `n` is `[1, 16]`.
fn nominate(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1870`
// Estimated: `4556 + n * (2520 ±0)`
// Minimum execution time: 302_985_000 picoseconds.
Weight::from_parts(302_737_863, 0)
.saturating_add(Weight::from_parts(0, 4556))
// Standard Error: 22_407
.saturating_add(Weight::from_parts(5_487_308, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(15))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(5))
.saturating_add(Weight::from_parts(0, 2520).saturating_mul(n.into()))
}
/// Storage: `NominationPools::BondedPools` (r:1 w:1)
/// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:0)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
fn set_state() -> Weight {
// Proof Size summary in bytes:
// Measured: `1326`
// Estimated: `4556`
// Minimum execution time: 113_053_000 picoseconds.
Weight::from_parts(114_218_000, 0)
.saturating_add(Weight::from_parts(0, 4556))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `NominationPools::BondedPools` (r:1 w:0)
/// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::Metadata` (r:1 w:1)
/// Proof: `NominationPools::Metadata` (`max_values`: None, `max_size`: Some(270), added: 2745, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::CounterForMetadata` (r:1 w:1)
/// Proof: `NominationPools::CounterForMetadata` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// The range of component `n` is `[1, 256]`.
fn set_metadata(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `532`
// Estimated: `3735`
// Minimum execution time: 52_132_000 picoseconds.
Weight::from_parts(53_264_279, 0)
.saturating_add(Weight::from_parts(0, 3735))
// Standard Error: 428
.saturating_add(Weight::from_parts(2_468, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `NominationPools::MinJoinBond` (r:0 w:1)
/// Proof: `NominationPools::MinJoinBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::MaxPoolMembers` (r:0 w:1)
/// Proof: `NominationPools::MaxPoolMembers` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::MaxPoolMembersPerPool` (r:0 w:1)
/// Proof: `NominationPools::MaxPoolMembersPerPool` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::MinCreateBond` (r:0 w:1)
/// Proof: `NominationPools::MinCreateBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::GlobalMaxCommission` (r:0 w:1)
/// Proof: `NominationPools::GlobalMaxCommission` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::MaxPools` (r:0 w:1)
/// Proof: `NominationPools::MaxPools` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn set_configs() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 16_746_000 picoseconds.
Weight::from_parts(17_151_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(6))
}
/// Storage: `NominationPools::BondedPools` (r:1 w:1)
/// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`)
fn update_roles() -> Weight {
// Proof Size summary in bytes:
// Measured: `532`
// Estimated: `3719`
// Minimum execution time: 63_646_000 picoseconds.
Weight::from_parts(64_352_000, 0)
.saturating_add(Weight::from_parts(0, 3719))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `NominationPools::BondedPools` (r:1 w:0)
/// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::PoolMembers` (r:1 w:0)
/// Proof: `NominationPools::PoolMembers` (`max_values`: None, `max_size`: Some(717), added: 3192, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:0)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::MinNominatorBond` (r:1 w:0)
/// Proof: `Staking::MinNominatorBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `Staking::Validators` (r:1 w:0)
/// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
/// Storage: `Staking::Nominators` (r:1 w:1)
/// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(558), added: 3033, mode: `MaxEncodedLen`)
/// Storage: `Staking::CounterForNominators` (r:1 w:1)
/// Proof: `Staking::CounterForNominators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListNodes` (r:1 w:1)
/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListBags` (r:1 w:1)
/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
/// Storage: `VoterList::CounterForListNodes` (r:1 w:1)
/// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn chill() -> Weight {
// Proof Size summary in bytes:
// Measured: `2037`
// Estimated: `4556`
// Minimum execution time: 274_338_000 picoseconds.
Weight::from_parts(276_519_000, 0)
.saturating_add(Weight::from_parts(0, 4556))
.saturating_add(T::DbWeight::get().reads(11))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `NominationPools::BondedPools` (r:1 w:1)
/// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::RewardPools` (r:1 w:1)
/// Proof: `NominationPools::RewardPools` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::GlobalMaxCommission` (r:1 w:0)
/// Proof: `NominationPools::GlobalMaxCommission` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:0)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn set_commission() -> Weight {
// Proof Size summary in bytes:
// Measured: `804`
// Estimated: `3719`
// Minimum execution time: 123_432_000 picoseconds.
Weight::from_parts(124_207_000, 0)
.saturating_add(Weight::from_parts(0, 3719))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `NominationPools::BondedPools` (r:1 w:1)
/// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::GlobalMaxCommission` (r:1 w:0)
/// Proof: `NominationPools::GlobalMaxCommission` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn set_commission_max() -> Weight {
// Proof Size summary in bytes:
// Measured: `572`
// Estimated: `3719`
// Minimum execution time: 64_040_000 picoseconds.
Weight::from_parts(64_576_000, 0)
.saturating_add(Weight::from_parts(0, 3719))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `NominationPools::BondedPools` (r:1 w:1)
/// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`)
fn set_commission_change_rate() -> Weight {
// Proof Size summary in bytes:
// Measured: `532`
// Estimated: `3719`
// Minimum execution time: 63_327_000 picoseconds.
Weight::from_parts(63_759_000, 0)
.saturating_add(Weight::from_parts(0, 3719))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `NominationPools::BondedPools` (r:1 w:1)
/// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`)
fn set_commission_claim_permission() -> Weight {
// Proof Size summary in bytes:
// Measured: `532`
// Estimated: `3719`
// Minimum execution time: 62_830_000 picoseconds.
Weight::from_parts(63_234_000, 0)
.saturating_add(Weight::from_parts(0, 3719))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `NominationPools::PoolMembers` (r:1 w:0)
/// Proof: `NominationPools::PoolMembers` (`max_values`: None, `max_size`: Some(717), added: 3192, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::ClaimPermissions` (r:1 w:1)
/// Proof: `NominationPools::ClaimPermissions` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`)
fn set_claim_permission() -> Weight {
// Proof Size summary in bytes:
// Measured: `542`
// Estimated: `4182`
// Minimum execution time: 53_239_000 picoseconds.
Weight::from_parts(54_298_000, 0)
.saturating_add(Weight::from_parts(0, 4182))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `NominationPools::BondedPools` (r:1 w:0)
/// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::RewardPools` (r:1 w:1)
/// Proof: `NominationPools::RewardPools` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::GlobalMaxCommission` (r:1 w:0)
/// Proof: `NominationPools::GlobalMaxCommission` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn claim_commission() -> Weight {
// Proof Size summary in bytes:
// Measured: `1073`
// Estimated: `3719`
// Minimum execution time: 246_773_000 picoseconds.
Weight::from_parts(248_359_000, 0)
.saturating_add(Weight::from_parts(0, 3719))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `NominationPools::BondedPools` (r:1 w:0)
/// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:1)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:0)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
fn adjust_pool_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `972`
// Estimated: `4764`
// Minimum execution time: 273_640_000 picoseconds.
Weight::from_parts(275_806_000, 0)
.saturating_add(Weight::from_parts(0, 4764))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
}
}

View File

@@ -0,0 +1,264 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_preimage`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-08-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_preimage
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_preimage.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_preimage`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> {
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `Preimage::PreimageFor` (r:0 w:1)
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 4194304]`.
fn note_preimage(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `76`
// Estimated: `3556`
// Minimum execution time: 184_982_000 picoseconds.
Weight::from_parts(185_981_000, 0)
.saturating_add(Weight::from_parts(0, 3556))
// Standard Error: 12
.saturating_add(Weight::from_parts(6_544, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::PreimageFor` (r:0 w:1)
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 4194304]`.
fn note_requested_preimage(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `140`
// Estimated: `3556`
// Minimum execution time: 58_660_000 picoseconds.
Weight::from_parts(59_197_000, 0)
.saturating_add(Weight::from_parts(0, 3556))
// Standard Error: 11
.saturating_add(Weight::from_parts(6_536, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::PreimageFor` (r:0 w:1)
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 4194304]`.
fn note_no_deposit_preimage(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `140`
// Estimated: `3556`
// Minimum execution time: 60_486_000 picoseconds.
Weight::from_parts(61_208_000, 0)
.saturating_add(Weight::from_parts(0, 3556))
// Standard Error: 12
.saturating_add(Weight::from_parts(6_563, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `Preimage::PreimageFor` (r:0 w:1)
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
fn unnote_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `278`
// Estimated: `3556`
// Minimum execution time: 196_725_000 picoseconds.
Weight::from_parts(198_947_000, 0)
.saturating_add(Weight::from_parts(0, 3556))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::PreimageFor` (r:0 w:1)
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
fn unnote_no_deposit_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `178`
// Estimated: `3556`
// Minimum execution time: 93_063_000 picoseconds.
Weight::from_parts(94_422_000, 0)
.saturating_add(Weight::from_parts(0, 3556))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
fn request_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `222`
// Estimated: `3556`
// Minimum execution time: 75_641_000 picoseconds.
Weight::from_parts(77_340_000, 0)
.saturating_add(Weight::from_parts(0, 3556))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
fn request_no_deposit_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `178`
// Estimated: `3556`
// Minimum execution time: 59_452_000 picoseconds.
Weight::from_parts(60_649_000, 0)
.saturating_add(Weight::from_parts(0, 3556))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
fn request_unnoted_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `76`
// Estimated: `3556`
// Minimum execution time: 67_319_000 picoseconds.
Weight::from_parts(68_408_000, 0)
.saturating_add(Weight::from_parts(0, 3556))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
fn request_requested_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `140`
// Estimated: `3556`
// Minimum execution time: 43_700_000 picoseconds.
Weight::from_parts(44_342_000, 0)
.saturating_add(Weight::from_parts(0, 3556))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::PreimageFor` (r:0 w:1)
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
fn unrequest_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `178`
// Estimated: `3556`
// Minimum execution time: 85_045_000 picoseconds.
Weight::from_parts(86_364_000, 0)
.saturating_add(Weight::from_parts(0, 3556))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
fn unrequest_unnoted_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `140`
// Estimated: `3556`
// Minimum execution time: 43_163_000 picoseconds.
Weight::from_parts(44_239_000, 0)
.saturating_add(Weight::from_parts(0, 3556))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
fn unrequest_multi_referenced_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `140`
// Estimated: `3556`
// Minimum execution time: 44_330_000 picoseconds.
Weight::from_parts(45_448_000, 0)
.saturating_add(Weight::from_parts(0, 3556))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Preimage::StatusFor` (r:1023 w:1023)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1023 w:1023)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1023 w:1023)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:0 w:1023)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// The range of component `n` is `[1, 1024]`.
fn ensure_updated(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0 + n * (227 ±0)`
// Estimated: `990 + n * (2603 ±0)`
// Minimum execution time: 209_069_000 picoseconds.
Weight::from_parts(210_285_000, 0)
.saturating_add(Weight::from_parts(0, 990))
// Standard Error: 107_938
.saturating_add(Weight::from_parts(203_214_364, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(n.into()))
}
}

View File

@@ -0,0 +1,222 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_proxy`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-08-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_proxy
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_proxy.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_proxy`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
/// Storage: `Proxy::Proxies` (r:1 w:0)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 31]`.
fn proxy(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `227 + p * (37 ±0)`
// Estimated: `4706`
// Minimum execution time: 52_102_000 picoseconds.
Weight::from_parts(52_983_652, 0)
.saturating_add(Weight::from_parts(0, 4706))
// Standard Error: 2_345
.saturating_add(Weight::from_parts(123_131, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1))
}
/// Storage: `Proxy::Proxies` (r:1 w:0)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// Storage: `Proxy::Announcements` (r:1 w:1)
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn proxy_announced(a: u32, p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `554 + a * (68 ±0) + p * (37 ±0)`
// Estimated: `5698`
// Minimum execution time: 135_284_000 picoseconds.
Weight::from_parts(133_942_081, 0)
.saturating_add(Weight::from_parts(0, 5698))
// Standard Error: 7_270
.saturating_add(Weight::from_parts(486_065, 0).saturating_mul(a.into()))
// Standard Error: 7_511
.saturating_add(Weight::from_parts(93_257, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Proxy::Announcements` (r:1 w:1)
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn remove_announcement(a: u32, p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `469 + a * (68 ±0)`
// Estimated: `5698`
// Minimum execution time: 92_458_000 picoseconds.
Weight::from_parts(93_228_580, 0)
.saturating_add(Weight::from_parts(0, 5698))
// Standard Error: 3_540
.saturating_add(Weight::from_parts(496_930, 0).saturating_mul(a.into()))
// Standard Error: 3_658
.saturating_add(Weight::from_parts(20_009, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Proxy::Announcements` (r:1 w:1)
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn reject_announcement(a: u32, p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `469 + a * (68 ±0)`
// Estimated: `5698`
// Minimum execution time: 92_412_000 picoseconds.
Weight::from_parts(93_431_190, 0)
.saturating_add(Weight::from_parts(0, 5698))
// Standard Error: 4_974
.saturating_add(Weight::from_parts(499_958, 0).saturating_mul(a.into()))
// Standard Error: 5_139
.saturating_add(Weight::from_parts(8_062, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Proxy::Proxies` (r:1 w:0)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// Storage: `Proxy::Announcements` (r:1 w:1)
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn announce(a: u32, p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `486 + a * (68 ±0) + p * (37 ±0)`
// Estimated: `5698`
// Minimum execution time: 122_066_000 picoseconds.
Weight::from_parts(120_516_865, 0)
.saturating_add(Weight::from_parts(0, 5698))
// Standard Error: 3_583
.saturating_add(Weight::from_parts(474_188, 0).saturating_mul(a.into()))
// Standard Error: 3_702
.saturating_add(Weight::from_parts(89_204, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Proxy::Proxies` (r:1 w:1)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 31]`.
fn add_proxy(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `227 + p * (37 ±0)`
// Estimated: `4706`
// Minimum execution time: 90_747_000 picoseconds.
Weight::from_parts(92_224_658, 0)
.saturating_add(Weight::from_parts(0, 4706))
// Standard Error: 6_178
.saturating_add(Weight::from_parts(115_174, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Proxy::Proxies` (r:1 w:1)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 31]`.
fn remove_proxy(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `227 + p * (37 ±0)`
// Estimated: `4706`
// Minimum execution time: 90_894_000 picoseconds.
Weight::from_parts(91_907_515, 0)
.saturating_add(Weight::from_parts(0, 4706))
// Standard Error: 5_632
.saturating_add(Weight::from_parts(170_776, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Proxy::Proxies` (r:1 w:1)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 31]`.
fn remove_proxies(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `227 + p * (37 ±0)`
// Estimated: `4706`
// Minimum execution time: 82_623_000 picoseconds.
Weight::from_parts(83_682_560, 0)
.saturating_add(Weight::from_parts(0, 4706))
// Standard Error: 1_885
.saturating_add(Weight::from_parts(142_952, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Proxy::Proxies` (r:1 w:1)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 31]`.
fn create_pure(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `239`
// Estimated: `4706`
// Minimum execution time: 96_987_000 picoseconds.
Weight::from_parts(98_089_930, 0)
.saturating_add(Weight::from_parts(0, 4706))
// Standard Error: 2_115
.saturating_add(Weight::from_parts(36_871, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Proxy::Proxies` (r:1 w:1)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// The range of component `p` is `[0, 30]`.
fn kill_pure(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `264 + p * (37 ±0)`
// Estimated: `4706`
// Minimum execution time: 86_027_000 picoseconds.
Weight::from_parts(87_080_852, 0)
.saturating_add(Weight::from_parts(0, 4706))
// Standard Error: 1_982
.saturating_add(Weight::from_parts(142_829, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
}

View File

@@ -0,0 +1,198 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_ranked_collective`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-08-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_ranked_collective
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_ranked_collective.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_ranked_collective`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_ranked_collective::WeightInfo for WeightInfo<T> {
/// Storage: `CultCollective::Members` (r:1 w:1)
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::MemberCount` (r:1 w:1)
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::IndexToId` (r:0 w:1)
/// Proof: `CultCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::IdToIndex` (r:0 w:1)
/// Proof: `CultCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
fn add_member() -> Weight {
// Proof Size summary in bytes:
// Measured: `142`
// Estimated: `3507`
// Minimum execution time: 63_706_000 picoseconds.
Weight::from_parts(64_882_000, 0)
.saturating_add(Weight::from_parts(0, 3507))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `CultCollective::Members` (r:1 w:1)
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::MemberCount` (r:11 w:11)
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::IdToIndex` (r:11 w:22)
/// Proof: `CultCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::IndexToId` (r:11 w:22)
/// Proof: `CultCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// The range of component `r` is `[0, 10]`.
fn remove_member(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `617 + r * (281 ±0)`
// Estimated: `3519 + r * (2529 ±0)`
// Minimum execution time: 113_000_000 picoseconds.
Weight::from_parts(118_820_574, 0)
.saturating_add(Weight::from_parts(0, 3519))
// Standard Error: 67_446
.saturating_add(Weight::from_parts(57_292_374, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(r.into())))
.saturating_add(T::DbWeight::get().writes(6))
.saturating_add(T::DbWeight::get().writes((5_u64).saturating_mul(r.into())))
.saturating_add(Weight::from_parts(0, 2529).saturating_mul(r.into()))
}
/// Storage: `CultCollective::Members` (r:1 w:1)
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::MemberCount` (r:1 w:1)
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::IndexToId` (r:0 w:1)
/// Proof: `CultCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::IdToIndex` (r:0 w:1)
/// Proof: `CultCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// The range of component `r` is `[0, 10]`.
fn promote_member(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `314 + r * (17 ±0)`
// Estimated: `3507`
// Minimum execution time: 73_427_000 picoseconds.
Weight::from_parts(75_571_865, 0)
.saturating_add(Weight::from_parts(0, 3507))
// Standard Error: 10_496
.saturating_add(Weight::from_parts(748_369, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `CultCollective::Members` (r:1 w:1)
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::MemberCount` (r:1 w:1)
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::IdToIndex` (r:1 w:2)
/// Proof: `CultCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::IndexToId` (r:1 w:2)
/// Proof: `CultCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// The range of component `r` is `[0, 10]`.
fn demote_member(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `632 + r * (72 ±0)`
// Estimated: `3519`
// Minimum execution time: 113_585_000 picoseconds.
Weight::from_parts(119_684_908, 0)
.saturating_add(Weight::from_parts(0, 3519))
// Standard Error: 46_656
.saturating_add(Weight::from_parts(1_495_515, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(6))
}
/// Storage: `CultCollective::Members` (r:1 w:0)
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::Voting` (r:1 w:1)
/// Proof: `CultCollective::Voting` (`max_values`: None, `max_size`: Some(65), added: 2540, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn vote() -> Weight {
// Proof Size summary in bytes:
// Measured: `699`
// Estimated: `26866`
// Minimum execution time: 165_614_000 picoseconds.
Weight::from_parts(167_712_000, 0)
.saturating_add(Weight::from_parts(0, 26866))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:0)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::VotingCleanup` (r:1 w:0)
/// Proof: `CultCollective::VotingCleanup` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::Voting` (r:100 w:100)
/// Proof: `CultCollective::Voting` (`max_values`: None, `max_size`: Some(65), added: 2540, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 100]`.
fn cleanup_poll(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `534 + n * (50 ±0)`
// Estimated: `3795 + n * (2540 ±0)`
// Minimum execution time: 61_194_000 picoseconds.
Weight::from_parts(69_801_249, 0)
.saturating_add(Weight::from_parts(0, 3795))
// Standard Error: 5_737
.saturating_add(Weight::from_parts(3_189_746, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 2540).saturating_mul(n.into()))
}
/// Storage: `CultCollective::Members` (r:2 w:2)
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::MemberCount` (r:2 w:2)
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::IdToIndex` (r:2 w:4)
/// Proof: `CultCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `CultCore::Member` (r:2 w:2)
/// Proof: `CultCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `CultCore::MemberEvidence` (r:1 w:0)
/// Proof: `CultCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
/// Storage: `CultSalary::Claimant` (r:2 w:2)
/// Proof: `CultSalary::Claimant` (`max_values`: None, `max_size`: Some(78), added: 2553, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::IndexToId` (r:0 w:2)
/// Proof: `CultCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
fn exchange_member() -> Weight {
// Proof Size summary in bytes:
// Measured: `698`
// Estimated: `69046`
// Minimum execution time: 271_034_000 picoseconds.
Weight::from_parts(273_243_000, 0)
.saturating_add(Weight::from_parts(0, 69046))
.saturating_add(T::DbWeight::get().reads(11))
.saturating_add(T::DbWeight::get().writes(14))
}
}

View File

@@ -0,0 +1,537 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_referenda`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-08-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_referenda
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_referenda.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_referenda`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// Storage: `CultCollective::Members` (r:1 w:0)
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `CultReferenda::ReferendumCount` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
/// Storage: `CultReferenda::ReferendumInfoFor` (r:0 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
fn submit() -> Weight {
// Proof Size summary in bytes:
// Measured: `491`
// Estimated: `13928`
// Minimum execution time: 271_563_000 picoseconds.
Weight::from_parts(306_859_000, 0)
.saturating_add(Weight::from_parts(0, 13928))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn place_decision_deposit_preparing() -> Weight {
// Proof Size summary in bytes:
// Measured: `399`
// Estimated: `26866`
// Minimum execution time: 345_999_000 picoseconds.
Weight::from_parts(359_026_000, 0)
.saturating_add(Weight::from_parts(0, 26866))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `CultReferenda::DecidingCount` (r:1 w:0)
/// Proof: `CultReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `CultReferenda::TrackQueue` (r:1 w:1)
/// Proof: `CultReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(812), added: 3287, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn place_decision_deposit_queued() -> Weight {
// Proof Size summary in bytes:
// Measured: `2037`
// Estimated: `13928`
// Minimum execution time: 407_615_000 picoseconds.
Weight::from_parts(438_553_000, 0)
.saturating_add(Weight::from_parts(0, 13928))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `CultReferenda::DecidingCount` (r:1 w:0)
/// Proof: `CultReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `CultReferenda::TrackQueue` (r:1 w:1)
/// Proof: `CultReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(812), added: 3287, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn place_decision_deposit_not_queued() -> Weight {
// Proof Size summary in bytes:
// Measured: `2078`
// Estimated: `13928`
// Minimum execution time: 261_093_000 picoseconds.
Weight::from_parts(265_172_000, 0)
.saturating_add(Weight::from_parts(0, 13928))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `CultReferenda::DecidingCount` (r:1 w:1)
/// Proof: `CultReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::MemberCount` (r:1 w:0)
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn place_decision_deposit_passing() -> Weight {
// Proof Size summary in bytes:
// Measured: `768`
// Estimated: `26866`
// Minimum execution time: 353_944_000 picoseconds.
Weight::from_parts(363_500_000, 0)
.saturating_add(Weight::from_parts(0, 26866))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `CultReferenda::DecidingCount` (r:1 w:1)
/// Proof: `CultReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::MemberCount` (r:1 w:0)
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn place_decision_deposit_failing() -> Weight {
// Proof Size summary in bytes:
// Measured: `734`
// Estimated: `26866`
// Minimum execution time: 220_837_000 picoseconds.
Weight::from_parts(223_023_000, 0)
.saturating_add(Weight::from_parts(0, 26866))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
fn refund_decision_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `351`
// Estimated: `3795`
// Minimum execution time: 105_825_000 picoseconds.
Weight::from_parts(107_256_000, 0)
.saturating_add(Weight::from_parts(0, 3795))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
fn refund_submission_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `304`
// Estimated: `3795`
// Minimum execution time: 105_222_000 picoseconds.
Weight::from_parts(106_172_000, 0)
.saturating_add(Weight::from_parts(0, 3795))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn cancel() -> Weight {
// Proof Size summary in bytes:
// Measured: `344`
// Estimated: `26866`
// Minimum execution time: 123_694_000 picoseconds.
Weight::from_parts(124_961_000, 0)
.saturating_add(Weight::from_parts(0, 26866))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
/// Storage: `CultReferenda::MetadataOf` (r:1 w:0)
/// Proof: `CultReferenda::MetadataOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn kill() -> Weight {
// Proof Size summary in bytes:
// Measured: `548`
// Estimated: `26866`
// Minimum execution time: 329_538_000 picoseconds.
Weight::from_parts(332_131_000, 0)
.saturating_add(Weight::from_parts(0, 26866))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `CultReferenda::TrackQueue` (r:1 w:0)
/// Proof: `CultReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(812), added: 3287, mode: `MaxEncodedLen`)
/// Storage: `CultReferenda::DecidingCount` (r:1 w:1)
/// Proof: `CultReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
fn one_fewer_deciding_queue_empty() -> Weight {
// Proof Size summary in bytes:
// Measured: `174`
// Estimated: `4277`
// Minimum execution time: 38_477_000 picoseconds.
Weight::from_parts(39_216_000, 0)
.saturating_add(Weight::from_parts(0, 4277))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `CultReferenda::TrackQueue` (r:1 w:1)
/// Proof: `CultReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(812), added: 3287, mode: `MaxEncodedLen`)
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::MemberCount` (r:1 w:0)
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
fn one_fewer_deciding_failing() -> Weight {
// Proof Size summary in bytes:
// Measured: `2356`
// Estimated: `13928`
// Minimum execution time: 212_067_000 picoseconds.
Weight::from_parts(215_809_000, 0)
.saturating_add(Weight::from_parts(0, 13928))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `CultReferenda::TrackQueue` (r:1 w:1)
/// Proof: `CultReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(812), added: 3287, mode: `MaxEncodedLen`)
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::MemberCount` (r:1 w:0)
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
fn one_fewer_deciding_passing() -> Weight {
// Proof Size summary in bytes:
// Measured: `2356`
// Estimated: `13928`
// Minimum execution time: 214_401_000 picoseconds.
Weight::from_parts(216_549_000, 0)
.saturating_add(Weight::from_parts(0, 13928))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:0)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `CultReferenda::TrackQueue` (r:1 w:1)
/// Proof: `CultReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(812), added: 3287, mode: `MaxEncodedLen`)
fn nudge_referendum_requeued_insertion() -> Weight {
// Proof Size summary in bytes:
// Measured: `1841`
// Estimated: `4277`
// Minimum execution time: 93_699_000 picoseconds.
Weight::from_parts(95_154_000, 0)
.saturating_add(Weight::from_parts(0, 4277))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:0)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `CultReferenda::TrackQueue` (r:1 w:1)
/// Proof: `CultReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(812), added: 3287, mode: `MaxEncodedLen`)
fn nudge_referendum_requeued_slide() -> Weight {
// Proof Size summary in bytes:
// Measured: `1808`
// Estimated: `4277`
// Minimum execution time: 92_829_000 picoseconds.
Weight::from_parts(94_785_000, 0)
.saturating_add(Weight::from_parts(0, 4277))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `CultReferenda::DecidingCount` (r:1 w:0)
/// Proof: `CultReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `CultReferenda::TrackQueue` (r:1 w:1)
/// Proof: `CultReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(812), added: 3287, mode: `MaxEncodedLen`)
fn nudge_referendum_queued() -> Weight {
// Proof Size summary in bytes:
// Measured: `1824`
// Estimated: `4277`
// Minimum execution time: 117_686_000 picoseconds.
Weight::from_parts(119_841_000, 0)
.saturating_add(Weight::from_parts(0, 4277))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `CultReferenda::DecidingCount` (r:1 w:0)
/// Proof: `CultReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `CultReferenda::TrackQueue` (r:1 w:1)
/// Proof: `CultReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(812), added: 3287, mode: `MaxEncodedLen`)
fn nudge_referendum_not_queued() -> Weight {
// Proof Size summary in bytes:
// Measured: `1865`
// Estimated: `4277`
// Minimum execution time: 118_158_000 picoseconds.
Weight::from_parts(119_943_000, 0)
.saturating_add(Weight::from_parts(0, 4277))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
fn nudge_referendum_no_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `296`
// Estimated: `13928`
// Minimum execution time: 83_935_000 picoseconds.
Weight::from_parts(84_946_000, 0)
.saturating_add(Weight::from_parts(0, 13928))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
fn nudge_referendum_preparing() -> Weight {
// Proof Size summary in bytes:
// Measured: `344`
// Estimated: `13928`
// Minimum execution time: 83_826_000 picoseconds.
Weight::from_parts(84_883_000, 0)
.saturating_add(Weight::from_parts(0, 13928))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
fn nudge_referendum_timed_out() -> Weight {
// Proof Size summary in bytes:
// Measured: `242`
// Estimated: `3795`
// Minimum execution time: 56_837_000 picoseconds.
Weight::from_parts(57_686_000, 0)
.saturating_add(Weight::from_parts(0, 3795))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `CultReferenda::DecidingCount` (r:1 w:1)
/// Proof: `CultReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::MemberCount` (r:1 w:0)
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
fn nudge_referendum_begin_deciding_failing() -> Weight {
// Proof Size summary in bytes:
// Measured: `679`
// Estimated: `13928`
// Minimum execution time: 125_429_000 picoseconds.
Weight::from_parts(127_334_000, 0)
.saturating_add(Weight::from_parts(0, 13928))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `CultReferenda::DecidingCount` (r:1 w:1)
/// Proof: `CultReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::MemberCount` (r:1 w:0)
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
fn nudge_referendum_begin_deciding_passing() -> Weight {
// Proof Size summary in bytes:
// Measured: `713`
// Estimated: `13928`
// Minimum execution time: 192_281_000 picoseconds.
Weight::from_parts(195_794_000, 0)
.saturating_add(Weight::from_parts(0, 13928))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::MemberCount` (r:1 w:0)
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
fn nudge_referendum_begin_confirming() -> Weight {
// Proof Size summary in bytes:
// Measured: `764`
// Estimated: `13928`
// Minimum execution time: 230_411_000 picoseconds.
Weight::from_parts(234_602_000, 0)
.saturating_add(Weight::from_parts(0, 13928))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::MemberCount` (r:1 w:0)
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
fn nudge_referendum_end_confirming() -> Weight {
// Proof Size summary in bytes:
// Measured: `749`
// Estimated: `13928`
// Minimum execution time: 211_689_000 picoseconds.
Weight::from_parts(233_824_000, 0)
.saturating_add(Weight::from_parts(0, 13928))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::MemberCount` (r:1 w:0)
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
fn nudge_referendum_continue_not_confirming() -> Weight {
// Proof Size summary in bytes:
// Measured: `764`
// Estimated: `13928`
// Minimum execution time: 222_475_000 picoseconds.
Weight::from_parts(233_253_000, 0)
.saturating_add(Weight::from_parts(0, 13928))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::MemberCount` (r:1 w:0)
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
fn nudge_referendum_continue_confirming() -> Weight {
// Proof Size summary in bytes:
// Measured: `770`
// Estimated: `13928`
// Minimum execution time: 158_148_000 picoseconds.
Weight::from_parts(161_486_000, 0)
.saturating_add(Weight::from_parts(0, 13928))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::MemberCount` (r:1 w:0)
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Lookup` (r:1 w:1)
/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
fn nudge_referendum_approved() -> Weight {
// Proof Size summary in bytes:
// Measured: `770`
// Estimated: `26866`
// Minimum execution time: 246_542_000 picoseconds.
Weight::from_parts(273_256_000, 0)
.saturating_add(Weight::from_parts(0, 26866))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::MemberCount` (r:1 w:0)
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
fn nudge_referendum_rejected() -> Weight {
// Proof Size summary in bytes:
// Measured: `766`
// Estimated: `13928`
// Minimum execution time: 203_428_000 picoseconds.
Weight::from_parts(228_944_000, 0)
.saturating_add(Weight::from_parts(0, 13928))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:0)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:0)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `CultReferenda::MetadataOf` (r:0 w:1)
/// Proof: `CultReferenda::MetadataOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
fn set_some_metadata() -> Weight {
// Proof Size summary in bytes:
// Measured: `420`
// Estimated: `3795`
// Minimum execution time: 76_891_000 picoseconds.
Weight::from_parts(78_187_000, 0)
.saturating_add(Weight::from_parts(0, 3795))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:0)
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
/// Storage: `CultReferenda::MetadataOf` (r:1 w:1)
/// Proof: `CultReferenda::MetadataOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
fn clear_metadata() -> Weight {
// Proof Size summary in bytes:
// Measured: `319`
// Estimated: `3795`
// Minimum execution time: 62_364_000 picoseconds.
Weight::from_parts(63_236_000, 0)
.saturating_add(Weight::from_parts(0, 3795))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
}

View File

@@ -0,0 +1,153 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_salary`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-08-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_salary
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_salary.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_salary`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_salary::WeightInfo for WeightInfo<T> {
/// Storage: `CultSalary::Status` (r:1 w:1)
/// Proof: `CultSalary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
fn init() -> Weight {
// Proof Size summary in bytes:
// Measured: `6`
// Estimated: `1541`
// Minimum execution time: 32_706_000 picoseconds.
Weight::from_parts(33_774_000, 0)
.saturating_add(Weight::from_parts(0, 1541))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `CultSalary::Status` (r:1 w:1)
/// Proof: `CultSalary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
fn bump() -> Weight {
// Proof Size summary in bytes:
// Measured: `87`
// Estimated: `1541`
// Minimum execution time: 36_773_000 picoseconds.
Weight::from_parts(37_441_000, 0)
.saturating_add(Weight::from_parts(0, 1541))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `CultSalary::Status` (r:1 w:0)
/// Proof: `CultSalary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::Members` (r:1 w:0)
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `CultSalary::Claimant` (r:1 w:1)
/// Proof: `CultSalary::Claimant` (`max_values`: None, `max_size`: Some(78), added: 2553, mode: `MaxEncodedLen`)
fn induct() -> Weight {
// Proof Size summary in bytes:
// Measured: `501`
// Estimated: `3543`
// Minimum execution time: 68_175_000 picoseconds.
Weight::from_parts(69_367_000, 0)
.saturating_add(Weight::from_parts(0, 3543))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `CultCollective::Members` (r:1 w:0)
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `CultSalary::Status` (r:1 w:1)
/// Proof: `CultSalary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
/// Storage: `CultSalary::Claimant` (r:1 w:1)
/// Proof: `CultSalary::Claimant` (`max_values`: None, `max_size`: Some(78), added: 2553, mode: `MaxEncodedLen`)
fn register() -> Weight {
// Proof Size summary in bytes:
// Measured: `568`
// Estimated: `3543`
// Minimum execution time: 73_214_000 picoseconds.
Weight::from_parts(74_504_000, 0)
.saturating_add(Weight::from_parts(0, 3543))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `CultSalary::Status` (r:1 w:1)
/// Proof: `CultSalary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
/// Storage: `CultSalary::Claimant` (r:1 w:1)
/// Proof: `CultSalary::Claimant` (`max_values`: None, `max_size`: Some(78), added: 2553, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::Members` (r:1 w:0)
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
fn payout() -> Weight {
// Proof Size summary in bytes:
// Measured: `568`
// Estimated: `3543`
// Minimum execution time: 211_221_000 picoseconds.
Weight::from_parts(212_656_000, 0)
.saturating_add(Weight::from_parts(0, 3543))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `CultSalary::Status` (r:1 w:1)
/// Proof: `CultSalary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
/// Storage: `CultSalary::Claimant` (r:1 w:1)
/// Proof: `CultSalary::Claimant` (`max_values`: None, `max_size`: Some(78), added: 2553, mode: `MaxEncodedLen`)
/// Storage: `CultCollective::Members` (r:1 w:0)
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn payout_other() -> Weight {
// Proof Size summary in bytes:
// Measured: `568`
// Estimated: `3593`
// Minimum execution time: 213_501_000 picoseconds.
Weight::from_parts(214_674_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `CultSalary::Status` (r:1 w:1)
/// Proof: `CultSalary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
/// Storage: `CultSalary::Claimant` (r:1 w:1)
/// Proof: `CultSalary::Claimant` (`max_values`: None, `max_size`: Some(78), added: 2553, mode: `MaxEncodedLen`)
fn check_payment() -> Weight {
// Proof Size summary in bytes:
// Measured: `171`
// Estimated: `3543`
// Minimum execution time: 41_227_000 picoseconds.
Weight::from_parts(41_594_000, 0)
.saturating_add(Weight::from_parts(0, 3543))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
}

View File

@@ -0,0 +1,286 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_scheduler`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-08-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_scheduler
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_scheduler.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_scheduler`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> {
/// Storage: `Scheduler::IncompleteSince` (r:1 w:1)
/// Proof: `Scheduler::IncompleteSince` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn service_agendas_base() -> Weight {
// Proof Size summary in bytes:
// Measured: `30`
// Estimated: `1489`
// Minimum execution time: 14_819_000 picoseconds.
Weight::from_parts(15_186_000, 0)
.saturating_add(Weight::from_parts(0, 1489))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 50]`.
fn service_agenda_base(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `77 + s * (177 ±0)`
// Estimated: `13928`
// Minimum execution time: 18_503_000 picoseconds.
Weight::from_parts(27_515_314, 0)
.saturating_add(Weight::from_parts(0, 13928))
// Standard Error: 4_293
.saturating_add(Weight::from_parts(1_235_722, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
fn service_task_base() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 14_076_000 picoseconds.
Weight::from_parts(14_272_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `Preimage::PreimageFor` (r:1 w:1)
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`)
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// The range of component `s` is `[128, 4194304]`.
fn service_task_fetched(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `213 + s * (1 ±0)`
// Estimated: `3678 + s * (1 ±0)`
// Minimum execution time: 69_682_000 picoseconds.
Weight::from_parts(70_459_000, 0)
.saturating_add(Weight::from_parts(0, 3678))
// Standard Error: 25
.saturating_add(Weight::from_parts(3_260, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
.saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into()))
}
/// Storage: `Scheduler::Lookup` (r:0 w:1)
/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
fn service_task_named() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 20_275_000 picoseconds.
Weight::from_parts(20_772_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
fn service_task_periodic() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 14_080_000 picoseconds.
Weight::from_parts(14_259_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn execute_dispatch_signed() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 11_075_000 picoseconds.
Weight::from_parts(11_416_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn execute_dispatch_unsigned() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 10_983_000 picoseconds.
Weight::from_parts(11_168_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 49]`.
fn schedule(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `77 + s * (177 ±0)`
// Estimated: `13928`
// Minimum execution time: 46_875_000 picoseconds.
Weight::from_parts(54_427_669, 0)
.saturating_add(Weight::from_parts(0, 13928))
// Standard Error: 5_759
.saturating_add(Weight::from_parts(1_282_517, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Lookup` (r:0 w:1)
/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// The range of component `s` is `[1, 50]`.
fn cancel(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `77 + s * (177 ±0)`
// Estimated: `13928`
// Minimum execution time: 66_317_000 picoseconds.
Weight::from_parts(64_165_317, 0)
.saturating_add(Weight::from_parts(0, 13928))
// Standard Error: 6_122
.saturating_add(Weight::from_parts(1_989_423, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Scheduler::Lookup` (r:1 w:1)
/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 49]`.
fn schedule_named(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `254 + s * (185 ±0)`
// Estimated: `13928`
// Minimum execution time: 58_571_000 picoseconds.
Weight::from_parts(70_239_408, 0)
.saturating_add(Weight::from_parts(0, 13928))
// Standard Error: 7_226
.saturating_add(Weight::from_parts(1_332_263, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Scheduler::Lookup` (r:1 w:1)
/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
/// The range of component `s` is `[1, 50]`.
fn cancel_named(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `280 + s * (185 ±0)`
// Estimated: `13928`
// Minimum execution time: 73_281_000 picoseconds.
Weight::from_parts(73_250_179, 0)
.saturating_add(Weight::from_parts(0, 13928))
// Standard Error: 6_858
.saturating_add(Weight::from_parts(2_049_531, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
/// The range of component `s` is `[1, 50]`.
fn schedule_retry(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `117`
// Estimated: `13928`
// Minimum execution time: 40_949_000 picoseconds.
Weight::from_parts(42_172_132, 0)
.saturating_add(Weight::from_parts(0, 13928))
// Standard Error: 3_444
.saturating_add(Weight::from_parts(44_459, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Scheduler::Agenda` (r:1 w:0)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn set_retry() -> Weight {
// Proof Size summary in bytes:
// Measured: `8927`
// Estimated: `13928`
// Minimum execution time: 94_947_000 picoseconds.
Weight::from_parts(96_426_000, 0)
.saturating_add(Weight::from_parts(0, 13928))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Scheduler::Lookup` (r:1 w:0)
/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:0)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn set_retry_named() -> Weight {
// Proof Size summary in bytes:
// Measured: `9605`
// Estimated: `13928`
// Minimum execution time: 111_321_000 picoseconds.
Weight::from_parts(112_931_000, 0)
.saturating_add(Weight::from_parts(0, 13928))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Scheduler::Agenda` (r:1 w:0)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn cancel_retry() -> Weight {
// Proof Size summary in bytes:
// Measured: `8939`
// Estimated: `13928`
// Minimum execution time: 91_427_000 picoseconds.
Weight::from_parts(92_904_000, 0)
.saturating_add(Weight::from_parts(0, 13928))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Scheduler::Lookup` (r:1 w:0)
/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:0)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn cancel_retry_named() -> Weight {
// Proof Size summary in bytes:
// Measured: `9617`
// Estimated: `13928`
// Minimum execution time: 108_471_000 picoseconds.
Weight::from_parts(110_205_000, 0)
.saturating_add(Weight::from_parts(0, 13928))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
}

View File

@@ -0,0 +1,81 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_session`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-08-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_session
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_session.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_session`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_session::WeightInfo for WeightInfo<T> {
/// Storage: `Staking::Ledger` (r:1 w:0)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Session::NextKeys` (r:1 w:1)
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Session::KeyOwner` (r:4 w:4)
/// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn set_keys() -> Weight {
// Proof Size summary in bytes:
// Measured: `1764`
// Estimated: `12654`
// Minimum execution time: 165_108_000 picoseconds.
Weight::from_parts(167_458_000, 0)
.saturating_add(Weight::from_parts(0, 12654))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `Staking::Ledger` (r:1 w:0)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Session::NextKeys` (r:1 w:1)
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Session::KeyOwner` (r:0 w:4)
/// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn purge_keys() -> Weight {
// Proof Size summary in bytes:
// Measured: `1680`
// Estimated: `5145`
// Minimum execution time: 119_549_000 picoseconds.
Weight::from_parts(121_281_000, 0)
.saturating_add(Weight::from_parts(0, 5145))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(5))
}
}

View File

@@ -0,0 +1,847 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_staking`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_staking
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_staking.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_staking`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
/// Storage: `Staking::Bonded` (r:1 w:1)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:1)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::VirtualStakers` (r:1 w:0)
/// Proof: `Staking::VirtualStakers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `Staking::Payee` (r:0 w:1)
/// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn bond() -> Weight {
// Proof Size summary in bytes:
// Measured: `1004`
// Estimated: `4764`
// Minimum execution time: 338_498_000 picoseconds.
Weight::from_parts(386_720_000, 0)
.saturating_add(Weight::from_parts(0, 4764))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:1)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::VirtualStakers` (r:1 w:0)
/// Proof: `Staking::VirtualStakers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListNodes` (r:3 w:3)
/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListBags` (r:2 w:2)
/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
fn bond_extra() -> Weight {
// Proof Size summary in bytes:
// Measured: `1921`
// Estimated: `8877`
// Minimum execution time: 661_452_000 picoseconds.
Weight::from_parts(712_052_000, 0)
.saturating_add(Weight::from_parts(0, 8877))
.saturating_add(T::DbWeight::get().reads(10))
.saturating_add(T::DbWeight::get().writes(7))
}
/// Storage: `Staking::Ledger` (r:1 w:1)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Nominators` (r:1 w:0)
/// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(558), added: 3033, mode: `MaxEncodedLen`)
/// Storage: `Staking::MinNominatorBond` (r:1 w:0)
/// Proof: `Staking::MinNominatorBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `Staking::CurrentEra` (r:1 w:0)
/// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::VirtualStakers` (r:1 w:0)
/// Proof: `Staking::VirtualStakers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListNodes` (r:3 w:3)
/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListBags` (r:2 w:2)
/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
fn unbond() -> Weight {
// Proof Size summary in bytes:
// Measured: `2128`
// Estimated: `8877`
// Minimum execution time: 696_538_000 picoseconds.
Weight::from_parts(750_706_000, 0)
.saturating_add(Weight::from_parts(0, 8877))
.saturating_add(T::DbWeight::get().reads(13))
.saturating_add(T::DbWeight::get().writes(7))
}
/// Storage: `Staking::Ledger` (r:1 w:1)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::CurrentEra` (r:1 w:0)
/// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::VirtualStakers` (r:1 w:0)
/// Proof: `Staking::VirtualStakers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::ReversePoolIdLookup` (r:1 w:0)
/// Proof: `NominationPools::ReversePoolIdLookup` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 100]`.
fn withdraw_unbonded_update(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1189`
// Estimated: `4764`
// Minimum execution time: 240_569_000 picoseconds.
Weight::from_parts(373_957_113, 0)
.saturating_add(Weight::from_parts(0, 4764))
// Standard Error: 24_005
.saturating_add(Weight::from_parts(504_716, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Staking::Ledger` (r:1 w:1)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:1)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::CurrentEra` (r:1 w:0)
/// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::SlashingSpans` (r:1 w:1)
/// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Staking::VirtualStakers` (r:1 w:1)
/// Proof: `Staking::VirtualStakers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `Staking::Validators` (r:1 w:0)
/// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
/// Storage: `Staking::Nominators` (r:1 w:1)
/// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(558), added: 3033, mode: `MaxEncodedLen`)
/// Storage: `Staking::CounterForNominators` (r:1 w:1)
/// Proof: `Staking::CounterForNominators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListNodes` (r:2 w:2)
/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListBags` (r:1 w:1)
/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
/// Storage: `VoterList::CounterForListNodes` (r:1 w:1)
/// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::Payee` (r:0 w:1)
/// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Staking::SpanSlash` (r:0 w:100)
/// Proof: `Staking::SpanSlash` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 100]`.
fn withdraw_unbonded_kill(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `2127 + s * (4 ±0)`
// Estimated: `6248 + s * (4 ±0)`
// Minimum execution time: 431_599_000 picoseconds.
Weight::from_parts(815_489_622, 0)
.saturating_add(Weight::from_parts(0, 6248))
// Standard Error: 383_786
.saturating_add(Weight::from_parts(3_974_343, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(14))
.saturating_add(T::DbWeight::get().writes(12))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
.saturating_add(Weight::from_parts(0, 4).saturating_mul(s.into()))
}
/// Storage: `Staking::Ledger` (r:1 w:0)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::MinValidatorBond` (r:1 w:0)
/// Proof: `Staking::MinValidatorBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `Staking::MinCommission` (r:1 w:0)
/// Proof: `Staking::MinCommission` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::Validators` (r:1 w:1)
/// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
/// Storage: `Staking::MaxValidatorsCount` (r:1 w:0)
/// Proof: `Staking::MaxValidatorsCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::Nominators` (r:1 w:0)
/// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(558), added: 3033, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListNodes` (r:1 w:1)
/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListBags` (r:1 w:1)
/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
/// Storage: `VoterList::CounterForListNodes` (r:1 w:1)
/// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::CounterForValidators` (r:1 w:1)
/// Proof: `Staking::CounterForValidators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn validate() -> Weight {
// Proof Size summary in bytes:
// Measured: `1266`
// Estimated: `4556`
// Minimum execution time: 218_840_000 picoseconds.
Weight::from_parts(237_793_000, 0)
.saturating_add(Weight::from_parts(0, 4556))
.saturating_add(T::DbWeight::get().reads(11))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `Staking::Ledger` (r:1 w:0)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Nominators` (r:128 w:128)
/// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(558), added: 3033, mode: `MaxEncodedLen`)
/// The range of component `k` is `[1, 128]`.
fn kick(k: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1709 + k * (572 ±0)`
// Estimated: `4556 + k * (3033 ±0)`
// Minimum execution time: 127_973_000 picoseconds.
Weight::from_parts(597_225_750, 0)
.saturating_add(Weight::from_parts(0, 4556))
// Standard Error: 324_699
.saturating_add(Weight::from_parts(19_393_381, 0).saturating_mul(k.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into())))
.saturating_add(Weight::from_parts(0, 3033).saturating_mul(k.into()))
}
/// Storage: `Staking::Ledger` (r:1 w:0)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::MinNominatorBond` (r:1 w:0)
/// Proof: `Staking::MinNominatorBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `Staking::Nominators` (r:1 w:1)
/// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(558), added: 3033, mode: `MaxEncodedLen`)
/// Storage: `Staking::MaxNominatorsCount` (r:1 w:0)
/// Proof: `Staking::MaxNominatorsCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::Validators` (r:17 w:0)
/// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
/// Storage: `Staking::CurrentEra` (r:1 w:0)
/// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListNodes` (r:2 w:2)
/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListBags` (r:1 w:1)
/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
/// Storage: `VoterList::CounterForListNodes` (r:1 w:1)
/// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::CounterForNominators` (r:1 w:1)
/// Proof: `Staking::CounterForNominators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// The range of component `n` is `[1, 16]`.
fn nominate(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1760 + n * (102 ±0)`
// Estimated: `6248 + n * (2520 ±0)`
// Minimum execution time: 249_923_000 picoseconds.
Weight::from_parts(244_536_929, 0)
.saturating_add(Weight::from_parts(0, 6248))
// Standard Error: 44_547
.saturating_add(Weight::from_parts(13_536_858, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(12))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(6))
.saturating_add(Weight::from_parts(0, 2520).saturating_mul(n.into()))
}
/// Storage: `Staking::Ledger` (r:1 w:0)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Validators` (r:1 w:0)
/// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
/// Storage: `Staking::Nominators` (r:1 w:1)
/// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(558), added: 3033, mode: `MaxEncodedLen`)
/// Storage: `Staking::CounterForNominators` (r:1 w:1)
/// Proof: `Staking::CounterForNominators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListNodes` (r:2 w:2)
/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListBags` (r:1 w:1)
/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
/// Storage: `VoterList::CounterForListNodes` (r:1 w:1)
/// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn chill() -> Weight {
// Proof Size summary in bytes:
// Measured: `1710`
// Estimated: `6248`
// Minimum execution time: 217_259_000 picoseconds.
Weight::from_parts(222_020_000, 0)
.saturating_add(Weight::from_parts(0, 6248))
.saturating_add(T::DbWeight::get().reads(9))
.saturating_add(T::DbWeight::get().writes(6))
}
/// Storage: `Staking::Ledger` (r:1 w:0)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Payee` (r:0 w:1)
/// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn set_payee() -> Weight {
// Proof Size summary in bytes:
// Measured: `796`
// Estimated: `4556`
// Minimum execution time: 78_429_000 picoseconds.
Weight::from_parts(80_713_000, 0)
.saturating_add(Weight::from_parts(0, 4556))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Staking::Ledger` (r:1 w:0)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Payee` (r:1 w:1)
/// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn update_payee() -> Weight {
// Proof Size summary in bytes:
// Measured: `863`
// Estimated: `4556`
// Minimum execution time: 91_087_000 picoseconds.
Weight::from_parts(93_237_000, 0)
.saturating_add(Weight::from_parts(0, 4556))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Staking::Bonded` (r:1 w:1)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:2 w:2)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
fn set_controller() -> Weight {
// Proof Size summary in bytes:
// Measured: `796`
// Estimated: `8122`
// Minimum execution time: 88_084_000 picoseconds.
Weight::from_parts(89_025_000, 0)
.saturating_add(Weight::from_parts(0, 8122))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Staking::ValidatorCount` (r:0 w:1)
/// Proof: `Staking::ValidatorCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn set_validator_count() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 12_031_000 picoseconds.
Weight::from_parts(12_270_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Staking::ForceEra` (r:0 w:1)
/// Proof: `Staking::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
fn force_no_eras() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 37_611_000 picoseconds.
Weight::from_parts(38_280_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Staking::ForceEra` (r:0 w:1)
/// Proof: `Staking::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
fn force_new_era() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 37_820_000 picoseconds.
Weight::from_parts(39_125_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Staking::ForceEra` (r:0 w:1)
/// Proof: `Staking::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
fn force_new_era_always() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 37_282_000 picoseconds.
Weight::from_parts(38_356_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Staking::Invulnerables` (r:0 w:1)
/// Proof: `Staking::Invulnerables` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// The range of component `v` is `[0, 1000]`.
fn set_invulnerables(v: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 13_308_000 picoseconds.
Weight::from_parts(14_766_882, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 294
.saturating_add(Weight::from_parts(31_704, 0).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Staking::Ledger` (r:10628 w:10628)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:5314 w:5314)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Payee` (r:5314 w:0)
/// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// The range of component `i` is `[0, 5314]`.
fn deprecate_controller_batch(i: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1631 + i * (227 ±0)`
// Estimated: `990 + i * (7132 ±0)`
// Minimum execution time: 21_760_000 picoseconds.
Weight::from_parts(22_276_000, 0)
.saturating_add(Weight::from_parts(0, 990))
// Standard Error: 147_182
.saturating_add(Weight::from_parts(97_693_277, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(i.into())))
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(i.into())))
.saturating_add(Weight::from_parts(0, 7132).saturating_mul(i.into()))
}
/// Storage: `Staking::SlashingSpans` (r:1 w:1)
/// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Staking::Bonded` (r:1 w:1)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:1)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::VirtualStakers` (r:1 w:1)
/// Proof: `Staking::VirtualStakers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Staking::Validators` (r:1 w:0)
/// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
/// Storage: `Staking::Nominators` (r:1 w:1)
/// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(558), added: 3033, mode: `MaxEncodedLen`)
/// Storage: `Staking::CounterForNominators` (r:1 w:1)
/// Proof: `Staking::CounterForNominators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListNodes` (r:2 w:2)
/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListBags` (r:1 w:1)
/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
/// Storage: `VoterList::CounterForListNodes` (r:1 w:1)
/// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::Payee` (r:0 w:1)
/// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Staking::SpanSlash` (r:0 w:100)
/// Proof: `Staking::SpanSlash` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 100]`.
fn force_unstake(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `2127 + s * (4 ±0)`
// Estimated: `6248 + s * (4 ±0)`
// Minimum execution time: 323_185_000 picoseconds.
Weight::from_parts(337_339_097, 0)
.saturating_add(Weight::from_parts(0, 6248))
// Standard Error: 11_397
.saturating_add(Weight::from_parts(4_408_240, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(14))
.saturating_add(T::DbWeight::get().writes(13))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
.saturating_add(Weight::from_parts(0, 4).saturating_mul(s.into()))
}
/// Storage: `Staking::UnappliedSlashes` (r:1 w:1)
/// Proof: `Staking::UnappliedSlashes` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `s` is `[1, 1000]`.
fn cancel_deferred_slash(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `66568`
// Estimated: `70033`
// Minimum execution time: 437_005_000 picoseconds.
Weight::from_parts(3_003_988_272, 0)
.saturating_add(Weight::from_parts(0, 70033))
// Standard Error: 185_994
.saturating_add(Weight::from_parts(15_645_000, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Staking::Bonded` (r:513 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:513 w:513)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::ErasStakersClipped` (r:1 w:0)
/// Proof: `Staking::ErasStakersClipped` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Staking::ErasStakersOverview` (r:1 w:0)
/// Proof: `Staking::ErasStakersOverview` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
/// Storage: `Staking::ClaimedRewards` (r:1 w:1)
/// Proof: `Staking::ClaimedRewards` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Staking::CurrentEra` (r:1 w:0)
/// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::ErasValidatorReward` (r:1 w:0)
/// Proof: `Staking::ErasValidatorReward` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `Staking::VirtualStakers` (r:513 w:0)
/// Proof: `Staking::VirtualStakers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:513 w:513)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:513 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:513 w:513)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Staking::ErasStakersPaged` (r:1 w:0)
/// Proof: `Staking::ErasStakersPaged` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Staking::ErasRewardPoints` (r:1 w:0)
/// Proof: `Staking::ErasRewardPoints` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Staking::ErasValidatorPrefs` (r:1 w:0)
/// Proof: `Staking::ErasValidatorPrefs` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Staking::Payee` (r:513 w:0)
/// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 512]`.
fn payout_stakers_alive_staked(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `58361 + n * (391 ±0)`
// Estimated: `53178 + n * (3774 ±0)`
// Minimum execution time: 583_180_000 picoseconds.
Weight::from_parts(842_483_973, 0)
.saturating_add(Weight::from_parts(0, 53178))
// Standard Error: 216_817
.saturating_add(Weight::from_parts(207_149_899, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(15))
.saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(4))
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 3774).saturating_mul(n.into()))
}
/// Storage: `Staking::Ledger` (r:1 w:1)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::VirtualStakers` (r:1 w:0)
/// Proof: `Staking::VirtualStakers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListNodes` (r:3 w:3)
/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListBags` (r:2 w:2)
/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
/// The range of component `l` is `[1, 32]`.
fn rebond(l: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1922 + l * (7 ±0)`
// Estimated: `8877`
// Minimum execution time: 336_912_000 picoseconds.
Weight::from_parts(340_230_283, 0)
.saturating_add(Weight::from_parts(0, 8877))
// Standard Error: 8_240
.saturating_add(Weight::from_parts(485_568, 0).saturating_mul(l.into()))
.saturating_add(T::DbWeight::get().reads(10))
.saturating_add(T::DbWeight::get().writes(7))
}
/// Storage: `Staking::VirtualStakers` (r:1 w:1)
/// Proof: `Staking::VirtualStakers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:1)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:1)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::SlashingSpans` (r:1 w:1)
/// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `Staking::Validators` (r:1 w:0)
/// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
/// Storage: `Staking::Nominators` (r:1 w:1)
/// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(558), added: 3033, mode: `MaxEncodedLen`)
/// Storage: `Staking::CounterForNominators` (r:1 w:1)
/// Proof: `Staking::CounterForNominators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListNodes` (r:2 w:2)
/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListBags` (r:1 w:1)
/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
/// Storage: `VoterList::CounterForListNodes` (r:1 w:1)
/// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::Payee` (r:0 w:1)
/// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Staking::SpanSlash` (r:0 w:100)
/// Proof: `Staking::SpanSlash` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// The range of component `s` is `[1, 100]`.
fn reap_stash(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `2127 + s * (4 ±0)`
// Estimated: `6248 + s * (4 ±0)`
// Minimum execution time: 369_161_000 picoseconds.
Weight::from_parts(369_247_756, 0)
.saturating_add(Weight::from_parts(0, 6248))
// Standard Error: 7_786
.saturating_add(Weight::from_parts(4_374_782, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(13))
.saturating_add(T::DbWeight::get().writes(12))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
.saturating_add(Weight::from_parts(0, 4).saturating_mul(s.into()))
}
/// Storage: `VoterList::CounterForListNodes` (r:1 w:0)
/// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListBags` (r:134 w:0)
/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListNodes` (r:110 w:0)
/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:110 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:110 w:0)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::Nominators` (r:110 w:0)
/// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(558), added: 3033, mode: `MaxEncodedLen`)
/// Storage: `Staking::Validators` (r:11 w:0)
/// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
/// Storage: `Staking::CounterForValidators` (r:1 w:0)
/// Proof: `Staking::CounterForValidators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::ValidatorCount` (r:1 w:0)
/// Proof: `Staking::ValidatorCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::MinimumValidatorCount` (r:1 w:0)
/// Proof: `Staking::MinimumValidatorCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::CurrentEra` (r:1 w:1)
/// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::ErasValidatorPrefs` (r:0 w:10)
/// Proof: `Staking::ErasValidatorPrefs` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Staking::ErasStakersPaged` (r:0 w:10)
/// Proof: `Staking::ErasStakersPaged` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Staking::ErasStakersOverview` (r:0 w:10)
/// Proof: `Staking::ErasStakersOverview` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
/// Storage: `Staking::ErasTotalStake` (r:0 w:1)
/// Proof: `Staking::ErasTotalStake` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `Staking::ErasStartSessionIndex` (r:0 w:1)
/// Proof: `Staking::ErasStartSessionIndex` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`)
/// Storage: `Staking::MinimumActiveStake` (r:0 w:1)
/// Proof: `Staking::MinimumActiveStake` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// The range of component `v` is `[1, 10]`.
/// The range of component `n` is `[0, 100]`.
fn new_era(v: u32, n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0 + n * (718 ±0) + v * (3596 ±0)`
// Estimated: `343628 + n * (3566 ±0) + v * (3566 ±0)`
// Minimum execution time: 1_815_047_000 picoseconds.
Weight::from_parts(1_828_204_000, 0)
.saturating_add(Weight::from_parts(0, 343628))
// Standard Error: 6_726_450
.saturating_add(Weight::from_parts(224_873_492, 0).saturating_mul(v.into()))
// Standard Error: 670_253
.saturating_add(Weight::from_parts(69_720_585, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(140))
.saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into())))
.saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(3))
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(v.into())))
.saturating_add(Weight::from_parts(0, 3566).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 3566).saturating_mul(v.into()))
}
/// Storage: `VoterList::CounterForListNodes` (r:1 w:0)
/// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListBags` (r:134 w:0)
/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListNodes` (r:2000 w:0)
/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:2000 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:2000 w:0)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::Nominators` (r:2000 w:0)
/// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(558), added: 3033, mode: `MaxEncodedLen`)
/// Storage: `Staking::Validators` (r:1000 w:0)
/// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
/// Storage: `Staking::MinimumActiveStake` (r:0 w:1)
/// Proof: `Staking::MinimumActiveStake` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// The range of component `v` is `[500, 1000]`.
/// The range of component `n` is `[500, 1000]`.
fn get_npos_voters(v: u32, n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `3071 + n * (909 ±0) + v * (393 ±0)`
// Estimated: `343628 + n * (3566 ±0) + v * (3566 ±0)`
// Minimum execution time: 122_916_627_000 picoseconds.
Weight::from_parts(123_492_844_000, 0)
.saturating_add(Weight::from_parts(0, 343628))
// Standard Error: 1_263_122
.saturating_add(Weight::from_parts(18_060_245, 0).saturating_mul(v.into()))
// Standard Error: 1_263_122
.saturating_add(Weight::from_parts(11_472_643, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(135))
.saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into())))
.saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(Weight::from_parts(0, 3566).saturating_mul(n.into()))
.saturating_add(Weight::from_parts(0, 3566).saturating_mul(v.into()))
}
/// Storage: `Staking::CounterForValidators` (r:1 w:0)
/// Proof: `Staking::CounterForValidators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::Validators` (r:1001 w:0)
/// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
/// The range of component `v` is `[500, 1000]`.
fn get_npos_targets(v: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `875 + v * (50 ±0)`
// Estimated: `3510 + v * (2520 ±0)`
// Minimum execution time: 9_765_731_000 picoseconds.
Weight::from_parts(115_775_558, 0)
.saturating_add(Weight::from_parts(0, 3510))
// Standard Error: 23_034
.saturating_add(Weight::from_parts(19_694_945, 0).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into())))
.saturating_add(Weight::from_parts(0, 2520).saturating_mul(v.into()))
}
/// Storage: `Staking::MinCommission` (r:0 w:1)
/// Proof: `Staking::MinCommission` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::MinValidatorBond` (r:0 w:1)
/// Proof: `Staking::MinValidatorBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `Staking::MaxValidatorsCount` (r:0 w:1)
/// Proof: `Staking::MaxValidatorsCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::MaxStakedRewards` (r:0 w:1)
/// Proof: `Staking::MaxStakedRewards` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `Staking::ChillThreshold` (r:0 w:1)
/// Proof: `Staking::ChillThreshold` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `Staking::MaxNominatorsCount` (r:0 w:1)
/// Proof: `Staking::MaxNominatorsCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::MinNominatorBond` (r:0 w:1)
/// Proof: `Staking::MinNominatorBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
fn set_staking_configs_all_set() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 18_211_000 picoseconds.
Weight::from_parts(18_717_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(7))
}
/// Storage: `Staking::MinCommission` (r:0 w:1)
/// Proof: `Staking::MinCommission` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::MinValidatorBond` (r:0 w:1)
/// Proof: `Staking::MinValidatorBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `Staking::MaxValidatorsCount` (r:0 w:1)
/// Proof: `Staking::MaxValidatorsCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::MaxStakedRewards` (r:0 w:1)
/// Proof: `Staking::MaxStakedRewards` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `Staking::ChillThreshold` (r:0 w:1)
/// Proof: `Staking::ChillThreshold` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `Staking::MaxNominatorsCount` (r:0 w:1)
/// Proof: `Staking::MaxNominatorsCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::MinNominatorBond` (r:0 w:1)
/// Proof: `Staking::MinNominatorBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
fn set_staking_configs_all_remove() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 17_036_000 picoseconds.
Weight::from_parts(17_619_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(7))
}
/// Storage: `Staking::Bonded` (r:1 w:0)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:0)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::Nominators` (r:1 w:1)
/// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(558), added: 3033, mode: `MaxEncodedLen`)
/// Storage: `Staking::ChillThreshold` (r:1 w:0)
/// Proof: `Staking::ChillThreshold` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `Staking::MaxNominatorsCount` (r:1 w:0)
/// Proof: `Staking::MaxNominatorsCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::CounterForNominators` (r:1 w:1)
/// Proof: `Staking::CounterForNominators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::MinNominatorBond` (r:1 w:0)
/// Proof: `Staking::MinNominatorBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `Staking::Validators` (r:1 w:0)
/// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListNodes` (r:2 w:2)
/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
/// Storage: `VoterList::ListBags` (r:1 w:1)
/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
/// Storage: `VoterList::CounterForListNodes` (r:1 w:1)
/// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn chill_other() -> Weight {
// Proof Size summary in bytes:
// Measured: `1833`
// Estimated: `6248`
// Minimum execution time: 257_282_000 picoseconds.
Weight::from_parts(259_826_000, 0)
.saturating_add(Weight::from_parts(0, 6248))
.saturating_add(T::DbWeight::get().reads(12))
.saturating_add(T::DbWeight::get().writes(6))
}
/// Storage: `Staking::MinCommission` (r:1 w:0)
/// Proof: `Staking::MinCommission` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Staking::Validators` (r:1 w:1)
/// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
fn force_apply_min_commission() -> Weight {
// Proof Size summary in bytes:
// Measured: `587`
// Estimated: `3510`
// Minimum execution time: 46_151_000 picoseconds.
Weight::from_parts(46_807_000, 0)
.saturating_add(Weight::from_parts(0, 3510))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Staking::MinCommission` (r:0 w:1)
/// Proof: `Staking::MinCommission` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn set_min_commission() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 12_083_000 picoseconds.
Weight::from_parts(23_149_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Staking::VirtualStakers` (r:1 w:0)
/// Proof: `Staking::VirtualStakers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:1)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:1)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
fn restore_ledger() -> Weight {
// Proof Size summary in bytes:
// Measured: `943`
// Estimated: `4764`
// Minimum execution time: 186_152_000 picoseconds.
Weight::from_parts(187_010_000, 0)
.saturating_add(Weight::from_parts(0, 4764))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(4))
}
}

View File

@@ -0,0 +1,71 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_timestamp`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-08-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_timestamp
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_timestamp.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_timestamp`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_timestamp::WeightInfo for WeightInfo<T> {
/// Storage: `Timestamp::Now` (r:1 w:1)
/// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Babe::CurrentSlot` (r:1 w:0)
/// Proof: `Babe::CurrentSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
fn set() -> Weight {
// Proof Size summary in bytes:
// Measured: `345`
// Estimated: `1493`
// Minimum execution time: 35_760_000 picoseconds.
Weight::from_parts(36_868_000, 0)
.saturating_add(Weight::from_parts(0, 1493))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
fn on_finalize() -> Weight {
// Proof Size summary in bytes:
// Measured: `128`
// Estimated: `0`
// Minimum execution time: 15_654_000 picoseconds.
Weight::from_parts(16_117_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
}

View File

@@ -0,0 +1,61 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_treasury`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-08-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_treasury
// --extrinsic=void_spend
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_treasury.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_treasury`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> {
/// Storage: `Treasury::Spends` (r:1 w:1)
/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
fn void_spend() -> Weight {
// Proof Size summary in bytes:
// Measured: `124`
// Estimated: `3534`
// Minimum execution time: 77_449_000 picoseconds.
Weight::from_parts(88_782_000, 0)
.saturating_add(Weight::from_parts(0, 3534))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
}

View File

@@ -0,0 +1,98 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_utility`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-08-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_utility
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_utility.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_utility`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> {
/// The range of component `c` is `[0, 1000]`.
fn batch(c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 20_509_000 picoseconds.
Weight::from_parts(27_625_885, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 7_840
.saturating_add(Weight::from_parts(11_994_055, 0).saturating_mul(c.into()))
}
fn as_derivative() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 20_665_000 picoseconds.
Weight::from_parts(21_060_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// The range of component `c` is `[0, 1000]`.
fn batch_all(c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 20_675_000 picoseconds.
Weight::from_parts(33_788_704, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 3_192
.saturating_add(Weight::from_parts(13_004_420, 0).saturating_mul(c.into()))
}
fn dispatch_as() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 28_291_000 picoseconds.
Weight::from_parts(28_769_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// The range of component `c` is `[0, 1000]`.
fn force_batch(c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 20_069_000 picoseconds.
Weight::from_parts(36_269_385, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 3_338
.saturating_add(Weight::from_parts(12_004_193, 0).saturating_mul(c.into()))
}
}

View File

@@ -0,0 +1,261 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_vesting`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-08-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_vesting
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_vesting.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_vesting`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_vesting::WeightInfo for WeightInfo<T> {
/// Storage: `Vesting::Vesting` (r:1 w:1)
/// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// The range of component `l` is `[0, 49]`.
/// The range of component `s` is `[1, 28]`.
fn vest_locked(l: u32, s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `277 + l * (25 ±0) + s * (36 ±0)`
// Estimated: `4764`
// Minimum execution time: 122_639_000 picoseconds.
Weight::from_parts(119_788_111, 0)
.saturating_add(Weight::from_parts(0, 4764))
// Standard Error: 3_103
.saturating_add(Weight::from_parts(89_720, 0).saturating_mul(l.into()))
// Standard Error: 5_521
.saturating_add(Weight::from_parts(208_023, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Vesting::Vesting` (r:1 w:1)
/// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// The range of component `l` is `[0, 49]`.
/// The range of component `s` is `[1, 28]`.
fn vest_unlocked(l: u32, s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `277 + l * (25 ±0) + s * (36 ±0)`
// Estimated: `4764`
// Minimum execution time: 129_566_000 picoseconds.
Weight::from_parts(127_309_060, 0)
.saturating_add(Weight::from_parts(0, 4764))
// Standard Error: 1_988
.saturating_add(Weight::from_parts(82_863, 0).saturating_mul(l.into()))
// Standard Error: 3_537
.saturating_add(Weight::from_parts(162_912, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Vesting::Vesting` (r:1 w:1)
/// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `l` is `[0, 49]`.
/// The range of component `s` is `[1, 28]`.
fn vest_other_locked(l: u32, s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `380 + l * (25 ±0) + s * (36 ±0)`
// Estimated: `4764`
// Minimum execution time: 130_629_000 picoseconds.
Weight::from_parts(129_291_209, 0)
.saturating_add(Weight::from_parts(0, 4764))
// Standard Error: 3_291
.saturating_add(Weight::from_parts(62_654, 0).saturating_mul(l.into()))
// Standard Error: 5_855
.saturating_add(Weight::from_parts(199_735, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Vesting::Vesting` (r:1 w:1)
/// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `l` is `[0, 49]`.
/// The range of component `s` is `[1, 28]`.
fn vest_other_unlocked(l: u32, s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `380 + l * (25 ±0) + s * (36 ±0)`
// Estimated: `4764`
// Minimum execution time: 136_735_000 picoseconds.
Weight::from_parts(134_928_366, 0)
.saturating_add(Weight::from_parts(0, 4764))
// Standard Error: 4_220
.saturating_add(Weight::from_parts(76_876, 0).saturating_mul(l.into()))
// Standard Error: 7_508
.saturating_add(Weight::from_parts(178_775, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Vesting::Vesting` (r:1 w:1)
/// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// The range of component `l` is `[0, 49]`.
/// The range of component `s` is `[0, 27]`.
fn vested_transfer(l: u32, s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `451 + l * (25 ±0) + s * (36 ±0)`
// Estimated: `4764`
// Minimum execution time: 268_393_000 picoseconds.
Weight::from_parts(269_136_230, 0)
.saturating_add(Weight::from_parts(0, 4764))
// Standard Error: 5_783
.saturating_add(Weight::from_parts(97_611, 0).saturating_mul(l.into()))
// Standard Error: 10_290
.saturating_add(Weight::from_parts(223_818, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Vesting::Vesting` (r:1 w:1)
/// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// The range of component `l` is `[0, 49]`.
/// The range of component `s` is `[0, 27]`.
fn force_vested_transfer(l: u32, s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `591 + l * (25 ±0) + s * (36 ±0)`
// Estimated: `6196`
// Minimum execution time: 277_724_000 picoseconds.
Weight::from_parts(278_570_646, 0)
.saturating_add(Weight::from_parts(0, 6196))
// Standard Error: 3_331
.saturating_add(Weight::from_parts(101_462, 0).saturating_mul(l.into()))
// Standard Error: 5_926
.saturating_add(Weight::from_parts(237_946, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `Vesting::Vesting` (r:1 w:1)
/// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `l` is `[0, 49]`.
/// The range of component `s` is `[2, 28]`.
fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `378 + l * (25 ±0) + s * (36 ±0)`
// Estimated: `4764`
// Minimum execution time: 133_075_000 picoseconds.
Weight::from_parts(131_689_481, 0)
.saturating_add(Weight::from_parts(0, 4764))
// Standard Error: 3_832
.saturating_add(Weight::from_parts(73_049, 0).saturating_mul(l.into()))
// Standard Error: 7_078
.saturating_add(Weight::from_parts(186_150, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Vesting::Vesting` (r:1 w:1)
/// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `l` is `[0, 49]`.
/// The range of component `s` is `[2, 28]`.
fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `378 + l * (25 ±0) + s * (36 ±0)`
// Estimated: `4764`
// Minimum execution time: 141_395_000 picoseconds.
Weight::from_parts(139_649_819, 0)
.saturating_add(Weight::from_parts(0, 4764))
// Standard Error: 3_605
.saturating_add(Weight::from_parts(82_146, 0).saturating_mul(l.into()))
// Standard Error: 6_658
.saturating_add(Weight::from_parts(186_309, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Vesting::Vesting` (r:1 w:1)
/// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:1 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `l` is `[0, 49]`.
/// The range of component `s` is `[2, 28]`.
fn force_remove_vesting_schedule(l: u32, s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `451 + l * (25 ±0) + s * (36 ±0)`
// Estimated: `4764`
// Minimum execution time: 147_292_000 picoseconds.
Weight::from_parts(145_632_661, 0)
.saturating_add(Weight::from_parts(0, 4764))
// Standard Error: 4_503
.saturating_add(Weight::from_parts(83_213, 0).saturating_mul(l.into()))
// Standard Error: 8_316
.saturating_add(Weight::from_parts(199_717, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
}

View File

@@ -0,0 +1,122 @@
// This file is part of Ghost Network.
// Ghost Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Ghost Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_whitelist`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-08-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/release/ghost
// benchmark
// pallet
// --chain=casper-dev
// --steps=50
// --repeat=20
// --pallet=pallet_whitelist
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/casper/src/weights/pallet_whitelist.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_whitelist`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_whitelist::WeightInfo for WeightInfo<T> {
/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
fn whitelist_call() -> Weight {
// Proof Size summary in bytes:
// Measured: `185`
// Estimated: `3556`
// Minimum execution time: 73_478_000 picoseconds.
Weight::from_parts(75_014_000, 0)
.saturating_add(Weight::from_parts(0, 3556))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
fn remove_whitelisted_call() -> Weight {
// Proof Size summary in bytes:
// Measured: `314`
// Estimated: `3556`
// Minimum execution time: 70_728_000 picoseconds.
Weight::from_parts(71_250_000, 0)
.saturating_add(Weight::from_parts(0, 3556))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Preimage::PreimageFor` (r:1 w:1)
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`)
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// The range of component `n` is `[1, 4194294]`.
fn dispatch_whitelisted_call(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `390 + n * (1 ±0)`
// Estimated: `3854 + n * (1 ±0)`
// Minimum execution time: 111_739_000 picoseconds.
Weight::from_parts(112_792_000, 0)
.saturating_add(Weight::from_parts(0, 3854))
// Standard Error: 23
.saturating_add(Weight::from_parts(3_436, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
}
/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// The range of component `n` is `[1, 10000]`.
fn dispatch_whitelisted_call_with_preimage(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `314`
// Estimated: `3556`
// Minimum execution time: 87_333_000 picoseconds.
Weight::from_parts(88_510_679, 0)
.saturating_add(Weight::from_parts(0, 3556))
// Standard Error: 10
.saturating_add(Weight::from_parts(4_580, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
}

73
runtime/common/Cargo.toml Executable file
View File

@@ -0,0 +1,73 @@
[package]
name = "ghost-runtime-common"
version = "0.4.2"
authors.workspace = true
edition.workspace = true
homepage.workspace = true
repository.workspace = true
[dependencies]
static_assertions = { workspace = true }
sp-std = { workspace = true }
sp-io = { workspace = true }
sp-core = { workspace = true }
sp-runtime = { workspace = true, features = ["serde"] }
sp-staking = { workspace = true, features = ["serde"] }
frame-support = { workspace = true }
frame-system = { workspace = true }
pallet-authorship = { workspace = true }
pallet-balances = { workspace = true }
pallet-staking = { workspace = true }
pallet-staking-reward-fn = { workspace = true }
pallet-timestamp = { workspace = true }
pallet-transaction-payment = { workspace = true }
pallet-treasury = { workspace = true }
pallet-election-provider-multi-phase = { workspace = true }
primitives = { workspace = true }
[features]
default = ["std"]
no_std = []
std = [
"sp-core/std",
"sp-std/std",
"sp-io/std",
"sp-runtime/std",
"sp-staking/std",
"frame-support/std",
"frame-system/std",
"pallet-authorship/std",
"pallet-balances/std",
"pallet-staking/std",
"pallet-staking-reward-fn/std",
"pallet-timestamp/std",
"pallet-transaction-payment/std",
"pallet-treasury/std",
"pallet-election-provider-multi-phase/std",
"primitives/std",
]
runtime-benchmarks = [
"sp-runtime/runtime-benchmarks",
"sp-staking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-staking/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"pallet-treasury/runtime-benchmarks",
"pallet-election-provider-multi-phase/runtime-benchmarks",
]
try-runtime = [
"sp-runtime/try-runtime",
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-authorship/try-runtime",
"pallet-balances/try-runtime",
"pallet-staking/try-runtime",
"pallet-timestamp/try-runtime",
"pallet-transaction-payment/try-runtime",
"pallet-treasury/try-runtime",
"pallet-election-provider-multi-phase/try-runtime",
]

View File

@@ -0,0 +1,26 @@
use primitives::{AccountId, Balance};
use pallet_treasury::ArgumentsFactory;
use sp_core::crypto::FromEntropy;
use frame_support::traits::tokens::{Pay, PaymentStatus};
pub struct BenchmarkTreasuryHelper;
impl ArgumentsFactory<(), AccountId> for BenchmarkTreasuryHelper {
fn create_asset_kind(_seed: u32) -> () { () }
fn create_beneficiary(seed: [u8; 32]) -> AccountId {
AccountId::from_entropy(&mut seed.as_slice()).unwrap()
}
}
pub struct BenchmarkTreasuryPaymaster;
impl Pay for BenchmarkTreasuryPaymaster {
type Beneficiary = AccountId;
type Balance = Balance;
type Id = ();
type AssetKind = ();
type Error = ();
fn pay(_: &Self::Beneficiary, _: Self::AssetKind, _: Self::Balance) -> Result<Self::Id, Self::Error> { Ok(()) }
fn check_payment(_: Self::Id) -> PaymentStatus { PaymentStatus::Success }
fn ensure_successful(_: &Self::Beneficiary, _: Self::AssetKind, _: Self::Balance) {}
fn ensure_concluded(_: Self::Id) {}
}

View File

@@ -0,0 +1,42 @@
#[macro_export]
macro_rules! impl_elections_weights {
($runtime:ident) => {
parameter_types! {
/// A limit for off-chain phragmen unsigned solution submission.
///
/// We want to keep it as high as possible, but can't risk having
/// it reject, so we always substract the base block execution weight.
pub OffchainSolutionWeightLimit: Weight = BlockWeights::get()
.get(DispatchClass::Normal)
.max_extrinsic
.expect("Normal extrinsic have weight limit configured by default; qed")
.saturating_sub($runtime::weights::BlockExecutionWeight::get());
/// A limit for off-chain phragmen unsigned solution length.
///
/// We allow up to 90% of the block's size to be consumed by the solution.
pub OffchainSolutionLengthLimit: u32 = Perbill::from_rational(90u32, 100u32) *
*BlockLength::get()
.max
.get(DispatchClass::Normal);
}
};
}
/// The number configured here could always be more than the maximum limits of
/// staking pallet to ensure election snapshot will not run out of memory. For
/// now, we set them to smaller values since the staking is bounded and the weight
/// pipeline takes for this single pallet.
pub struct BenchmarkConfig;
impl pallet_election_provider_multi_phase::BenchmarkingConfig for BenchmarkConfig {
const VOTERS: [u32; 2] = [1000, 2000];
const TARGETS: [u32; 2] = [500, 1000];
const ACTIVE_VOTERS: [u32; 2] = [500, 800];
const DESIRED_TARGETS: [u32; 2] = [200, 400];
const SNAPSHOT_MAXIMUM_VOTERS: u32 = 1000;
const MINER_MAXIMUM_VOTERS: u32 = 1000;
const MAXIMUM_TARGETS: u32 = 300;
}
/// The accuracy type used for genesis election provider.
pub type OnChainAccuracy = sp_runtime::Perbill;

253
runtime/common/src/impls.rs Executable file
View File

@@ -0,0 +1,253 @@
use frame_support::traits::{
fungible::{Balanced, Credit},
tokens::imbalance::ResolveTo,
Imbalance, OnUnbalanced,
};
use pallet_treasury::TreasuryAccountId;
/// The logic for the author to get a portion of fees.
pub struct ToAuthor<R>(sp_std::marker::PhantomData<R>);
impl<R> OnUnbalanced<Credit<R::AccountId, pallet_balances::Pallet<R>>> for ToAuthor<R>
where
R: pallet_balances::Config + pallet_authorship::Config,
<R as frame_system::Config>::AccountId: From<primitives::AccountId>,
<R as frame_system::Config>::AccountId: Into<primitives::AccountId>,
{
fn on_nonzero_unbalanced(
amount: Credit<<R as frame_system::Config>::AccountId, pallet_balances::Pallet<R>>,
) {
if let Some(author) = <pallet_authorship::Pallet<R>>::author() {
let _ = <pallet_balances::Pallet<R>>::resolve(&author, amount);
}
}
}
pub struct DealWithFees<R>(sp_std::marker::PhantomData<R>);
impl<R> OnUnbalanced<Credit<R::AccountId, pallet_balances::Pallet<R>>> for DealWithFees<R>
where
R: pallet_balances::Config + pallet_treasury::Config + pallet_authorship::Config,
<R as frame_system::Config>::AccountId: From<primitives::AccountId>,
<R as frame_system::Config>::AccountId: Into<primitives::AccountId>,
{
// this seems to be called for substrate-based transactions
fn on_unbalanceds<B>(
mut fees_then_tips: impl Iterator<Item = Credit<R::AccountId, pallet_balances::Pallet<R>>>,
) {
if let Some(fees) = fees_then_tips.next() {
// for fees, 80% to treasury, 20% to author
let mut split = fees.ration(80, 20);
if let Some(tips) = fees_then_tips.next() {
// for tips, if any, 100% to author
tips.merge_into(&mut split.1);
}
ResolveTo::<TreasuryAccountId<R>, pallet_balances::Pallet<R>>::on_unbalanced(split.0);
<ToAuthor<R> as OnUnbalanced<_>>::on_unbalanced(split.1);
}
}
}
#[cfg(test)]
mod tests {
use super::*;
use frame_support::{
derive_impl,
dispatch::DispatchClass,
parameter_types,
traits::{
tokens::{PayFromAccount, UnityAssetBalanceConversion},
ConstU32, FindAuthor
},
weights::Weight,
PalletId,
};
use frame_system::limits;
use primitives::AccountId;
use sp_core::{ConstU64, H256};
use sp_runtime::{
traits::{BlakeTwo256, IdentityLookup},
Perbill, BuildStorage,
};
type Block = frame_system::mocking::MockingBlock<Test>;
const TEST_ACCOUNT: AccountId = AccountId::new([1; 32]);
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system,
Authorship: pallet_authorship,
Balances: pallet_balances,
Treasury: pallet_treasury,
}
);
parameter_types! {
pub BlockWeights: limits::BlockWeights = limits::BlockWeights::builder()
.base_block(Weight::from_parts(10, 0))
.for_class(DispatchClass::all(), |weight| {
weight.base_extrinsic = Weight::from_parts(100, 0);
})
.for_class(DispathcClass::non_mandatory(), |weight| {
weight.max_total = Some(Weight::from_parts(1024, u64::MAX));
})
.build_or_panic();
pub BlockLength: limits::BlockLength = limits::BlockLength::max(2 * 1024);
pub const AvailableBlockRatio: Perbill = Perbill::one();
}
#[derive_impl(frame_system::config_preludes::TestDefaultConfig)]
impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything;
type RuntimeOrigin = RuntimeOrigin;
type Nonce = u64;
type RuntimeCall = RuntimeCall;
type Hash = H256;
type Hashing = BlakeTwo256;
type AccountId = AccountId;
type Lookup = IdentityLookup<Self::AccountId>;
type Block = Block;
type RuntimeEvent = RuntimeEvent;
type BlockLength = BlockLength;
type BlockWeights = BlockWeghts;
type DbWeight = ();
type Version = ();
type PalletInfo = PalletInfo;
type AccountData = pallet_balances::AccountData<u64>;
type OnNewAccount = ();
type OnKilledAccount = ();
type SystemWeightInfo = ();
type SS58Prefix = ();
type OnSetCode = ();
type MaxConsumers = frame_support::traits::ConstU32<16>;
}
impl pallet_balances::Config for Runtime {
type Balance = u64;
type RuntimeEvent = RuntimeEvent;
type DustRemoval = ();
type ExistentialDeposit = ConstU64<1>;
type AccountStore = System;
type MaxLocks = ();
type MaxReserves = ();
type ReserveIdentifier = [u8; 8];
type WeightInfo = ();
type RuntimeHoldReason = RuntimeHoldReason;
type RuntimeFreezeReason = RuntimeFreezeReason;
type FreezeIdentifier = ();
type MaxFreezes = ConstU32<1>;
}
parameter_types! {
pub const TreasuryPalletId: PalletId = PalletId(*b"g/trsry");
pub const MaxApprovals: u32 = 100;
pub TreasuryAccount: AccountId = Treasury::account_id();
}
impl pallet_treasury::Config for Runtime {
type Currency = pallet_balances::Pallet<Test>;
type ApproveOrigin = frame_system::EnsureRoot<AccountId>;
type RejectOrigin = frame_system::EnsureRoot<AccountId>;
type RuntimeEvent = RuntimeEvent;
type OnSlash = ();
type ProposalBond = ();
type ProposalBondMaximum = ();
type ProposalBondMinimum = ();
type SpendPeriod = ();
type Burn = ();
type BurnDestination = ();
type PalletId = TreasuryPalletId;
type SpendFunds = ();
type MaxApprovals = MaxApprovals;
type WeightInfo = ();
type SpendOrigin = frame_support::traits::NeverEnsureOrigin<u64>;
type AssetKind = ();
type Beneficiary = Self::AccountId;
type BeneficiaryLookup = IdentityLookup<Self::AccountId>;
type Paymaster = PayFromAccount<Balances, TreasuryAccount>;
type BalanceConverter = UnityAssetBalanceConversion;
type PayoutPeriod = ConstU64<0>;
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkHelper = ();
}
pub struct OneAuthor;
impl FindAuthor<AccountId> for OneAuthor {
fn find_author<'a, I>(_: I) -> Option<AccountId> where I: 'a {
Some(TEST_ACCOUNT)
}
}
impl pallet_authorship::Config for Runtime {
type FindAuthor = OneAuthor;
type UncleGenerations = ();
type FilterUncle = ();
type EventHandler = ();
}
pub fn new_test_ext() -> sp_io::TestExternalities {
let mut t = frame_system::GenesisConfig::default().build_storage::<Test>().unwrap();
// We use default for brevity, but you can configure as desired if needed.
pallet_balances::GenesisConfig::<Test>::default()
.assimilate_storage(&mut t)
.unwrap();
t.into()
}
#[test]
fn test_fees_and_tips_split() {
new_test_ext().execute_with(|| {
let fee = <paller_balances::Pallet<Test> as frame_support::traits::fungible::Balanced<AccountId>>::issue(10);
let tip = <paller_balances::Pallet<Test> as frame_support::traits::fungible::Balanced<AccountId>>::issue(20);
assert_eq!(Balances::free_balance(Treasury::account_id()), 0);
assert_eq!(Balances::free_balance(TEST_ACCOUNT), 0);
DealWithFees::on_unbalanced(vec![fee, tip].into_iter());
// Author gets 100% of tip and 20% of fee = 22
assert_eq!(Balances::free_balance(TEST_ACCOUNT), 22);
// Treasury get 80% of fee
assert_eq!(Balances::free_balance(Treasury::account_id()), 8);
});
}
#[test]
fn compute_inflation_should_give_sensible_results() {
assert_eq!(
pallet_staking_reward_fn::compute_inflation(
Perquintill::from_percent(75),
Perquintill::from_percent(75),
Perquintill::from_percent(5),
),
Perquintill::one()
);
assert_eq!(
pallet_staking_reward_fn::compute_inflation(
Perquintill::from_percent(50),
Perquintill::from_percent(75),
Perquintill::from_percent(5),
),
Perquintill::from_rational(2u64, 3u64)
);
assert_eq!(
pallet_staking_reward_fn::compute_inflation(
Perquintill::from_percent(80),
Perquintill::from_percent(75),
Perquintill::from_percent(5),
),
Perquintill::fram_rational(1u64, 2u64)
);
}
#[test]
fn era_payout_should_give_sensible_results() {
assert_eq!(
era_payout(75, 100, Perquintill::from_percent(10), Perquintill::one(), 0, ),
(10, 0)
);
assert_eq!(
era_payout(80, 100, Perquintill::from_percent(10), Perquintill::one(), 0, ),
(6, 4)
);
}
}

186
runtime/common/src/lib.rs Executable file
View File

@@ -0,0 +1,186 @@
#![cfg_attr(not(feature = "std"), no_std)]
pub mod impls;
pub mod elections;
#[cfg(feature = "try-runtime")]
pub mod elections;
#[cfg(feature = "runtime-benchmarks")]
pub mod benchmarking;
use frame_support::{
parameter_types, traits::ConstU32,
weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight},
};
use frame_system::limits;
use primitives::{Balance, BlockNumber};
use sp_runtime::{FixedPointNumber, Perbill, Perquintill};
use static_assertions::const_assert;
pub use pallet_balances::Call as BalancesCall;
#[cfg(feature = "std")]
pub use pallet_staking::StakerStatus;
pub use pallet_timestamp::{Call as TimestampCall};
use pallet_transaction_payment::{Multiplier, TargetedFeeAdjustment};
pub use sp_runtime::traits::Bounded;
#[cfg(any(feature = "std", test))]
pub use sp_runtime::BuildStorage;
pub use impls::ToAuthor;
/// We assume that an on-initialize consumes 1% of the weight on average, hence
/// a single extrinsic will not be allowed to consume more than
/// `AvailableBlockRatio - 1%`.
pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(1);
/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can
/// be used by `Operational` extrinsics.
pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
/// We allow for 2 seconds of compute with a 6 seconds average block time.
/// The storage proof size is not limited so far.
pub const MAXIMUM_BLOCK_WEIGHT: Weight =
Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2), u64::MAX);
const_assert!(NORMAL_DISPATCH_RATIO.deconstruct() >= AVERAGE_ON_INITIALIZE_RATIO.deconstruct());
// Common constants used in all runtimes.
parameter_types! {
/// Maximum amount of block to be stored in ledger.
pub const BlockHashCount: BlockNumber = 4096;
/// The portion of the `NORMAL_DISPATCH_RATIO` that we adjust the fees
/// with. Blocks filled less than will decrease the weight and more will
/// increase.
pub const TargetBlockFullness: Perquintill = Perquintill::from_percent(25);
/// The adjustment variable of the runtime. Higher values will cause
/// `TargetBlockFullness` to change the fees more rapidly.
pub AdjustmentVariable: Multiplier = Multiplier::saturating_from_rational(75, 1_000_000);
/// Minimum amount of the multiplier. This value cannot be too low. A test
/// case should ensure that combined with `AdjustmentVariable`, we can
/// recover from the minimum.
pub MinimumMultiplier: Multiplier = Multiplier::saturating_from_rational(1, 10u128);
/// The maximum amount of the multiplier.
pub MaximumMultiplier: Multiplier = Bounded::max_value();
/// Maximum length of block. Up to 5MB.
pub BlockLength: limits::BlockLength =
limits::BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO);
}
/// Parametrized slow adjusting fee.
pub type SlowAdjustingFeeUpdate<R> = TargetedFeeAdjustment<
R,
TargetBlockFullness,
AdjustmentVariable,
MinimumMultiplier,
MaximumMultiplier,
>;
/// Implements the weight types for a runtime.
/// It expects the passed runtime constants to contain a `weights` module.
/// The generated weight types were formerly part of the common
/// runtime but are now runtime dependant.
#[macro_export]
macro_rules! impl_runtime_weights {
($runtime:ident) => {
use frame_support::{dispatch::DispatchClass, weights::Weight};
use frame_system::limits;
use pallet_transaction_payment::{Multiplier, TargetedFeeAdjustment};
pub use runtime_common::{
impl_elections_weights, AVERAGE_ON_INITIALIZE_RATIO,
MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO,
};
use sp_runtime::{FixedPointNumber, Perquintill};
impl_elections_weights!($runtime);
// Expose the weight from the runtime constants module.
pub use $runtime::weights::{
BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight,
ParityDbWeight,
};
parameter_types! {
/// Block weights base values and limits.
pub BlockWeights: limits::BlockWeights = limits::BlockWeights::builder()
.base_block($runtime::weights::BlockExecutionWeight::get())
.for_class(DispatchClass::all(), |weights| {
weights.base_extrinsic = $runtime::weights::ExtrinsicBaseWeight::get();
})
.for_class(DispatchClass::Normal, |weights| {
weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT);
})
.for_class(DispatchClass::Operational, |weights| {
weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT);
// Operational transactions have an extra reserved space, so that they
// are included even if block reached `MAXIMUM_BLOCK_WEIGHT`.
weights.reserved = Some(
MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT,
);
})
.avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO)
.build_or_panic();
}
};
}
/// The type used for currency conversion.
///
/// This must be only be used as long as the balance type is `u128`.
pub type CurrencyToVote = sp_staking::currency_to_vote::U128CurrencyToVote;
static_assertions::assert_eq_size!(primitives::Balance, u128);
/// A reasonable benchmarking config for staking pallet.
pub struct StakingBenchmarkingConfig;
impl pallet_staking::BenchmarkingConfig for StakingBenchmarkingConfig {
type MaxValidators = ConstU32<1000>;
type MaxNominators = ConstU32<1000>;
}
/// Convert a balance to an unsigned 256-bit number, use in nomination pools.
pub struct BalanceToU256;
impl sp_runtime::traits::Convert<Balance, sp_core::U256> for BalanceToU256 {
fn convert(n: Balance) -> sp_core::U256 {
n.into()
}
}
/// Convert an unsigned 256-bit number to balance, use in nomination pools.
pub struct U256ToBalance;
impl sp_runtime::traits::Convert<sp_core::U256, Balance> for U256ToBalance {
fn convert(n: sp_core::U256) -> Balance {
use frame_support::traits::Defensive;
n.try_into().defensive_unwrap_or(Balance::MAX)
}
}
/// Macro to set a value (e.g. when using the `parameter_types` macro) to
/// either a production value or to an environment variable or testing value
/// ( in case the `fast-runtime` feature is selected).
/// Note that the environment varable is evaluated _at compile time_.
#[macro_export]
macro_rules! prod_or_fast {
($prod:expr, $test:expr) => {
if cfg!(feature = "fast-runtime") {
$test
} else {
$prod
}
};
($prod:expr, $test:expr, $env:expr) => {
if cfg!(feature == "fast-runtime") {
core::option_env!($env)
.map(|s| s.parse().ok())
.flatten()
.unwrap_or($test)
} else {
$prod
}
};
}

View File

@@ -0,0 +1,96 @@
use frame_support::{
dispatch::RawOrigin,
traits::{Get, Hooks},
};
use pallet_fast_unstake::{Pallet as FastUnstake, *};
use pallet_staking::*;
use sp_std::{collections::btree_set::BTreeSet, prelude:*};
/// Register all inactive nominators for fast unstake, and progress until they
/// have all benn processed.
pub fn migrate_all_inactive_nominators<T: pallet_fast_unstake::Config + pallet_staking::Config>()
where
<T as frame_system::Config>::RuntimeEvent: TryInto<pallet_fast_unstake::Event<T>>,
{
let mut unstaked_ok = 0;
let mut unstaked_err = 0;
let mut unstaked_slashed = 0;
let all_stakers = Ledger::<T>::iter().map(|(ctrl, l)| (ctrl, l.stash)).collect::<BTreeSet<_>>();
let mut all_exposed = BTreeSet::new();
ErasStakers::<T>::iter().for_each(|(_, val, expo)| {
all_exposed.insert(val);
all_exposed.extend(expo.others.iter().map(|ie| ie.who.clone()))
});
let eligible = all_stakers
.iter()
.filter_map(|(ctrl, stash)| all_exposed.contains(stash).then_some(ctrl))
.collect::<Vec<_>>();
log::info!(
target: "runtime::test",
"registering {} out of {} stakers for fast-unstake",
eligible.len(),
all_stakers.len(),
);
for ctrl in eligible {
if let Err(why) =
FastUnstake::<T>::register_fast_unstake(RawOrigin::Signed(ctrl.clone()).into())
{
low::warn!(target: "runtime::test", "failed to register {:?} due to {:?}", ctrl, why);
}
}
log::info!(
target: "runtime::test",
"registered {} successfully, starting at {:?}.",
Queue::<T>::count(),
frame_system::Pallet::<T>::block_number(),
);
while Queue::<T>::count() != 0 || Head::<T>::get().is_some() {
let not = frame_system::Pallet::<T>::block_number();
let weight = <T as frame_system::Config>::BlockWeights::get().max_block;
let consumed = FastUnstake::<T>::on_idle(now, weight);
log::debug!(
target: "runtime::test",
"consumed {:?} ({})",
consumed,
consumed.ref_time() as f32 / weight.ref_time() as f32,
);
frame_system::Pallet::<T>::read_events_on_consensus()
.into_iter()
.map(|r| r.event)
.filter_map(|e| {
let maybe_fast_unstake_event: Option<pallet_fast_unstake::Event<T>> =
e.try_into().ok();
maybe_fast_unstake_event
})
.for_each(|e: pallet_fast_unstake::Event<T>| match e {
pallet_fast_unstake::Event<T>::Unstaked { result, .. } =>
if result.is_ok() {
unstaked_ok += 1;
} else {
unstaked_err += 1;
},
pallet_fast_unstake::Event::<T>::Slashed { .. } => unstaked_slashed += 1,
pallet_fast_unstake::Event::<T>::InternalError { .. } => unreachable!(),
_ => {},
});
if now % 100u32.into() == sp_runtime::traits::Zero::zero() {
log::info!(
target: "runtime::test",
"status: ok {}, err {}, slash {}",
unstaked_ok,
unstaked_err,
unstaked_slashed,
);
}
frame_system::Pallet::<T>::reset_events();
}
}

View File

@@ -0,0 +1,27 @@
use sp_core::parameter_types;
use sp_weights::{constants::WEIGHT_PER_TIME_PER_NANOS, Weight};
parameter_types! {
pub const BlockExecutionWeight: Weight =
Weight::from_ref_time(WEIGHT_PER_TIME_PER_NANOS.saturating_mul(7_955_558));
}
#[cfg(test)]
mod test_weights {
use sp_weights::constants;
#[test]
fn sane() {
let w = super::BlockExecutionWeight::get();
assert!(
w.ref_time() >= 100u64 * constants::WEIGHT_PER_TIME_PER_MICROS,
"Weight should be at least 100 µs."
);
assert!(
w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS,
"Weight should be at most 50 ms."
);
}
}

View File

@@ -0,0 +1,27 @@
use sp_core::parameter_types;
use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight};
parameter_types! {
pub const ExtrinsicBaseWeight: Weight =
Weight::from_ref_time(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(94_914));
}
#[cfg(test)]
mod test_weights {
use sp_weights::constants;
#[test]
fn sane() {
let w = super::ExtrinsicBaseWeight::get();
assert!(
w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS,
"Weight should be at least 10 µs."
);
assert!(
w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
"Weight should be at most 1 ms."
);
}
}

View File

@@ -0,0 +1,5 @@
pub mod block_weights;
pub mod extrinsic_weight;
pub use block_weights::BlockExecutionWeight;
pub use extrinsic_weights::ExtrinsicBaseWeight;