diff --git a/pallets/weaver/Cargo.toml b/pallets/weaver/Cargo.toml index 3a0ec19..2f3fdfc 100644 --- a/pallets/weaver/Cargo.toml +++ b/pallets/weaver/Cargo.toml @@ -50,30 +50,30 @@ std = [ "frame-support/std", "frame-system/std", "frame-benchmarking?/std", - "sp-application-crypto/std", - "sp-runtime/std", - "sp-arithmetic/std", - "sp-keystore?/std", - "sp-core/std", - "sp-std/std", - "sp-io/std", - "ghost-networks/std", - "ghost-helpers/std", - "ghost-traits/std", - "pallet-balances/std", + "sp-application-crypto/std", + "sp-runtime/std", + "sp-arithmetic/std", + "sp-keystore?/std", + "sp-core/std", + "sp-std/std", + "sp-io/std", + "ghost-networks/std", + "ghost-helpers/std", + "ghost-traits/std", + "pallet-balances/std", ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "ghost-networks/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", - "ghost-helpers/runtime-benchmarks", - "sp-keystore" + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "ghost-networks/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "ghost-helpers/runtime-benchmarks", + "sp-keystore" ] try-runtime = [ - "frame-support/try-runtime", - "frame-system/try-runtime", - "ghost-networks/try-runtime", - "pallet-balances/try-runtime", + "frame-support/try-runtime", + "frame-system/try-runtime", + "ghost-networks/try-runtime", + "pallet-balances/try-runtime", ] diff --git a/pallets/weaver/src/weights.rs b/pallets/weaver/src/weights.rs index 4a60c3f..fc51920 100644 --- a/pallets/weaver/src/weights.rs +++ b/pallets/weaver/src/weights.rs @@ -1,23 +1,152 @@ -use frame_support::weights::Weight; +// 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 . + +//! Autogenerated weights for `ghost_weaver` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2026-09-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_weaver +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --header=./file_header.txt +// --output=./runtime/casper/src/weights/ghost_weaver.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{ + traits::Get, + weights::{Weight, constants::RocksDbWeight}, +}; +use core::marker::PhantomData; pub trait WeightInfo { - fn extend_warp() -> Weight; - fn weave_weft() -> Weight; + fn extend_warp(a: u32,) -> Weight; + fn weave_weft(a: u32,) -> Weight; fn pull_evm_thread() -> Weight; - fn pull_utxo_thread() -> Weight; + fn pull_utxo_thread(a: u32) -> Weight; } impl WeightInfo for () { - fn extend_warp() -> Weight { - Default::default() - } - fn weave_weft() -> Weight { - Default::default() - } - fn pull_evm_thread() -> Weight { - Default::default() - } - fn pull_utxo_thread() -> Weight { - Default::default() - } + /// Storage: `GhostWeaver::DisabledAuthorities` (r:1 w:0) + /// Proof: `GhostWeaver::DisabledAuthorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `GhostWeaver::Authorities` (r:1 w:0) + /// Proof: `GhostWeaver::Authorities` (`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: `GhostWeaver::TapestryDrafts` (r:1 w:0) + /// Proof: `GhostWeaver::TapestryDrafts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `GhostWeaver::NetworkAttestations` (r:1 w:1) + /// Proof: `GhostWeaver::NetworkAttestations` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `a` is `[1, 300]`. + fn extend_warp(a: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `223 + a * (32 ±0)` + // Estimated: `3687 + a * (32 ±0)` + // Minimum execution time: 215_336_000 picoseconds. + Weight::from_parts(218_119_120, 0) + .saturating_add(Weight::from_parts(0, 3687)) + // Standard Error: 1_412 + .saturating_add(Weight::from_parts(47_848, 0).saturating_mul(a.into())) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(a.into())) + } + /// Storage: `GhostWeaver::DisabledAuthorities` (r:1 w:0) + /// Proof: `GhostWeaver::DisabledAuthorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `GhostWeaver::Authorities` (r:1 w:0) + /// Proof: `GhostWeaver::Authorities` (`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: `GhostWeaver::TapestryDrafts` (r:1 w:0) + /// Proof: `GhostWeaver::TapestryDrafts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `GhostWeaver::TapestryStrands` (r:1 w:1) + /// Proof: `GhostWeaver::TapestryStrands` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `GhostWeaver::WeavingStates` (r:1 w:1) + /// Proof: `GhostWeaver::WeavingStates` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `a` is `[1, 300]`. + fn weave_weft(a: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `518 + a * (32 ±0)` + // Estimated: `3982 + a * (32 ±0)` + // Minimum execution time: 244_811_000 picoseconds. + Weight::from_parts(250_046_200, 0) + .saturating_add(Weight::from_parts(0, 3982)) + // Standard Error: 1_958 + .saturating_add(Weight::from_parts(26_347, 0).saturating_mul(a.into())) + .saturating_add(RocksDbWeight::get().reads(6)) + .saturating_add(RocksDbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(a.into())) + } + /// Storage: `GhostNetworks::Networks` (r:1 w:0) + /// Proof: `GhostNetworks::Networks` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `GhostWeaver::LoomStates` (r:1 w:0) + /// Proof: `GhostWeaver::LoomStates` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `GhostWeaver::PulledThreads` (r:1 w:1) + /// Proof: `GhostWeaver::PulledThreads` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `GhostNetworks::GatekeeperAmounts` (r:1 w:1) + /// Proof: `GhostNetworks::GatekeeperAmounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `GhostNetworks::NetworkImbalance` (r:1 w:1) + /// Proof: `GhostNetworks::NetworkImbalance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// 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 `a` is `[1, 300]`. + fn pull_utxo_thread(_a: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `358` + // Estimated: `3823` + // Minimum execution time: 650_006_000 picoseconds. + Weight::from_parts(663_001_690, 0) + .saturating_add(Weight::from_parts(0, 3823)) + .saturating_add(RocksDbWeight::get().reads(6)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + /// Storage: `GhostNetworks::Networks` (r:1 w:0) + /// Proof: `GhostNetworks::Networks` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `GhostWeaver::LoomStates` (r:1 w:0) + /// Proof: `GhostWeaver::LoomStates` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `GhostWeaver::PulledThreads` (r:1 w:1) + /// Proof: `GhostWeaver::PulledThreads` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `GhostNetworks::GatekeeperAmounts` (r:1 w:1) + /// Proof: `GhostNetworks::GatekeeperAmounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `GhostNetworks::NetworkImbalance` (r:1 w:1) + /// Proof: `GhostNetworks::NetworkImbalance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn pull_evm_thread() -> Weight { + // Proof Size summary in bytes: + // Measured: `358` + // Estimated: `3823` + // Minimum execution time: 138_199_000 picoseconds. + Weight::from_parts(162_645_000, 0) + .saturating_add(Weight::from_parts(0, 3823)) + .saturating_add(RocksDbWeight::get().reads(6)) + .saturating_add(RocksDbWeight::get().writes(3)) + } }