fix: add missing benchmarks and weights (#302)

## Add missing weights
The aim of this PR is to complete our weights by enabling more runtime
benchmarks from the pallets used in DataHaven. I will start this effort
with Storage Hub pallets.

## What's included
- [x] `pallet_nfts`
  - [x] Added signing helper for pallet nfts
  - [x] Add pallet to benchmarks
  - [x] Run benches and generate weights
  - [x] Wire up weights to runtimes  

- [x] `pallet_session`
  - [x] Added a `pallet_session_benchmarking` crate
  - [x] Added signing helpers
  - [x] Add pallet to benchmarks
  - [x] Run benches and generate weights
  - [x] Wire up weights to runtimes  

- [x] `pallet_payment_streams`
  - [x] Add `TreasuryAccount` helper and configure properly
  - [x] Add pallet to benchmarks
  - [x] Run benches and generate weights
  - [x] Wire up weights to runtimes  
  
- [x] `pallet_storage_providers`
  - [x] Add `TreasuryAccount` helper and configure properly
  - [x] Add pallet to benchmarks
  - [x] Run benches and generate weights
  - [x] Wire up weights to runtimes  

- [x] `pallet_file_system`
  - [x] Add pallet to benchmarks and configure properly
  - [ ] Run benches and generate weights
  - [x] Wire up weights to runtimes  

- [x] `pallet_proofs_dealer`
  - [x] Add pallet to benchmarks and configure properly
  - [x] Run benches and generate weights
  - [x] Wire up weights to runtimes  


## What's not included
- `pallet_identity` - We'll enable it once we update to `2506`, that
will allow us to have a BenchmarkHelper in the config on the pallet (see
[here](ac28323e7d/operator/runtime/mainnet/src/configs/mod.rs (L632-L643)))
- `pallet_grandpa` - the upstream pallet defines
[benchmarks](bbc435c766/substrate/frame/grandpa/src/benchmarking.rs (L25))
for `check_equivocation_proof` and `note_stalled`, but the required
weights to be wired are actually `report_equivocation`,
`report_equivocation_unsigned` and `note_stalled`. That means including
`pallet_grandpa` in the benchmarks results in an inconsistent
`WeightInfo` implementation, so further understanding in the pallet's
approach to benchmarking is needed.
- `pallet_file_system` -> Run benches and generate weights. Weights will
fail because of a hardcoded `AccountId32` on the
[benchmarks](57d2a195d5/pallets/file-system/src/benchmark_proofs.rs (L69-L71)).
I'll create a PR for SH soon.

These two are left for a follow up PR.
This commit is contained in:
Gonza Montiel 2026-02-03 13:12:11 -03:00 committed by GitHub
parent a97f1a0ae2
commit 786ddb39a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
43 changed files with 7419 additions and 172 deletions

16
operator/Cargo.lock generated
View file

@ -2629,6 +2629,7 @@ dependencies = [
"hex",
"hex-literal 0.3.4",
"itoa",
"k256",
"log",
"num-bigint",
"num_enum",
@ -2929,6 +2930,7 @@ dependencies = [
"hex",
"hex-literal 0.3.4",
"itoa",
"k256",
"log",
"num-bigint",
"num_enum",
@ -3084,6 +3086,7 @@ dependencies = [
"hex",
"hex-literal 0.3.4",
"itoa",
"k256",
"log",
"num-bigint",
"num_enum",
@ -9211,6 +9214,7 @@ dependencies = [
"frame-benchmarking",
"frame-support",
"frame-system",
"hex",
"log",
"num-bigint",
"pallet-file-system-runtime-api",
@ -9221,6 +9225,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"shp-constants",
"shp-file-key-verifier",
"shp-file-metadata",
"shp-traits",
"sp-core",
@ -9482,11 +9487,15 @@ dependencies = [
"frame-benchmarking",
"frame-support",
"frame-system",
"hex",
"pallet-balances",
"pallet-proofs-dealer-runtime-api",
"pallet-storage-providers",
"parity-scale-codec",
"scale-info",
"shp-file-key-verifier",
"shp-file-metadata",
"shp-forest-verifier",
"shp-traits",
"sp-core",
"sp-keyring",
@ -9631,18 +9640,15 @@ dependencies = [
[[package]]
name = "pallet-session-benchmarking"
version = "39.1.0"
source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2412-6#bbc435c7667d3283ba280a8fec44676357392753"
version = "0.22.0"
dependencies = [
"frame-benchmarking",
"frame-support",
"frame-system",
"pallet-session",
"pallet-staking",
"parity-scale-codec",
"rand 0.8.5",
"sp-runtime",
"sp-session",
"sp-std",
]
[[package]]

View file

@ -28,6 +28,7 @@ datahaven-stagenet-runtime = { path = "./runtime/stagenet", default-features = f
datahaven-testnet-runtime = { path = "./runtime/testnet", default-features = false }
dhp-bridge = { path = "./primitives/bridge", default-features = false }
pallet-datahaven-native-transfer = { path = "./pallets/datahaven-native-transfer", default-features = false }
pallet-session-benchmarking = { path = "./pallets/session-benchmarking", default-features = false }
pallet-evm-precompile-balances-erc20 = { path = "./precompiles/erc20-balances", default-features = false }
pallet-evm-precompile-batch = { path = "./precompiles/batch", default-features = false }
pallet-evm-precompile-call-permit = { path = "./precompiles/call-permit", default-features = false }
@ -67,6 +68,10 @@ impl-serde = { version = "0.5.0", default-features = false }
impl-trait-for-tuples = { version = "0.2.2" }
itoa = { version = "1.0" }
jsonrpsee = { version = "0.24.3" }
k256 = { version = "0.13.4", default-features = false, features = [
"ecdsa",
"alloc",
] }
libsecp256k1 = { version = "0.7", default-features = false }
log = { version = "0.4.25" }
macro_rules_attribute = { version = "0.2.0" }
@ -139,7 +144,6 @@ pallet-referenda = { git = "https://github.com/paritytech/polkadot-sdk", tag = "
pallet-safe-mode = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-6", default-features = false }
pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-6", default-features = false }
pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-6", default-features = false }
pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-6", default-features = false }
pallet-staking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-6", default-features = false }
pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-6", default-features = false }
pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2412-6", default-features = false }

View file

@ -19,7 +19,6 @@
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;
use crate::{{pallet}};
/// Weights for `{{pallet}}`.
pub struct WeightInfo<T>(PhantomData<T>);

View file

@ -0,0 +1,40 @@
[package]
authors = { workspace = true }
description = "Benchmarking helpers for pallet-session in DataHaven runtimes."
edition = { workspace = true }
license = { workspace = true }
name = "pallet-session-benchmarking"
version = { workspace = true }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
[lints]
workspace = true
[dependencies]
codec = { workspace = true }
frame-benchmarking = { workspace = true, optional = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
pallet-session = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }
[features]
default = ["std"]
std = [
"codec/std",
"frame-benchmarking?/std",
"frame-support/std",
"frame-system/std",
"pallet-session/std",
"sp-runtime/std",
"sp-std/std",
]
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]

View file

@ -0,0 +1,32 @@
//! Benchmarks for solochain session usage (no staking dependency).
//!
//! This mirrors the upstream session benchmarks but avoids `pallet_staking`
//! by directly calling `pallet_session::Pallet::set_keys`. The session keys
//! are decoded from zeros, which works as long as the runtime wires Babe and
//! Grandpa into `SessionKeys`.
use alloc::{vec, vec::Vec};
use codec::Decode;
use frame_benchmarking::{benchmarks, whitelisted_caller};
use frame_system::RawOrigin;
use crate::{Config, Pallet};
use pallet_session::Call;
benchmarks! {
set_keys {
let caller: T::AccountId = whitelisted_caller();
frame_system::Pallet::<T>::inc_providers(&caller);
let keys = T::Keys::decode(&mut sp_runtime::traits::TrailingZeroInput::zeroes()).unwrap();
let proof: Vec<u8> = vec![0, 1, 2, 3];
}: _(RawOrigin::Signed(caller), keys, proof)
purge_keys {
let caller: T::AccountId = whitelisted_caller();
frame_system::Pallet::<T>::inc_providers(&caller);
let keys = T::Keys::decode(&mut sp_runtime::traits::TrailingZeroInput::zeroes()).unwrap();
let proof: Vec<u8> = vec![0, 1, 2, 3];
let _ = pallet_session::Pallet::<T>::set_keys(RawOrigin::Signed(caller.clone()).into(), keys, proof);
}: _(RawOrigin::Signed(caller))
}

View file

@ -0,0 +1,11 @@
#![cfg_attr(not(feature = "std"), no_std)]
extern crate alloc;
pub struct Pallet<T: Config>(pallet_session::Pallet<T>);
/// Benchmarking configuration for pallet-session in DataHaven.
pub trait Config: pallet_session::Config {}
#[cfg(feature = "runtime-benchmarks")]
mod benchmarking;

View file

@ -15,7 +15,9 @@
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.
use fp_account::AccountId20;
use frame_support::traits::Currency;
use pallet_treasury::ArgumentsFactory;
use sp_runtime::traits::Zero;
pub struct BenchmarkHelper;
impl ArgumentsFactory<(), AccountId20> for BenchmarkHelper {
@ -31,3 +33,24 @@ impl ArgumentsFactory<(), AccountId20> for BenchmarkHelper {
AccountId20::from(seed)
}
}
pub struct StorageHubBenchmarking;
impl StorageHubBenchmarking {
pub const SP_MIN_DEPOSIT: u128 = 100_000_000_000_000;
pub const BUCKET_DEPOSIT: u128 = 100_000_000_000_000;
// Keep the benchmark challenge period within u32 limits.
pub const STAKE_TO_CHALLENGE_PERIOD: u128 = 3_000_000_000_000_000;
// Derived from StakeToChallengePeriod / SP_MIN_DEPOSIT + tolerance + 1.
pub const CHECKPOINT_CHALLENGE_PERIOD: u32 = 81;
pub fn ensure_treasury_account<AccountId, Balance, CurrencyT>(account: AccountId) -> AccountId
where
Balance: From<u128> + Zero,
CurrencyT: Currency<AccountId, Balance = Balance>,
{
if CurrencyT::free_balance(&account).is_zero() {
let _ = CurrencyT::deposit_creating(&account, 1u128.into());
}
account
}
}

View file

@ -86,6 +86,7 @@ polkadot-runtime-common = { workspace = true }
precompile-utils = { workspace = true }
scale-info = { workspace = true, features = ["derive", "serde"] }
serde = { workspace = true, features = ["derive"] }
k256 = { workspace = true, optional = true }
serde_json = { workspace = true, default-features = false, features = [
"alloc",
] }
@ -360,6 +361,13 @@ runtime-benchmarks = [
"snowbridge-pallet-system/runtime-benchmarks",
"pallet-outbound-commitment-store/runtime-benchmarks",
"pallet-datahaven-native-transfer/runtime-benchmarks",
# StorageHub pallets
"pallet-nfts/runtime-benchmarks",
"pallet-file-system/runtime-benchmarks",
"pallet-proofs-dealer/runtime-benchmarks",
"pallet-payment-streams/runtime-benchmarks",
"pallet-storage-providers/runtime-benchmarks",
"dep:k256",
]
try-runtime = [

View file

@ -27,6 +27,7 @@ frame_benchmarking::define_benchmarks!(
// Substrate pallets
[pallet_balances, Balances]
[pallet_session, pallet_session_benchmarking::Pallet::<Runtime>]
// FIXME: benchmarking identity fail
// [pallet_identity, Identity]
[pallet_im_online, ImOnline]
@ -47,6 +48,13 @@ frame_benchmarking::define_benchmarks!(
// EVM pallets
[pallet_evm, EVM]
// StorageHub pallets
[pallet_nfts, Nfts]
[pallet_file_system, FileSystem]
[pallet_proofs_dealer, ProofsDealer]
[pallet_payment_streams, PaymentStreams]
[pallet_storage_providers, Providers]
// Governance pallets
[pallet_collective_technical_committee, TechnicalCommittee]
[pallet_collective_treasury_council, TreasuryCouncil]

View file

@ -91,7 +91,6 @@ use datahaven_runtime_common::{
},
time::{EpochDurationInBlocks, SessionsPerEra, DAYS, MILLISECS_PER_BLOCK},
};
use dhp_bridge::{EigenLayerMessageProcessor, NativeTokenTransferMessageProcessor};
use frame_support::{
derive_impl,
dispatch::DispatchClass,
@ -126,7 +125,7 @@ use snowbridge_core::{gwei, meth, AgentIdOf, PricingParameters, Rewards, TokenId
use snowbridge_inbound_queue_primitives::RewardLedger;
use snowbridge_outbound_queue_primitives::{
v1::{Fee, Message, SendMessage},
v2::{Command, ConstantGasMeter},
v2::ConstantGasMeter,
SendError, SendMessageFeeProvider,
};
use snowbridge_pallet_outbound_queue_v2::OnNewCommitment;
@ -388,7 +387,7 @@ impl pallet_session::Config for Runtime {
>;
type SessionHandler = <SessionKeys as OpaqueKeys>::KeyTypeIdProviders;
type Keys = SessionKeys;
type WeightInfo = pallet_session::weights::SubstrateWeight<Runtime>;
type WeightInfo = mainnet_weights::pallet_session::WeightInfo<Runtime>;
}
parameter_types! {
@ -1108,47 +1107,13 @@ impl snowbridge_pallet_system_v2::Config for Runtime {
type Helper = ();
}
// Fork versions for runtime benchmarks - must match the fixtures for BLS verification to work
// The fixtures are generated with standard testnet fork versions
#[cfg(feature = "runtime-benchmarks")]
parameter_types! {
pub const ChainForkVersions: ForkVersions = ForkVersions {
genesis: Fork {
version: hex_literal::hex!("00000000"),
epoch: 0,
},
altair: Fork {
version: hex_literal::hex!("01000000"),
epoch: 0,
},
bellatrix: Fork {
version: hex_literal::hex!("02000000"),
epoch: 0,
},
capella: Fork {
version: hex_literal::hex!("03000000"),
epoch: 0,
},
deneb: Fork {
version: hex_literal::hex!("04000000"),
epoch: 0,
},
electra: Fork {
version: hex_literal::hex!("05000000"),
epoch: 80000000000,
},
fulu: Fork {
version: hex_literal::hex!("06000000"),
epoch: 90000000000,
},
};
}
// For tests, fast-runtime and std configurations we use the mocked fork versions
// These match the fork versions used by the local Ethereum network in E2E tests
#[cfg(all(
any(feature = "std", feature = "fast-runtime", test),
not(feature = "runtime-benchmarks")
#[cfg(any(
feature = "std",
feature = "fast-runtime",
feature = "runtime-benchmarks",
test
))]
parameter_types! {
pub const ChainForkVersions: ForkVersions = ForkVersions {
@ -1278,8 +1243,8 @@ impl snowbridge_pallet_inbound_queue_v2::Config for Runtime {
type GatewayAddress = runtime_params::dynamic_params::runtime_config::EthereumGatewayAddress;
#[cfg(not(feature = "runtime-benchmarks"))]
type MessageProcessor = (
EigenLayerMessageProcessor<Runtime>,
NativeTokenTransferMessageProcessor<Runtime>,
dhp_bridge::EigenLayerMessageProcessor<Runtime>,
dhp_bridge::NativeTokenTransferMessageProcessor<Runtime>,
);
#[cfg(feature = "runtime-benchmarks")]
type MessageProcessor = NoOpMessageProcessor;
@ -1750,6 +1715,7 @@ mod tests {
use snowbridge_inbound_queue_primitives::v2::{
EthereumAsset, Message as SnowbridgeMessage, MessageProcessor, Payload as SnowPayload,
};
use snowbridge_outbound_queue_primitives::v2::Command;
use sp_core::H160;
use sp_io::TestExternalities;
use xcm_builder::GlobalConsensusConvertsFor;

View file

@ -14,9 +14,13 @@
// You should have received a copy of the GNU General Public License
// along with DataHaven. If not, see <http://www.gnu.org/licenses/>.
#[cfg(not(feature = "runtime-benchmarks"))]
use super::HAVE;
#[cfg(feature = "runtime-benchmarks")]
use super::MICROHAVE;
use super::{
AccountId, Balance, Balances, BlockNumber, Hash, RuntimeEvent, RuntimeHoldReason,
TreasuryAccount, HAVE,
TreasuryAccount,
};
use crate::configs::runtime_params::dynamic_params::runtime_config;
use crate::{
@ -24,6 +28,8 @@ use crate::{
HOURS,
};
use core::marker::PhantomData;
#[cfg(feature = "runtime-benchmarks")]
use datahaven_runtime_common::benchmarking::StorageHubBenchmarking;
use datahaven_runtime_common::time::{DAYS, MINUTES};
use frame_support::pallet_prelude::DispatchClass;
use frame_support::traits::AsEnsureOriginWithArg;
@ -33,7 +39,7 @@ use frame_support::{
weights::Weight,
};
use frame_system::pallet_prelude::BlockNumberFor;
use frame_system::{EnsureRoot, EnsureSigned};
use frame_system::EnsureSigned;
use num_bigint::BigUint;
use pallet_nfts::PalletFeatures;
use polkadot_runtime_common::prod_or_fast;
@ -68,6 +74,7 @@ pub type StorageProofsMerkleTrieLayout = LayoutV1<BlakeTwo256>;
pub type Hashing = BlakeTwo256;
/****** NFTs pallet ******/
#[cfg(not(feature = "runtime-benchmarks"))]
parameter_types! {
pub const CollectionDeposit: Balance = 100 * HAVE;
pub const ItemDeposit: Balance = 1 * HAVE;
@ -80,6 +87,19 @@ parameter_types! {
pub const MaxAttributesPerCall: u32 = 10;
pub Features: PalletFeatures = PalletFeatures::all_enabled();
}
#[cfg(feature = "runtime-benchmarks")]
parameter_types! {
pub const CollectionDeposit: Balance = 100 * MICROHAVE;
pub const ItemDeposit: Balance = 1 * MICROHAVE;
pub const MetadataDepositBase: Balance = 10 * MICROHAVE;
pub const MetadataDepositPerByte: Balance = 1 * MICROHAVE;
pub const ApprovalsLimit: u32 = 20;
pub const ItemAttributesApprovalsLimit: u32 = 20;
pub const MaxTips: u32 = 10;
pub const MaxDeadlineDuration: BlockNumber = 12 * 30 * DAYS;
pub const MaxAttributesPerCall: u32 = 10;
pub Features: PalletFeatures = PalletFeatures::all_enabled();
}
impl pallet_nfts::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
@ -104,11 +124,66 @@ impl pallet_nfts::Config for Runtime {
type Features = Features;
type OffchainSignature = Signature;
type OffchainPublic = <Signature as Verify>::Signer;
type WeightInfo = pallet_nfts::weights::SubstrateWeight<Runtime>;
type WeightInfo = crate::weights::pallet_nfts::WeightInfo<Runtime>;
type Locker = ();
#[cfg(feature = "runtime-benchmarks")]
type Helper = benchmark_helpers::NftHelper;
}
/****** ****** ****** ******/
#[cfg(feature = "runtime-benchmarks")]
pub mod benchmark_helpers {
use crate::{AccountId, Signature};
use k256::ecdsa::SigningKey;
use sp_runtime::traits::{IdentifyAccount, Verify};
use sp_runtime::MultiSignature;
const BENCH_SIGNING_KEY: [u8; 32] = [1u8; 32];
fn bench_signing_key() -> SigningKey {
SigningKey::from_bytes(&BENCH_SIGNING_KEY.into())
.expect("benchmark signing key is valid; qed")
}
/// Benchmark helper for NFTs pallet
pub struct NftHelper;
impl pallet_nfts::BenchmarkHelper<u32, u32, <Signature as Verify>::Signer, AccountId, Signature>
for NftHelper
{
fn collection(i: u16) -> u32 {
i.into()
}
fn item(i: u16) -> u32 {
i.into()
}
fn signer() -> (<Signature as Verify>::Signer, AccountId) {
let signing_key = bench_signing_key();
let verifying_key = signing_key.verifying_key();
let encoded = verifying_key.to_encoded_point(true);
let public =
sp_core::ecdsa::Public::from_full(encoded.as_bytes()).expect("valid key; qed");
let public_key: <Signature as Verify>::Signer = public.into();
let account: AccountId = public_key.clone().into_account();
(public_key, account)
}
fn sign(_public: &<Signature as Verify>::Signer, message: &[u8]) -> Signature {
let digest = sp_io::hashing::keccak_256(message);
let (sig, recovery_id) = bench_signing_key()
.sign_prehash_recoverable(&digest)
.expect("signing with fixed key never fails; qed");
let mut sig_bytes = [0u8; 65];
sig_bytes[..64].copy_from_slice(&sig.to_bytes());
sig_bytes[64] = recovery_id.to_byte();
let sig = sp_core::ecdsa::Signature::from_raw(sig_bytes);
Signature::from(MultiSignature::Ecdsa(sig))
}
}
}
/****** Relay Randomness pallet ******/
impl pallet_randomness::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
@ -151,6 +226,7 @@ impl sp_runtime::traits::BlockNumberProvider for BlockNumberGetter {
/****** ****** ****** ******/
/****** Storage Providers pallet ******/
#[cfg(not(feature = "runtime-benchmarks"))]
parameter_types! {
pub const SpMinDeposit: Balance = 100 * HAVE;
pub const BucketDeposit: Balance = 100 * HAVE;
@ -159,10 +235,47 @@ parameter_types! {
// TODO: If the next line is uncommented (which should be eventually, replacing the line above), compilation breaks (most likely because of mismatched dependency issues)
// pub const MaxBlocksForRandomness: BlockNumber = prod_or_fast!(2 * runtime_constants::time::EPOCH_DURATION_IN_SLOTS, 2 * MINUTES);
}
#[cfg(feature = "runtime-benchmarks")]
parameter_types! {
pub const SpMinDeposit: Balance = StorageHubBenchmarking::SP_MIN_DEPOSIT;
pub const BucketDeposit: Balance = StorageHubBenchmarking::BUCKET_DEPOSIT;
pub const BspSignUpLockPeriod: BlockNumber = 90 * DAYS; // ~3 months
pub const MaxBlocksForRandomness: BlockNumber = prod_or_fast!(2 * HOURS, 2 * MINUTES);
// TODO: If the next line is uncommented (which should be eventually, replacing the line above), compilation breaks (most likely because of mismatched dependency issues)
// pub const MaxBlocksForRandomness: BlockNumber = prod_or_fast!(2 * runtime_constants::time::EPOCH_DURATION_IN_SLOTS, 2 * MINUTES);
}
#[cfg(feature = "runtime-benchmarks")]
pub struct StorageHubTreasuryAccount;
#[cfg(feature = "runtime-benchmarks")]
impl Get<AccountId> for StorageHubTreasuryAccount {
fn get() -> AccountId {
let account = TreasuryAccount::get();
StorageHubBenchmarking::ensure_treasury_account::<AccountId, Balance, Balances>(account)
}
}
// Benchmark helpers for Storage Providers pallet.
#[cfg(feature = "runtime-benchmarks")]
pub struct ProvidersBenchmarkHelpers;
#[cfg(feature = "runtime-benchmarks")]
impl pallet_storage_providers::benchmarking::BenchmarkHelpers<Runtime>
for ProvidersBenchmarkHelpers
{
type ProviderId = <Runtime as pallet_storage_providers::Config>::ProviderId;
fn set_accrued_failed_proofs(provider_id: Self::ProviderId, value: u32) {
pallet_proofs_dealer::SlashableProviders::<Runtime>::insert(provider_id, value);
}
fn get_accrued_failed_proofs(provider_id: Self::ProviderId) -> u32 {
pallet_proofs_dealer::SlashableProviders::<Runtime>::get(provider_id).unwrap_or(0)
}
}
impl pallet_storage_providers::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = pallet_storage_providers::weights::SubstrateWeight<Runtime>;
type WeightInfo = crate::weights::pallet_storage_providers::WeightInfo<Runtime>;
type ProvidersRandomness = pallet_randomness::RandomnessFromOneEpochAgo<Runtime>;
type PaymentStreams = PaymentStreams;
type ProofDealer = ProofsDealer;
@ -188,7 +301,10 @@ impl pallet_storage_providers::Config for Runtime {
type ProvidersProofSubmitters = ProofsDealer;
type ReputationWeightType = u32;
type StorageHubTickGetter = ProofsDealer;
#[cfg(not(feature = "runtime-benchmarks"))]
type Treasury = TreasuryAccount;
#[cfg(feature = "runtime-benchmarks")]
type Treasury = StorageHubTreasuryAccount;
type SpMinDeposit = SpMinDeposit;
type SpMinCapacity = ConstU64<2>;
type DepositPerData = ConstU128<2>;
@ -208,6 +324,8 @@ impl pallet_storage_providers::Config for Runtime {
type ZeroSizeBucketFixedRate = runtime_config::ZeroSizeBucketFixedRate;
type ProviderTopUpTtl = runtime_config::ProviderTopUpTtl;
type MaxExpiredItemsInBlock = ConstU32<100>;
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkHelpers = ProvidersBenchmarkHelpers;
}
pub struct StorageDataUnitAndBalanceConverter;
@ -240,7 +358,7 @@ parameter_types! {
impl pallet_payment_streams::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = pallet_payment_streams::weights::SubstrateWeight<Runtime>;
type WeightInfo = crate::weights::pallet_payment_streams::WeightInfo<Runtime>;
type NativeBalance = Balances;
type ProvidersPallet = Providers;
type RuntimeHoldReason = RuntimeHoldReason;
@ -250,7 +368,10 @@ impl pallet_payment_streams::Config for Runtime {
type BlockNumberToBalance = BlockNumberToBalance;
type ProvidersProofSubmitters = ProofsDealer;
type TreasuryCutCalculator = LinearThenPowerOfTwoTreasuryCutCalculator<Runtime, Perbill>;
#[cfg(not(feature = "runtime-benchmarks"))]
type TreasuryAccount = TreasuryAccount;
#[cfg(feature = "runtime-benchmarks")]
type TreasuryAccount = StorageHubTreasuryAccount;
type MaxUsersToCharge = ConstU32<10>;
type BaseDeposit = ConstU128<10>;
}
@ -279,6 +400,14 @@ const MAX_CUSTOM_CHALLENGES_PER_BLOCK: u32 = 10;
const TOTAL_MAX_CHALLENGES_PER_BLOCK: u32 =
RANDOM_CHALLENGES_PER_BLOCK + MAX_CUSTOM_CHALLENGES_PER_BLOCK;
#[cfg(feature = "runtime-benchmarks")]
parameter_types! {
pub const BenchmarkStakeToChallengePeriod: Balance =
StorageHubBenchmarking::STAKE_TO_CHALLENGE_PERIOD;
pub const BenchmarkCheckpointChallengePeriod: BlockNumber =
StorageHubBenchmarking::CHECKPOINT_CHALLENGE_PERIOD;
}
parameter_types! {
pub const RandomChallengesPerBlock: u32 = RANDOM_CHALLENGES_PER_BLOCK;
pub const MaxCustomChallengesPerBlock: u32 = MAX_CUSTOM_CHALLENGES_PER_BLOCK;
@ -293,7 +422,7 @@ parameter_types! {
impl pallet_proofs_dealer::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = pallet_proofs_dealer::weights::SubstrateWeight<Runtime>;
type WeightInfo = crate::weights::pallet_proofs_dealer::WeightInfo<Runtime>;
type ProvidersPallet = Providers;
type NativeBalance = Balances;
type MerkleTrieHash = Hash;
@ -306,29 +435,50 @@ impl pallet_proofs_dealer::Config for Runtime {
{ shp_constants::FILE_SIZE_TO_CHALLENGES },
>;
type StakeToBlockNumber = SaturatingBalanceToBlockNumber;
#[cfg(feature = "runtime-benchmarks")]
type RandomChallengesPerBlock = ConstU32<0>;
#[cfg(not(feature = "runtime-benchmarks"))]
type RandomChallengesPerBlock = RandomChallengesPerBlock;
#[cfg(feature = "runtime-benchmarks")]
type MaxCustomChallengesPerBlock = TotalMaxChallengesPerBlock;
#[cfg(not(feature = "runtime-benchmarks"))]
type MaxCustomChallengesPerBlock = MaxCustomChallengesPerBlock;
type MaxSubmittersPerTick = MaxSubmittersPerTick;
type TargetTicksStorageOfSubmitters = TargetTicksStorageOfSubmitters;
type ChallengeHistoryLength = ChallengeHistoryLength;
type ChallengesQueueLength = ChallengesQueueLength;
#[cfg(not(feature = "runtime-benchmarks"))]
type CheckpointChallengePeriod = runtime_config::CheckpointChallengePeriod;
#[cfg(feature = "runtime-benchmarks")]
type CheckpointChallengePeriod = BenchmarkCheckpointChallengePeriod;
type ChallengesFee = ChallengesFee;
type PriorityChallengesFee = PriorityChallengesFee;
#[cfg(not(feature = "runtime-benchmarks"))]
type Treasury = TreasuryAccount;
#[cfg(feature = "runtime-benchmarks")]
type Treasury = StorageHubTreasuryAccount;
// TODO: Once the client logic to keep track of CR randomness deadlines and execute their submissions is implemented
// AND after the chain has been live for enough time to have enough providers to avoid the commit-reveal randomness being
// gameable, the randomness provider should be CrRandomness
type RandomnessProvider = pallet_randomness::ParentBlockRandomness<Runtime>;
#[cfg(not(feature = "runtime-benchmarks"))]
type StakeToChallengePeriod = runtime_config::StakeToChallengePeriod;
#[cfg(feature = "runtime-benchmarks")]
type StakeToChallengePeriod = BenchmarkStakeToChallengePeriod;
type MinChallengePeriod = runtime_config::MinChallengePeriod;
type ChallengeTicksTolerance = ChallengeTicksTolerance;
type BlockFullnessPeriod = ChallengeTicksTolerance; // We purposely set this to `ChallengeTicksTolerance` so that spamming of the chain is evaluated for the same blocks as the tolerance BSPs are given.
type BlockFullnessHeadroom = BlockFullnessHeadroom;
type MinNotFullBlocksRatio = MinNotFullBlocksRatio;
type MaxSlashableProvidersPerTick = MaxSlashableProvidersPerTick;
type ChallengeOrigin = EnsureRoot<AccountId>;
type PriorityChallengeOrigin = EnsureRoot<AccountId>;
#[cfg(not(feature = "runtime-benchmarks"))]
type ChallengeOrigin = frame_system::EnsureRoot<AccountId>;
#[cfg(feature = "runtime-benchmarks")]
type ChallengeOrigin = EnsureSigned<AccountId>;
#[cfg(not(feature = "runtime-benchmarks"))]
type PriorityChallengeOrigin = frame_system::EnsureRoot<AccountId>;
#[cfg(feature = "runtime-benchmarks")]
type PriorityChallengeOrigin = EnsureSigned<AccountId>;
}
// Converter from the Balance type to the BlockNumber type for math.
@ -452,12 +602,24 @@ impl Get<u32> for MaxSlashableProvidersPerTick {
type ThresholdType = u32;
pub type ReplicationTargetType = u32;
#[cfg(not(feature = "runtime-benchmarks"))]
parameter_types! {
pub const BaseStorageRequestCreationDeposit: Balance = 1 * HAVE;
pub const FileDeletionRequestCreationDeposit: Balance = 1 * HAVE;
pub const FileSystemStorageRequestCreationHoldReason: RuntimeHoldReason = RuntimeHoldReason::FileSystem(pallet_file_system::HoldReason::StorageRequestCreationHold);
pub const FileSystemFileDeletionRequestHoldReason: RuntimeHoldReason = RuntimeHoldReason::FileSystem(pallet_file_system::HoldReason::FileDeletionRequestHold);
}
#[cfg(feature = "runtime-benchmarks")]
parameter_types! {
pub const BaseStorageRequestCreationDeposit: Balance = 1 * MICROHAVE;
pub const FileDeletionRequestCreationDeposit: Balance = 1 * MICROHAVE;
pub const FileSystemStorageRequestCreationHoldReason: RuntimeHoldReason = RuntimeHoldReason::FileSystem(pallet_file_system::HoldReason::StorageRequestCreationHold);
pub const FileSystemFileDeletionRequestHoldReason: RuntimeHoldReason = RuntimeHoldReason::FileSystem(pallet_file_system::HoldReason::FileDeletionRequestHold);
}
#[cfg(feature = "runtime-benchmarks")]
parameter_types! {
pub const BenchmarkBspStopStoringFilePenalty: Balance = 1 * MICROHAVE;
}
// Converts a given signed message in a EIP-191 compliant message bytes to verify.
/// EIP-191: https://eips.ethereum.org/EIPS/eip-191
@ -480,7 +642,7 @@ impl shp_traits::MessageAdapter for Eip191Adapter {
impl pallet_file_system::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = pallet_file_system::weights::SubstrateWeight<Runtime>;
type WeightInfo = crate::weights::pallet_file_system::WeightInfo<Runtime>;
type Providers = Providers;
type ProofDealer = ProofsDealer;
type PaymentStreams = PaymentStreams;
@ -500,8 +662,14 @@ impl pallet_file_system::Config for Runtime {
type RuntimeHoldReason = RuntimeHoldReason;
type Nfts = Nfts;
type CollectionInspector = BucketNfts;
#[cfg(not(feature = "runtime-benchmarks"))]
type BspStopStoringFilePenalty = runtime_config::BspStopStoringFilePenalty;
#[cfg(feature = "runtime-benchmarks")]
type BspStopStoringFilePenalty = BenchmarkBspStopStoringFilePenalty;
#[cfg(not(feature = "runtime-benchmarks"))]
type TreasuryAccount = TreasuryAccount;
#[cfg(feature = "runtime-benchmarks")]
type TreasuryAccount = StorageHubTreasuryAccount;
type MaxBatchConfirmStorageRequests = ConstU32<100>;
type MaxFilePathSize = ConstU32<512u32>;
type MaxPeerIdSize = ConstU32<100>;

View file

@ -201,7 +201,7 @@ parameter_types! {
parameter_types! {
// TODO: Change ED to 1 after upgrade to Polkadot SDK stable2503
// cfr. https://github.com/paritytech/polkadot-sdk/pull/7379
pub const ExistentialDeposit: Balance = 100;
pub const ExistentialDeposit: Balance = 1;
}
/// The version information used to identify this runtime when compiled natively.
@ -972,6 +972,7 @@ impl_runtime_apis! {
use frame_system_benchmarking::Pallet as SystemBench;
impl frame_system_benchmarking::Config for Runtime {}
impl pallet_session_benchmarking::Config for Runtime {}
impl baseline::Config for Runtime {}
use frame_support::traits::WhitelistedStorageKeys;

View file

@ -35,18 +35,24 @@ pub mod pallet_babe;
pub mod pallet_balances;
pub mod pallet_beefy_mmr;
pub mod pallet_evm;
pub mod pallet_file_system;
pub mod pallet_grandpa;
pub mod pallet_im_online;
pub mod pallet_message_queue;
pub mod pallet_migrations;
pub mod pallet_mmr;
pub mod pallet_multisig;
pub mod pallet_nfts;
pub mod pallet_parameters;
pub mod pallet_payment_streams;
pub mod pallet_preimage;
pub mod pallet_proofs_dealer;
pub mod pallet_proxy;
pub mod pallet_randomness;
pub mod pallet_safe_mode;
pub mod pallet_scheduler;
pub mod pallet_session;
pub mod pallet_storage_providers;
pub mod pallet_sudo;
pub mod pallet_timestamp;
pub mod pallet_transaction_payment;

View file

@ -0,0 +1,5 @@
//! Weights for `pallet_file_system`.
//!
//! Generated weights should overwrite this file.
pub use pallet_file_system::weights::SubstrateWeight as WeightInfo;

View file

@ -0,0 +1,726 @@
//! Autogenerated weights for `pallet_nfts`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 51.0.0
//! DATE: 2025-11-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --runtime
// target/production/wbuild/datahaven-mainnet-runtime/datahaven_mainnet_runtime.compact.compressed.wasm
// --pallet
// pallet_nfts
// --extrinsic
//
// --template
// benchmarking/frame-weight-template.hbs
// --output
// runtime/mainnet/src/weights/pallet_nfts.rs
// --steps
// 50
// --repeat
// 20
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;
/// Weights for `pallet_nfts`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_nfts::WeightInfo for WeightInfo<T> {
/// Storage: `Nfts::NextCollectionId` (r:1 w:1)
/// Proof: `Nfts::NextCollectionId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionRoleOf` (r:0 w:1)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:0 w:1)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionAccount` (r:0 w:1)
/// Proof: `Nfts::CollectionAccount` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
fn create() -> Weight {
// Proof Size summary in bytes:
// Measured: `271`
// Estimated: `3537`
// Minimum execution time: 46_980_000 picoseconds.
Weight::from_parts(48_333_000, 3537)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Nfts::NextCollectionId` (r:1 w:1)
/// Proof: `Nfts::NextCollectionId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionRoleOf` (r:0 w:1)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:0 w:1)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionAccount` (r:0 w:1)
/// Proof: `Nfts::CollectionAccount` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
fn force_create() -> Weight {
// Proof Size summary in bytes:
// Measured: `76`
// Estimated: `3537`
// Minimum execution time: 25_388_000 picoseconds.
Weight::from_parts(26_185_000, 3537)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemMetadataOf` (r:1 w:0)
/// Proof: `Nfts::ItemMetadataOf` (`max_values`: None, `max_size`: Some(335), added: 2810, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:1)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:1001 w:1000)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1000 w:1000)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionMetadataOf` (r:0 w:1)
/// Proof: `Nfts::CollectionMetadataOf` (`max_values`: None, `max_size`: Some(294), added: 2769, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:0 w:1)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionAccount` (r:0 w:1)
/// Proof: `Nfts::CollectionAccount` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// The range of component `m` is `[0, 1000]`.
/// The range of component `c` is `[0, 1000]`.
/// The range of component `a` is `[0, 1000]`.
fn destroy(m: u32, _c: u32, a: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `32179 + a * (366 ±0)`
// Estimated: `2523990 + a * (2930 ±0)`
// Minimum execution time: 1_376_605_000 picoseconds.
Weight::from_parts(1_488_155_322, 2523990)
// Standard Error: 20_663
.saturating_add(Weight::from_parts(65_636, 0).saturating_mul(m.into()))
// Standard Error: 20_663
.saturating_add(Weight::from_parts(8_224_542, 0).saturating_mul(a.into()))
.saturating_add(T::DbWeight::get().reads(1004_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into())))
.saturating_add(T::DbWeight::get().writes(1005_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into())))
.saturating_add(Weight::from_parts(0, 2930).saturating_mul(a.into()))
}
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Account` (r:0 w:1)
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
fn mint() -> Weight {
// Proof Size summary in bytes:
// Measured: `418`
// Estimated: `4062`
// Minimum execution time: 67_377_000 picoseconds.
Weight::from_parts(68_962_000, 4062)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Account` (r:0 w:1)
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
fn force_mint() -> Weight {
// Proof Size summary in bytes:
// Measured: `418`
// Estimated: `4062`
// Minimum execution time: 65_493_000 picoseconds.
Weight::from_parts(67_405_000, 4062)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
/// Storage: `Nfts::Attribute` (r:1 w:0)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemMetadataOf` (r:1 w:0)
/// Proof: `Nfts::ItemMetadataOf` (`max_values`: None, `max_size`: Some(335), added: 2810, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Account` (r:0 w:1)
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemPriceOf` (r:0 w:1)
/// Proof: `Nfts::ItemPriceOf` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemAttributesApprovalsOf` (r:0 w:1)
/// Proof: `Nfts::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(441), added: 2916, mode: `MaxEncodedLen`)
/// Storage: `Nfts::PendingSwapOf` (r:0 w:1)
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
fn burn() -> Weight {
// Proof Size summary in bytes:
// Measured: `526`
// Estimated: `4062`
// Minimum execution time: 73_291_000 picoseconds.
Weight::from_parts(75_035_000, 4062)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(7_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:0)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:1 w:0)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Account` (r:0 w:2)
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemPriceOf` (r:0 w:1)
/// Proof: `Nfts::ItemPriceOf` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
/// Storage: `Nfts::PendingSwapOf` (r:0 w:1)
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
fn transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `555`
// Estimated: `4062`
// Minimum execution time: 56_413_000 picoseconds.
Weight::from_parts(58_224_000, 4062)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:0)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Item` (r:5000 w:5000)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// The range of component `i` is `[0, 5000]`.
fn redeposit(i: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `750 + i * (83 ±0)`
// Estimated: `3538 + i * (3072 ±0)`
// Minimum execution time: 18_658_000 picoseconds.
Weight::from_parts(19_263_000, 3538)
// Standard Error: 28_107
.saturating_add(Weight::from_parts(24_930_095, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
.saturating_add(Weight::from_parts(0, 3072).saturating_mul(i.into()))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
fn lock_item_transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `423`
// Estimated: `3522`
// Minimum execution time: 24_194_000 picoseconds.
Weight::from_parts(25_183_000, 3522)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
fn unlock_item_transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `423`
// Estimated: `3522`
// Minimum execution time: 24_302_000 picoseconds.
Weight::from_parts(24_760_000, 3522)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:0)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:1)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn lock_collection() -> Weight {
// Proof Size summary in bytes:
// Measured: `327`
// Estimated: `3538`
// Minimum execution time: 20_173_000 picoseconds.
Weight::from_parts(20_850_000, 3538)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::OwnershipAcceptance` (r:1 w:1)
/// Proof: `Nfts::OwnershipAcceptance` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionAccount` (r:0 w:2)
/// Proof: `Nfts::CollectionAccount` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
fn transfer_ownership() -> Weight {
// Proof Size summary in bytes:
// Measured: `524`
// Estimated: `3581`
// Minimum execution time: 35_232_000 picoseconds.
Weight::from_parts(36_300_000, 3581)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionRoleOf` (r:2 w:4)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
fn set_team() -> Weight {
// Proof Size summary in bytes:
// Measured: `344`
// Estimated: `6054`
// Minimum execution time: 49_520_000 picoseconds.
Weight::from_parts(50_640_000, 6054)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionAccount` (r:0 w:2)
/// Proof: `Nfts::CollectionAccount` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
fn force_collection_owner() -> Weight {
// Proof Size summary in bytes:
// Measured: `298`
// Estimated: `3537`
// Minimum execution time: 20_820_000 picoseconds.
Weight::from_parts(21_202_000, 3537)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:0)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:0 w:1)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn force_collection_config() -> Weight {
// Proof Size summary in bytes:
// Measured: `276`
// Estimated: `3537`
// Minimum execution time: 16_693_000 picoseconds.
Weight::from_parts(17_330_000, 3537)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
fn lock_item_properties() -> Weight {
// Proof Size summary in bytes:
// Measured: `423`
// Estimated: `3522`
// Minimum execution time: 23_027_000 picoseconds.
Weight::from_parts(23_442_000, 3522)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:1 w:1)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
fn set_attribute() -> Weight {
// Proof Size summary in bytes:
// Measured: `514`
// Estimated: `3920`
// Minimum execution time: 68_689_000 picoseconds.
Weight::from_parts(70_511_000, 3920)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:1 w:1)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
fn force_set_attribute() -> Weight {
// Proof Size summary in bytes:
// Measured: `331`
// Estimated: `3920`
// Minimum execution time: 32_782_000 picoseconds.
Weight::from_parts(33_772_000, 3920)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Nfts::Attribute` (r:1 w:1)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
fn clear_attribute() -> Weight {
// Proof Size summary in bytes:
// Measured: `958`
// Estimated: `3920`
// Minimum execution time: 62_968_000 picoseconds.
Weight::from_parts(64_747_000, 3920)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Nfts::Item` (r:1 w:0)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemAttributesApprovalsOf` (r:1 w:1)
/// Proof: `Nfts::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(441), added: 2916, mode: `MaxEncodedLen`)
fn approve_item_attributes() -> Weight {
// Proof Size summary in bytes:
// Measured: `356`
// Estimated: `4062`
// Minimum execution time: 20_730_000 picoseconds.
Weight::from_parts(21_384_000, 4062)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::Item` (r:1 w:0)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemAttributesApprovalsOf` (r:1 w:1)
/// Proof: `Nfts::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(441), added: 2916, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:1001 w:1000)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 1000]`.
fn cancel_item_attributes_approval(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `769 + n * (386 ±0)`
// Estimated: `4062 + n * (2930 ±0)`
// Minimum execution time: 33_379_000 picoseconds.
Weight::from_parts(34_195_000, 4062)
// Standard Error: 4_787
.saturating_add(Weight::from_parts(7_772_947, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 2930).saturating_mul(n.into()))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemMetadataOf` (r:1 w:1)
/// Proof: `Nfts::ItemMetadataOf` (`max_values`: None, `max_size`: Some(335), added: 2810, mode: `MaxEncodedLen`)
fn set_metadata() -> Weight {
// Proof Size summary in bytes:
// Measured: `514`
// Estimated: `3800`
// Minimum execution time: 56_022_000 picoseconds.
Weight::from_parts(57_731_000, 3800)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemMetadataOf` (r:1 w:1)
/// Proof: `Nfts::ItemMetadataOf` (`max_values`: None, `max_size`: Some(335), added: 2810, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
fn clear_metadata() -> Weight {
// Proof Size summary in bytes:
// Measured: `824`
// Estimated: `3800`
// Minimum execution time: 53_756_000 picoseconds.
Weight::from_parts(54_834_000, 3800)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionMetadataOf` (r:1 w:1)
/// Proof: `Nfts::CollectionMetadataOf` (`max_values`: None, `max_size`: Some(294), added: 2769, mode: `MaxEncodedLen`)
fn set_collection_metadata() -> Weight {
// Proof Size summary in bytes:
// Measured: `373`
// Estimated: `3759`
// Minimum execution time: 50_526_000 picoseconds.
Weight::from_parts(52_262_000, 3759)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionMetadataOf` (r:1 w:1)
/// Proof: `Nfts::CollectionMetadataOf` (`max_values`: None, `max_size`: Some(294), added: 2769, mode: `MaxEncodedLen`)
fn clear_collection_metadata() -> Weight {
// Proof Size summary in bytes:
// Measured: `691`
// Estimated: `3759`
// Minimum execution time: 50_577_000 picoseconds.
Weight::from_parts(51_516_000, 3759)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn approve_transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `385`
// Estimated: `4062`
// Minimum execution time: 24_204_000 picoseconds.
Weight::from_parts(25_158_000, 4062)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
fn cancel_approval() -> Weight {
// Proof Size summary in bytes:
// Measured: `382`
// Estimated: `4062`
// Minimum execution time: 21_067_000 picoseconds.
Weight::from_parts(21_663_000, 4062)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
fn clear_all_transfer_approvals() -> Weight {
// Proof Size summary in bytes:
// Measured: `382`
// Estimated: `4062`
// Minimum execution time: 19_982_000 picoseconds.
Weight::from_parts(20_493_000, 4062)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::OwnershipAcceptance` (r:1 w:1)
/// Proof: `Nfts::OwnershipAcceptance` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
fn set_accept_ownership() -> Weight {
// Proof Size summary in bytes:
// Measured: `76`
// Estimated: `3505`
// Minimum execution time: 17_144_000 picoseconds.
Weight::from_parts(17_739_000, 3505)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:1)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:0)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
fn set_collection_max_supply() -> Weight {
// Proof Size summary in bytes:
// Measured: `327`
// Estimated: `3538`
// Minimum execution time: 22_173_000 picoseconds.
Weight::from_parts(22_774_000, 3538)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:1)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn update_mint_settings() -> Weight {
// Proof Size summary in bytes:
// Measured: `311`
// Estimated: `3538`
// Minimum execution time: 21_245_000 picoseconds.
Weight::from_parts(21_957_000, 3538)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::Item` (r:1 w:0)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemPriceOf` (r:0 w:1)
/// Proof: `Nfts::ItemPriceOf` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
fn set_price() -> Weight {
// Proof Size summary in bytes:
// Measured: `493`
// Estimated: `4062`
// Minimum execution time: 30_559_000 picoseconds.
Weight::from_parts(31_877_000, 4062)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemPriceOf` (r:1 w:1)
/// Proof: `Nfts::ItemPriceOf` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:0)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:1 w:0)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Account` (r:0 w:2)
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// Storage: `Nfts::PendingSwapOf` (r:0 w:1)
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
fn buy_item() -> Weight {
// Proof Size summary in bytes:
// Measured: `655`
// Estimated: `4062`
// Minimum execution time: 66_567_000 picoseconds.
Weight::from_parts(68_264_000, 4062)
.saturating_add(T::DbWeight::get().reads(6_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// The range of component `n` is `[0, 10]`.
fn pay_tips(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_221_000 picoseconds.
Weight::from_parts(4_654_516, 0)
// Standard Error: 7_679
.saturating_add(Weight::from_parts(2_619_134, 0).saturating_mul(n.into()))
}
/// Storage: `Nfts::Item` (r:2 w:0)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::PendingSwapOf` (r:0 w:1)
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
fn create_swap() -> Weight {
// Proof Size summary in bytes:
// Measured: `444`
// Estimated: `7134`
// Minimum execution time: 26_849_000 picoseconds.
Weight::from_parts(27_644_000, 7134)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::PendingSwapOf` (r:1 w:1)
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Item` (r:1 w:0)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
fn cancel_swap() -> Weight {
// Proof Size summary in bytes:
// Measured: `488`
// Estimated: `4062`
// Minimum execution time: 27_431_000 picoseconds.
Weight::from_parts(27_897_000, 4062)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::Item` (r:2 w:2)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::PendingSwapOf` (r:1 w:2)
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:0)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:2 w:0)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:2 w:0)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Account` (r:0 w:4)
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemPriceOf` (r:0 w:2)
/// Proof: `Nfts::ItemPriceOf` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
fn claim_swap() -> Weight {
// Proof Size summary in bytes:
// Measured: `771`
// Estimated: `7134`
// Minimum execution time: 110_387_000 picoseconds.
Weight::from_parts(112_526_000, 7134)
.saturating_add(T::DbWeight::get().reads(9_u64))
.saturating_add(T::DbWeight::get().writes(10_u64))
}
/// Storage: `Nfts::CollectionRoleOf` (r:2 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:10 w:10)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemMetadataOf` (r:1 w:1)
/// Proof: `Nfts::ItemMetadataOf` (`max_values`: None, `max_size`: Some(335), added: 2810, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Account` (r:0 w:1)
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 10]`.
fn mint_pre_signed(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `580`
// Estimated: `6054 + n * (2930 ±0)`
// Minimum execution time: 159_612_000 picoseconds.
Weight::from_parts(166_084_283, 6054)
// Standard Error: 67_116
.saturating_add(Weight::from_parts(43_826_364, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(6_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 2930).saturating_mul(n.into()))
}
/// Storage: `Nfts::Item` (r:1 w:0)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemAttributesApprovalsOf` (r:1 w:1)
/// Proof: `Nfts::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(441), added: 2916, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:10 w:10)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 10]`.
fn set_attributes_pre_signed(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `575`
// Estimated: `4062 + n * (2930 ±0)`
// Minimum execution time: 75_695_000 picoseconds.
Weight::from_parts(89_915_935, 4062)
// Standard Error: 98_709
.saturating_add(Weight::from_parts(42_240_220, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 2930).saturating_mul(n.into()))
}
}

View file

@ -0,0 +1,449 @@
// Copyright 2025 DataHaven
// This file is part of DataHaven.
// DataHaven 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.
// DataHaven 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 DataHaven. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_payment_streams`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 51.0.0
//! DATE: 2026-01-29, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --runtime
// target/production/wbuild/datahaven-mainnet-runtime/datahaven_mainnet_runtime.compact.compressed.wasm
// --pallet
// pallet_payment_streams
// --extrinsic
//
// --header
// ../file_header.txt
// --template
// benchmarking/frame-weight-template.hbs
// --output
// runtime/mainnet/src/weights/pallet_payment_streams.rs
// --steps
// 50
// --repeat
// 20
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;
/// Weights for `pallet_payment_streams`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_payment_streams::weights::WeightInfo for WeightInfo<T> {
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::RegisteredUsers` (r:1 w:1)
/// Proof: `PaymentStreams::RegisteredUsers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:0)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn create_fixed_rate_payment_stream() -> Weight {
// Proof Size summary in bytes:
// Measured: `523`
// Estimated: `6054`
// Minimum execution time: 107_606_000 picoseconds.
Weight::from_parts(108_915_000, 6054)
.saturating_add(T::DbWeight::get().reads(11_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:1 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:1 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:3 w:3)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:0)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:4 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:0)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
fn update_fixed_rate_payment_stream() -> Weight {
// Proof Size summary in bytes:
// Measured: `1427`
// Estimated: `12414`
// Minimum execution time: 403_134_000 picoseconds.
Weight::from_parts(416_206_000, 12414)
.saturating_add(T::DbWeight::get().reads(21_u64))
.saturating_add(T::DbWeight::get().writes(6_u64))
}
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:0)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:1 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:1 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:3 w:3)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:0)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:4 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:0)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::RegisteredUsers` (r:1 w:1)
/// Proof: `PaymentStreams::RegisteredUsers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
fn delete_fixed_rate_payment_stream() -> Weight {
// Proof Size summary in bytes:
// Measured: `1304`
// Estimated: `12414`
// Minimum execution time: 295_969_000 picoseconds.
Weight::from_parts(300_145_000, 12414)
.saturating_add(T::DbWeight::get().reads(22_u64))
.saturating_add(T::DbWeight::get().writes(6_u64))
}
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (r:1 w:0)
/// Proof: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::RegisteredUsers` (r:1 w:1)
/// Proof: `PaymentStreams::RegisteredUsers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::AccumulatedPriceIndex` (r:1 w:0)
/// Proof: `PaymentStreams::AccumulatedPriceIndex` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
fn create_dynamic_rate_payment_stream() -> Weight {
// Proof Size summary in bytes:
// Measured: `525`
// Estimated: `6054`
// Minimum execution time: 110_904_000 picoseconds.
Weight::from_parts(113_365_000, 6054)
.saturating_add(T::DbWeight::get().reads(12_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:1 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:1 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:3 w:3)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:0)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:4 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:0)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (r:1 w:0)
/// Proof: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
fn update_dynamic_rate_payment_stream() -> Weight {
// Proof Size summary in bytes:
// Measured: `1387`
// Estimated: `12414`
// Minimum execution time: 351_490_000 picoseconds.
Weight::from_parts(354_309_000, 12414)
.saturating_add(T::DbWeight::get().reads(21_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:1 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:1 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:3 w:3)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:0)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:4 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:0)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::RegisteredUsers` (r:1 w:1)
/// Proof: `PaymentStreams::RegisteredUsers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
fn delete_dynamic_rate_payment_stream() -> Weight {
// Proof Size summary in bytes:
// Measured: `1455`
// Estimated: `12414`
// Minimum execution time: 399_760_000 picoseconds.
Weight::from_parts(410_315_000, 12414)
.saturating_add(T::DbWeight::get().reads(22_u64))
.saturating_add(T::DbWeight::get().writes(7_u64))
}
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:1 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:1 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:3 w:3)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:0)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:4 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:0)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn charge_payment_streams() -> Weight {
// Proof Size summary in bytes:
// Measured: `1441`
// Estimated: `12414`
// Minimum execution time: 335_054_000 picoseconds.
Weight::from_parts(339_893_000, 12414)
.saturating_add(T::DbWeight::get().reads(21_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:0)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:10 w:10)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:10 w:10)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:1 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:1 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:10 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:12 w:12)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:0)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:4 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 10]`.
fn charge_multiple_users_payment_streams(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1122 + n * (331 ±0)`
// Estimated: `12414 + n * (2604 ±0)`
// Minimum execution time: 20_587_000 picoseconds.
Weight::from_parts(44_190_125, 12414)
// Standard Error: 170_219
.saturating_add(Weight::from_parts(294_748_615, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(12_u64))
.saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 2604).saturating_mul(n.into()))
}
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1001 w:1001)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:0)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:999 w:999)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:999 w:999)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:999 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:999 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:4 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:999 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::RegisteredUsers` (r:1 w:1)
/// Proof: `PaymentStreams::RegisteredUsers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// The range of component `n` is `[1, 1000]`.
fn pay_outstanding_debt(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1422 + n * (644 ±0)`
// Estimated: `12414 + n * (3634 ±0)`
// Minimum execution time: 376_066_000 picoseconds.
Weight::from_parts(378_172_000, 12414)
// Standard Error: 147_940
.saturating_add(Weight::from_parts(283_749_757, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(11_u64))
.saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(4_u64))
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 3634).saturating_mul(n.into()))
}
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:1)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:0)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::RegisteredUsers` (r:1 w:0)
/// Proof: `PaymentStreams::RegisteredUsers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
fn clear_insolvent_flag() -> Weight {
// Proof Size summary in bytes:
// Measured: `231`
// Estimated: `3505`
// Minimum execution time: 22_472_000 picoseconds.
Weight::from_parts(23_180_000, 3505)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (r:1 w:0)
/// Proof: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::AccumulatedPriceIndex` (r:1 w:1)
/// Proof: `PaymentStreams::AccumulatedPriceIndex` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
fn price_index_update() -> Weight {
// Proof Size summary in bytes:
// Measured: `116`
// Estimated: `1501`
// Minimum execution time: 5_847_000 picoseconds.
Weight::from_parts(6_187_000, 1501)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:1)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn tick_update() -> Weight {
// Proof Size summary in bytes:
// Measured: `114`
// Estimated: `1489`
// Minimum execution time: 3_884_000 picoseconds.
Weight::from_parts(4_063_000, 1489)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `ProofsDealer::ChallengesTicker` (r:1 w:0)
/// Proof: `ProofsDealer::ChallengesTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastSubmittersTickRegistered` (r:1 w:1)
/// Proof: `PaymentStreams::LastSubmittersTickRegistered` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ValidProofSubmittersLastTicks` (r:1 w:0)
/// Proof: `ProofsDealer::ValidProofSubmittersLastTicks` (`max_values`: None, `max_size`: Some(7830), added: 10305, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::AccumulatedPriceIndex` (r:1 w:0)
/// Proof: `PaymentStreams::AccumulatedPriceIndex` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:244 w:244)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 244]`.
fn update_providers_last_chargeable_info(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `270 + n * (32 ±0)`
// Estimated: `11295 + n * (2543 ±0)`
// Minimum execution time: 12_468_000 picoseconds.
Weight::from_parts(9_805_506, 11295)
// Standard Error: 5_017
.saturating_add(Weight::from_parts(6_952_512, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 2543).saturating_mul(n.into()))
}
}

View file

@ -0,0 +1,326 @@
// Copyright 2025 DataHaven
// This file is part of DataHaven.
// DataHaven 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.
// DataHaven 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 DataHaven. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_proofs_dealer`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 51.0.0
//! DATE: 2026-01-29, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --runtime
// target/production/wbuild/datahaven-mainnet-runtime/datahaven_mainnet_runtime.compact.compressed.wasm
// --pallet
// pallet_proofs_dealer
// --extrinsic
//
// --header
// ../file_header.txt
// --template
// benchmarking/frame-weight-template.hbs
// --output
// runtime/mainnet/src/weights/pallet_proofs_dealer.rs
// --steps
// 50
// --repeat
// 20
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;
/// Weights for `pallet_proofs_dealer`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_proofs_dealer::weights::WeightInfo for WeightInfo<T> {
/// Storage: `ProofsDealer::ChallengesQueue` (r:1 w:1)
/// Proof: `ProofsDealer::ChallengesQueue` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
fn challenge() -> Weight {
// Proof Size summary in bytes:
// Measured: `41`
// Estimated: `4687`
// Minimum execution time: 11_710_000 picoseconds.
Weight::from_parts(12_273_000, 4687)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ProviderToProofSubmissionRecord` (r:1 w:1)
/// Proof: `ProofsDealer::ProviderToProofSubmissionRecord` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:2 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ChallengesTicker` (r:1 w:0)
/// Proof: `ProofsDealer::ChallengesTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToChallengesSeed` (r:1 w:0)
/// Proof: `ProofsDealer::TickToChallengesSeed` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::LastCheckpointTick` (r:1 w:0)
/// Proof: `ProofsDealer::LastCheckpointTick` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToCheckpointChallenges` (r:1 w:0)
/// Proof: `ProofsDealer::TickToCheckpointChallenges` (`max_values`: None, `max_size`: Some(681), added: 3156, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:0)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:1)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:0)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:1 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:1 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:5 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (r:1 w:0)
/// Proof: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ValidProofSubmittersLastTicks` (r:1 w:1)
/// Proof: `ProofsDealer::ValidProofSubmittersLastTicks` (`max_values`: None, `max_size`: Some(7830), added: 10305, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToProvidersDeadlines` (r:0 w:2)
/// Proof: `ProofsDealer::TickToProvidersDeadlines` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// The range of component `n` is `[1, 20]`.
fn submit_proof_no_checkpoint_challenges_key_proofs(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `2070`
// Estimated: `15270`
// Minimum execution time: 2_180_337_000 picoseconds.
Weight::from_parts(2_068_089_120, 15270)
// Standard Error: 256_975
.saturating_add(Weight::from_parts(139_273_283, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(30_u64))
.saturating_add(T::DbWeight::get().writes(9_u64))
}
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ProviderToProofSubmissionRecord` (r:1 w:1)
/// Proof: `ProofsDealer::ProviderToProofSubmissionRecord` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:0)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ChallengesTicker` (r:1 w:0)
/// Proof: `ProofsDealer::ChallengesTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToChallengesSeed` (r:1 w:0)
/// Proof: `ProofsDealer::TickToChallengesSeed` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::LastCheckpointTick` (r:1 w:0)
/// Proof: `ProofsDealer::LastCheckpointTick` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToCheckpointChallenges` (r:1 w:0)
/// Proof: `ProofsDealer::TickToCheckpointChallenges` (`max_values`: None, `max_size`: Some(681), added: 3156, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:1 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ValidProofSubmittersLastTicks` (r:1 w:1)
/// Proof: `ProofsDealer::ValidProofSubmittersLastTicks` (`max_values`: None, `max_size`: Some(7830), added: 10305, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToProvidersDeadlines` (r:0 w:2)
/// Proof: `ProofsDealer::TickToProvidersDeadlines` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:0)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:1)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:0)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:1 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:1 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (r:1 w:0)
/// Proof: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// The range of component `n` is `[21, 40]`.
fn submit_proof_with_checkpoint_challenges_key_proofs(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `2070`
// Estimated: `20676`
// Minimum execution time: 4_705_521_000 picoseconds.
Weight::from_parts(4_096_774_230, 20676)
// Standard Error: 968_637
.saturating_add(Weight::from_parts(38_494_397, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(39_u64))
.saturating_add(T::DbWeight::get().writes(11_u64))
}
/// Storage: `ProofsDealer::ChallengesTicker` (r:1 w:1)
/// Proof: `ProofsDealer::ChallengesTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Randomness::LatestParentBlockRandomness` (r:1 w:0)
/// Proof: `Randomness::LatestParentBlockRandomness` (`max_values`: Some(1), `max_size`: Some(36), added: 531, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::LastCheckpointTick` (r:1 w:0)
/// Proof: `ProofsDealer::LastCheckpointTick` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToCheckpointChallenges` (r:1 w:0)
/// Proof: `ProofsDealer::TickToCheckpointChallenges` (`max_values`: None, `max_size`: Some(681), added: 3156, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToCheckForSlashableProviders` (r:1 w:1)
/// Proof: `ProofsDealer::TickToCheckForSlashableProviders` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToProvidersDeadlines` (r:1001 w:2000)
/// Proof: `ProofsDealer::TickToProvidersDeadlines` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ProviderToProofSubmissionRecord` (r:1000 w:1000)
/// Proof: `ProofsDealer::ProviderToProofSubmissionRecord` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::SlashableProviders` (r:1000 w:1000)
/// Proof: `ProofsDealer::SlashableProviders` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1000 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1000 w:0)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:1 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToChallengesSeed` (r:0 w:1)
/// Proof: `ProofsDealer::TickToChallengesSeed` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 1000]`.
fn new_challenges_round(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1155 + n * (271 ±0)`
// Estimated: `6172 + n * (3634 ±0)`
// Minimum execution time: 29_450_000 picoseconds.
Weight::from_parts(30_176_000, 6172)
// Standard Error: 45_927
.saturating_add(Weight::from_parts(40_350_233, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(3_u64))
.saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 3634).saturating_mul(n.into()))
}
/// Storage: `ProofsDealer::PriorityChallengesQueue` (r:1 w:1)
/// Proof: `ProofsDealer::PriorityChallengesQueue` (`max_values`: Some(1), `max_size`: Some(3302), added: 3797, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ChallengesQueue` (r:1 w:1)
/// Proof: `ProofsDealer::ChallengesQueue` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::LastCheckpointTick` (r:1 w:1)
/// Proof: `ProofsDealer::LastCheckpointTick` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToCheckpointChallenges` (r:0 w:2)
/// Proof: `ProofsDealer::TickToCheckpointChallenges` (`max_values`: None, `max_size`: Some(681), added: 3156, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 20]`.
fn new_checkpoint_challenge_round(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `65 + n * (32 ±0)`
// Estimated: `4787`
// Minimum execution time: 14_001_000 picoseconds.
Weight::from_parts(15_995_280, 4787)
// Standard Error: 3_445
.saturating_add(Weight::from_parts(449_577, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `ProofsDealer::PastBlocksStatus` (r:1 w:1)
/// Proof: `ProofsDealer::PastBlocksStatus` (`max_values`: Some(1), `max_size`: Some(51), added: 546, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::PastBlocksWeight` (r:1 w:0)
/// Proof: `ProofsDealer::PastBlocksWeight` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ChallengesTicker` (r:1 w:0)
/// Proof: `ProofsDealer::ChallengesTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ChallengesTickerPaused` (r:0 w:1)
/// Proof: `ProofsDealer::ChallengesTickerPaused` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
fn check_spamming_condition() -> Weight {
// Proof Size summary in bytes:
// Measured: `248`
// Estimated: `3501`
// Minimum execution time: 14_141_000 picoseconds.
Weight::from_parts(14_450_000, 3501)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `ProofsDealer::LastDeletedTick` (r:1 w:0)
/// Proof: `ProofsDealer::LastDeletedTick` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ChallengesTicker` (r:1 w:0)
/// Proof: `ProofsDealer::ChallengesTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn trim_valid_proof_submitters_last_ticks_constant_execution() -> Weight {
// Proof Size summary in bytes:
// Measured: `41`
// Estimated: `1489`
// Minimum execution time: 4_433_000 picoseconds.
Weight::from_parts(4_657_000, 1489)
.saturating_add(T::DbWeight::get().reads(2_u64))
}
/// Storage: `ProofsDealer::LastDeletedTick` (r:0 w:1)
/// Proof: `ProofsDealer::LastDeletedTick` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ValidProofSubmittersLastTicks` (r:0 w:1)
/// Proof: `ProofsDealer::ValidProofSubmittersLastTicks` (`max_values`: None, `max_size`: Some(7830), added: 10305, mode: `MaxEncodedLen`)
fn trim_valid_proof_submitters_last_ticks_loop() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_533_000 picoseconds.
Weight::from_parts(2_701_000, 0)
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `ProofsDealer::PastBlocksWeight` (r:0 w:2)
/// Proof: `ProofsDealer::PastBlocksWeight` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
fn on_finalize() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 4_812_000 picoseconds.
Weight::from_parts(5_079_000, 0)
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:0)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ProviderToProofSubmissionRecord` (r:1 w:1)
/// Proof: `ProofsDealer::ProviderToProofSubmissionRecord` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ChallengesTicker` (r:1 w:0)
/// Proof: `ProofsDealer::ChallengesTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:1 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToProvidersDeadlines` (r:0 w:1)
/// Proof: `ProofsDealer::TickToProvidersDeadlines` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
fn force_initialise_challenge_cycle() -> Weight {
// Proof Size summary in bytes:
// Measured: `552`
// Estimated: `4624`
// Minimum execution time: 44_569_000 picoseconds.
Weight::from_parts(46_326_000, 4624)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `ProofsDealer::ChallengesTickerPaused` (r:0 w:1)
/// Proof: `ProofsDealer::ChallengesTickerPaused` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
fn set_paused() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_440_000 picoseconds.
Weight::from_parts(7_760_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
}

View file

@ -0,0 +1,84 @@
// Copyright 2025 DataHaven
// This file is part of DataHaven.
// DataHaven 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.
// DataHaven 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 DataHaven. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_session`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 51.0.0
//! DATE: 2026-01-29, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --runtime
// target/production/wbuild/datahaven-mainnet-runtime/datahaven_mainnet_runtime.compact.compressed.wasm
// --pallet
// pallet_session
// --extrinsic
//
// --header
// ../file_header.txt
// --template
// benchmarking/frame-weight-template.hbs
// --output
// runtime/mainnet/src/weights/pallet_session.rs
// --steps
// 50
// --repeat
// 20
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;
/// Weights for `pallet_session`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_session::WeightInfo for WeightInfo<T> {
/// 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: `350`
// Estimated: `11240`
// Minimum execution time: 36_482_000 picoseconds.
Weight::from_parts(37_467_000, 11240)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// 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: `328`
// Estimated: `3793`
// Minimum execution time: 21_767_000 picoseconds.
Weight::from_parts(22_530_000, 3793)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
}

View file

@ -0,0 +1,630 @@
// Copyright 2025 DataHaven
// This file is part of DataHaven.
// DataHaven 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.
// DataHaven 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 DataHaven. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_storage_providers`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 51.0.0
//! DATE: 2026-01-29, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --runtime
// target/production/wbuild/datahaven-mainnet-runtime/datahaven_mainnet_runtime.compact.compressed.wasm
// --pallet
// pallet_storage_providers
// --extrinsic
//
// --header
// ../file_header.txt
// --template
// benchmarking/frame-weight-template.hbs
// --output
// runtime/mainnet/src/weights/pallet_storage_providers.rs
// --steps
// 50
// --repeat
// 20
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;
/// Weights for `pallet_storage_providers`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_storage_providers::weights::WeightInfo for WeightInfo<T> {
/// Storage: `Providers::SignUpRequests` (r:1 w:1)
/// Proof: `Providers::SignUpRequests` (`max_values`: None, `max_size`: Some(2163), added: 4638, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
fn request_msp_sign_up() -> Weight {
// Proof Size summary in bytes:
// Measured: `270`
// Estimated: `5628`
// Minimum execution time: 87_582_000 picoseconds.
Weight::from_parts(89_898_000, 5628)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `Providers::SignUpRequests` (r:1 w:1)
/// Proof: `Providers::SignUpRequests` (`max_values`: None, `max_size`: Some(2163), added: 4638, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
fn request_bsp_sign_up() -> Weight {
// Proof Size summary in bytes:
// Measured: `270`
// Estimated: `5628`
// Minimum execution time: 88_155_000 picoseconds.
Weight::from_parts(90_220_000, 5628)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `Providers::SignUpRequests` (r:1 w:1)
/// Proof: `Providers::SignUpRequests` (`max_values`: None, `max_size`: Some(2163), added: 4638, mode: `MaxEncodedLen`)
/// Storage: `Randomness::LatestOneEpochAgoRandomness` (r:1 w:0)
/// Proof: `Randomness::LatestOneEpochAgoRandomness` (`max_values`: Some(1), `max_size`: Some(36), added: 531, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:1)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::BspCount` (r:1 w:1)
/// Proof: `Providers::BspCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::GlobalBspsReputationWeight` (r:1 w:1)
/// Proof: `Providers::GlobalBspsReputationWeight` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:0 w:1)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:0 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
fn confirm_sign_up_bsp() -> Weight {
// Proof Size summary in bytes:
// Measured: `474`
// Estimated: `5628`
// Minimum execution time: 38_210_000 picoseconds.
Weight::from_parts(39_338_000, 5628)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(6_u64))
}
/// Storage: `Providers::SignUpRequests` (r:1 w:1)
/// Proof: `Providers::SignUpRequests` (`max_values`: None, `max_size`: Some(2163), added: 4638, mode: `MaxEncodedLen`)
/// Storage: `Randomness::LatestOneEpochAgoRandomness` (r:1 w:0)
/// Proof: `Randomness::LatestOneEpochAgoRandomness` (`max_values`: Some(1), `max_size`: Some(36), added: 531, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviderIdsToValuePropositions` (r:1 w:1)
/// Proof: `Providers::MainStorageProviderIdsToValuePropositions` (`max_values`: None, `max_size`: Some(1123), added: 3598, mode: `MaxEncodedLen`)
/// Storage: `Providers::MspCount` (r:1 w:1)
/// Proof: `Providers::MspCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:0 w:1)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:0 w:1)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:0 w:1)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
fn confirm_sign_up_msp() -> Weight {
// Proof Size summary in bytes:
// Measured: `487`
// Estimated: `5628`
// Minimum execution time: 54_698_000 picoseconds.
Weight::from_parts(55_937_000, 5628)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(6_u64))
}
/// Storage: `Providers::SignUpRequests` (r:1 w:1)
/// Proof: `Providers::SignUpRequests` (`max_values`: None, `max_size`: Some(2163), added: 4638, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
fn cancel_sign_up() -> Weight {
// Proof Size summary in bytes:
// Measured: `507`
// Estimated: `5628`
// Minimum execution time: 65_127_000 picoseconds.
Weight::from_parts(65_875_000, 5628)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:1)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:1)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviderIdsToValuePropositions` (r:102 w:101)
/// Proof: `Providers::MainStorageProviderIdsToValuePropositions` (`max_values`: None, `max_size`: Some(1123), added: 3598, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::MspCount` (r:1 w:1)
/// Proof: `Providers::MspCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:0 w:1)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 100]`.
fn msp_sign_off(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `775 + n * (83 ±0)`
// Estimated: `8186 + n * (3598 ±0)`
// Minimum execution time: 91_582_000 picoseconds.
Weight::from_parts(91_148_393, 8186)
// Standard Error: 9_568
.saturating_add(Weight::from_parts(6_388_975, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(7_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(7_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 3598).saturating_mul(n.into()))
}
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:1)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ProviderToProofSubmissionRecord` (r:1 w:0)
/// Proof: `ProofsDealer::ProviderToProofSubmissionRecord` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:1)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::BspCount` (r:1 w:1)
/// Proof: `Providers::BspCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::GlobalBspsReputationWeight` (r:1 w:1)
/// Proof: `Providers::GlobalBspsReputationWeight` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn bsp_sign_off() -> Weight {
// Proof Size summary in bytes:
// Measured: `720`
// Estimated: `4624`
// Minimum execution time: 92_255_000 picoseconds.
Weight::from_parts(93_446_000, 4624)
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().writes(7_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:1)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
fn change_capacity_bsp_less_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `679`
// Estimated: `4624`
// Minimum execution time: 82_856_000 picoseconds.
Weight::from_parts(85_018_000, 4624)
.saturating_add(T::DbWeight::get().reads(7_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:1)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
fn change_capacity_bsp_more_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `679`
// Estimated: `4624`
// Minimum execution time: 102_474_000 picoseconds.
Weight::from_parts(104_618_000, 4624)
.saturating_add(T::DbWeight::get().reads(7_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:1)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
fn change_capacity_msp_less_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `649`
// Estimated: `4608`
// Minimum execution time: 78_146_000 picoseconds.
Weight::from_parts(80_013_000, 4608)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:1)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
fn change_capacity_msp_more_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `649`
// Estimated: `4608`
// Minimum execution time: 97_535_000 picoseconds.
Weight::from_parts(99_407_000, 4608)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviderIdsToValuePropositions` (r:1 w:1)
/// Proof: `Providers::MainStorageProviderIdsToValuePropositions` (`max_values`: None, `max_size`: Some(1123), added: 3598, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:1)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
fn add_value_prop() -> Weight {
// Proof Size summary in bytes:
// Measured: `591`
// Estimated: `4608`
// Minimum execution time: 45_319_000 picoseconds.
Weight::from_parts(46_335_000, 4608)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:0)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviderIdsToValuePropositions` (r:1 w:1)
/// Proof: `Providers::MainStorageProviderIdsToValuePropositions` (`max_values`: None, `max_size`: Some(1123), added: 3598, mode: `MaxEncodedLen`)
fn make_value_prop_unavailable() -> Weight {
// Proof Size summary in bytes:
// Measured: `631`
// Estimated: `4608`
// Minimum execution time: 32_867_000 picoseconds.
Weight::from_parts(33_943_000, 4608)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
fn add_multiaddress() -> Weight {
// Proof Size summary in bytes:
// Measured: `508`
// Estimated: `4624`
// Minimum execution time: 34_149_000 picoseconds.
Weight::from_parts(35_552_000, 4624)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
fn remove_multiaddress() -> Weight {
// Proof Size summary in bytes:
// Measured: `1316`
// Estimated: `4624`
// Minimum execution time: 32_650_000 picoseconds.
Weight::from_parts(33_556_000, 4624)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Providers::SignUpRequests` (r:1 w:1)
/// Proof: `Providers::SignUpRequests` (`max_values`: None, `max_size`: Some(2163), added: 4638, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:1)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviderIdsToValuePropositions` (r:1 w:1)
/// Proof: `Providers::MainStorageProviderIdsToValuePropositions` (`max_values`: None, `max_size`: Some(1123), added: 3598, mode: `MaxEncodedLen`)
/// Storage: `Providers::MspCount` (r:1 w:1)
/// Proof: `Providers::MspCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:0 w:1)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:0 w:1)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
fn force_msp_sign_up() -> Weight {
// Proof Size summary in bytes:
// Measured: `270`
// Estimated: `5628`
// Minimum execution time: 126_083_000 picoseconds.
Weight::from_parts(127_714_000, 5628)
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().writes(8_u64))
}
/// Storage: `Providers::SignUpRequests` (r:1 w:1)
/// Proof: `Providers::SignUpRequests` (`max_values`: None, `max_size`: Some(2163), added: 4638, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:1)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:1)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::BspCount` (r:1 w:1)
/// Proof: `Providers::BspCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::GlobalBspsReputationWeight` (r:1 w:1)
/// Proof: `Providers::GlobalBspsReputationWeight` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:0 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
fn force_bsp_sign_up() -> Weight {
// Proof Size summary in bytes:
// Measured: `270`
// Estimated: `5628`
// Minimum execution time: 104_033_000 picoseconds.
Weight::from_parts(106_787_000, 5628)
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().writes(8_u64))
}
/// Storage: `Providers::MainStorageProviders` (r:1 w:0)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::SlashableProviders` (r:1 w:1)
/// Proof: `ProofsDealer::SlashableProviders` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:1 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:1 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
fn slash_without_awaiting_top_up() -> Weight {
// Proof Size summary in bytes:
// Measured: `871`
// Estimated: `6172`
// Minimum execution time: 159_588_000 picoseconds.
Weight::from_parts(161_719_000, 6172)
.saturating_add(T::DbWeight::get().reads(9_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Providers::MainStorageProviders` (r:1 w:0)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::SlashableProviders` (r:1 w:1)
/// Proof: `ProofsDealer::SlashableProviders` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:2 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:1 w:1)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ChallengesTicker` (r:1 w:0)
/// Proof: `ProofsDealer::ChallengesTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::NextAvailableProviderTopUpExpirationShTick` (r:1 w:1)
/// Proof: `Providers::NextAvailableProviderTopUpExpirationShTick` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::ProviderTopUpExpirations` (r:1 w:1)
/// Proof: `Providers::ProviderTopUpExpirations` (`max_values`: None, `max_size`: Some(3322), added: 5797, mode: `MaxEncodedLen`)
fn slash_with_awaiting_top_up() -> Weight {
// Proof Size summary in bytes:
// Measured: `871`
// Estimated: `6787`
// Minimum execution time: 126_797_000 picoseconds.
Weight::from_parts(129_937_000, 6787)
.saturating_add(T::DbWeight::get().reads(13_u64))
.saturating_add(T::DbWeight::get().writes(8_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:0)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:1 w:1)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Providers::ProviderTopUpExpirations` (r:0 w:1)
/// Proof: `Providers::ProviderTopUpExpirations` (`max_values`: None, `max_size`: Some(3322), added: 5797, mode: `MaxEncodedLen`)
fn top_up_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `758`
// Estimated: `4624`
// Minimum execution time: 111_138_000 picoseconds.
Weight::from_parts(113_128_000, 4624)
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Providers::InsolventProviders` (r:2 w:1)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:0)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:0)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:0)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:1)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ProviderToProofSubmissionRecord` (r:1 w:1)
/// Proof: `ProofsDealer::ProviderToProofSubmissionRecord` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// Storage: `Providers::BspCount` (r:1 w:1)
/// Proof: `Providers::BspCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:1)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:1)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::GlobalBspsReputationWeight` (r:1 w:1)
/// Proof: `Providers::GlobalBspsReputationWeight` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToProvidersDeadlines` (r:0 w:1)
/// Proof: `ProofsDealer::TickToProvidersDeadlines` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
fn delete_provider_bsp() -> Weight {
// Proof Size summary in bytes:
// Measured: `853`
// Estimated: `6038`
// Minimum execution time: 80_884_000 picoseconds.
Weight::from_parts(82_175_000, 6038)
.saturating_add(T::DbWeight::get().reads(12_u64))
.saturating_add(T::DbWeight::get().writes(9_u64))
}
/// Storage: `Providers::InsolventProviders` (r:1 w:1)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:0)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:0)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:1)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviderIdsToValuePropositions` (r:22 w:21)
/// Proof: `Providers::MainStorageProviderIdsToValuePropositions` (`max_values`: None, `max_size`: Some(1123), added: 3598, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviderIdsToBuckets` (r:21 w:20)
/// Proof: `Providers::MainStorageProviderIdsToBuckets` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
/// Storage: `Providers::MspCount` (r:1 w:1)
/// Proof: `Providers::MspCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:0 w:1)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 20]`.
/// The range of component `m` is `[0, 20]`.
fn delete_provider_msp(n: u32, m: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1845 + m * (54 ±0) + n * (83 ±0)`
// Estimated: `8186 + m * (2571 ±0) + n * (3598 ±0)`
// Minimum execution time: 184_840_000 picoseconds.
Weight::from_parts(79_815_534, 8186)
// Standard Error: 30_345
.saturating_add(Weight::from_parts(6_847_952, 0).saturating_mul(n.into()))
// Standard Error: 30_345
.saturating_add(Weight::from_parts(5_652_904, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into())))
.saturating_add(T::DbWeight::get().writes(5_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m.into())))
.saturating_add(Weight::from_parts(0, 2571).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 3598).saturating_mul(n.into()))
}
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ProviderToProofSubmissionRecord` (r:1 w:0)
/// Proof: `ProofsDealer::ProviderToProofSubmissionRecord` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
fn stop_all_cycles() -> Weight {
// Proof Size summary in bytes:
// Measured: `549`
// Estimated: `4624`
// Minimum execution time: 27_400_000 picoseconds.
Weight::from_parts(27_944_000, 4624)
.saturating_add(T::DbWeight::get().reads(3_u64))
}
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:1 w:1)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ProviderToProofSubmissionRecord` (r:1 w:1)
/// Proof: `ProofsDealer::ProviderToProofSubmissionRecord` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:0 w:1)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToProvidersDeadlines` (r:0 w:1)
/// Proof: `ProofsDealer::TickToProvidersDeadlines` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
fn process_expired_provider_top_up_bsp() -> Weight {
// Proof Size summary in bytes:
// Measured: `1038`
// Estimated: `6172`
// Minimum execution time: 103_682_000 picoseconds.
Weight::from_parts(105_525_000, 6172)
.saturating_add(T::DbWeight::get().reads(7_u64))
.saturating_add(T::DbWeight::get().writes(7_u64))
}
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:1 w:1)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:0)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:0 w:1)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
fn process_expired_provider_top_up_msp() -> Weight {
// Proof Size summary in bytes:
// Measured: `775`
// Estimated: `6172`
// Minimum execution time: 83_347_000 picoseconds.
Weight::from_parts(84_976_000, 6172)
.saturating_add(T::DbWeight::get().reads(6_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
}

View file

@ -86,6 +86,7 @@ polkadot-runtime-common = { workspace = true }
precompile-utils = { workspace = true }
scale-info = { workspace = true, features = ["derive", "serde"] }
serde = { workspace = true, features = ["derive"] }
k256 = { workspace = true, optional = true }
serde_json = { workspace = true, default-features = false, features = [
"alloc",
] }
@ -361,6 +362,13 @@ runtime-benchmarks = [
"snowbridge-pallet-system/runtime-benchmarks",
"pallet-outbound-commitment-store/runtime-benchmarks",
"pallet-datahaven-native-transfer/runtime-benchmarks",
# StorageHub pallets
"pallet-nfts/runtime-benchmarks",
"pallet-file-system/runtime-benchmarks",
"pallet-proofs-dealer/runtime-benchmarks",
"pallet-payment-streams/runtime-benchmarks",
"pallet-storage-providers/runtime-benchmarks",
"dep:k256",
]
try-runtime = [

View file

@ -27,6 +27,7 @@ frame_benchmarking::define_benchmarks!(
// Substrate pallets
[pallet_balances, Balances]
[pallet_session, pallet_session_benchmarking::Pallet::<Runtime>]
// FIXME: benchmarking identity fail
// [pallet_identity, Identity]
[pallet_im_online, ImOnline]
@ -44,6 +45,13 @@ frame_benchmarking::define_benchmarks!(
[pallet_safe_mode, SafeMode]
[pallet_tx_pause, TxPause]
// StorageHub pallets
[pallet_nfts, Nfts]
[pallet_file_system, FileSystem]
[pallet_proofs_dealer, ProofsDealer]
[pallet_payment_streams, PaymentStreams]
[pallet_storage_providers, Providers]
// Governance pallets
[pallet_collective_technical_committee, TechnicalCommittee]
[pallet_collective_treasury_council, TreasuryCouncil]

View file

@ -91,7 +91,6 @@ use datahaven_runtime_common::{
},
time::{EpochDurationInBlocks, SessionsPerEra, DAYS, MILLISECS_PER_BLOCK},
};
use dhp_bridge::{EigenLayerMessageProcessor, NativeTokenTransferMessageProcessor};
use frame_support::{
derive_impl,
dispatch::DispatchClass,
@ -126,7 +125,7 @@ use snowbridge_core::{gwei, meth, AgentIdOf, PricingParameters, Rewards, TokenId
use snowbridge_inbound_queue_primitives::RewardLedger;
use snowbridge_outbound_queue_primitives::{
v1::{Fee, Message, SendMessage},
v2::{Command, ConstantGasMeter},
v2::ConstantGasMeter,
SendError, SendMessageFeeProvider,
};
use snowbridge_pallet_outbound_queue_v2::OnNewCommitment;
@ -387,7 +386,7 @@ impl pallet_session::Config for Runtime {
>;
type SessionHandler = <SessionKeys as OpaqueKeys>::KeyTypeIdProviders;
type Keys = SessionKeys;
type WeightInfo = pallet_session::weights::SubstrateWeight<Runtime>;
type WeightInfo = stagenet_weights::pallet_session::WeightInfo<Runtime>;
}
parameter_types! {
@ -1105,47 +1104,13 @@ impl snowbridge_pallet_system_v2::Config for Runtime {
type Helper = ();
}
// Fork versions for runtime benchmarks - must match the fixtures for BLS verification to work
// The fixtures are generated with standard testnet fork versions
#[cfg(feature = "runtime-benchmarks")]
parameter_types! {
pub const ChainForkVersions: ForkVersions = ForkVersions {
genesis: Fork {
version: hex_literal::hex!("00000000"),
epoch: 0,
},
altair: Fork {
version: hex_literal::hex!("01000000"),
epoch: 0,
},
bellatrix: Fork {
version: hex_literal::hex!("02000000"),
epoch: 0,
},
capella: Fork {
version: hex_literal::hex!("03000000"),
epoch: 0,
},
deneb: Fork {
version: hex_literal::hex!("04000000"),
epoch: 0,
},
electra: Fork {
version: hex_literal::hex!("05000000"),
epoch: 80000000000,
},
fulu: Fork {
version: hex_literal::hex!("06000000"),
epoch: 90000000000,
},
};
}
// For tests, fast-runtime and std configurations we use the mocked fork versions
// These match the fork versions used by the local Ethereum network in E2E tests
#[cfg(all(
any(feature = "std", feature = "fast-runtime", test),
not(feature = "runtime-benchmarks")
#[cfg(any(
feature = "std",
feature = "fast-runtime",
feature = "runtime-benchmarks",
test
))]
parameter_types! {
pub const ChainForkVersions: ForkVersions = ForkVersions {
@ -1275,8 +1240,8 @@ impl snowbridge_pallet_inbound_queue_v2::Config for Runtime {
type GatewayAddress = runtime_params::dynamic_params::runtime_config::EthereumGatewayAddress;
#[cfg(not(feature = "runtime-benchmarks"))]
type MessageProcessor = (
EigenLayerMessageProcessor<Runtime>,
NativeTokenTransferMessageProcessor<Runtime>,
dhp_bridge::EigenLayerMessageProcessor<Runtime>,
dhp_bridge::NativeTokenTransferMessageProcessor<Runtime>,
);
#[cfg(feature = "runtime-benchmarks")]
type MessageProcessor = NoOpMessageProcessor;
@ -1746,6 +1711,7 @@ mod tests {
use snowbridge_inbound_queue_primitives::v2::{
EthereumAsset, Message as SnowbridgeMessage, MessageProcessor, Payload as SnowPayload,
};
use snowbridge_outbound_queue_primitives::v2::Command;
use sp_core::H160;
use sp_io::TestExternalities;
use xcm_builder::GlobalConsensusConvertsFor;

View file

@ -14,9 +14,13 @@
// You should have received a copy of the GNU General Public License
// along with DataHaven. If not, see <http://www.gnu.org/licenses/>.
#[cfg(not(feature = "runtime-benchmarks"))]
use super::HAVE;
#[cfg(feature = "runtime-benchmarks")]
use super::MICROHAVE;
use super::{
AccountId, Balance, Balances, BlockNumber, Hash, RuntimeEvent, RuntimeHoldReason,
TreasuryAccount, HAVE,
TreasuryAccount,
};
use crate::configs::runtime_params::dynamic_params::runtime_config;
use crate::{
@ -24,6 +28,8 @@ use crate::{
HOURS,
};
use core::marker::PhantomData;
#[cfg(feature = "runtime-benchmarks")]
use datahaven_runtime_common::benchmarking::StorageHubBenchmarking;
use datahaven_runtime_common::time::{DAYS, MINUTES};
use frame_support::pallet_prelude::DispatchClass;
use frame_support::traits::AsEnsureOriginWithArg;
@ -33,7 +39,7 @@ use frame_support::{
weights::Weight,
};
use frame_system::pallet_prelude::BlockNumberFor;
use frame_system::{EnsureRoot, EnsureSigned};
use frame_system::EnsureSigned;
use num_bigint::BigUint;
use pallet_nfts::PalletFeatures;
use polkadot_runtime_common::prod_or_fast;
@ -68,6 +74,7 @@ pub type StorageProofsMerkleTrieLayout = LayoutV1<BlakeTwo256>;
pub type Hashing = BlakeTwo256;
/****** NFTs pallet ******/
#[cfg(not(feature = "runtime-benchmarks"))]
parameter_types! {
pub const CollectionDeposit: Balance = 100 * HAVE;
pub const ItemDeposit: Balance = 1 * HAVE;
@ -80,6 +87,19 @@ parameter_types! {
pub const MaxAttributesPerCall: u32 = 10;
pub Features: PalletFeatures = PalletFeatures::all_enabled();
}
#[cfg(feature = "runtime-benchmarks")]
parameter_types! {
pub const CollectionDeposit: Balance = 100 * MICROHAVE;
pub const ItemDeposit: Balance = 1 * MICROHAVE;
pub const MetadataDepositBase: Balance = 10 * MICROHAVE;
pub const MetadataDepositPerByte: Balance = 1 * MICROHAVE;
pub const ApprovalsLimit: u32 = 20;
pub const ItemAttributesApprovalsLimit: u32 = 20;
pub const MaxTips: u32 = 10;
pub const MaxDeadlineDuration: BlockNumber = 12 * 30 * DAYS;
pub const MaxAttributesPerCall: u32 = 10;
pub Features: PalletFeatures = PalletFeatures::all_enabled();
}
impl pallet_nfts::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
@ -104,11 +124,66 @@ impl pallet_nfts::Config for Runtime {
type Features = Features;
type OffchainSignature = Signature;
type OffchainPublic = <Signature as Verify>::Signer;
type WeightInfo = pallet_nfts::weights::SubstrateWeight<Runtime>;
type WeightInfo = crate::weights::pallet_nfts::WeightInfo<Runtime>;
type Locker = ();
#[cfg(feature = "runtime-benchmarks")]
type Helper = benchmark_helpers::NftHelper;
}
/****** ****** ****** ******/
#[cfg(feature = "runtime-benchmarks")]
pub mod benchmark_helpers {
use crate::{AccountId, Signature};
use k256::ecdsa::SigningKey;
use sp_runtime::traits::{IdentifyAccount, Verify};
use sp_runtime::MultiSignature;
const BENCH_SIGNING_KEY: [u8; 32] = [1u8; 32];
fn bench_signing_key() -> SigningKey {
SigningKey::from_bytes(&BENCH_SIGNING_KEY.into())
.expect("benchmark signing key is valid; qed")
}
/// Benchmark helper for NFTs pallet
pub struct NftHelper;
impl pallet_nfts::BenchmarkHelper<u32, u32, <Signature as Verify>::Signer, AccountId, Signature>
for NftHelper
{
fn collection(i: u16) -> u32 {
i.into()
}
fn item(i: u16) -> u32 {
i.into()
}
fn signer() -> (<Signature as Verify>::Signer, AccountId) {
let signing_key = bench_signing_key();
let verifying_key = signing_key.verifying_key();
let encoded = verifying_key.to_encoded_point(true);
let public =
sp_core::ecdsa::Public::from_full(encoded.as_bytes()).expect("valid key; qed");
let public_key: <Signature as Verify>::Signer = public.into();
let account: AccountId = public_key.clone().into_account();
(public_key, account)
}
fn sign(_public: &<Signature as Verify>::Signer, message: &[u8]) -> Signature {
let digest = sp_io::hashing::keccak_256(message);
let (sig, recovery_id) = bench_signing_key()
.sign_prehash_recoverable(&digest)
.expect("signing with fixed key never fails; qed");
let mut sig_bytes = [0u8; 65];
sig_bytes[..64].copy_from_slice(&sig.to_bytes());
sig_bytes[64] = recovery_id.to_byte();
let sig = sp_core::ecdsa::Signature::from_raw(sig_bytes);
Signature::from(MultiSignature::Ecdsa(sig))
}
}
}
/****** Relay Randomness pallet ******/
impl pallet_randomness::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
@ -151,6 +226,7 @@ impl sp_runtime::traits::BlockNumberProvider for BlockNumberGetter {
/****** ****** ****** ******/
/****** Storage Providers pallet ******/
#[cfg(not(feature = "runtime-benchmarks"))]
parameter_types! {
pub const SpMinDeposit: Balance = 100 * HAVE;
pub const BucketDeposit: Balance = 100 * HAVE;
@ -159,10 +235,47 @@ parameter_types! {
// TODO: If the next line is uncommented (which should be eventually, replacing the line above), compilation breaks (most likely because of mismatched dependency issues)
// pub const MaxBlocksForRandomness: BlockNumber = prod_or_fast!(2 * runtime_constants::time::EPOCH_DURATION_IN_SLOTS, 2 * MINUTES);
}
#[cfg(feature = "runtime-benchmarks")]
parameter_types! {
pub const SpMinDeposit: Balance = StorageHubBenchmarking::SP_MIN_DEPOSIT;
pub const BucketDeposit: Balance = StorageHubBenchmarking::BUCKET_DEPOSIT;
pub const BspSignUpLockPeriod: BlockNumber = 90 * DAYS; // ~3 months
pub const MaxBlocksForRandomness: BlockNumber = prod_or_fast!(2 * HOURS, 2 * MINUTES);
// TODO: If the next line is uncommented (which should be eventually, replacing the line above), compilation breaks (most likely because of mismatched dependency issues)
// pub const MaxBlocksForRandomness: BlockNumber = prod_or_fast!(2 * runtime_constants::time::EPOCH_DURATION_IN_SLOTS, 2 * MINUTES);
}
#[cfg(feature = "runtime-benchmarks")]
pub struct StorageHubTreasuryAccount;
#[cfg(feature = "runtime-benchmarks")]
impl Get<AccountId> for StorageHubTreasuryAccount {
fn get() -> AccountId {
let account = TreasuryAccount::get();
StorageHubBenchmarking::ensure_treasury_account::<AccountId, Balance, Balances>(account)
}
}
// Benchmark helpers for Storage Providers pallet.
#[cfg(feature = "runtime-benchmarks")]
pub struct ProvidersBenchmarkHelpers;
#[cfg(feature = "runtime-benchmarks")]
impl pallet_storage_providers::benchmarking::BenchmarkHelpers<Runtime>
for ProvidersBenchmarkHelpers
{
type ProviderId = <Runtime as pallet_storage_providers::Config>::ProviderId;
fn set_accrued_failed_proofs(provider_id: Self::ProviderId, value: u32) {
pallet_proofs_dealer::SlashableProviders::<Runtime>::insert(provider_id, value);
}
fn get_accrued_failed_proofs(provider_id: Self::ProviderId) -> u32 {
pallet_proofs_dealer::SlashableProviders::<Runtime>::get(provider_id).unwrap_or(0)
}
}
impl pallet_storage_providers::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = pallet_storage_providers::weights::SubstrateWeight<Runtime>;
type WeightInfo = crate::weights::pallet_storage_providers::WeightInfo<Runtime>;
type ProvidersRandomness = pallet_randomness::RandomnessFromOneEpochAgo<Runtime>;
type PaymentStreams = PaymentStreams;
type ProofDealer = ProofsDealer;
@ -188,7 +301,10 @@ impl pallet_storage_providers::Config for Runtime {
type ProvidersProofSubmitters = ProofsDealer;
type ReputationWeightType = u32;
type StorageHubTickGetter = ProofsDealer;
#[cfg(not(feature = "runtime-benchmarks"))]
type Treasury = TreasuryAccount;
#[cfg(feature = "runtime-benchmarks")]
type Treasury = StorageHubTreasuryAccount;
type SpMinDeposit = SpMinDeposit;
type SpMinCapacity = ConstU64<2>;
type DepositPerData = ConstU128<2>;
@ -208,6 +324,8 @@ impl pallet_storage_providers::Config for Runtime {
type ZeroSizeBucketFixedRate = runtime_config::ZeroSizeBucketFixedRate;
type ProviderTopUpTtl = runtime_config::ProviderTopUpTtl;
type MaxExpiredItemsInBlock = ConstU32<100>;
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkHelpers = ProvidersBenchmarkHelpers;
}
pub struct StorageDataUnitAndBalanceConverter;
@ -240,7 +358,7 @@ parameter_types! {
impl pallet_payment_streams::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = pallet_payment_streams::weights::SubstrateWeight<Runtime>;
type WeightInfo = crate::weights::pallet_payment_streams::WeightInfo<Runtime>;
type NativeBalance = Balances;
type ProvidersPallet = Providers;
type RuntimeHoldReason = RuntimeHoldReason;
@ -250,7 +368,10 @@ impl pallet_payment_streams::Config for Runtime {
type BlockNumberToBalance = BlockNumberToBalance;
type ProvidersProofSubmitters = ProofsDealer;
type TreasuryCutCalculator = LinearThenPowerOfTwoTreasuryCutCalculator<Runtime, Perbill>;
#[cfg(not(feature = "runtime-benchmarks"))]
type TreasuryAccount = TreasuryAccount;
#[cfg(feature = "runtime-benchmarks")]
type TreasuryAccount = StorageHubTreasuryAccount;
type MaxUsersToCharge = ConstU32<10>;
type BaseDeposit = ConstU128<10>;
}
@ -279,6 +400,14 @@ const MAX_CUSTOM_CHALLENGES_PER_BLOCK: u32 = 10;
const TOTAL_MAX_CHALLENGES_PER_BLOCK: u32 =
RANDOM_CHALLENGES_PER_BLOCK + MAX_CUSTOM_CHALLENGES_PER_BLOCK;
#[cfg(feature = "runtime-benchmarks")]
parameter_types! {
pub const BenchmarkStakeToChallengePeriod: Balance =
StorageHubBenchmarking::STAKE_TO_CHALLENGE_PERIOD;
pub const BenchmarkCheckpointChallengePeriod: BlockNumber =
StorageHubBenchmarking::CHECKPOINT_CHALLENGE_PERIOD;
}
parameter_types! {
pub const RandomChallengesPerBlock: u32 = RANDOM_CHALLENGES_PER_BLOCK;
pub const MaxCustomChallengesPerBlock: u32 = MAX_CUSTOM_CHALLENGES_PER_BLOCK;
@ -293,7 +422,7 @@ parameter_types! {
impl pallet_proofs_dealer::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = pallet_proofs_dealer::weights::SubstrateWeight<Runtime>;
type WeightInfo = crate::weights::pallet_proofs_dealer::WeightInfo<Runtime>;
type ProvidersPallet = Providers;
type NativeBalance = Balances;
type MerkleTrieHash = Hash;
@ -306,29 +435,50 @@ impl pallet_proofs_dealer::Config for Runtime {
{ shp_constants::FILE_SIZE_TO_CHALLENGES },
>;
type StakeToBlockNumber = SaturatingBalanceToBlockNumber;
#[cfg(feature = "runtime-benchmarks")]
type RandomChallengesPerBlock = ConstU32<0>;
#[cfg(not(feature = "runtime-benchmarks"))]
type RandomChallengesPerBlock = RandomChallengesPerBlock;
#[cfg(feature = "runtime-benchmarks")]
type MaxCustomChallengesPerBlock = TotalMaxChallengesPerBlock;
#[cfg(not(feature = "runtime-benchmarks"))]
type MaxCustomChallengesPerBlock = MaxCustomChallengesPerBlock;
type MaxSubmittersPerTick = MaxSubmittersPerTick;
type TargetTicksStorageOfSubmitters = TargetTicksStorageOfSubmitters;
type ChallengeHistoryLength = ChallengeHistoryLength;
type ChallengesQueueLength = ChallengesQueueLength;
#[cfg(not(feature = "runtime-benchmarks"))]
type CheckpointChallengePeriod = runtime_config::CheckpointChallengePeriod;
#[cfg(feature = "runtime-benchmarks")]
type CheckpointChallengePeriod = BenchmarkCheckpointChallengePeriod;
type ChallengesFee = ChallengesFee;
type PriorityChallengesFee = PriorityChallengesFee;
#[cfg(not(feature = "runtime-benchmarks"))]
type Treasury = TreasuryAccount;
#[cfg(feature = "runtime-benchmarks")]
type Treasury = StorageHubTreasuryAccount;
// TODO: Once the client logic to keep track of CR randomness deadlines and execute their submissions is implemented
// AND after the chain has been live for enough time to have enough providers to avoid the commit-reveal randomness being
// gameable, the randomness provider should be CrRandomness
type RandomnessProvider = pallet_randomness::ParentBlockRandomness<Runtime>;
#[cfg(not(feature = "runtime-benchmarks"))]
type StakeToChallengePeriod = runtime_config::StakeToChallengePeriod;
#[cfg(feature = "runtime-benchmarks")]
type StakeToChallengePeriod = BenchmarkStakeToChallengePeriod;
type MinChallengePeriod = runtime_config::MinChallengePeriod;
type ChallengeTicksTolerance = ChallengeTicksTolerance;
type BlockFullnessPeriod = ChallengeTicksTolerance; // We purposely set this to `ChallengeTicksTolerance` so that spamming of the chain is evaluated for the same blocks as the tolerance BSPs are given.
type BlockFullnessHeadroom = BlockFullnessHeadroom;
type MinNotFullBlocksRatio = MinNotFullBlocksRatio;
type MaxSlashableProvidersPerTick = MaxSlashableProvidersPerTick;
type ChallengeOrigin = EnsureRoot<AccountId>;
type PriorityChallengeOrigin = EnsureRoot<AccountId>;
#[cfg(not(feature = "runtime-benchmarks"))]
type ChallengeOrigin = frame_system::EnsureRoot<AccountId>;
#[cfg(feature = "runtime-benchmarks")]
type ChallengeOrigin = EnsureSigned<AccountId>;
#[cfg(not(feature = "runtime-benchmarks"))]
type PriorityChallengeOrigin = frame_system::EnsureRoot<AccountId>;
#[cfg(feature = "runtime-benchmarks")]
type PriorityChallengeOrigin = EnsureSigned<AccountId>;
}
// Converter from the Balance type to the BlockNumber type for math.
@ -452,12 +602,24 @@ impl Get<u32> for MaxSlashableProvidersPerTick {
type ThresholdType = u32;
pub type ReplicationTargetType = u32;
#[cfg(not(feature = "runtime-benchmarks"))]
parameter_types! {
pub const BaseStorageRequestCreationDeposit: Balance = 1 * HAVE;
pub const FileDeletionRequestCreationDeposit: Balance = 1 * HAVE;
pub const FileSystemStorageRequestCreationHoldReason: RuntimeHoldReason = RuntimeHoldReason::FileSystem(pallet_file_system::HoldReason::StorageRequestCreationHold);
pub const FileSystemFileDeletionRequestHoldReason: RuntimeHoldReason = RuntimeHoldReason::FileSystem(pallet_file_system::HoldReason::FileDeletionRequestHold);
}
#[cfg(feature = "runtime-benchmarks")]
parameter_types! {
pub const BaseStorageRequestCreationDeposit: Balance = 1 * MICROHAVE;
pub const FileDeletionRequestCreationDeposit: Balance = 1 * MICROHAVE;
pub const FileSystemStorageRequestCreationHoldReason: RuntimeHoldReason = RuntimeHoldReason::FileSystem(pallet_file_system::HoldReason::StorageRequestCreationHold);
pub const FileSystemFileDeletionRequestHoldReason: RuntimeHoldReason = RuntimeHoldReason::FileSystem(pallet_file_system::HoldReason::FileDeletionRequestHold);
}
#[cfg(feature = "runtime-benchmarks")]
parameter_types! {
pub const BenchmarkBspStopStoringFilePenalty: Balance = 1 * MICROHAVE;
}
// Converts a given signed message in a EIP-191 compliant message bytes to verify.
/// EIP-191: https://eips.ethereum.org/EIPS/eip-191
@ -480,7 +642,7 @@ impl shp_traits::MessageAdapter for Eip191Adapter {
impl pallet_file_system::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = pallet_file_system::weights::SubstrateWeight<Runtime>;
type WeightInfo = crate::weights::pallet_file_system::WeightInfo<Runtime>;
type Providers = Providers;
type ProofDealer = ProofsDealer;
type PaymentStreams = PaymentStreams;
@ -500,8 +662,14 @@ impl pallet_file_system::Config for Runtime {
type RuntimeHoldReason = RuntimeHoldReason;
type Nfts = Nfts;
type CollectionInspector = BucketNfts;
#[cfg(not(feature = "runtime-benchmarks"))]
type BspStopStoringFilePenalty = runtime_config::BspStopStoringFilePenalty;
#[cfg(feature = "runtime-benchmarks")]
type BspStopStoringFilePenalty = BenchmarkBspStopStoringFilePenalty;
#[cfg(not(feature = "runtime-benchmarks"))]
type TreasuryAccount = TreasuryAccount;
#[cfg(feature = "runtime-benchmarks")]
type TreasuryAccount = StorageHubTreasuryAccount;
type MaxBatchConfirmStorageRequests = ConstU32<100>;
type MaxFilePathSize = ConstU32<512u32>;
type MaxPeerIdSize = ConstU32<100>;

View file

@ -203,7 +203,7 @@ parameter_types! {
parameter_types! {
// TODO: Change ED to 1 after upgrade to Polkadot SDK stable2503
// cfr. https://github.com/paritytech/polkadot-sdk/pull/7379
pub const ExistentialDeposit: Balance = 100;
pub const ExistentialDeposit: Balance = 1;
}
/// The version information used to identify this runtime when compiled natively.
@ -974,6 +974,7 @@ impl_runtime_apis! {
use frame_system_benchmarking::Pallet as SystemBench;
impl frame_system_benchmarking::Config for Runtime {}
impl pallet_session_benchmarking::Config for Runtime {}
impl baseline::Config for Runtime {}
use frame_support::traits::WhitelistedStorageKeys;

View file

@ -35,8 +35,13 @@ pub mod pallet_babe;
pub mod pallet_balances;
pub mod pallet_beefy_mmr;
pub mod pallet_evm;
pub mod pallet_file_system;
pub mod pallet_grandpa;
pub mod pallet_nfts;
pub mod pallet_payment_streams;
pub mod pallet_proofs_dealer;
pub mod pallet_randomness;
pub mod pallet_storage_providers;
// pub mod pallet_identity;
pub mod pallet_im_online;
pub mod pallet_message_queue;
@ -48,6 +53,7 @@ pub mod pallet_preimage;
pub mod pallet_proxy;
pub mod pallet_safe_mode;
pub mod pallet_scheduler;
pub mod pallet_session;
pub mod pallet_sudo;
pub mod pallet_timestamp;
pub mod pallet_transaction_payment;

View file

@ -0,0 +1,5 @@
//! Weights for `pallet_file_system`.
//!
//! Generated weights should overwrite this file.
pub use pallet_file_system::weights::SubstrateWeight as WeightInfo;

View file

@ -0,0 +1,728 @@
//! Autogenerated weights for `pallet_nfts`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 51.0.0
//! DATE: 2025-11-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --runtime
// target/production/wbuild/datahaven-stagenet-runtime/datahaven_stagenet_runtime.compact.compressed.wasm
// --pallet
// pallet_nfts
// --extrinsic
//
// --template
// benchmarking/frame-weight-template.hbs
// --output
// runtime/stagenet/src/weights/pallet_nfts.rs
// --steps
// 50
// --repeat
// 20
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;
/// Weights for `pallet_nfts`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_nfts::WeightInfo for WeightInfo<T> {
/// Storage: `Nfts::NextCollectionId` (r:1 w:1)
/// Proof: `Nfts::NextCollectionId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionRoleOf` (r:0 w:1)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:0 w:1)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionAccount` (r:0 w:1)
/// Proof: `Nfts::CollectionAccount` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
fn create() -> Weight {
// Proof Size summary in bytes:
// Measured: `271`
// Estimated: `3537`
// Minimum execution time: 47_279_000 picoseconds.
Weight::from_parts(48_666_000, 3537)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Nfts::NextCollectionId` (r:1 w:1)
/// Proof: `Nfts::NextCollectionId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionRoleOf` (r:0 w:1)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:0 w:1)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionAccount` (r:0 w:1)
/// Proof: `Nfts::CollectionAccount` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
fn force_create() -> Weight {
// Proof Size summary in bytes:
// Measured: `76`
// Estimated: `3537`
// Minimum execution time: 25_473_000 picoseconds.
Weight::from_parts(26_241_000, 3537)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemMetadataOf` (r:1 w:0)
/// Proof: `Nfts::ItemMetadataOf` (`max_values`: None, `max_size`: Some(335), added: 2810, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:1)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:1001 w:1000)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1000 w:1000)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionMetadataOf` (r:0 w:1)
/// Proof: `Nfts::CollectionMetadataOf` (`max_values`: None, `max_size`: Some(294), added: 2769, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:0 w:1)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionAccount` (r:0 w:1)
/// Proof: `Nfts::CollectionAccount` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// The range of component `m` is `[0, 1000]`.
/// The range of component `c` is `[0, 1000]`.
/// The range of component `a` is `[0, 1000]`.
fn destroy(m: u32, c: u32, a: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `32179 + a * (366 ±0)`
// Estimated: `2523990 + a * (2930 ±0)`
// Minimum execution time: 1_381_577_000 picoseconds.
Weight::from_parts(756_122_428, 2523990)
// Standard Error: 12_048
.saturating_add(Weight::from_parts(476_790, 0).saturating_mul(m.into()))
// Standard Error: 12_048
.saturating_add(Weight::from_parts(51_253, 0).saturating_mul(c.into()))
// Standard Error: 12_048
.saturating_add(Weight::from_parts(8_131_406, 0).saturating_mul(a.into()))
.saturating_add(T::DbWeight::get().reads(1004_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into())))
.saturating_add(T::DbWeight::get().writes(1005_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into())))
.saturating_add(Weight::from_parts(0, 2930).saturating_mul(a.into()))
}
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Account` (r:0 w:1)
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
fn mint() -> Weight {
// Proof Size summary in bytes:
// Measured: `418`
// Estimated: `4062`
// Minimum execution time: 67_882_000 picoseconds.
Weight::from_parts(69_718_000, 4062)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Account` (r:0 w:1)
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
fn force_mint() -> Weight {
// Proof Size summary in bytes:
// Measured: `418`
// Estimated: `4062`
// Minimum execution time: 65_679_000 picoseconds.
Weight::from_parts(66_549_000, 4062)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
/// Storage: `Nfts::Attribute` (r:1 w:0)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemMetadataOf` (r:1 w:0)
/// Proof: `Nfts::ItemMetadataOf` (`max_values`: None, `max_size`: Some(335), added: 2810, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Account` (r:0 w:1)
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemPriceOf` (r:0 w:1)
/// Proof: `Nfts::ItemPriceOf` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemAttributesApprovalsOf` (r:0 w:1)
/// Proof: `Nfts::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(441), added: 2916, mode: `MaxEncodedLen`)
/// Storage: `Nfts::PendingSwapOf` (r:0 w:1)
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
fn burn() -> Weight {
// Proof Size summary in bytes:
// Measured: `526`
// Estimated: `4062`
// Minimum execution time: 73_580_000 picoseconds.
Weight::from_parts(75_125_000, 4062)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(7_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:0)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:1 w:0)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Account` (r:0 w:2)
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemPriceOf` (r:0 w:1)
/// Proof: `Nfts::ItemPriceOf` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
/// Storage: `Nfts::PendingSwapOf` (r:0 w:1)
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
fn transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `555`
// Estimated: `4062`
// Minimum execution time: 56_312_000 picoseconds.
Weight::from_parts(58_020_000, 4062)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:0)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Item` (r:5000 w:5000)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// The range of component `i` is `[0, 5000]`.
fn redeposit(i: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `750 + i * (83 ±0)`
// Estimated: `3538 + i * (3072 ±0)`
// Minimum execution time: 19_062_000 picoseconds.
Weight::from_parts(19_305_000, 3538)
// Standard Error: 24_093
.saturating_add(Weight::from_parts(25_028_153, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
.saturating_add(Weight::from_parts(0, 3072).saturating_mul(i.into()))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
fn lock_item_transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `423`
// Estimated: `3522`
// Minimum execution time: 24_311_000 picoseconds.
Weight::from_parts(24_973_000, 3522)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
fn unlock_item_transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `423`
// Estimated: `3522`
// Minimum execution time: 24_194_000 picoseconds.
Weight::from_parts(24_755_000, 3522)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:0)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:1)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn lock_collection() -> Weight {
// Proof Size summary in bytes:
// Measured: `327`
// Estimated: `3538`
// Minimum execution time: 19_916_000 picoseconds.
Weight::from_parts(20_550_000, 3538)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::OwnershipAcceptance` (r:1 w:1)
/// Proof: `Nfts::OwnershipAcceptance` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionAccount` (r:0 w:2)
/// Proof: `Nfts::CollectionAccount` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
fn transfer_ownership() -> Weight {
// Proof Size summary in bytes:
// Measured: `524`
// Estimated: `3581`
// Minimum execution time: 35_006_000 picoseconds.
Weight::from_parts(35_968_000, 3581)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionRoleOf` (r:2 w:4)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
fn set_team() -> Weight {
// Proof Size summary in bytes:
// Measured: `344`
// Estimated: `6054`
// Minimum execution time: 49_456_000 picoseconds.
Weight::from_parts(50_590_000, 6054)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionAccount` (r:0 w:2)
/// Proof: `Nfts::CollectionAccount` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
fn force_collection_owner() -> Weight {
// Proof Size summary in bytes:
// Measured: `298`
// Estimated: `3537`
// Minimum execution time: 20_463_000 picoseconds.
Weight::from_parts(20_872_000, 3537)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:0)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:0 w:1)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn force_collection_config() -> Weight {
// Proof Size summary in bytes:
// Measured: `276`
// Estimated: `3537`
// Minimum execution time: 16_403_000 picoseconds.
Weight::from_parts(17_022_000, 3537)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
fn lock_item_properties() -> Weight {
// Proof Size summary in bytes:
// Measured: `423`
// Estimated: `3522`
// Minimum execution time: 22_791_000 picoseconds.
Weight::from_parts(23_182_000, 3522)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:1 w:1)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
fn set_attribute() -> Weight {
// Proof Size summary in bytes:
// Measured: `514`
// Estimated: `3920`
// Minimum execution time: 68_893_000 picoseconds.
Weight::from_parts(70_418_000, 3920)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:1 w:1)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
fn force_set_attribute() -> Weight {
// Proof Size summary in bytes:
// Measured: `331`
// Estimated: `3920`
// Minimum execution time: 33_040_000 picoseconds.
Weight::from_parts(33_469_000, 3920)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Nfts::Attribute` (r:1 w:1)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
fn clear_attribute() -> Weight {
// Proof Size summary in bytes:
// Measured: `958`
// Estimated: `3920`
// Minimum execution time: 62_760_000 picoseconds.
Weight::from_parts(64_137_000, 3920)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Nfts::Item` (r:1 w:0)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemAttributesApprovalsOf` (r:1 w:1)
/// Proof: `Nfts::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(441), added: 2916, mode: `MaxEncodedLen`)
fn approve_item_attributes() -> Weight {
// Proof Size summary in bytes:
// Measured: `356`
// Estimated: `4062`
// Minimum execution time: 20_851_000 picoseconds.
Weight::from_parts(21_234_000, 4062)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::Item` (r:1 w:0)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemAttributesApprovalsOf` (r:1 w:1)
/// Proof: `Nfts::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(441), added: 2916, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:1001 w:1000)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 1000]`.
fn cancel_item_attributes_approval(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `769 + n * (386 ±0)`
// Estimated: `4062 + n * (2930 ±0)`
// Minimum execution time: 32_914_000 picoseconds.
Weight::from_parts(33_415_000, 4062)
// Standard Error: 7_498
.saturating_add(Weight::from_parts(7_720_860, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 2930).saturating_mul(n.into()))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemMetadataOf` (r:1 w:1)
/// Proof: `Nfts::ItemMetadataOf` (`max_values`: None, `max_size`: Some(335), added: 2810, mode: `MaxEncodedLen`)
fn set_metadata() -> Weight {
// Proof Size summary in bytes:
// Measured: `514`
// Estimated: `3800`
// Minimum execution time: 56_827_000 picoseconds.
Weight::from_parts(57_851_000, 3800)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemMetadataOf` (r:1 w:1)
/// Proof: `Nfts::ItemMetadataOf` (`max_values`: None, `max_size`: Some(335), added: 2810, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
fn clear_metadata() -> Weight {
// Proof Size summary in bytes:
// Measured: `824`
// Estimated: `3800`
// Minimum execution time: 53_669_000 picoseconds.
Weight::from_parts(54_640_000, 3800)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionMetadataOf` (r:1 w:1)
/// Proof: `Nfts::CollectionMetadataOf` (`max_values`: None, `max_size`: Some(294), added: 2769, mode: `MaxEncodedLen`)
fn set_collection_metadata() -> Weight {
// Proof Size summary in bytes:
// Measured: `373`
// Estimated: `3759`
// Minimum execution time: 51_403_000 picoseconds.
Weight::from_parts(52_206_000, 3759)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionMetadataOf` (r:1 w:1)
/// Proof: `Nfts::CollectionMetadataOf` (`max_values`: None, `max_size`: Some(294), added: 2769, mode: `MaxEncodedLen`)
fn clear_collection_metadata() -> Weight {
// Proof Size summary in bytes:
// Measured: `691`
// Estimated: `3759`
// Minimum execution time: 50_720_000 picoseconds.
Weight::from_parts(51_692_000, 3759)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn approve_transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `385`
// Estimated: `4062`
// Minimum execution time: 24_116_000 picoseconds.
Weight::from_parts(25_104_000, 4062)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
fn cancel_approval() -> Weight {
// Proof Size summary in bytes:
// Measured: `382`
// Estimated: `4062`
// Minimum execution time: 20_907_000 picoseconds.
Weight::from_parts(21_484_000, 4062)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
fn clear_all_transfer_approvals() -> Weight {
// Proof Size summary in bytes:
// Measured: `382`
// Estimated: `4062`
// Minimum execution time: 19_916_000 picoseconds.
Weight::from_parts(20_689_000, 4062)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::OwnershipAcceptance` (r:1 w:1)
/// Proof: `Nfts::OwnershipAcceptance` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
fn set_accept_ownership() -> Weight {
// Proof Size summary in bytes:
// Measured: `76`
// Estimated: `3505`
// Minimum execution time: 17_199_000 picoseconds.
Weight::from_parts(17_750_000, 3505)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:1)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:0)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
fn set_collection_max_supply() -> Weight {
// Proof Size summary in bytes:
// Measured: `327`
// Estimated: `3538`
// Minimum execution time: 22_256_000 picoseconds.
Weight::from_parts(22_786_000, 3538)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:1)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn update_mint_settings() -> Weight {
// Proof Size summary in bytes:
// Measured: `311`
// Estimated: `3538`
// Minimum execution time: 21_133_000 picoseconds.
Weight::from_parts(21_821_000, 3538)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::Item` (r:1 w:0)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemPriceOf` (r:0 w:1)
/// Proof: `Nfts::ItemPriceOf` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
fn set_price() -> Weight {
// Proof Size summary in bytes:
// Measured: `493`
// Estimated: `4062`
// Minimum execution time: 30_502_000 picoseconds.
Weight::from_parts(31_519_000, 4062)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemPriceOf` (r:1 w:1)
/// Proof: `Nfts::ItemPriceOf` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:0)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:1 w:0)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Account` (r:0 w:2)
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// Storage: `Nfts::PendingSwapOf` (r:0 w:1)
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
fn buy_item() -> Weight {
// Proof Size summary in bytes:
// Measured: `655`
// Estimated: `4062`
// Minimum execution time: 66_549_000 picoseconds.
Weight::from_parts(67_947_000, 4062)
.saturating_add(T::DbWeight::get().reads(6_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// The range of component `n` is `[0, 10]`.
fn pay_tips(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_265_000 picoseconds.
Weight::from_parts(4_739_944, 0)
// Standard Error: 7_976
.saturating_add(Weight::from_parts(2_546_489, 0).saturating_mul(n.into()))
}
/// Storage: `Nfts::Item` (r:2 w:0)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::PendingSwapOf` (r:0 w:1)
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
fn create_swap() -> Weight {
// Proof Size summary in bytes:
// Measured: `444`
// Estimated: `7134`
// Minimum execution time: 26_741_000 picoseconds.
Weight::from_parts(27_648_000, 7134)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::PendingSwapOf` (r:1 w:1)
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Item` (r:1 w:0)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
fn cancel_swap() -> Weight {
// Proof Size summary in bytes:
// Measured: `488`
// Estimated: `4062`
// Minimum execution time: 27_430_000 picoseconds.
Weight::from_parts(28_020_000, 4062)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::Item` (r:2 w:2)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::PendingSwapOf` (r:1 w:2)
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:0)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:2 w:0)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:2 w:0)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Account` (r:0 w:4)
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemPriceOf` (r:0 w:2)
/// Proof: `Nfts::ItemPriceOf` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
fn claim_swap() -> Weight {
// Proof Size summary in bytes:
// Measured: `771`
// Estimated: `7134`
// Minimum execution time: 109_567_000 picoseconds.
Weight::from_parts(111_480_000, 7134)
.saturating_add(T::DbWeight::get().reads(9_u64))
.saturating_add(T::DbWeight::get().writes(10_u64))
}
/// Storage: `Nfts::CollectionRoleOf` (r:2 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:10 w:10)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemMetadataOf` (r:1 w:1)
/// Proof: `Nfts::ItemMetadataOf` (`max_values`: None, `max_size`: Some(335), added: 2810, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Account` (r:0 w:1)
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 10]`.
fn mint_pre_signed(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `580`
// Estimated: `6054 + n * (2930 ±0)`
// Minimum execution time: 159_539_000 picoseconds.
Weight::from_parts(165_962_526, 6054)
// Standard Error: 69_524
.saturating_add(Weight::from_parts(43_681_845, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(6_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 2930).saturating_mul(n.into()))
}
/// Storage: `Nfts::Item` (r:1 w:0)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemAttributesApprovalsOf` (r:1 w:1)
/// Proof: `Nfts::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(441), added: 2916, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:10 w:10)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 10]`.
fn set_attributes_pre_signed(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `575`
// Estimated: `4062 + n * (2930 ±0)`
// Minimum execution time: 75_482_000 picoseconds.
Weight::from_parts(89_133_467, 4062)
// Standard Error: 95_313
.saturating_add(Weight::from_parts(42_327_087, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 2930).saturating_mul(n.into()))
}
}

View file

@ -0,0 +1,449 @@
// Copyright 2025 DataHaven
// This file is part of DataHaven.
// DataHaven 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.
// DataHaven 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 DataHaven. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_payment_streams`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 51.0.0
//! DATE: 2026-01-29, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --runtime
// target/production/wbuild/datahaven-stagenet-runtime/datahaven_stagenet_runtime.compact.compressed.wasm
// --pallet
// pallet_payment_streams
// --extrinsic
//
// --header
// ../file_header.txt
// --template
// benchmarking/frame-weight-template.hbs
// --output
// runtime/stagenet/src/weights/pallet_payment_streams.rs
// --steps
// 50
// --repeat
// 20
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;
/// Weights for `pallet_payment_streams`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_payment_streams::weights::WeightInfo for WeightInfo<T> {
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::RegisteredUsers` (r:1 w:1)
/// Proof: `PaymentStreams::RegisteredUsers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:0)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn create_fixed_rate_payment_stream() -> Weight {
// Proof Size summary in bytes:
// Measured: `523`
// Estimated: `6054`
// Minimum execution time: 109_755_000 picoseconds.
Weight::from_parts(111_256_000, 6054)
.saturating_add(T::DbWeight::get().reads(11_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:1 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:1 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:3 w:3)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:0)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:4 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:0)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
fn update_fixed_rate_payment_stream() -> Weight {
// Proof Size summary in bytes:
// Measured: `1427`
// Estimated: `12414`
// Minimum execution time: 410_091_000 picoseconds.
Weight::from_parts(423_942_000, 12414)
.saturating_add(T::DbWeight::get().reads(21_u64))
.saturating_add(T::DbWeight::get().writes(6_u64))
}
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:0)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:1 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:1 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:3 w:3)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:0)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:4 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:0)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::RegisteredUsers` (r:1 w:1)
/// Proof: `PaymentStreams::RegisteredUsers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
fn delete_fixed_rate_payment_stream() -> Weight {
// Proof Size summary in bytes:
// Measured: `1304`
// Estimated: `12414`
// Minimum execution time: 299_884_000 picoseconds.
Weight::from_parts(304_140_000, 12414)
.saturating_add(T::DbWeight::get().reads(22_u64))
.saturating_add(T::DbWeight::get().writes(6_u64))
}
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (r:1 w:0)
/// Proof: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::RegisteredUsers` (r:1 w:1)
/// Proof: `PaymentStreams::RegisteredUsers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::AccumulatedPriceIndex` (r:1 w:0)
/// Proof: `PaymentStreams::AccumulatedPriceIndex` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
fn create_dynamic_rate_payment_stream() -> Weight {
// Proof Size summary in bytes:
// Measured: `525`
// Estimated: `6054`
// Minimum execution time: 111_177_000 picoseconds.
Weight::from_parts(113_406_000, 6054)
.saturating_add(T::DbWeight::get().reads(12_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:1 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:1 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:3 w:3)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:0)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:4 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:0)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (r:1 w:0)
/// Proof: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
fn update_dynamic_rate_payment_stream() -> Weight {
// Proof Size summary in bytes:
// Measured: `1387`
// Estimated: `12414`
// Minimum execution time: 367_704_000 picoseconds.
Weight::from_parts(372_410_000, 12414)
.saturating_add(T::DbWeight::get().reads(21_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:1 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:1 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:3 w:3)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:0)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:4 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:0)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::RegisteredUsers` (r:1 w:1)
/// Proof: `PaymentStreams::RegisteredUsers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
fn delete_dynamic_rate_payment_stream() -> Weight {
// Proof Size summary in bytes:
// Measured: `1455`
// Estimated: `12414`
// Minimum execution time: 408_008_000 picoseconds.
Weight::from_parts(420_144_000, 12414)
.saturating_add(T::DbWeight::get().reads(22_u64))
.saturating_add(T::DbWeight::get().writes(7_u64))
}
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:1 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:1 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:3 w:3)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:0)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:4 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:0)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn charge_payment_streams() -> Weight {
// Proof Size summary in bytes:
// Measured: `1441`
// Estimated: `12414`
// Minimum execution time: 341_010_000 picoseconds.
Weight::from_parts(353_585_000, 12414)
.saturating_add(T::DbWeight::get().reads(21_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:0)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:10 w:10)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:10 w:10)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:1 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:1 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:10 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:12 w:12)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:0)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:4 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 10]`.
fn charge_multiple_users_payment_streams(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1122 + n * (331 ±0)`
// Estimated: `12414 + n * (2604 ±0)`
// Minimum execution time: 20_290_000 picoseconds.
Weight::from_parts(44_658_677, 12414)
// Standard Error: 159_356
.saturating_add(Weight::from_parts(299_090_828, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(12_u64))
.saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 2604).saturating_mul(n.into()))
}
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1001 w:1001)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:0)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:999 w:999)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:999 w:999)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:999 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:999 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:4 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:999 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::RegisteredUsers` (r:1 w:1)
/// Proof: `PaymentStreams::RegisteredUsers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// The range of component `n` is `[1, 1000]`.
fn pay_outstanding_debt(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1422 + n * (644 ±0)`
// Estimated: `12414 + n * (3634 ±0)`
// Minimum execution time: 382_387_000 picoseconds.
Weight::from_parts(386_938_000, 12414)
// Standard Error: 160_843
.saturating_add(Weight::from_parts(288_094_697, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(11_u64))
.saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(4_u64))
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 3634).saturating_mul(n.into()))
}
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:1)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:0)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::RegisteredUsers` (r:1 w:0)
/// Proof: `PaymentStreams::RegisteredUsers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
fn clear_insolvent_flag() -> Weight {
// Proof Size summary in bytes:
// Measured: `231`
// Estimated: `3505`
// Minimum execution time: 22_156_000 picoseconds.
Weight::from_parts(23_278_000, 3505)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (r:1 w:0)
/// Proof: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::AccumulatedPriceIndex` (r:1 w:1)
/// Proof: `PaymentStreams::AccumulatedPriceIndex` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
fn price_index_update() -> Weight {
// Proof Size summary in bytes:
// Measured: `116`
// Estimated: `1501`
// Minimum execution time: 5_701_000 picoseconds.
Weight::from_parts(6_021_000, 1501)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:1)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn tick_update() -> Weight {
// Proof Size summary in bytes:
// Measured: `114`
// Estimated: `1489`
// Minimum execution time: 3_827_000 picoseconds.
Weight::from_parts(4_161_000, 1489)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `ProofsDealer::ChallengesTicker` (r:1 w:0)
/// Proof: `ProofsDealer::ChallengesTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastSubmittersTickRegistered` (r:1 w:1)
/// Proof: `PaymentStreams::LastSubmittersTickRegistered` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ValidProofSubmittersLastTicks` (r:1 w:0)
/// Proof: `ProofsDealer::ValidProofSubmittersLastTicks` (`max_values`: None, `max_size`: Some(7830), added: 10305, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::AccumulatedPriceIndex` (r:1 w:0)
/// Proof: `PaymentStreams::AccumulatedPriceIndex` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:244 w:244)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 244]`.
fn update_providers_last_chargeable_info(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `270 + n * (32 ±0)`
// Estimated: `11295 + n * (2543 ±0)`
// Minimum execution time: 12_555_000 picoseconds.
Weight::from_parts(10_548_186, 11295)
// Standard Error: 4_805
.saturating_add(Weight::from_parts(7_024_412, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 2543).saturating_mul(n.into()))
}
}

View file

@ -0,0 +1,326 @@
// Copyright 2025 DataHaven
// This file is part of DataHaven.
// DataHaven 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.
// DataHaven 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 DataHaven. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_proofs_dealer`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 51.0.0
//! DATE: 2026-01-29, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --runtime
// target/production/wbuild/datahaven-stagenet-runtime/datahaven_stagenet_runtime.compact.compressed.wasm
// --pallet
// pallet_proofs_dealer
// --extrinsic
//
// --header
// ../file_header.txt
// --template
// benchmarking/frame-weight-template.hbs
// --output
// runtime/stagenet/src/weights/pallet_proofs_dealer.rs
// --steps
// 50
// --repeat
// 20
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;
/// Weights for `pallet_proofs_dealer`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_proofs_dealer::weights::WeightInfo for WeightInfo<T> {
/// Storage: `ProofsDealer::ChallengesQueue` (r:1 w:1)
/// Proof: `ProofsDealer::ChallengesQueue` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
fn challenge() -> Weight {
// Proof Size summary in bytes:
// Measured: `41`
// Estimated: `4687`
// Minimum execution time: 11_702_000 picoseconds.
Weight::from_parts(12_152_000, 4687)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ProviderToProofSubmissionRecord` (r:1 w:1)
/// Proof: `ProofsDealer::ProviderToProofSubmissionRecord` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:2 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ChallengesTicker` (r:1 w:0)
/// Proof: `ProofsDealer::ChallengesTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToChallengesSeed` (r:1 w:0)
/// Proof: `ProofsDealer::TickToChallengesSeed` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::LastCheckpointTick` (r:1 w:0)
/// Proof: `ProofsDealer::LastCheckpointTick` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToCheckpointChallenges` (r:1 w:0)
/// Proof: `ProofsDealer::TickToCheckpointChallenges` (`max_values`: None, `max_size`: Some(681), added: 3156, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:0)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:1)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:0)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:1 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:1 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:5 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (r:1 w:0)
/// Proof: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ValidProofSubmittersLastTicks` (r:1 w:1)
/// Proof: `ProofsDealer::ValidProofSubmittersLastTicks` (`max_values`: None, `max_size`: Some(7830), added: 10305, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToProvidersDeadlines` (r:0 w:2)
/// Proof: `ProofsDealer::TickToProvidersDeadlines` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// The range of component `n` is `[1, 20]`.
fn submit_proof_no_checkpoint_challenges_key_proofs(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `2070`
// Estimated: `15270`
// Minimum execution time: 2_158_744_000 picoseconds.
Weight::from_parts(2_068_488_029, 15270)
// Standard Error: 330_919
.saturating_add(Weight::from_parts(133_424_014, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(30_u64))
.saturating_add(T::DbWeight::get().writes(9_u64))
}
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ProviderToProofSubmissionRecord` (r:1 w:1)
/// Proof: `ProofsDealer::ProviderToProofSubmissionRecord` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:0)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ChallengesTicker` (r:1 w:0)
/// Proof: `ProofsDealer::ChallengesTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToChallengesSeed` (r:1 w:0)
/// Proof: `ProofsDealer::TickToChallengesSeed` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::LastCheckpointTick` (r:1 w:0)
/// Proof: `ProofsDealer::LastCheckpointTick` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToCheckpointChallenges` (r:1 w:0)
/// Proof: `ProofsDealer::TickToCheckpointChallenges` (`max_values`: None, `max_size`: Some(681), added: 3156, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:1 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ValidProofSubmittersLastTicks` (r:1 w:1)
/// Proof: `ProofsDealer::ValidProofSubmittersLastTicks` (`max_values`: None, `max_size`: Some(7830), added: 10305, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToProvidersDeadlines` (r:0 w:2)
/// Proof: `ProofsDealer::TickToProvidersDeadlines` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:0)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:1)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:0)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:1 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:1 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (r:1 w:0)
/// Proof: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// The range of component `n` is `[21, 40]`.
fn submit_proof_with_checkpoint_challenges_key_proofs(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `2070`
// Estimated: `20676`
// Minimum execution time: 4_534_427_000 picoseconds.
Weight::from_parts(3_936_459_939, 20676)
// Standard Error: 918_274
.saturating_add(Weight::from_parts(38_816_629, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(39_u64))
.saturating_add(T::DbWeight::get().writes(11_u64))
}
/// Storage: `ProofsDealer::ChallengesTicker` (r:1 w:1)
/// Proof: `ProofsDealer::ChallengesTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Randomness::LatestParentBlockRandomness` (r:1 w:0)
/// Proof: `Randomness::LatestParentBlockRandomness` (`max_values`: Some(1), `max_size`: Some(36), added: 531, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::LastCheckpointTick` (r:1 w:0)
/// Proof: `ProofsDealer::LastCheckpointTick` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToCheckpointChallenges` (r:1 w:0)
/// Proof: `ProofsDealer::TickToCheckpointChallenges` (`max_values`: None, `max_size`: Some(681), added: 3156, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToCheckForSlashableProviders` (r:1 w:1)
/// Proof: `ProofsDealer::TickToCheckForSlashableProviders` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToProvidersDeadlines` (r:1001 w:2000)
/// Proof: `ProofsDealer::TickToProvidersDeadlines` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ProviderToProofSubmissionRecord` (r:1000 w:1000)
/// Proof: `ProofsDealer::ProviderToProofSubmissionRecord` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::SlashableProviders` (r:1000 w:1000)
/// Proof: `ProofsDealer::SlashableProviders` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1000 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1000 w:0)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:1 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToChallengesSeed` (r:0 w:1)
/// Proof: `ProofsDealer::TickToChallengesSeed` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 1000]`.
fn new_challenges_round(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1155 + n * (271 ±0)`
// Estimated: `6172 + n * (3634 ±0)`
// Minimum execution time: 29_919_000 picoseconds.
Weight::from_parts(30_247_000, 6172)
// Standard Error: 50_330
.saturating_add(Weight::from_parts(40_561_686, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(3_u64))
.saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 3634).saturating_mul(n.into()))
}
/// Storage: `ProofsDealer::PriorityChallengesQueue` (r:1 w:1)
/// Proof: `ProofsDealer::PriorityChallengesQueue` (`max_values`: Some(1), `max_size`: Some(3302), added: 3797, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ChallengesQueue` (r:1 w:1)
/// Proof: `ProofsDealer::ChallengesQueue` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::LastCheckpointTick` (r:1 w:1)
/// Proof: `ProofsDealer::LastCheckpointTick` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToCheckpointChallenges` (r:0 w:2)
/// Proof: `ProofsDealer::TickToCheckpointChallenges` (`max_values`: None, `max_size`: Some(681), added: 3156, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 20]`.
fn new_checkpoint_challenge_round(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `65 + n * (32 ±0)`
// Estimated: `4787`
// Minimum execution time: 14_102_000 picoseconds.
Weight::from_parts(16_065_088, 4787)
// Standard Error: 3_474
.saturating_add(Weight::from_parts(431_594, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `ProofsDealer::PastBlocksStatus` (r:1 w:1)
/// Proof: `ProofsDealer::PastBlocksStatus` (`max_values`: Some(1), `max_size`: Some(51), added: 546, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::PastBlocksWeight` (r:1 w:0)
/// Proof: `ProofsDealer::PastBlocksWeight` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ChallengesTicker` (r:1 w:0)
/// Proof: `ProofsDealer::ChallengesTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ChallengesTickerPaused` (r:0 w:1)
/// Proof: `ProofsDealer::ChallengesTickerPaused` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
fn check_spamming_condition() -> Weight {
// Proof Size summary in bytes:
// Measured: `248`
// Estimated: `3501`
// Minimum execution time: 14_156_000 picoseconds.
Weight::from_parts(14_699_000, 3501)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `ProofsDealer::LastDeletedTick` (r:1 w:0)
/// Proof: `ProofsDealer::LastDeletedTick` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ChallengesTicker` (r:1 w:0)
/// Proof: `ProofsDealer::ChallengesTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn trim_valid_proof_submitters_last_ticks_constant_execution() -> Weight {
// Proof Size summary in bytes:
// Measured: `41`
// Estimated: `1489`
// Minimum execution time: 4_462_000 picoseconds.
Weight::from_parts(4_676_000, 1489)
.saturating_add(T::DbWeight::get().reads(2_u64))
}
/// Storage: `ProofsDealer::LastDeletedTick` (r:0 w:1)
/// Proof: `ProofsDealer::LastDeletedTick` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ValidProofSubmittersLastTicks` (r:0 w:1)
/// Proof: `ProofsDealer::ValidProofSubmittersLastTicks` (`max_values`: None, `max_size`: Some(7830), added: 10305, mode: `MaxEncodedLen`)
fn trim_valid_proof_submitters_last_ticks_loop() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_654_000 picoseconds.
Weight::from_parts(2_799_000, 0)
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `ProofsDealer::PastBlocksWeight` (r:0 w:2)
/// Proof: `ProofsDealer::PastBlocksWeight` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
fn on_finalize() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 4_988_000 picoseconds.
Weight::from_parts(5_139_000, 0)
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:0)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ProviderToProofSubmissionRecord` (r:1 w:1)
/// Proof: `ProofsDealer::ProviderToProofSubmissionRecord` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ChallengesTicker` (r:1 w:0)
/// Proof: `ProofsDealer::ChallengesTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:1 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToProvidersDeadlines` (r:0 w:1)
/// Proof: `ProofsDealer::TickToProvidersDeadlines` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
fn force_initialise_challenge_cycle() -> Weight {
// Proof Size summary in bytes:
// Measured: `552`
// Estimated: `4624`
// Minimum execution time: 45_404_000 picoseconds.
Weight::from_parts(46_675_000, 4624)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `ProofsDealer::ChallengesTickerPaused` (r:0 w:1)
/// Proof: `ProofsDealer::ChallengesTickerPaused` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
fn set_paused() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_538_000 picoseconds.
Weight::from_parts(7_804_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
}

View file

@ -0,0 +1,84 @@
// Copyright 2025 DataHaven
// This file is part of DataHaven.
// DataHaven 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.
// DataHaven 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 DataHaven. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_session`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 51.0.0
//! DATE: 2026-01-29, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --runtime
// target/production/wbuild/datahaven-stagenet-runtime/datahaven_stagenet_runtime.compact.compressed.wasm
// --pallet
// pallet_session
// --extrinsic
//
// --header
// ../file_header.txt
// --template
// benchmarking/frame-weight-template.hbs
// --output
// runtime/stagenet/src/weights/pallet_session.rs
// --steps
// 50
// --repeat
// 20
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;
/// Weights for `pallet_session`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_session::WeightInfo for WeightInfo<T> {
/// 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: `350`
// Estimated: `11240`
// Minimum execution time: 37_322_000 picoseconds.
Weight::from_parts(38_272_000, 11240)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// 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: `328`
// Estimated: `3793`
// Minimum execution time: 21_685_000 picoseconds.
Weight::from_parts(22_489_000, 3793)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
}

View file

@ -0,0 +1,630 @@
// Copyright 2025 DataHaven
// This file is part of DataHaven.
// DataHaven 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.
// DataHaven 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 DataHaven. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_storage_providers`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 51.0.0
//! DATE: 2026-01-29, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --runtime
// target/production/wbuild/datahaven-stagenet-runtime/datahaven_stagenet_runtime.compact.compressed.wasm
// --pallet
// pallet_storage_providers
// --extrinsic
//
// --header
// ../file_header.txt
// --template
// benchmarking/frame-weight-template.hbs
// --output
// runtime/stagenet/src/weights/pallet_storage_providers.rs
// --steps
// 50
// --repeat
// 20
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;
/// Weights for `pallet_storage_providers`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_storage_providers::weights::WeightInfo for WeightInfo<T> {
/// Storage: `Providers::SignUpRequests` (r:1 w:1)
/// Proof: `Providers::SignUpRequests` (`max_values`: None, `max_size`: Some(2163), added: 4638, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
fn request_msp_sign_up() -> Weight {
// Proof Size summary in bytes:
// Measured: `270`
// Estimated: `5628`
// Minimum execution time: 90_021_000 picoseconds.
Weight::from_parts(92_670_000, 5628)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `Providers::SignUpRequests` (r:1 w:1)
/// Proof: `Providers::SignUpRequests` (`max_values`: None, `max_size`: Some(2163), added: 4638, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
fn request_bsp_sign_up() -> Weight {
// Proof Size summary in bytes:
// Measured: `270`
// Estimated: `5628`
// Minimum execution time: 91_611_000 picoseconds.
Weight::from_parts(93_053_000, 5628)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `Providers::SignUpRequests` (r:1 w:1)
/// Proof: `Providers::SignUpRequests` (`max_values`: None, `max_size`: Some(2163), added: 4638, mode: `MaxEncodedLen`)
/// Storage: `Randomness::LatestOneEpochAgoRandomness` (r:1 w:0)
/// Proof: `Randomness::LatestOneEpochAgoRandomness` (`max_values`: Some(1), `max_size`: Some(36), added: 531, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:1)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::BspCount` (r:1 w:1)
/// Proof: `Providers::BspCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::GlobalBspsReputationWeight` (r:1 w:1)
/// Proof: `Providers::GlobalBspsReputationWeight` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:0 w:1)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:0 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
fn confirm_sign_up_bsp() -> Weight {
// Proof Size summary in bytes:
// Measured: `474`
// Estimated: `5628`
// Minimum execution time: 38_428_000 picoseconds.
Weight::from_parts(39_861_000, 5628)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(6_u64))
}
/// Storage: `Providers::SignUpRequests` (r:1 w:1)
/// Proof: `Providers::SignUpRequests` (`max_values`: None, `max_size`: Some(2163), added: 4638, mode: `MaxEncodedLen`)
/// Storage: `Randomness::LatestOneEpochAgoRandomness` (r:1 w:0)
/// Proof: `Randomness::LatestOneEpochAgoRandomness` (`max_values`: Some(1), `max_size`: Some(36), added: 531, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviderIdsToValuePropositions` (r:1 w:1)
/// Proof: `Providers::MainStorageProviderIdsToValuePropositions` (`max_values`: None, `max_size`: Some(1123), added: 3598, mode: `MaxEncodedLen`)
/// Storage: `Providers::MspCount` (r:1 w:1)
/// Proof: `Providers::MspCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:0 w:1)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:0 w:1)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:0 w:1)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
fn confirm_sign_up_msp() -> Weight {
// Proof Size summary in bytes:
// Measured: `487`
// Estimated: `5628`
// Minimum execution time: 54_665_000 picoseconds.
Weight::from_parts(56_343_000, 5628)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(6_u64))
}
/// Storage: `Providers::SignUpRequests` (r:1 w:1)
/// Proof: `Providers::SignUpRequests` (`max_values`: None, `max_size`: Some(2163), added: 4638, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
fn cancel_sign_up() -> Weight {
// Proof Size summary in bytes:
// Measured: `507`
// Estimated: `5628`
// Minimum execution time: 65_055_000 picoseconds.
Weight::from_parts(67_002_000, 5628)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:1)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:1)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviderIdsToValuePropositions` (r:102 w:101)
/// Proof: `Providers::MainStorageProviderIdsToValuePropositions` (`max_values`: None, `max_size`: Some(1123), added: 3598, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::MspCount` (r:1 w:1)
/// Proof: `Providers::MspCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:0 w:1)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 100]`.
fn msp_sign_off(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `775 + n * (83 ±0)`
// Estimated: `8186 + n * (3598 ±0)`
// Minimum execution time: 92_437_000 picoseconds.
Weight::from_parts(92_181_442, 8186)
// Standard Error: 9_739
.saturating_add(Weight::from_parts(6_392_076, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(7_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(7_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 3598).saturating_mul(n.into()))
}
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:1)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ProviderToProofSubmissionRecord` (r:1 w:0)
/// Proof: `ProofsDealer::ProviderToProofSubmissionRecord` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:1)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::BspCount` (r:1 w:1)
/// Proof: `Providers::BspCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::GlobalBspsReputationWeight` (r:1 w:1)
/// Proof: `Providers::GlobalBspsReputationWeight` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn bsp_sign_off() -> Weight {
// Proof Size summary in bytes:
// Measured: `720`
// Estimated: `4624`
// Minimum execution time: 93_925_000 picoseconds.
Weight::from_parts(95_582_000, 4624)
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().writes(7_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:1)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
fn change_capacity_bsp_less_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `679`
// Estimated: `4624`
// Minimum execution time: 84_814_000 picoseconds.
Weight::from_parts(86_666_000, 4624)
.saturating_add(T::DbWeight::get().reads(7_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:1)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
fn change_capacity_bsp_more_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `679`
// Estimated: `4624`
// Minimum execution time: 105_285_000 picoseconds.
Weight::from_parts(106_175_000, 4624)
.saturating_add(T::DbWeight::get().reads(7_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:1)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
fn change_capacity_msp_less_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `649`
// Estimated: `4608`
// Minimum execution time: 79_570_000 picoseconds.
Weight::from_parts(80_600_000, 4608)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:1)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
fn change_capacity_msp_more_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `649`
// Estimated: `4608`
// Minimum execution time: 99_554_000 picoseconds.
Weight::from_parts(100_542_000, 4608)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviderIdsToValuePropositions` (r:1 w:1)
/// Proof: `Providers::MainStorageProviderIdsToValuePropositions` (`max_values`: None, `max_size`: Some(1123), added: 3598, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:1)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
fn add_value_prop() -> Weight {
// Proof Size summary in bytes:
// Measured: `591`
// Estimated: `4608`
// Minimum execution time: 45_279_000 picoseconds.
Weight::from_parts(45_906_000, 4608)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:0)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviderIdsToValuePropositions` (r:1 w:1)
/// Proof: `Providers::MainStorageProviderIdsToValuePropositions` (`max_values`: None, `max_size`: Some(1123), added: 3598, mode: `MaxEncodedLen`)
fn make_value_prop_unavailable() -> Weight {
// Proof Size summary in bytes:
// Measured: `631`
// Estimated: `4608`
// Minimum execution time: 33_017_000 picoseconds.
Weight::from_parts(33_762_000, 4608)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
fn add_multiaddress() -> Weight {
// Proof Size summary in bytes:
// Measured: `508`
// Estimated: `4624`
// Minimum execution time: 34_075_000 picoseconds.
Weight::from_parts(35_656_000, 4624)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
fn remove_multiaddress() -> Weight {
// Proof Size summary in bytes:
// Measured: `1316`
// Estimated: `4624`
// Minimum execution time: 32_962_000 picoseconds.
Weight::from_parts(33_729_000, 4624)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Providers::SignUpRequests` (r:1 w:1)
/// Proof: `Providers::SignUpRequests` (`max_values`: None, `max_size`: Some(2163), added: 4638, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:1)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviderIdsToValuePropositions` (r:1 w:1)
/// Proof: `Providers::MainStorageProviderIdsToValuePropositions` (`max_values`: None, `max_size`: Some(1123), added: 3598, mode: `MaxEncodedLen`)
/// Storage: `Providers::MspCount` (r:1 w:1)
/// Proof: `Providers::MspCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:0 w:1)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:0 w:1)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
fn force_msp_sign_up() -> Weight {
// Proof Size summary in bytes:
// Measured: `270`
// Estimated: `5628`
// Minimum execution time: 126_394_000 picoseconds.
Weight::from_parts(129_027_000, 5628)
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().writes(8_u64))
}
/// Storage: `Providers::SignUpRequests` (r:1 w:1)
/// Proof: `Providers::SignUpRequests` (`max_values`: None, `max_size`: Some(2163), added: 4638, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:1)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:1)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::BspCount` (r:1 w:1)
/// Proof: `Providers::BspCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::GlobalBspsReputationWeight` (r:1 w:1)
/// Proof: `Providers::GlobalBspsReputationWeight` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:0 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
fn force_bsp_sign_up() -> Weight {
// Proof Size summary in bytes:
// Measured: `270`
// Estimated: `5628`
// Minimum execution time: 106_273_000 picoseconds.
Weight::from_parts(108_690_000, 5628)
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().writes(8_u64))
}
/// Storage: `Providers::MainStorageProviders` (r:1 w:0)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::SlashableProviders` (r:1 w:1)
/// Proof: `ProofsDealer::SlashableProviders` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:1 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:1 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
fn slash_without_awaiting_top_up() -> Weight {
// Proof Size summary in bytes:
// Measured: `871`
// Estimated: `6172`
// Minimum execution time: 160_594_000 picoseconds.
Weight::from_parts(163_915_000, 6172)
.saturating_add(T::DbWeight::get().reads(9_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Providers::MainStorageProviders` (r:1 w:0)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::SlashableProviders` (r:1 w:1)
/// Proof: `ProofsDealer::SlashableProviders` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:2 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:1 w:1)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ChallengesTicker` (r:1 w:0)
/// Proof: `ProofsDealer::ChallengesTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::NextAvailableProviderTopUpExpirationShTick` (r:1 w:1)
/// Proof: `Providers::NextAvailableProviderTopUpExpirationShTick` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::ProviderTopUpExpirations` (r:1 w:1)
/// Proof: `Providers::ProviderTopUpExpirations` (`max_values`: None, `max_size`: Some(3322), added: 5797, mode: `MaxEncodedLen`)
fn slash_with_awaiting_top_up() -> Weight {
// Proof Size summary in bytes:
// Measured: `871`
// Estimated: `6787`
// Minimum execution time: 128_483_000 picoseconds.
Weight::from_parts(129_763_000, 6787)
.saturating_add(T::DbWeight::get().reads(13_u64))
.saturating_add(T::DbWeight::get().writes(8_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:0)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:1 w:1)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Providers::ProviderTopUpExpirations` (r:0 w:1)
/// Proof: `Providers::ProviderTopUpExpirations` (`max_values`: None, `max_size`: Some(3322), added: 5797, mode: `MaxEncodedLen`)
fn top_up_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `758`
// Estimated: `4624`
// Minimum execution time: 115_081_000 picoseconds.
Weight::from_parts(116_579_000, 4624)
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Providers::InsolventProviders` (r:2 w:1)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:0)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:0)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:0)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:1)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ProviderToProofSubmissionRecord` (r:1 w:1)
/// Proof: `ProofsDealer::ProviderToProofSubmissionRecord` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// Storage: `Providers::BspCount` (r:1 w:1)
/// Proof: `Providers::BspCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:1)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:1)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::GlobalBspsReputationWeight` (r:1 w:1)
/// Proof: `Providers::GlobalBspsReputationWeight` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToProvidersDeadlines` (r:0 w:1)
/// Proof: `ProofsDealer::TickToProvidersDeadlines` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
fn delete_provider_bsp() -> Weight {
// Proof Size summary in bytes:
// Measured: `853`
// Estimated: `6038`
// Minimum execution time: 80_980_000 picoseconds.
Weight::from_parts(82_589_000, 6038)
.saturating_add(T::DbWeight::get().reads(12_u64))
.saturating_add(T::DbWeight::get().writes(9_u64))
}
/// Storage: `Providers::InsolventProviders` (r:1 w:1)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:0)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:0)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:1)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviderIdsToValuePropositions` (r:22 w:21)
/// Proof: `Providers::MainStorageProviderIdsToValuePropositions` (`max_values`: None, `max_size`: Some(1123), added: 3598, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviderIdsToBuckets` (r:21 w:20)
/// Proof: `Providers::MainStorageProviderIdsToBuckets` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
/// Storage: `Providers::MspCount` (r:1 w:1)
/// Proof: `Providers::MspCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:0 w:1)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 20]`.
/// The range of component `m` is `[0, 20]`.
fn delete_provider_msp(n: u32, m: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1845 + m * (54 ±0) + n * (83 ±0)`
// Estimated: `8186 + m * (2571 ±0) + n * (3598 ±0)`
// Minimum execution time: 184_369_000 picoseconds.
Weight::from_parts(77_759_231, 8186)
// Standard Error: 28_443
.saturating_add(Weight::from_parts(6_795_099, 0).saturating_mul(n.into()))
// Standard Error: 28_443
.saturating_add(Weight::from_parts(5_705_653, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into())))
.saturating_add(T::DbWeight::get().writes(5_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m.into())))
.saturating_add(Weight::from_parts(0, 2571).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 3598).saturating_mul(n.into()))
}
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ProviderToProofSubmissionRecord` (r:1 w:0)
/// Proof: `ProofsDealer::ProviderToProofSubmissionRecord` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
fn stop_all_cycles() -> Weight {
// Proof Size summary in bytes:
// Measured: `549`
// Estimated: `4624`
// Minimum execution time: 27_473_000 picoseconds.
Weight::from_parts(28_240_000, 4624)
.saturating_add(T::DbWeight::get().reads(3_u64))
}
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:1 w:1)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ProviderToProofSubmissionRecord` (r:1 w:1)
/// Proof: `ProofsDealer::ProviderToProofSubmissionRecord` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:0 w:1)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToProvidersDeadlines` (r:0 w:1)
/// Proof: `ProofsDealer::TickToProvidersDeadlines` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
fn process_expired_provider_top_up_bsp() -> Weight {
// Proof Size summary in bytes:
// Measured: `1038`
// Estimated: `6172`
// Minimum execution time: 102_791_000 picoseconds.
Weight::from_parts(105_581_000, 6172)
.saturating_add(T::DbWeight::get().reads(7_u64))
.saturating_add(T::DbWeight::get().writes(7_u64))
}
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:1 w:1)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:0)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:0 w:1)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
fn process_expired_provider_top_up_msp() -> Weight {
// Proof Size summary in bytes:
// Measured: `775`
// Estimated: `6172`
// Minimum execution time: 83_518_000 picoseconds.
Weight::from_parts(84_579_000, 6172)
.saturating_add(T::DbWeight::get().reads(6_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
}

View file

@ -84,6 +84,7 @@ pallet-utility = { workspace = true }
pallet-whitelist = { workspace = true }
polkadot-primitives = { workspace = true }
polkadot-runtime-common = { workspace = true }
k256 = { workspace = true, optional = true }
precompile-utils = { workspace = true }
scale-info = { workspace = true, features = ["derive", "serde"] }
serde = { workspace = true, features = ["derive"] }
@ -360,6 +361,13 @@ runtime-benchmarks = [
"pallet-external-validators-rewards/runtime-benchmarks",
"pallet-external-validator-slashes/runtime-benchmarks",
"pallet-datahaven-native-transfer/runtime-benchmarks",
# StorageHub pallets
"pallet-nfts/runtime-benchmarks",
"pallet-file-system/runtime-benchmarks",
"pallet-proofs-dealer/runtime-benchmarks",
"pallet-payment-streams/runtime-benchmarks",
"pallet-storage-providers/runtime-benchmarks",
"dep:k256",
]
try-runtime = [

View file

@ -27,6 +27,7 @@ frame_benchmarking::define_benchmarks!(
// Substrate pallets
[pallet_balances, Balances]
[pallet_session, pallet_session_benchmarking::Pallet::<Runtime>]
[pallet_identity, Identity]
[pallet_im_online, ImOnline]
[pallet_multisig, Multisig]
@ -46,6 +47,13 @@ frame_benchmarking::define_benchmarks!(
// EVM pallets
[pallet_evm, EVM]
// StorageHub pallets
[pallet_nfts, Nfts]
[pallet_file_system, FileSystem]
[pallet_proofs_dealer, ProofsDealer]
[pallet_payment_streams, PaymentStreams]
[pallet_storage_providers, Providers]
// Governance pallets
[pallet_collective_technical_committee, TechnicalCommittee]
[pallet_collective_treasury_council, TreasuryCouncil]

View file

@ -91,7 +91,6 @@ use datahaven_runtime_common::{
},
time::{EpochDurationInBlocks, SessionsPerEra, DAYS, MILLISECS_PER_BLOCK},
};
use dhp_bridge::{EigenLayerMessageProcessor, NativeTokenTransferMessageProcessor};
use frame_support::{
derive_impl,
dispatch::DispatchClass,
@ -126,7 +125,7 @@ use snowbridge_core::{gwei, meth, AgentIdOf, PricingParameters, Rewards, TokenId
use snowbridge_inbound_queue_primitives::RewardLedger;
use snowbridge_outbound_queue_primitives::{
v1::{Fee, Message, SendMessage},
v2::{Command, ConstantGasMeter},
v2::ConstantGasMeter,
SendError, SendMessageFeeProvider,
};
use snowbridge_pallet_outbound_queue_v2::OnNewCommitment;
@ -387,7 +386,7 @@ impl pallet_session::Config for Runtime {
>;
type SessionHandler = <SessionKeys as OpaqueKeys>::KeyTypeIdProviders;
type Keys = SessionKeys;
type WeightInfo = pallet_session::weights::SubstrateWeight<Runtime>;
type WeightInfo = testnet_weights::pallet_session::WeightInfo<Runtime>;
}
parameter_types! {
@ -629,7 +628,7 @@ impl pallet_identity::Config for Runtime {
type PendingUsernameExpiration = PendingUsernameExpiration;
type MaxSuffixLength = MaxSuffixLength;
type MaxUsernameLength = MaxUsernameLength;
type WeightInfo = pallet_identity::weights::SubstrateWeight<Runtime>;
type WeightInfo = testnet_weights::pallet_identity::WeightInfo<Runtime>;
type UsernameDeposit = UsernameDeposit;
type UsernameGracePeriod = UsernameGracePeriod;
@ -1108,47 +1107,13 @@ impl snowbridge_pallet_system_v2::Config for Runtime {
type Helper = ();
}
// Fork versions for runtime benchmarks - must match the fixtures for BLS verification to work
// The fixtures are generated with standard testnet fork versions
#[cfg(feature = "runtime-benchmarks")]
parameter_types! {
pub const ChainForkVersions: ForkVersions = ForkVersions {
genesis: Fork {
version: hex_literal::hex!("00000000"),
epoch: 0,
},
altair: Fork {
version: hex_literal::hex!("01000000"),
epoch: 0,
},
bellatrix: Fork {
version: hex_literal::hex!("02000000"),
epoch: 0,
},
capella: Fork {
version: hex_literal::hex!("03000000"),
epoch: 0,
},
deneb: Fork {
version: hex_literal::hex!("04000000"),
epoch: 0,
},
electra: Fork {
version: hex_literal::hex!("05000000"),
epoch: 80000000000,
},
fulu: Fork {
version: hex_literal::hex!("06000000"),
epoch: 90000000000,
},
};
}
// For tests, fast-runtime and std configurations we use the mocked fork versions
// These match the fork versions used by the local Ethereum network in E2E tests
#[cfg(all(
any(feature = "std", feature = "fast-runtime", test),
not(feature = "runtime-benchmarks")
#[cfg(any(
feature = "std",
feature = "fast-runtime",
feature = "runtime-benchmarks",
test
))]
parameter_types! {
pub const ChainForkVersions: ForkVersions = ForkVersions {
@ -1278,8 +1243,8 @@ impl snowbridge_pallet_inbound_queue_v2::Config for Runtime {
type GatewayAddress = runtime_params::dynamic_params::runtime_config::EthereumGatewayAddress;
#[cfg(not(feature = "runtime-benchmarks"))]
type MessageProcessor = (
EigenLayerMessageProcessor<Runtime>,
NativeTokenTransferMessageProcessor<Runtime>,
dhp_bridge::EigenLayerMessageProcessor<Runtime>,
dhp_bridge::NativeTokenTransferMessageProcessor<Runtime>,
);
#[cfg(feature = "runtime-benchmarks")]
type MessageProcessor = NoOpMessageProcessor;
@ -1749,6 +1714,7 @@ mod tests {
use snowbridge_inbound_queue_primitives::v2::{
EthereumAsset, Message as SnowbridgeMessage, MessageProcessor, Payload as SnowPayload,
};
use snowbridge_outbound_queue_primitives::v2::Command;
use sp_core::H160;
use sp_io::TestExternalities;
use xcm_builder::GlobalConsensusConvertsFor;

View file

@ -14,9 +14,13 @@
// You should have received a copy of the GNU General Public License
// along with DataHaven. If not, see <http://www.gnu.org/licenses/>.
#[cfg(not(feature = "runtime-benchmarks"))]
use super::HAVE;
#[cfg(feature = "runtime-benchmarks")]
use super::MICROHAVE;
use super::{
AccountId, Balance, Balances, BlockNumber, Hash, RuntimeEvent, RuntimeHoldReason,
TreasuryAccount, HAVE,
TreasuryAccount,
};
use crate::configs::runtime_params::dynamic_params::runtime_config;
use crate::{
@ -24,6 +28,8 @@ use crate::{
HOURS,
};
use core::marker::PhantomData;
#[cfg(feature = "runtime-benchmarks")]
use datahaven_runtime_common::benchmarking::StorageHubBenchmarking;
use datahaven_runtime_common::time::{DAYS, MINUTES};
use frame_support::pallet_prelude::DispatchClass;
use frame_support::traits::AsEnsureOriginWithArg;
@ -33,7 +39,7 @@ use frame_support::{
weights::Weight,
};
use frame_system::pallet_prelude::BlockNumberFor;
use frame_system::{EnsureRoot, EnsureSigned};
use frame_system::EnsureSigned;
use num_bigint::BigUint;
use pallet_nfts::PalletFeatures;
use polkadot_runtime_common::prod_or_fast;
@ -68,6 +74,7 @@ pub type StorageProofsMerkleTrieLayout = LayoutV1<BlakeTwo256>;
pub type Hashing = BlakeTwo256;
/****** NFTs pallet ******/
#[cfg(not(feature = "runtime-benchmarks"))]
parameter_types! {
pub const CollectionDeposit: Balance = 100 * HAVE;
pub const ItemDeposit: Balance = 1 * HAVE;
@ -80,6 +87,19 @@ parameter_types! {
pub const MaxAttributesPerCall: u32 = 10;
pub Features: PalletFeatures = PalletFeatures::all_enabled();
}
#[cfg(feature = "runtime-benchmarks")]
parameter_types! {
pub const CollectionDeposit: Balance = 100 * MICROHAVE;
pub const ItemDeposit: Balance = 1 * MICROHAVE;
pub const MetadataDepositBase: Balance = 10 * MICROHAVE;
pub const MetadataDepositPerByte: Balance = 1 * MICROHAVE;
pub const ApprovalsLimit: u32 = 20;
pub const ItemAttributesApprovalsLimit: u32 = 20;
pub const MaxTips: u32 = 10;
pub const MaxDeadlineDuration: BlockNumber = 12 * 30 * DAYS;
pub const MaxAttributesPerCall: u32 = 10;
pub Features: PalletFeatures = PalletFeatures::all_enabled();
}
impl pallet_nfts::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
@ -104,11 +124,67 @@ impl pallet_nfts::Config for Runtime {
type Features = Features;
type OffchainSignature = Signature;
type OffchainPublic = <Signature as Verify>::Signer;
type WeightInfo = pallet_nfts::weights::SubstrateWeight<Runtime>;
type WeightInfo = crate::weights::pallet_nfts::WeightInfo<Runtime>;
type Locker = ();
#[cfg(feature = "runtime-benchmarks")]
type Helper = benchmark_helpers::NftHelper;
}
/****** ****** ****** ******/
#[cfg(feature = "runtime-benchmarks")]
pub mod benchmark_helpers {
use crate::{AccountId, Signature};
use k256::ecdsa::SigningKey;
use sp_runtime::traits::{IdentifyAccount, Verify};
use sp_runtime::MultiSignature;
const BENCH_SIGNING_KEY: [u8; 32] = [1u8; 32];
fn bench_signing_key() -> SigningKey {
SigningKey::from_bytes(&BENCH_SIGNING_KEY.into())
.expect("benchmark signing key is valid; qed")
}
/// Benchmark helper for NFTs pallet
pub struct NftHelper;
impl pallet_nfts::BenchmarkHelper<u32, u32, <Signature as Verify>::Signer, AccountId, Signature>
for NftHelper
{
fn collection(i: u16) -> u32 {
i.into()
}
fn item(i: u16) -> u32 {
i.into()
}
fn signer() -> (<Signature as Verify>::Signer, AccountId) {
let signing_key = bench_signing_key();
let verifying_key = signing_key.verifying_key();
let encoded = verifying_key.to_encoded_point(true);
let public = sp_core::ecdsa::Public::from_full(encoded.as_bytes())
.expect("encoded point is a valid compressed secp256k1 key; qed");
let public_key: <Signature as Verify>::Signer = public.into();
let account: AccountId = public_key.clone().into_account();
(public_key, account)
}
fn sign(_public: &<Signature as Verify>::Signer, message: &[u8]) -> Signature {
// Sign using Ethereum-style secp256k1 over keccak256(message).
let digest = sp_io::hashing::keccak_256(message);
let (sig, recovery_id) = bench_signing_key()
.sign_prehash_recoverable(&digest)
.expect("signing with fixed secret key never fails; qed");
let mut sig_bytes = [0u8; 65];
sig_bytes[..64].copy_from_slice(&sig.to_bytes());
sig_bytes[64] = recovery_id.to_byte();
let sig = sp_core::ecdsa::Signature::from_raw(sig_bytes);
Signature::from(MultiSignature::Ecdsa(sig))
}
}
}
/****** Relay Randomness pallet ******/
impl pallet_randomness::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
@ -151,6 +227,7 @@ impl sp_runtime::traits::BlockNumberProvider for BlockNumberGetter {
/****** ****** ****** ******/
/****** Storage Providers pallet ******/
#[cfg(not(feature = "runtime-benchmarks"))]
parameter_types! {
pub const SpMinDeposit: Balance = 100 * HAVE;
pub const BucketDeposit: Balance = 100 * HAVE;
@ -159,10 +236,47 @@ parameter_types! {
// TODO: If the next line is uncommented (which should be eventually, replacing the line above), compilation breaks (most likely because of mismatched dependency issues)
// pub const MaxBlocksForRandomness: BlockNumber = prod_or_fast!(2 * runtime_constants::time::EPOCH_DURATION_IN_SLOTS, 2 * MINUTES);
}
#[cfg(feature = "runtime-benchmarks")]
parameter_types! {
pub const SpMinDeposit: Balance = StorageHubBenchmarking::SP_MIN_DEPOSIT;
pub const BucketDeposit: Balance = StorageHubBenchmarking::BUCKET_DEPOSIT;
pub const BspSignUpLockPeriod: BlockNumber = 90 * DAYS; // ~3 months
pub const MaxBlocksForRandomness: BlockNumber = prod_or_fast!(2 * HOURS, 2 * MINUTES);
// TODO: If the next line is uncommented (which should be eventually, replacing the line above), compilation breaks (most likely because of mismatched dependency issues)
// pub const MaxBlocksForRandomness: BlockNumber = prod_or_fast!(2 * runtime_constants::time::EPOCH_DURATION_IN_SLOTS, 2 * MINUTES);
}
#[cfg(feature = "runtime-benchmarks")]
pub struct StorageHubTreasuryAccount;
#[cfg(feature = "runtime-benchmarks")]
impl Get<AccountId> for StorageHubTreasuryAccount {
fn get() -> AccountId {
let account = TreasuryAccount::get();
StorageHubBenchmarking::ensure_treasury_account::<AccountId, Balance, Balances>(account)
}
}
// Benchmark helpers for Storage Providers pallet.
#[cfg(feature = "runtime-benchmarks")]
pub struct ProvidersBenchmarkHelpers;
#[cfg(feature = "runtime-benchmarks")]
impl pallet_storage_providers::benchmarking::BenchmarkHelpers<Runtime>
for ProvidersBenchmarkHelpers
{
type ProviderId = <Runtime as pallet_storage_providers::Config>::ProviderId;
fn set_accrued_failed_proofs(provider_id: Self::ProviderId, value: u32) {
pallet_proofs_dealer::SlashableProviders::<Runtime>::insert(provider_id, value);
}
fn get_accrued_failed_proofs(provider_id: Self::ProviderId) -> u32 {
pallet_proofs_dealer::SlashableProviders::<Runtime>::get(provider_id).unwrap_or(0)
}
}
impl pallet_storage_providers::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = pallet_storage_providers::weights::SubstrateWeight<Runtime>;
type WeightInfo = crate::weights::pallet_storage_providers::WeightInfo<Runtime>;
type ProvidersRandomness = pallet_randomness::RandomnessFromOneEpochAgo<Runtime>;
type PaymentStreams = PaymentStreams;
type ProofDealer = ProofsDealer;
@ -188,7 +302,10 @@ impl pallet_storage_providers::Config for Runtime {
type ProvidersProofSubmitters = ProofsDealer;
type ReputationWeightType = u32;
type StorageHubTickGetter = ProofsDealer;
#[cfg(not(feature = "runtime-benchmarks"))]
type Treasury = TreasuryAccount;
#[cfg(feature = "runtime-benchmarks")]
type Treasury = StorageHubTreasuryAccount;
type SpMinDeposit = SpMinDeposit;
type SpMinCapacity = ConstU64<2>;
type DepositPerData = ConstU128<2>;
@ -208,6 +325,8 @@ impl pallet_storage_providers::Config for Runtime {
type ZeroSizeBucketFixedRate = runtime_config::ZeroSizeBucketFixedRate;
type ProviderTopUpTtl = runtime_config::ProviderTopUpTtl;
type MaxExpiredItemsInBlock = ConstU32<100>;
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkHelpers = ProvidersBenchmarkHelpers;
}
pub struct StorageDataUnitAndBalanceConverter;
@ -240,7 +359,7 @@ parameter_types! {
impl pallet_payment_streams::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = pallet_payment_streams::weights::SubstrateWeight<Runtime>;
type WeightInfo = crate::weights::pallet_payment_streams::WeightInfo<Runtime>;
type NativeBalance = Balances;
type ProvidersPallet = Providers;
type RuntimeHoldReason = RuntimeHoldReason;
@ -250,7 +369,10 @@ impl pallet_payment_streams::Config for Runtime {
type BlockNumberToBalance = BlockNumberToBalance;
type ProvidersProofSubmitters = ProofsDealer;
type TreasuryCutCalculator = LinearThenPowerOfTwoTreasuryCutCalculator<Runtime, Perbill>;
#[cfg(not(feature = "runtime-benchmarks"))]
type TreasuryAccount = TreasuryAccount;
#[cfg(feature = "runtime-benchmarks")]
type TreasuryAccount = StorageHubTreasuryAccount;
type MaxUsersToCharge = ConstU32<10>;
type BaseDeposit = ConstU128<10>;
}
@ -279,6 +401,14 @@ const MAX_CUSTOM_CHALLENGES_PER_BLOCK: u32 = 10;
const TOTAL_MAX_CHALLENGES_PER_BLOCK: u32 =
RANDOM_CHALLENGES_PER_BLOCK + MAX_CUSTOM_CHALLENGES_PER_BLOCK;
#[cfg(feature = "runtime-benchmarks")]
parameter_types! {
pub const BenchmarkStakeToChallengePeriod: Balance =
StorageHubBenchmarking::STAKE_TO_CHALLENGE_PERIOD;
pub const BenchmarkCheckpointChallengePeriod: BlockNumber =
StorageHubBenchmarking::CHECKPOINT_CHALLENGE_PERIOD;
}
parameter_types! {
pub const RandomChallengesPerBlock: u32 = RANDOM_CHALLENGES_PER_BLOCK;
pub const MaxCustomChallengesPerBlock: u32 = MAX_CUSTOM_CHALLENGES_PER_BLOCK;
@ -293,7 +423,7 @@ parameter_types! {
impl pallet_proofs_dealer::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = pallet_proofs_dealer::weights::SubstrateWeight<Runtime>;
type WeightInfo = crate::weights::pallet_proofs_dealer::WeightInfo<Runtime>;
type ProvidersPallet = Providers;
type NativeBalance = Balances;
type MerkleTrieHash = Hash;
@ -306,29 +436,50 @@ impl pallet_proofs_dealer::Config for Runtime {
{ shp_constants::FILE_SIZE_TO_CHALLENGES },
>;
type StakeToBlockNumber = SaturatingBalanceToBlockNumber;
#[cfg(feature = "runtime-benchmarks")]
type RandomChallengesPerBlock = ConstU32<0>;
#[cfg(not(feature = "runtime-benchmarks"))]
type RandomChallengesPerBlock = RandomChallengesPerBlock;
#[cfg(feature = "runtime-benchmarks")]
type MaxCustomChallengesPerBlock = TotalMaxChallengesPerBlock;
#[cfg(not(feature = "runtime-benchmarks"))]
type MaxCustomChallengesPerBlock = MaxCustomChallengesPerBlock;
type MaxSubmittersPerTick = MaxSubmittersPerTick;
type TargetTicksStorageOfSubmitters = TargetTicksStorageOfSubmitters;
type ChallengeHistoryLength = ChallengeHistoryLength;
type ChallengesQueueLength = ChallengesQueueLength;
#[cfg(not(feature = "runtime-benchmarks"))]
type CheckpointChallengePeriod = runtime_config::CheckpointChallengePeriod;
#[cfg(feature = "runtime-benchmarks")]
type CheckpointChallengePeriod = BenchmarkCheckpointChallengePeriod;
type ChallengesFee = ChallengesFee;
type PriorityChallengesFee = PriorityChallengesFee;
#[cfg(not(feature = "runtime-benchmarks"))]
type Treasury = TreasuryAccount;
#[cfg(feature = "runtime-benchmarks")]
type Treasury = StorageHubTreasuryAccount;
// TODO: Once the client logic to keep track of CR randomness deadlines and execute their submissions is implemented
// AND after the chain has been live for enough time to have enough providers to avoid the commit-reveal randomness being
// gameable, the randomness provider should be CrRandomness
type RandomnessProvider = pallet_randomness::ParentBlockRandomness<Runtime>;
#[cfg(not(feature = "runtime-benchmarks"))]
type StakeToChallengePeriod = runtime_config::StakeToChallengePeriod;
#[cfg(feature = "runtime-benchmarks")]
type StakeToChallengePeriod = BenchmarkStakeToChallengePeriod;
type MinChallengePeriod = runtime_config::MinChallengePeriod;
type ChallengeTicksTolerance = ChallengeTicksTolerance;
type BlockFullnessPeriod = ChallengeTicksTolerance; // We purposely set this to `ChallengeTicksTolerance` so that spamming of the chain is evaluated for the same blocks as the tolerance BSPs are given.
type BlockFullnessHeadroom = BlockFullnessHeadroom;
type MinNotFullBlocksRatio = MinNotFullBlocksRatio;
type MaxSlashableProvidersPerTick = MaxSlashableProvidersPerTick;
type ChallengeOrigin = EnsureRoot<AccountId>;
type PriorityChallengeOrigin = EnsureRoot<AccountId>;
#[cfg(not(feature = "runtime-benchmarks"))]
type ChallengeOrigin = frame_system::EnsureRoot<AccountId>;
#[cfg(feature = "runtime-benchmarks")]
type ChallengeOrigin = EnsureSigned<AccountId>;
#[cfg(not(feature = "runtime-benchmarks"))]
type PriorityChallengeOrigin = frame_system::EnsureRoot<AccountId>;
#[cfg(feature = "runtime-benchmarks")]
type PriorityChallengeOrigin = EnsureSigned<AccountId>;
}
// Converter from the Balance type to the BlockNumber type for math.
@ -452,12 +603,24 @@ impl Get<u32> for MaxSlashableProvidersPerTick {
type ThresholdType = u32;
pub type ReplicationTargetType = u32;
#[cfg(not(feature = "runtime-benchmarks"))]
parameter_types! {
pub const BaseStorageRequestCreationDeposit: Balance = 1 * HAVE;
pub const FileDeletionRequestCreationDeposit: Balance = 1 * HAVE;
pub const FileSystemStorageRequestCreationHoldReason: RuntimeHoldReason = RuntimeHoldReason::FileSystem(pallet_file_system::HoldReason::StorageRequestCreationHold);
pub const FileSystemFileDeletionRequestHoldReason: RuntimeHoldReason = RuntimeHoldReason::FileSystem(pallet_file_system::HoldReason::FileDeletionRequestHold);
}
#[cfg(feature = "runtime-benchmarks")]
parameter_types! {
pub const BaseStorageRequestCreationDeposit: Balance = 1 * MICROHAVE;
pub const FileDeletionRequestCreationDeposit: Balance = 1 * MICROHAVE;
pub const FileSystemStorageRequestCreationHoldReason: RuntimeHoldReason = RuntimeHoldReason::FileSystem(pallet_file_system::HoldReason::StorageRequestCreationHold);
pub const FileSystemFileDeletionRequestHoldReason: RuntimeHoldReason = RuntimeHoldReason::FileSystem(pallet_file_system::HoldReason::FileDeletionRequestHold);
}
#[cfg(feature = "runtime-benchmarks")]
parameter_types! {
pub const BenchmarkBspStopStoringFilePenalty: Balance = 1 * MICROHAVE;
}
// Converts a given signed message in a EIP-191 compliant message bytes to verify.
/// EIP-191: https://eips.ethereum.org/EIPS/eip-191
@ -480,7 +643,7 @@ impl shp_traits::MessageAdapter for Eip191Adapter {
impl pallet_file_system::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = pallet_file_system::weights::SubstrateWeight<Runtime>;
type WeightInfo = crate::weights::pallet_file_system::WeightInfo<Runtime>;
type Providers = Providers;
type ProofDealer = ProofsDealer;
type PaymentStreams = PaymentStreams;
@ -500,8 +663,14 @@ impl pallet_file_system::Config for Runtime {
type RuntimeHoldReason = RuntimeHoldReason;
type Nfts = Nfts;
type CollectionInspector = BucketNfts;
#[cfg(not(feature = "runtime-benchmarks"))]
type BspStopStoringFilePenalty = runtime_config::BspStopStoringFilePenalty;
#[cfg(feature = "runtime-benchmarks")]
type BspStopStoringFilePenalty = BenchmarkBspStopStoringFilePenalty;
#[cfg(not(feature = "runtime-benchmarks"))]
type TreasuryAccount = TreasuryAccount;
#[cfg(feature = "runtime-benchmarks")]
type TreasuryAccount = StorageHubTreasuryAccount;
type MaxBatchConfirmStorageRequests = ConstU32<100>;
type MaxFilePathSize = ConstU32<512u32>;
type MaxPeerIdSize = ConstU32<100>;

View file

@ -201,7 +201,7 @@ parameter_types! {
parameter_types! {
// TODO: Change ED to 1 after upgrade to Polkadot SDK stable2503
// cfr. https://github.com/paritytech/polkadot-sdk/pull/7379
pub const ExistentialDeposit: Balance = 100;
pub const ExistentialDeposit: Balance = 1;
}
/// The version information used to identify this runtime when compiled natively.
@ -972,6 +972,7 @@ impl_runtime_apis! {
use frame_system_benchmarking::Pallet as SystemBench;
impl frame_system_benchmarking::Config for Runtime {}
impl pallet_session_benchmarking::Config for Runtime {}
impl baseline::Config for Runtime {}
use frame_support::traits::WhitelistedStorageKeys;

View file

@ -35,19 +35,25 @@ pub mod pallet_babe;
pub mod pallet_balances;
pub mod pallet_beefy_mmr;
pub mod pallet_evm;
pub mod pallet_file_system;
pub mod pallet_grandpa;
pub mod pallet_randomness;
//pub mod pallet_identity;
pub mod pallet_identity;
pub mod pallet_im_online;
pub mod pallet_message_queue;
pub mod pallet_migrations;
pub mod pallet_mmr;
pub mod pallet_multisig;
pub mod pallet_nfts;
pub mod pallet_parameters;
pub mod pallet_payment_streams;
pub mod pallet_preimage;
pub mod pallet_proofs_dealer;
pub mod pallet_proxy;
pub mod pallet_randomness;
pub mod pallet_safe_mode;
pub mod pallet_scheduler;
pub mod pallet_session;
pub mod pallet_storage_providers;
pub mod pallet_sudo;
pub mod pallet_timestamp;
pub mod pallet_transaction_payment;

View file

@ -0,0 +1,5 @@
//! Weights for `pallet_file_system`.
//!
//! Generated weights should overwrite this file.
pub use pallet_file_system::weights::SubstrateWeight as WeightInfo;

View file

@ -0,0 +1,724 @@
//! Autogenerated weights for `pallet_nfts`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 51.0.0
//! DATE: 2025-11-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --runtime
// target/production/wbuild/datahaven-testnet-runtime/datahaven_testnet_runtime.compact.compressed.wasm
// --pallet
// pallet_nfts
// --extrinsic
//
// --template
// benchmarking/frame-weight-template.hbs
// --output
// runtime/testnet/src/weights/pallet_nfts.rs
// --steps
// 50
// --repeat
// 20
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;
/// Weights for `pallet_nfts`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_nfts::WeightInfo for WeightInfo<T> {
/// Storage: `Nfts::NextCollectionId` (r:1 w:1)
/// Proof: `Nfts::NextCollectionId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionRoleOf` (r:0 w:1)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:0 w:1)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionAccount` (r:0 w:1)
/// Proof: `Nfts::CollectionAccount` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
fn create() -> Weight {
// Proof Size summary in bytes:
// Measured: `271`
// Estimated: `3537`
// Minimum execution time: 47_561_000 picoseconds.
Weight::from_parts(48_583_000, 3537)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Nfts::NextCollectionId` (r:1 w:1)
/// Proof: `Nfts::NextCollectionId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionRoleOf` (r:0 w:1)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:0 w:1)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionAccount` (r:0 w:1)
/// Proof: `Nfts::CollectionAccount` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
fn force_create() -> Weight {
// Proof Size summary in bytes:
// Measured: `76`
// Estimated: `3537`
// Minimum execution time: 25_742_000 picoseconds.
Weight::from_parts(26_196_000, 3537)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemMetadataOf` (r:1 w:0)
/// Proof: `Nfts::ItemMetadataOf` (`max_values`: None, `max_size`: Some(335), added: 2810, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:1)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:1001 w:1000)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1000 w:1000)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionMetadataOf` (r:0 w:1)
/// Proof: `Nfts::CollectionMetadataOf` (`max_values`: None, `max_size`: Some(294), added: 2769, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:0 w:1)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionAccount` (r:0 w:1)
/// Proof: `Nfts::CollectionAccount` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// The range of component `m` is `[0, 1000]`.
/// The range of component `c` is `[0, 1000]`.
/// The range of component `a` is `[0, 1000]`.
fn destroy(_m: u32, _c: u32, a: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `32179 + a * (366 ±0)`
// Estimated: `2523990 + a * (2930 ±0)`
// Minimum execution time: 1_304_607_000 picoseconds.
Weight::from_parts(3_891_413_864, 2523990)
// Standard Error: 30_112
.saturating_add(Weight::from_parts(7_300_422, 0).saturating_mul(a.into()))
.saturating_add(T::DbWeight::get().reads(1004_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into())))
.saturating_add(T::DbWeight::get().writes(1005_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into())))
.saturating_add(Weight::from_parts(0, 2930).saturating_mul(a.into()))
}
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Account` (r:0 w:1)
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
fn mint() -> Weight {
// Proof Size summary in bytes:
// Measured: `418`
// Estimated: `4062`
// Minimum execution time: 68_983_000 picoseconds.
Weight::from_parts(69_802_000, 4062)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Account` (r:0 w:1)
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
fn force_mint() -> Weight {
// Proof Size summary in bytes:
// Measured: `418`
// Estimated: `4062`
// Minimum execution time: 65_803_000 picoseconds.
Weight::from_parts(67_191_000, 4062)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
/// Storage: `Nfts::Attribute` (r:1 w:0)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemMetadataOf` (r:1 w:0)
/// Proof: `Nfts::ItemMetadataOf` (`max_values`: None, `max_size`: Some(335), added: 2810, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Account` (r:0 w:1)
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemPriceOf` (r:0 w:1)
/// Proof: `Nfts::ItemPriceOf` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemAttributesApprovalsOf` (r:0 w:1)
/// Proof: `Nfts::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(441), added: 2916, mode: `MaxEncodedLen`)
/// Storage: `Nfts::PendingSwapOf` (r:0 w:1)
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
fn burn() -> Weight {
// Proof Size summary in bytes:
// Measured: `526`
// Estimated: `4062`
// Minimum execution time: 74_085_000 picoseconds.
Weight::from_parts(75_919_000, 4062)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(7_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:0)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:1 w:0)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Account` (r:0 w:2)
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemPriceOf` (r:0 w:1)
/// Proof: `Nfts::ItemPriceOf` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
/// Storage: `Nfts::PendingSwapOf` (r:0 w:1)
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
fn transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `555`
// Estimated: `4062`
// Minimum execution time: 56_531_000 picoseconds.
Weight::from_parts(57_676_000, 4062)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:0)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Item` (r:5000 w:5000)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// The range of component `i` is `[0, 5000]`.
fn redeposit(i: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `750 + i * (83 ±0)`
// Estimated: `3538 + i * (3072 ±0)`
// Minimum execution time: 18_545_000 picoseconds.
Weight::from_parts(18_987_000, 3538)
// Standard Error: 11_750
.saturating_add(Weight::from_parts(23_672_529, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
.saturating_add(Weight::from_parts(0, 3072).saturating_mul(i.into()))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
fn lock_item_transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `423`
// Estimated: `3522`
// Minimum execution time: 24_040_000 picoseconds.
Weight::from_parts(24_947_000, 3522)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
fn unlock_item_transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `423`
// Estimated: `3522`
// Minimum execution time: 23_941_000 picoseconds.
Weight::from_parts(24_858_000, 3522)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:0)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:1)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn lock_collection() -> Weight {
// Proof Size summary in bytes:
// Measured: `327`
// Estimated: `3538`
// Minimum execution time: 19_598_000 picoseconds.
Weight::from_parts(20_471_000, 3538)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::OwnershipAcceptance` (r:1 w:1)
/// Proof: `Nfts::OwnershipAcceptance` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionAccount` (r:0 w:2)
/// Proof: `Nfts::CollectionAccount` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
fn transfer_ownership() -> Weight {
// Proof Size summary in bytes:
// Measured: `524`
// Estimated: `3581`
// Minimum execution time: 35_013_000 picoseconds.
Weight::from_parts(36_104_000, 3581)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionRoleOf` (r:2 w:4)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
fn set_team() -> Weight {
// Proof Size summary in bytes:
// Measured: `344`
// Estimated: `6054`
// Minimum execution time: 48_777_000 picoseconds.
Weight::from_parts(50_672_000, 6054)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionAccount` (r:0 w:2)
/// Proof: `Nfts::CollectionAccount` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
fn force_collection_owner() -> Weight {
// Proof Size summary in bytes:
// Measured: `298`
// Estimated: `3537`
// Minimum execution time: 20_455_000 picoseconds.
Weight::from_parts(21_229_000, 3537)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:0)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:0 w:1)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn force_collection_config() -> Weight {
// Proof Size summary in bytes:
// Measured: `276`
// Estimated: `3537`
// Minimum execution time: 16_326_000 picoseconds.
Weight::from_parts(16_897_000, 3537)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
fn lock_item_properties() -> Weight {
// Proof Size summary in bytes:
// Measured: `423`
// Estimated: `3522`
// Minimum execution time: 22_519_000 picoseconds.
Weight::from_parts(23_274_000, 3522)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:1 w:1)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
fn set_attribute() -> Weight {
// Proof Size summary in bytes:
// Measured: `514`
// Estimated: `3920`
// Minimum execution time: 69_247_000 picoseconds.
Weight::from_parts(70_996_000, 3920)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:1 w:1)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
fn force_set_attribute() -> Weight {
// Proof Size summary in bytes:
// Measured: `331`
// Estimated: `3920`
// Minimum execution time: 33_077_000 picoseconds.
Weight::from_parts(33_810_000, 3920)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Nfts::Attribute` (r:1 w:1)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
fn clear_attribute() -> Weight {
// Proof Size summary in bytes:
// Measured: `958`
// Estimated: `3920`
// Minimum execution time: 63_523_000 picoseconds.
Weight::from_parts(64_779_000, 3920)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Nfts::Item` (r:1 w:0)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemAttributesApprovalsOf` (r:1 w:1)
/// Proof: `Nfts::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(441), added: 2916, mode: `MaxEncodedLen`)
fn approve_item_attributes() -> Weight {
// Proof Size summary in bytes:
// Measured: `356`
// Estimated: `4062`
// Minimum execution time: 20_686_000 picoseconds.
Weight::from_parts(21_511_000, 4062)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::Item` (r:1 w:0)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemAttributesApprovalsOf` (r:1 w:1)
/// Proof: `Nfts::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(441), added: 2916, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:1001 w:1000)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 1000]`.
fn cancel_item_attributes_approval(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `769 + n * (386 ±0)`
// Estimated: `4062 + n * (2930 ±0)`
// Minimum execution time: 33_029_000 picoseconds.
Weight::from_parts(33_938_000, 4062)
// Standard Error: 3_029
.saturating_add(Weight::from_parts(7_579_917, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 2930).saturating_mul(n.into()))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemMetadataOf` (r:1 w:1)
/// Proof: `Nfts::ItemMetadataOf` (`max_values`: None, `max_size`: Some(335), added: 2810, mode: `MaxEncodedLen`)
fn set_metadata() -> Weight {
// Proof Size summary in bytes:
// Measured: `514`
// Estimated: `3800`
// Minimum execution time: 56_219_000 picoseconds.
Weight::from_parts(57_548_000, 3800)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemMetadataOf` (r:1 w:1)
/// Proof: `Nfts::ItemMetadataOf` (`max_values`: None, `max_size`: Some(335), added: 2810, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
fn clear_metadata() -> Weight {
// Proof Size summary in bytes:
// Measured: `824`
// Estimated: `3800`
// Minimum execution time: 53_360_000 picoseconds.
Weight::from_parts(54_827_000, 3800)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionMetadataOf` (r:1 w:1)
/// Proof: `Nfts::CollectionMetadataOf` (`max_values`: None, `max_size`: Some(294), added: 2769, mode: `MaxEncodedLen`)
fn set_collection_metadata() -> Weight {
// Proof Size summary in bytes:
// Measured: `373`
// Estimated: `3759`
// Minimum execution time: 50_851_000 picoseconds.
Weight::from_parts(52_322_000, 3759)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionMetadataOf` (r:1 w:1)
/// Proof: `Nfts::CollectionMetadataOf` (`max_values`: None, `max_size`: Some(294), added: 2769, mode: `MaxEncodedLen`)
fn clear_collection_metadata() -> Weight {
// Proof Size summary in bytes:
// Measured: `691`
// Estimated: `3759`
// Minimum execution time: 50_304_000 picoseconds.
Weight::from_parts(51_259_000, 3759)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn approve_transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `385`
// Estimated: `4062`
// Minimum execution time: 24_516_000 picoseconds.
Weight::from_parts(25_110_000, 4062)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
fn cancel_approval() -> Weight {
// Proof Size summary in bytes:
// Measured: `382`
// Estimated: `4062`
// Minimum execution time: 20_404_000 picoseconds.
Weight::from_parts(21_281_000, 4062)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
fn clear_all_transfer_approvals() -> Weight {
// Proof Size summary in bytes:
// Measured: `382`
// Estimated: `4062`
// Minimum execution time: 19_568_000 picoseconds.
Weight::from_parts(20_376_000, 4062)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::OwnershipAcceptance` (r:1 w:1)
/// Proof: `Nfts::OwnershipAcceptance` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
fn set_accept_ownership() -> Weight {
// Proof Size summary in bytes:
// Measured: `76`
// Estimated: `3505`
// Minimum execution time: 17_232_000 picoseconds.
Weight::from_parts(17_555_000, 3505)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:1)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:0)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
fn set_collection_max_supply() -> Weight {
// Proof Size summary in bytes:
// Measured: `327`
// Estimated: `3538`
// Minimum execution time: 22_353_000 picoseconds.
Weight::from_parts(22_864_000, 3538)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::CollectionRoleOf` (r:1 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:1)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn update_mint_settings() -> Weight {
// Proof Size summary in bytes:
// Measured: `311`
// Estimated: `3538`
// Minimum execution time: 21_008_000 picoseconds.
Weight::from_parts(21_821_000, 3538)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::Item` (r:1 w:0)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemPriceOf` (r:0 w:1)
/// Proof: `Nfts::ItemPriceOf` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
fn set_price() -> Weight {
// Proof Size summary in bytes:
// Measured: `493`
// Estimated: `4062`
// Minimum execution time: 30_820_000 picoseconds.
Weight::from_parts(31_676_000, 4062)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemPriceOf` (r:1 w:1)
/// Proof: `Nfts::ItemPriceOf` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:0)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:1 w:0)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Account` (r:0 w:2)
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// Storage: `Nfts::PendingSwapOf` (r:0 w:1)
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
fn buy_item() -> Weight {
// Proof Size summary in bytes:
// Measured: `655`
// Estimated: `4062`
// Minimum execution time: 67_391_000 picoseconds.
Weight::from_parts(69_020_000, 4062)
.saturating_add(T::DbWeight::get().reads(6_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// The range of component `n` is `[0, 10]`.
fn pay_tips(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_194_000 picoseconds.
Weight::from_parts(4_693_046, 0)
// Standard Error: 8_482
.saturating_add(Weight::from_parts(2_570_624, 0).saturating_mul(n.into()))
}
/// Storage: `Nfts::Item` (r:2 w:0)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::PendingSwapOf` (r:0 w:1)
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
fn create_swap() -> Weight {
// Proof Size summary in bytes:
// Measured: `444`
// Estimated: `7134`
// Minimum execution time: 26_668_000 picoseconds.
Weight::from_parts(27_700_000, 7134)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::PendingSwapOf` (r:1 w:1)
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Item` (r:1 w:0)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
fn cancel_swap() -> Weight {
// Proof Size summary in bytes:
// Measured: `488`
// Estimated: `4062`
// Minimum execution time: 27_612_000 picoseconds.
Weight::from_parts(28_523_000, 4062)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Nfts::Item` (r:2 w:2)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::PendingSwapOf` (r:1 w:2)
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:0)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:2 w:0)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:2 w:0)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Account` (r:0 w:4)
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemPriceOf` (r:0 w:2)
/// Proof: `Nfts::ItemPriceOf` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
fn claim_swap() -> Weight {
// Proof Size summary in bytes:
// Measured: `771`
// Estimated: `7134`
// Minimum execution time: 109_691_000 picoseconds.
Weight::from_parts(111_678_000, 7134)
.saturating_add(T::DbWeight::get().reads(9_u64))
.saturating_add(T::DbWeight::get().writes(10_u64))
}
/// Storage: `Nfts::CollectionRoleOf` (r:2 w:0)
/// Proof: `Nfts::CollectionRoleOf` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:1)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:10 w:10)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemMetadataOf` (r:1 w:1)
/// Proof: `Nfts::ItemMetadataOf` (`max_values`: None, `max_size`: Some(335), added: 2810, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Account` (r:0 w:1)
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 10]`.
fn mint_pre_signed(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `580`
// Estimated: `6054 + n * (2930 ±0)`
// Minimum execution time: 158_638_000 picoseconds.
Weight::from_parts(165_550_686, 6054)
// Standard Error: 65_710
.saturating_add(Weight::from_parts(43_677_181, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(6_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 2930).saturating_mul(n.into()))
}
/// Storage: `Nfts::Item` (r:1 w:0)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(597), added: 3072, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemAttributesApprovalsOf` (r:1 w:1)
/// Proof: `Nfts::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(441), added: 2916, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:1)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:10 w:10)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(455), added: 2930, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 10]`.
fn set_attributes_pre_signed(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `575`
// Estimated: `4062 + n * (2930 ±0)`
// Minimum execution time: 75_427_000 picoseconds.
Weight::from_parts(88_971_257, 4062)
// Standard Error: 91_158
.saturating_add(Weight::from_parts(42_253_239, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 2930).saturating_mul(n.into()))
}
}

View file

@ -0,0 +1,449 @@
// Copyright 2025 DataHaven
// This file is part of DataHaven.
// DataHaven 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.
// DataHaven 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 DataHaven. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_payment_streams`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 51.0.0
//! DATE: 2026-01-29, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --runtime
// target/production/wbuild/datahaven-testnet-runtime/datahaven_testnet_runtime.compact.compressed.wasm
// --pallet
// pallet_payment_streams
// --extrinsic
//
// --header
// ../file_header.txt
// --template
// benchmarking/frame-weight-template.hbs
// --output
// runtime/testnet/src/weights/pallet_payment_streams.rs
// --steps
// 50
// --repeat
// 20
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;
/// Weights for `pallet_payment_streams`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_payment_streams::weights::WeightInfo for WeightInfo<T> {
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::RegisteredUsers` (r:1 w:1)
/// Proof: `PaymentStreams::RegisteredUsers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:0)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn create_fixed_rate_payment_stream() -> Weight {
// Proof Size summary in bytes:
// Measured: `523`
// Estimated: `6054`
// Minimum execution time: 108_671_000 picoseconds.
Weight::from_parts(110_483_000, 6054)
.saturating_add(T::DbWeight::get().reads(11_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:1 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:1 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:3 w:3)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:0)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:4 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:0)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
fn update_fixed_rate_payment_stream() -> Weight {
// Proof Size summary in bytes:
// Measured: `1427`
// Estimated: `12414`
// Minimum execution time: 406_731_000 picoseconds.
Weight::from_parts(416_205_000, 12414)
.saturating_add(T::DbWeight::get().reads(21_u64))
.saturating_add(T::DbWeight::get().writes(6_u64))
}
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:0)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:1 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:1 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:3 w:3)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:0)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:4 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:0)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::RegisteredUsers` (r:1 w:1)
/// Proof: `PaymentStreams::RegisteredUsers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
fn delete_fixed_rate_payment_stream() -> Weight {
// Proof Size summary in bytes:
// Measured: `1304`
// Estimated: `12414`
// Minimum execution time: 294_818_000 picoseconds.
Weight::from_parts(298_194_000, 12414)
.saturating_add(T::DbWeight::get().reads(22_u64))
.saturating_add(T::DbWeight::get().writes(6_u64))
}
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (r:1 w:0)
/// Proof: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::RegisteredUsers` (r:1 w:1)
/// Proof: `PaymentStreams::RegisteredUsers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::AccumulatedPriceIndex` (r:1 w:0)
/// Proof: `PaymentStreams::AccumulatedPriceIndex` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
fn create_dynamic_rate_payment_stream() -> Weight {
// Proof Size summary in bytes:
// Measured: `525`
// Estimated: `6054`
// Minimum execution time: 110_206_000 picoseconds.
Weight::from_parts(112_480_000, 6054)
.saturating_add(T::DbWeight::get().reads(12_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:1 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:1 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:3 w:3)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:0)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:4 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:0)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (r:1 w:0)
/// Proof: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
fn update_dynamic_rate_payment_stream() -> Weight {
// Proof Size summary in bytes:
// Measured: `1387`
// Estimated: `12414`
// Minimum execution time: 350_407_000 picoseconds.
Weight::from_parts(353_687_000, 12414)
.saturating_add(T::DbWeight::get().reads(21_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:1 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:1 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:3 w:3)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:0)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:4 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:0)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::RegisteredUsers` (r:1 w:1)
/// Proof: `PaymentStreams::RegisteredUsers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
fn delete_dynamic_rate_payment_stream() -> Weight {
// Proof Size summary in bytes:
// Measured: `1455`
// Estimated: `12414`
// Minimum execution time: 407_867_000 picoseconds.
Weight::from_parts(423_394_000, 12414)
.saturating_add(T::DbWeight::get().reads(22_u64))
.saturating_add(T::DbWeight::get().writes(7_u64))
}
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:1 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:1 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:3 w:3)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:0)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:4 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:0)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn charge_payment_streams() -> Weight {
// Proof Size summary in bytes:
// Measured: `1441`
// Estimated: `12414`
// Minimum execution time: 337_670_000 picoseconds.
Weight::from_parts(343_494_000, 12414)
.saturating_add(T::DbWeight::get().reads(21_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:0)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:10 w:10)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:10 w:10)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:1 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:1 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:10 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:12 w:12)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:0)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:4 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 10]`.
fn charge_multiple_users_payment_streams(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1122 + n * (331 ±0)`
// Estimated: `12414 + n * (2604 ±0)`
// Minimum execution time: 20_398_000 picoseconds.
Weight::from_parts(45_361_517, 12414)
// Standard Error: 164_730
.saturating_add(Weight::from_parts(296_339_119, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(12_u64))
.saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 2604).saturating_mul(n.into()))
}
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1001 w:1001)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:0)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:999 w:999)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:999 w:999)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:999 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:999 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:4 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:999 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::RegisteredUsers` (r:1 w:1)
/// Proof: `PaymentStreams::RegisteredUsers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// The range of component `n` is `[1, 1000]`.
fn pay_outstanding_debt(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1422 + n * (644 ±0)`
// Estimated: `12414 + n * (3634 ±0)`
// Minimum execution time: 379_144_000 picoseconds.
Weight::from_parts(384_440_000, 12414)
// Standard Error: 164_472
.saturating_add(Weight::from_parts(287_945_137, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(11_u64))
.saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(4_u64))
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 3634).saturating_mul(n.into()))
}
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:1)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:0)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::RegisteredUsers` (r:1 w:0)
/// Proof: `PaymentStreams::RegisteredUsers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
fn clear_insolvent_flag() -> Weight {
// Proof Size summary in bytes:
// Measured: `231`
// Estimated: `3505`
// Minimum execution time: 22_622_000 picoseconds.
Weight::from_parts(23_508_000, 3505)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (r:1 w:0)
/// Proof: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::AccumulatedPriceIndex` (r:1 w:1)
/// Proof: `PaymentStreams::AccumulatedPriceIndex` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
fn price_index_update() -> Weight {
// Proof Size summary in bytes:
// Measured: `116`
// Estimated: `1501`
// Minimum execution time: 5_924_000 picoseconds.
Weight::from_parts(6_148_000, 1501)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `PaymentStreams::OnPollTicker` (r:1 w:1)
/// Proof: `PaymentStreams::OnPollTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn tick_update() -> Weight {
// Proof Size summary in bytes:
// Measured: `114`
// Estimated: `1489`
// Minimum execution time: 4_037_000 picoseconds.
Weight::from_parts(4_180_000, 1489)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `ProofsDealer::ChallengesTicker` (r:1 w:0)
/// Proof: `ProofsDealer::ChallengesTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastSubmittersTickRegistered` (r:1 w:1)
/// Proof: `PaymentStreams::LastSubmittersTickRegistered` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ValidProofSubmittersLastTicks` (r:1 w:0)
/// Proof: `ProofsDealer::ValidProofSubmittersLastTicks` (`max_values`: None, `max_size`: Some(7830), added: 10305, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::AccumulatedPriceIndex` (r:1 w:0)
/// Proof: `PaymentStreams::AccumulatedPriceIndex` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:244 w:244)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 244]`.
fn update_providers_last_chargeable_info(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `270 + n * (32 ±0)`
// Estimated: `11295 + n * (2543 ±0)`
// Minimum execution time: 12_833_000 picoseconds.
Weight::from_parts(14_336_361, 11295)
// Standard Error: 5_031
.saturating_add(Weight::from_parts(6_893_894, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 2543).saturating_mul(n.into()))
}
}

View file

@ -0,0 +1,326 @@
// Copyright 2025 DataHaven
// This file is part of DataHaven.
// DataHaven 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.
// DataHaven 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 DataHaven. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_proofs_dealer`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 51.0.0
//! DATE: 2026-01-29, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --runtime
// target/production/wbuild/datahaven-testnet-runtime/datahaven_testnet_runtime.compact.compressed.wasm
// --pallet
// pallet_proofs_dealer
// --extrinsic
//
// --header
// ../file_header.txt
// --template
// benchmarking/frame-weight-template.hbs
// --output
// runtime/testnet/src/weights/pallet_proofs_dealer.rs
// --steps
// 50
// --repeat
// 20
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;
/// Weights for `pallet_proofs_dealer`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_proofs_dealer::weights::WeightInfo for WeightInfo<T> {
/// Storage: `ProofsDealer::ChallengesQueue` (r:1 w:1)
/// Proof: `ProofsDealer::ChallengesQueue` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
fn challenge() -> Weight {
// Proof Size summary in bytes:
// Measured: `41`
// Estimated: `4687`
// Minimum execution time: 11_486_000 picoseconds.
Weight::from_parts(11_900_000, 4687)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ProviderToProofSubmissionRecord` (r:1 w:1)
/// Proof: `ProofsDealer::ProviderToProofSubmissionRecord` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:2 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ChallengesTicker` (r:1 w:0)
/// Proof: `ProofsDealer::ChallengesTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToChallengesSeed` (r:1 w:0)
/// Proof: `ProofsDealer::TickToChallengesSeed` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::LastCheckpointTick` (r:1 w:0)
/// Proof: `ProofsDealer::LastCheckpointTick` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToCheckpointChallenges` (r:1 w:0)
/// Proof: `ProofsDealer::TickToCheckpointChallenges` (`max_values`: None, `max_size`: Some(681), added: 3156, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:0)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:1)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:0)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:1 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:1 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:5 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (r:1 w:0)
/// Proof: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ValidProofSubmittersLastTicks` (r:1 w:1)
/// Proof: `ProofsDealer::ValidProofSubmittersLastTicks` (`max_values`: None, `max_size`: Some(7830), added: 10305, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToProvidersDeadlines` (r:0 w:2)
/// Proof: `ProofsDealer::TickToProvidersDeadlines` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// The range of component `n` is `[1, 20]`.
fn submit_proof_no_checkpoint_challenges_key_proofs(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `2070`
// Estimated: `15270`
// Minimum execution time: 2_174_837_000 picoseconds.
Weight::from_parts(2_059_384_726, 15270)
// Standard Error: 314_390
.saturating_add(Weight::from_parts(135_797_182, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(30_u64))
.saturating_add(T::DbWeight::get().writes(9_u64))
}
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ProviderToProofSubmissionRecord` (r:1 w:1)
/// Proof: `ProofsDealer::ProviderToProofSubmissionRecord` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:0)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ChallengesTicker` (r:1 w:0)
/// Proof: `ProofsDealer::ChallengesTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToChallengesSeed` (r:1 w:0)
/// Proof: `ProofsDealer::TickToChallengesSeed` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::LastCheckpointTick` (r:1 w:0)
/// Proof: `ProofsDealer::LastCheckpointTick` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToCheckpointChallenges` (r:1 w:0)
/// Proof: `ProofsDealer::TickToCheckpointChallenges` (`max_values`: None, `max_size`: Some(681), added: 3156, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:1 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ValidProofSubmittersLastTicks` (r:1 w:1)
/// Proof: `ProofsDealer::ValidProofSubmittersLastTicks` (`max_values`: None, `max_size`: Some(7830), added: 10305, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToProvidersDeadlines` (r:0 w:2)
/// Proof: `ProofsDealer::TickToProvidersDeadlines` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:0)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:1)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::UsersWithoutFunds` (r:1 w:0)
/// Proof: `PaymentStreams::UsersWithoutFunds` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:1)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:2 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:2 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:0)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:1 w:0)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::LastChargeableInfo` (r:1 w:0)
/// Proof: `PaymentStreams::LastChargeableInfo` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:0)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (r:1 w:0)
/// Proof: `PaymentStreams::CurrentPricePerGigaUnitPerTick` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// The range of component `n` is `[21, 40]`.
fn submit_proof_with_checkpoint_challenges_key_proofs(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `2070`
// Estimated: `20676`
// Minimum execution time: 4_570_889_000 picoseconds.
Weight::from_parts(4_000_730_198, 20676)
// Standard Error: 951_176
.saturating_add(Weight::from_parts(35_912_979, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(39_u64))
.saturating_add(T::DbWeight::get().writes(11_u64))
}
/// Storage: `ProofsDealer::ChallengesTicker` (r:1 w:1)
/// Proof: `ProofsDealer::ChallengesTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Randomness::LatestParentBlockRandomness` (r:1 w:0)
/// Proof: `Randomness::LatestParentBlockRandomness` (`max_values`: Some(1), `max_size`: Some(36), added: 531, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::LastCheckpointTick` (r:1 w:0)
/// Proof: `ProofsDealer::LastCheckpointTick` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToCheckpointChallenges` (r:1 w:0)
/// Proof: `ProofsDealer::TickToCheckpointChallenges` (`max_values`: None, `max_size`: Some(681), added: 3156, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToCheckForSlashableProviders` (r:1 w:1)
/// Proof: `ProofsDealer::TickToCheckForSlashableProviders` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToProvidersDeadlines` (r:1001 w:2000)
/// Proof: `ProofsDealer::TickToProvidersDeadlines` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ProviderToProofSubmissionRecord` (r:1000 w:1000)
/// Proof: `ProofsDealer::ProviderToProofSubmissionRecord` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::SlashableProviders` (r:1000 w:1000)
/// Proof: `ProofsDealer::SlashableProviders` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1000 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1000 w:0)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:1 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToChallengesSeed` (r:0 w:1)
/// Proof: `ProofsDealer::TickToChallengesSeed` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 1000]`.
fn new_challenges_round(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1155 + n * (271 ±0)`
// Estimated: `6172 + n * (3634 ±0)`
// Minimum execution time: 29_687_000 picoseconds.
Weight::from_parts(30_010_000, 6172)
// Standard Error: 49_079
.saturating_add(Weight::from_parts(40_156_766, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(3_u64))
.saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 3634).saturating_mul(n.into()))
}
/// Storage: `ProofsDealer::PriorityChallengesQueue` (r:1 w:1)
/// Proof: `ProofsDealer::PriorityChallengesQueue` (`max_values`: Some(1), `max_size`: Some(3302), added: 3797, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ChallengesQueue` (r:1 w:1)
/// Proof: `ProofsDealer::ChallengesQueue` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::LastCheckpointTick` (r:1 w:1)
/// Proof: `ProofsDealer::LastCheckpointTick` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToCheckpointChallenges` (r:0 w:2)
/// Proof: `ProofsDealer::TickToCheckpointChallenges` (`max_values`: None, `max_size`: Some(681), added: 3156, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 20]`.
fn new_checkpoint_challenge_round(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `65 + n * (32 ±0)`
// Estimated: `4787`
// Minimum execution time: 14_023_000 picoseconds.
Weight::from_parts(16_003_551, 4787)
// Standard Error: 3_466
.saturating_add(Weight::from_parts(429_621, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `ProofsDealer::PastBlocksStatus` (r:1 w:1)
/// Proof: `ProofsDealer::PastBlocksStatus` (`max_values`: Some(1), `max_size`: Some(51), added: 546, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::PastBlocksWeight` (r:1 w:0)
/// Proof: `ProofsDealer::PastBlocksWeight` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ChallengesTicker` (r:1 w:0)
/// Proof: `ProofsDealer::ChallengesTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ChallengesTickerPaused` (r:0 w:1)
/// Proof: `ProofsDealer::ChallengesTickerPaused` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
fn check_spamming_condition() -> Weight {
// Proof Size summary in bytes:
// Measured: `248`
// Estimated: `3501`
// Minimum execution time: 13_925_000 picoseconds.
Weight::from_parts(14_476_000, 3501)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `ProofsDealer::LastDeletedTick` (r:1 w:0)
/// Proof: `ProofsDealer::LastDeletedTick` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ChallengesTicker` (r:1 w:0)
/// Proof: `ProofsDealer::ChallengesTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn trim_valid_proof_submitters_last_ticks_constant_execution() -> Weight {
// Proof Size summary in bytes:
// Measured: `41`
// Estimated: `1489`
// Minimum execution time: 4_422_000 picoseconds.
Weight::from_parts(4_638_000, 1489)
.saturating_add(T::DbWeight::get().reads(2_u64))
}
/// Storage: `ProofsDealer::LastDeletedTick` (r:0 w:1)
/// Proof: `ProofsDealer::LastDeletedTick` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ValidProofSubmittersLastTicks` (r:0 w:1)
/// Proof: `ProofsDealer::ValidProofSubmittersLastTicks` (`max_values`: None, `max_size`: Some(7830), added: 10305, mode: `MaxEncodedLen`)
fn trim_valid_proof_submitters_last_ticks_loop() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_453_000 picoseconds.
Weight::from_parts(2_608_000, 0)
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `ProofsDealer::PastBlocksWeight` (r:0 w:2)
/// Proof: `ProofsDealer::PastBlocksWeight` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
fn on_finalize() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 4_835_000 picoseconds.
Weight::from_parts(5_018_000, 0)
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:0)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ProviderToProofSubmissionRecord` (r:1 w:1)
/// Proof: `ProofsDealer::ProviderToProofSubmissionRecord` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ChallengesTicker` (r:1 w:0)
/// Proof: `ProofsDealer::ChallengesTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:1 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToProvidersDeadlines` (r:0 w:1)
/// Proof: `ProofsDealer::TickToProvidersDeadlines` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
fn force_initialise_challenge_cycle() -> Weight {
// Proof Size summary in bytes:
// Measured: `552`
// Estimated: `4624`
// Minimum execution time: 44_075_000 picoseconds.
Weight::from_parts(45_401_000, 4624)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `ProofsDealer::ChallengesTickerPaused` (r:0 w:1)
/// Proof: `ProofsDealer::ChallengesTickerPaused` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
fn set_paused() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_190_000 picoseconds.
Weight::from_parts(7_572_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
}

View file

@ -0,0 +1,84 @@
// Copyright 2025 DataHaven
// This file is part of DataHaven.
// DataHaven 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.
// DataHaven 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 DataHaven. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_session`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 51.0.0
//! DATE: 2026-01-29, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --runtime
// target/production/wbuild/datahaven-testnet-runtime/datahaven_testnet_runtime.compact.compressed.wasm
// --pallet
// pallet_session
// --extrinsic
//
// --header
// ../file_header.txt
// --template
// benchmarking/frame-weight-template.hbs
// --output
// runtime/testnet/src/weights/pallet_session.rs
// --steps
// 50
// --repeat
// 20
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;
/// Weights for `pallet_session`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_session::WeightInfo for WeightInfo<T> {
/// 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: `350`
// Estimated: `11240`
// Minimum execution time: 37_208_000 picoseconds.
Weight::from_parts(38_300_000, 11240)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// 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: `328`
// Estimated: `3793`
// Minimum execution time: 21_720_000 picoseconds.
Weight::from_parts(22_535_000, 3793)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
}

View file

@ -0,0 +1,630 @@
// Copyright 2025 DataHaven
// This file is part of DataHaven.
// DataHaven 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.
// DataHaven 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 DataHaven. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_storage_providers`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 51.0.0
//! DATE: 2026-01-29, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --runtime
// target/production/wbuild/datahaven-testnet-runtime/datahaven_testnet_runtime.compact.compressed.wasm
// --pallet
// pallet_storage_providers
// --extrinsic
//
// --header
// ../file_header.txt
// --template
// benchmarking/frame-weight-template.hbs
// --output
// runtime/testnet/src/weights/pallet_storage_providers.rs
// --steps
// 50
// --repeat
// 20
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;
/// Weights for `pallet_storage_providers`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_storage_providers::weights::WeightInfo for WeightInfo<T> {
/// Storage: `Providers::SignUpRequests` (r:1 w:1)
/// Proof: `Providers::SignUpRequests` (`max_values`: None, `max_size`: Some(2163), added: 4638, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
fn request_msp_sign_up() -> Weight {
// Proof Size summary in bytes:
// Measured: `270`
// Estimated: `5628`
// Minimum execution time: 89_826_000 picoseconds.
Weight::from_parts(90_994_000, 5628)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `Providers::SignUpRequests` (r:1 w:1)
/// Proof: `Providers::SignUpRequests` (`max_values`: None, `max_size`: Some(2163), added: 4638, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
fn request_bsp_sign_up() -> Weight {
// Proof Size summary in bytes:
// Measured: `270`
// Estimated: `5628`
// Minimum execution time: 89_741_000 picoseconds.
Weight::from_parts(91_222_000, 5628)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `Providers::SignUpRequests` (r:1 w:1)
/// Proof: `Providers::SignUpRequests` (`max_values`: None, `max_size`: Some(2163), added: 4638, mode: `MaxEncodedLen`)
/// Storage: `Randomness::LatestOneEpochAgoRandomness` (r:1 w:0)
/// Proof: `Randomness::LatestOneEpochAgoRandomness` (`max_values`: Some(1), `max_size`: Some(36), added: 531, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:1)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::BspCount` (r:1 w:1)
/// Proof: `Providers::BspCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::GlobalBspsReputationWeight` (r:1 w:1)
/// Proof: `Providers::GlobalBspsReputationWeight` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:0 w:1)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:0 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
fn confirm_sign_up_bsp() -> Weight {
// Proof Size summary in bytes:
// Measured: `474`
// Estimated: `5628`
// Minimum execution time: 38_182_000 picoseconds.
Weight::from_parts(39_713_000, 5628)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(6_u64))
}
/// Storage: `Providers::SignUpRequests` (r:1 w:1)
/// Proof: `Providers::SignUpRequests` (`max_values`: None, `max_size`: Some(2163), added: 4638, mode: `MaxEncodedLen`)
/// Storage: `Randomness::LatestOneEpochAgoRandomness` (r:1 w:0)
/// Proof: `Randomness::LatestOneEpochAgoRandomness` (`max_values`: Some(1), `max_size`: Some(36), added: 531, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviderIdsToValuePropositions` (r:1 w:1)
/// Proof: `Providers::MainStorageProviderIdsToValuePropositions` (`max_values`: None, `max_size`: Some(1123), added: 3598, mode: `MaxEncodedLen`)
/// Storage: `Providers::MspCount` (r:1 w:1)
/// Proof: `Providers::MspCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:0 w:1)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:0 w:1)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:0 w:1)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
fn confirm_sign_up_msp() -> Weight {
// Proof Size summary in bytes:
// Measured: `487`
// Estimated: `5628`
// Minimum execution time: 54_783_000 picoseconds.
Weight::from_parts(56_744_000, 5628)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(6_u64))
}
/// Storage: `Providers::SignUpRequests` (r:1 w:1)
/// Proof: `Providers::SignUpRequests` (`max_values`: None, `max_size`: Some(2163), added: 4638, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
fn cancel_sign_up() -> Weight {
// Proof Size summary in bytes:
// Measured: `507`
// Estimated: `5628`
// Minimum execution time: 65_446_000 picoseconds.
Weight::from_parts(66_906_000, 5628)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:1)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:1)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviderIdsToValuePropositions` (r:102 w:101)
/// Proof: `Providers::MainStorageProviderIdsToValuePropositions` (`max_values`: None, `max_size`: Some(1123), added: 3598, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::MspCount` (r:1 w:1)
/// Proof: `Providers::MspCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:0 w:1)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 100]`.
fn msp_sign_off(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `775 + n * (83 ±0)`
// Estimated: `8186 + n * (3598 ±0)`
// Minimum execution time: 93_251_000 picoseconds.
Weight::from_parts(91_955_675, 8186)
// Standard Error: 9_290
.saturating_add(Weight::from_parts(6_491_321, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(7_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(7_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 3598).saturating_mul(n.into()))
}
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:1)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ProviderToProofSubmissionRecord` (r:1 w:0)
/// Proof: `ProofsDealer::ProviderToProofSubmissionRecord` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:1)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::BspCount` (r:1 w:1)
/// Proof: `Providers::BspCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::GlobalBspsReputationWeight` (r:1 w:1)
/// Proof: `Providers::GlobalBspsReputationWeight` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn bsp_sign_off() -> Weight {
// Proof Size summary in bytes:
// Measured: `720`
// Estimated: `4624`
// Minimum execution time: 93_040_000 picoseconds.
Weight::from_parts(95_240_000, 4624)
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().writes(7_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:1)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
fn change_capacity_bsp_less_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `679`
// Estimated: `4624`
// Minimum execution time: 83_405_000 picoseconds.
Weight::from_parts(85_132_000, 4624)
.saturating_add(T::DbWeight::get().reads(7_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:1)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
fn change_capacity_bsp_more_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `679`
// Estimated: `4624`
// Minimum execution time: 105_733_000 picoseconds.
Weight::from_parts(106_832_000, 4624)
.saturating_add(T::DbWeight::get().reads(7_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:1)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
fn change_capacity_msp_less_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `649`
// Estimated: `4608`
// Minimum execution time: 79_140_000 picoseconds.
Weight::from_parts(80_429_000, 4608)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:1)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
fn change_capacity_msp_more_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `649`
// Estimated: `4608`
// Minimum execution time: 98_935_000 picoseconds.
Weight::from_parts(100_250_000, 4608)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviderIdsToValuePropositions` (r:1 w:1)
/// Proof: `Providers::MainStorageProviderIdsToValuePropositions` (`max_values`: None, `max_size`: Some(1123), added: 3598, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:1)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
fn add_value_prop() -> Weight {
// Proof Size summary in bytes:
// Measured: `591`
// Estimated: `4608`
// Minimum execution time: 44_674_000 picoseconds.
Weight::from_parts(46_159_000, 4608)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:0)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviderIdsToValuePropositions` (r:1 w:1)
/// Proof: `Providers::MainStorageProviderIdsToValuePropositions` (`max_values`: None, `max_size`: Some(1123), added: 3598, mode: `MaxEncodedLen`)
fn make_value_prop_unavailable() -> Weight {
// Proof Size summary in bytes:
// Measured: `631`
// Estimated: `4608`
// Minimum execution time: 32_741_000 picoseconds.
Weight::from_parts(34_206_000, 4608)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
fn add_multiaddress() -> Weight {
// Proof Size summary in bytes:
// Measured: `508`
// Estimated: `4624`
// Minimum execution time: 34_779_000 picoseconds.
Weight::from_parts(35_785_000, 4624)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
fn remove_multiaddress() -> Weight {
// Proof Size summary in bytes:
// Measured: `1316`
// Estimated: `4624`
// Minimum execution time: 32_789_000 picoseconds.
Weight::from_parts(33_844_000, 4624)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Providers::SignUpRequests` (r:1 w:1)
/// Proof: `Providers::SignUpRequests` (`max_values`: None, `max_size`: Some(2163), added: 4638, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:1)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviderIdsToValuePropositions` (r:1 w:1)
/// Proof: `Providers::MainStorageProviderIdsToValuePropositions` (`max_values`: None, `max_size`: Some(1123), added: 3598, mode: `MaxEncodedLen`)
/// Storage: `Providers::MspCount` (r:1 w:1)
/// Proof: `Providers::MspCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:0 w:1)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::PrivilegedProviders` (r:0 w:1)
/// Proof: `PaymentStreams::PrivilegedProviders` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
fn force_msp_sign_up() -> Weight {
// Proof Size summary in bytes:
// Measured: `270`
// Estimated: `5628`
// Minimum execution time: 126_228_000 picoseconds.
Weight::from_parts(130_217_000, 5628)
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().writes(8_u64))
}
/// Storage: `Providers::SignUpRequests` (r:1 w:1)
/// Proof: `Providers::SignUpRequests` (`max_values`: None, `max_size`: Some(2163), added: 4638, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:1)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:1)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::BspCount` (r:1 w:1)
/// Proof: `Providers::BspCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::GlobalBspsReputationWeight` (r:1 w:1)
/// Proof: `Providers::GlobalBspsReputationWeight` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:0 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
fn force_bsp_sign_up() -> Weight {
// Proof Size summary in bytes:
// Measured: `270`
// Estimated: `5628`
// Minimum execution time: 106_118_000 picoseconds.
Weight::from_parts(107_693_000, 5628)
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().writes(8_u64))
}
/// Storage: `Providers::MainStorageProviders` (r:1 w:0)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::SlashableProviders` (r:1 w:1)
/// Proof: `ProofsDealer::SlashableProviders` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:1 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:1 w:0)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
fn slash_without_awaiting_top_up() -> Weight {
// Proof Size summary in bytes:
// Measured: `871`
// Estimated: `6172`
// Minimum execution time: 162_133_000 picoseconds.
Weight::from_parts(164_580_000, 6172)
.saturating_add(T::DbWeight::get().reads(9_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Providers::MainStorageProviders` (r:1 w:0)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::SlashableProviders` (r:1 w:1)
/// Proof: `ProofsDealer::SlashableProviders` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `Parameters::Parameters` (r:2 w:0)
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(381), added: 2856, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:1 w:1)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ChallengesTicker` (r:1 w:0)
/// Proof: `ProofsDealer::ChallengesTicker` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::NextAvailableProviderTopUpExpirationShTick` (r:1 w:1)
/// Proof: `Providers::NextAvailableProviderTopUpExpirationShTick` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::ProviderTopUpExpirations` (r:1 w:1)
/// Proof: `Providers::ProviderTopUpExpirations` (`max_values`: None, `max_size`: Some(3322), added: 5797, mode: `MaxEncodedLen`)
fn slash_with_awaiting_top_up() -> Weight {
// Proof Size summary in bytes:
// Measured: `871`
// Estimated: `6787`
// Minimum execution time: 128_623_000 picoseconds.
Weight::from_parts(130_891_000, 6787)
.saturating_add(T::DbWeight::get().reads(13_u64))
.saturating_add(T::DbWeight::get().writes(8_u64))
}
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:0)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:1 w:0)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:1 w:1)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Providers::ProviderTopUpExpirations` (r:0 w:1)
/// Proof: `Providers::ProviderTopUpExpirations` (`max_values`: None, `max_size`: Some(3322), added: 5797, mode: `MaxEncodedLen`)
fn top_up_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `758`
// Estimated: `4624`
// Minimum execution time: 113_271_000 picoseconds.
Weight::from_parts(115_045_000, 4624)
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: `Providers::InsolventProviders` (r:2 w:1)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:0)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:0)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:0)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:1)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:1)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ProviderToProofSubmissionRecord` (r:1 w:1)
/// Proof: `ProofsDealer::ProviderToProofSubmissionRecord` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// Storage: `Providers::BspCount` (r:1 w:1)
/// Proof: `Providers::BspCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::TotalBspsCapacity` (r:1 w:1)
/// Proof: `Providers::TotalBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::UsedBspsCapacity` (r:1 w:1)
/// Proof: `Providers::UsedBspsCapacity` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Providers::GlobalBspsReputationWeight` (r:1 w:1)
/// Proof: `Providers::GlobalBspsReputationWeight` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToProvidersDeadlines` (r:0 w:1)
/// Proof: `ProofsDealer::TickToProvidersDeadlines` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
fn delete_provider_bsp() -> Weight {
// Proof Size summary in bytes:
// Measured: `853`
// Estimated: `6038`
// Minimum execution time: 81_453_000 picoseconds.
Weight::from_parts(84_499_000, 6038)
.saturating_add(T::DbWeight::get().reads(12_u64))
.saturating_add(T::DbWeight::get().writes(9_u64))
}
/// Storage: `Providers::InsolventProviders` (r:1 w:1)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::FixedRatePaymentStreams` (r:1 w:0)
/// Proof: `PaymentStreams::FixedRatePaymentStreams` (`max_values`: None, `max_size`: Some(125), added: 2600, mode: `MaxEncodedLen`)
/// Storage: `PaymentStreams::DynamicRatePaymentStreams` (r:1 w:0)
/// Proof: `PaymentStreams::DynamicRatePaymentStreams` (`max_values`: None, `max_size`: Some(129), added: 2604, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:1)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviderIdsToValuePropositions` (r:22 w:21)
/// Proof: `Providers::MainStorageProviderIdsToValuePropositions` (`max_values`: None, `max_size`: Some(1123), added: 3598, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviderIdsToBuckets` (r:21 w:20)
/// Proof: `Providers::MainStorageProviderIdsToBuckets` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
/// Storage: `Providers::MspCount` (r:1 w:1)
/// Proof: `Providers::MspCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToMainStorageProviderId` (r:0 w:1)
/// Proof: `Providers::AccountIdToMainStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 20]`.
/// The range of component `m` is `[0, 20]`.
fn delete_provider_msp(n: u32, m: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1845 + m * (54 ±0) + n * (83 ±0)`
// Estimated: `8186 + m * (2571 ±0) + n * (3598 ±0)`
// Minimum execution time: 186_516_000 picoseconds.
Weight::from_parts(80_100_317, 8186)
// Standard Error: 31_923
.saturating_add(Weight::from_parts(6_927_784, 0).saturating_mul(n.into()))
// Standard Error: 31_923
.saturating_add(Weight::from_parts(5_691_747, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into())))
.saturating_add(T::DbWeight::get().writes(5_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m.into())))
.saturating_add(Weight::from_parts(0, 2571).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 3598).saturating_mul(n.into()))
}
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ProviderToProofSubmissionRecord` (r:1 w:0)
/// Proof: `ProofsDealer::ProviderToProofSubmissionRecord` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
fn stop_all_cycles() -> Weight {
// Proof Size summary in bytes:
// Measured: `549`
// Estimated: `4624`
// Minimum execution time: 27_371_000 picoseconds.
Weight::from_parts(28_106_000, 4624)
.saturating_add(T::DbWeight::get().reads(3_u64))
}
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:1 w:1)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::AccountIdToBackupStorageProviderId` (r:1 w:0)
/// Proof: `Providers::AccountIdToBackupStorageProviderId` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::ProviderToProofSubmissionRecord` (r:1 w:1)
/// Proof: `ProofsDealer::ProviderToProofSubmissionRecord` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:0 w:1)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `ProofsDealer::TickToProvidersDeadlines` (r:0 w:1)
/// Proof: `ProofsDealer::TickToProvidersDeadlines` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
fn process_expired_provider_top_up_bsp() -> Weight {
// Proof Size summary in bytes:
// Measured: `1038`
// Estimated: `6172`
// Minimum execution time: 103_589_000 picoseconds.
Weight::from_parts(106_013_000, 6172)
.saturating_add(T::DbWeight::get().reads(7_u64))
.saturating_add(T::DbWeight::get().writes(7_u64))
}
/// Storage: `Providers::AwaitingTopUpFromProviders` (r:1 w:1)
/// Proof: `Providers::AwaitingTopUpFromProviders` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// Storage: `Providers::BackupStorageProviders` (r:1 w:0)
/// Proof: `Providers::BackupStorageProviders` (`max_values`: None, `max_size`: Some(1159), added: 3634, mode: `MaxEncodedLen`)
/// Storage: `Providers::MainStorageProviders` (r:1 w:0)
/// Proof: `Providers::MainStorageProviders` (`max_values`: None, `max_size`: Some(1143), added: 3618, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(289), added: 2764, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Providers::InsolventProviders` (r:0 w:1)
/// Proof: `Providers::InsolventProviders` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
fn process_expired_provider_top_up_msp() -> Weight {
// Proof Size summary in bytes:
// Measured: `775`
// Estimated: `6172`
// Minimum execution time: 83_393_000 picoseconds.
Weight::from_parts(84_682_000, 6172)
.saturating_add(T::DbWeight::get().reads(6_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
}