mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 05:11:09 +00:00
Introduce NIS functionality into Kusama/Rococo (#6352)
* Integrate NIS into Kusama/Rococo * Missing files * Fix * Fix * Formatting * Add Kusama weights Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add Rococo weights Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Use weights Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Bump * Bump * ".git/.scripts/bench-bot.sh" runtime kusama-dev pallet_nis * ".git/.scripts/bench-bot.sh" runtime rococo-dev pallet_nis Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: command-bot <>
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
use pallet_nis::WithMaximumOf;
|
||||
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
|
||||
use primitives::v2::{
|
||||
AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CandidateHash,
|
||||
@@ -55,7 +56,7 @@ use frame_support::{
|
||||
construct_runtime, parameter_types,
|
||||
traits::{
|
||||
Contains, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, LockIdentifier,
|
||||
PrivilegeCmp, WithdrawReasons,
|
||||
PrivilegeCmp, StorageMapShim, WithdrawReasons,
|
||||
},
|
||||
weights::ConstantMultiplier,
|
||||
PalletId, RuntimeDebug,
|
||||
@@ -65,7 +66,7 @@ use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};
|
||||
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
|
||||
use pallet_session::historical as session_historical;
|
||||
use pallet_transaction_payment::{CurrencyAdapter, FeeDetails, RuntimeDispatchInfo};
|
||||
use sp_core::{OpaqueMetadata, H256};
|
||||
use sp_core::{ConstU128, OpaqueMetadata, H256};
|
||||
use sp_mmr_primitives as mmr;
|
||||
use sp_runtime::{
|
||||
create_runtime_str, generic, impl_opaque_keys,
|
||||
@@ -954,7 +955,7 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
|
||||
RuntimeCall::Scheduler(..) |
|
||||
RuntimeCall::Proxy(..) |
|
||||
RuntimeCall::Multisig(..) |
|
||||
RuntimeCall::Gilt(..) |
|
||||
RuntimeCall::Nis(..) |
|
||||
RuntimeCall::Registrar(paras_registrar::Call::register {..}) |
|
||||
RuntimeCall::Registrar(paras_registrar::Call::deregister {..}) |
|
||||
// Specifically omitting Registrar `swap`
|
||||
@@ -1186,33 +1187,57 @@ impl auctions::Config for Runtime {
|
||||
type WeightInfo = weights::runtime_common_auctions::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub IgnoredIssuance: Balance = Treasury::pot();
|
||||
pub const QueueCount: u32 = 300;
|
||||
pub const MaxQueueLen: u32 = 1000;
|
||||
pub const FifoQueueLen: u32 = 250;
|
||||
pub const GiltPeriod: BlockNumber = 30 * DAYS;
|
||||
pub const MinFreeze: Balance = 10_000 * CENTS;
|
||||
pub const IntakePeriod: BlockNumber = 5 * MINUTES;
|
||||
pub const MaxIntakeBids: u32 = 100;
|
||||
type NisCounterpartInstance = pallet_balances::Instance2;
|
||||
impl pallet_balances::Config<NisCounterpartInstance> for Runtime {
|
||||
type Balance = Balance;
|
||||
type DustRemoval = ();
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type ExistentialDeposit = ConstU128<10_000_000_000>; // One RTC cent
|
||||
type AccountStore = StorageMapShim<
|
||||
pallet_balances::Account<Runtime, NisCounterpartInstance>,
|
||||
frame_system::Provider<Runtime>,
|
||||
AccountId,
|
||||
pallet_balances::AccountData<u128>,
|
||||
>;
|
||||
type MaxLocks = ConstU32<4>;
|
||||
type MaxReserves = ConstU32<4>;
|
||||
type ReserveIdentifier = [u8; 8];
|
||||
type WeightInfo = weights::pallet_balances_nis_counterpart_balances::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
impl pallet_gilt::Config for Runtime {
|
||||
parameter_types! {
|
||||
pub IgnoredIssuance: Balance = Treasury::pot();
|
||||
pub const NisBasePeriod: BlockNumber = 30 * DAYS;
|
||||
pub const MinBid: Balance = 100 * UNITS;
|
||||
pub MinReceipt: Perquintill = Perquintill::from_rational(1u64, 10_000_000u64);
|
||||
pub const IntakePeriod: BlockNumber = 5 * MINUTES;
|
||||
pub MaxIntakeWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 10;
|
||||
pub const ThawThrottle: (Perquintill, BlockNumber) = (Perquintill::from_percent(25), 5);
|
||||
pub storage NisTarget: Perquintill = Perquintill::zero();
|
||||
pub const NisPalletId: PalletId = PalletId(*b"py/nis ");
|
||||
}
|
||||
|
||||
impl pallet_nis::Config for Runtime {
|
||||
type WeightInfo = weights::pallet_nis::WeightInfo<Runtime>;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Currency = Balances;
|
||||
type CurrencyBalance = Balance;
|
||||
type AdminOrigin = MoreThanHalfCouncil;
|
||||
type FundOrigin = frame_system::EnsureSigned<AccountId>;
|
||||
type Counterpart = NisCounterpartBalances;
|
||||
type CounterpartAmount = WithMaximumOf<ConstU128<21_000_000_000_000_000_000u128>>;
|
||||
type Deficit = (); // Mint
|
||||
type Surplus = (); // Burn
|
||||
type IgnoredIssuance = IgnoredIssuance;
|
||||
type QueueCount = QueueCount;
|
||||
type MaxQueueLen = MaxQueueLen;
|
||||
type FifoQueueLen = FifoQueueLen;
|
||||
type Period = GiltPeriod;
|
||||
type MinFreeze = MinFreeze;
|
||||
type Target = NisTarget;
|
||||
type PalletId = NisPalletId;
|
||||
type QueueCount = ConstU32<300>;
|
||||
type MaxQueueLen = ConstU32<1000>;
|
||||
type FifoQueueLen = ConstU32<250>;
|
||||
type BasePeriod = NisBasePeriod;
|
||||
type MinBid = MinBid;
|
||||
type MinReceipt = MinReceipt;
|
||||
type IntakePeriod = IntakePeriod;
|
||||
type MaxIntakeBids = MaxIntakeBids;
|
||||
type WeightInfo = weights::pallet_gilt::WeightInfo<Runtime>;
|
||||
type MaxIntakeWeight = MaxIntakeWeight;
|
||||
type ThawThrottle = ThawThrottle;
|
||||
}
|
||||
|
||||
impl pallet_beefy::Config for Runtime {
|
||||
@@ -1375,8 +1400,10 @@ construct_runtime! {
|
||||
// Tips module.
|
||||
Tips: pallet_tips::{Pallet, Call, Storage, Event<T>} = 36,
|
||||
|
||||
// Gilts pallet.
|
||||
Gilt: pallet_gilt::{Pallet, Call, Storage, Event<T>, Config} = 38,
|
||||
// NIS pallet.
|
||||
Nis: pallet_nis::{Pallet, Call, Storage, Event<T>} = 38,
|
||||
// pub type NisCounterpartInstance = pallet_balances::Instance2;
|
||||
NisCounterpartBalances: pallet_balances::<Instance2> = 45,
|
||||
|
||||
// Parachains pallets. Start indices at 50 to leave room.
|
||||
ParachainsOrigin: parachains_origin::{Pallet, Origin} = 50,
|
||||
@@ -1510,6 +1537,7 @@ mod benches {
|
||||
[runtime_parachains::ump, Ump]
|
||||
// Substrate
|
||||
[pallet_balances, Balances]
|
||||
[pallet_balances, NisCounterpartBalances]
|
||||
[frame_benchmarking::baseline, Baseline::<Runtime>]
|
||||
[pallet_bounties, Bounties]
|
||||
[pallet_child_bounties, ChildBounties]
|
||||
@@ -1517,7 +1545,7 @@ mod benches {
|
||||
[pallet_collective, TechnicalCommittee]
|
||||
[pallet_democracy, Democracy]
|
||||
[pallet_elections_phragmen, PhragmenElection]
|
||||
[pallet_gilt, Gilt]
|
||||
[pallet_nis, Nis]
|
||||
[pallet_identity, Identity]
|
||||
[pallet_im_online, ImOnline]
|
||||
[pallet_indices, Indices]
|
||||
|
||||
@@ -17,18 +17,19 @@
|
||||
|
||||
pub mod frame_system;
|
||||
pub mod pallet_balances;
|
||||
pub mod pallet_balances_nis_counterpart_balances;
|
||||
pub mod pallet_bounties;
|
||||
pub mod pallet_child_bounties;
|
||||
pub mod pallet_collective_council;
|
||||
pub mod pallet_collective_technical_committee;
|
||||
pub mod pallet_democracy;
|
||||
pub mod pallet_elections_phragmen;
|
||||
pub mod pallet_gilt;
|
||||
pub mod pallet_identity;
|
||||
pub mod pallet_im_online;
|
||||
pub mod pallet_indices;
|
||||
pub mod pallet_membership;
|
||||
pub mod pallet_multisig;
|
||||
pub mod pallet_nis;
|
||||
pub mod pallet_preimage;
|
||||
pub mod pallet_proxy;
|
||||
pub mod pallet_scheduler;
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
// Copyright 2017-2022 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
//! Autogenerated weights for `pallet_balances`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2022-11-28, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=rococo-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --pallet=pallet-balances
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/rococo/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_balances`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
|
||||
// Storage: NisCounterpartBalances Account (r:2 w:2)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: NisCounterpartBalances TotalIssuance (r:1 w:1)
|
||||
fn transfer() -> Weight {
|
||||
// Minimum execution time: 41_176 nanoseconds.
|
||||
Weight::from_ref_time(42_293_000)
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
// Storage: NisCounterpartBalances Account (r:2 w:2)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn transfer_keep_alive() -> Weight {
|
||||
// Minimum execution time: 29_743 nanoseconds.
|
||||
Weight::from_ref_time(30_329_000)
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
// Storage: NisCounterpartBalances Account (r:1 w:1)
|
||||
// Storage: NisCounterpartBalances TotalIssuance (r:1 w:1)
|
||||
fn set_balance_creating() -> Weight {
|
||||
// Minimum execution time: 19_825 nanoseconds.
|
||||
Weight::from_ref_time(20_774_000)
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
// Storage: NisCounterpartBalances Account (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: NisCounterpartBalances TotalIssuance (r:1 w:1)
|
||||
fn set_balance_killing() -> Weight {
|
||||
// Minimum execution time: 27_783 nanoseconds.
|
||||
Weight::from_ref_time(28_462_000)
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
// Storage: NisCounterpartBalances Account (r:2 w:2)
|
||||
// Storage: System Account (r:2 w:2)
|
||||
// Storage: NisCounterpartBalances TotalIssuance (r:1 w:1)
|
||||
fn force_transfer() -> Weight {
|
||||
// Minimum execution time: 40_433 nanoseconds.
|
||||
Weight::from_ref_time(41_444_000)
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
// Storage: NisCounterpartBalances Account (r:2 w:2)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn transfer_all() -> Weight {
|
||||
// Minimum execution time: 37_439 nanoseconds.
|
||||
Weight::from_ref_time(38_570_000)
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
// Storage: NisCounterpartBalances Account (r:1 w:1)
|
||||
fn force_unreserve() -> Weight {
|
||||
// Minimum execution time: 18_366 nanoseconds.
|
||||
Weight::from_ref_time(19_170_000)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
@@ -1,119 +0,0 @@
|
||||
// Copyright 2017-2022 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
//! Autogenerated weights for `pallet_gilt`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2022-08-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=rococo-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --pallet=pallet_gilt
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/rococo/src/weights/pallet_gilt.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_gilt`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_gilt::WeightInfo for WeightInfo<T> {
|
||||
// Storage: Gilt Queues (r:1 w:1)
|
||||
// Storage: Gilt QueueTotals (r:1 w:1)
|
||||
/// The range of component `l` is `[0, 999]`.
|
||||
fn place_bid(l: u32, ) -> Weight {
|
||||
Weight::from_ref_time(36_767_000 as u64)
|
||||
// Standard Error: 0
|
||||
.saturating_add(Weight::from_ref_time(115_000 as u64).saturating_mul(l as u64))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as u64))
|
||||
}
|
||||
// Storage: Gilt Queues (r:1 w:1)
|
||||
// Storage: Gilt QueueTotals (r:1 w:1)
|
||||
fn place_bid_max() -> Weight {
|
||||
Weight::from_ref_time(119_333_000 as u64)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as u64))
|
||||
}
|
||||
// Storage: Gilt Queues (r:1 w:1)
|
||||
// Storage: Gilt QueueTotals (r:1 w:1)
|
||||
/// The range of component `l` is `[1, 1000]`.
|
||||
fn retract_bid(l: u32, ) -> Weight {
|
||||
Weight::from_ref_time(37_108_000 as u64)
|
||||
// Standard Error: 0
|
||||
.saturating_add(Weight::from_ref_time(94_000 as u64).saturating_mul(l as u64))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as u64))
|
||||
}
|
||||
// Storage: Gilt ActiveTotal (r:1 w:1)
|
||||
fn set_target() -> Weight {
|
||||
Weight::from_ref_time(5_188_000 as u64)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as u64))
|
||||
}
|
||||
// Storage: Gilt Active (r:1 w:1)
|
||||
// Storage: Gilt ActiveTotal (r:1 w:1)
|
||||
fn thaw() -> Weight {
|
||||
Weight::from_ref_time(43_654_000 as u64)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as u64))
|
||||
}
|
||||
// Storage: Gilt ActiveTotal (r:1 w:0)
|
||||
fn pursue_target_noop() -> Weight {
|
||||
Weight::from_ref_time(1_584_000 as u64)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as u64))
|
||||
}
|
||||
// Storage: Gilt ActiveTotal (r:1 w:1)
|
||||
// Storage: Gilt QueueTotals (r:1 w:1)
|
||||
// Storage: Gilt Queues (r:1 w:1)
|
||||
// Storage: Gilt Active (r:0 w:1)
|
||||
/// The range of component `b` is `[1, 1000]`.
|
||||
fn pursue_target_per_item(b: u32, ) -> Weight {
|
||||
Weight::from_ref_time(21_464_000 as u64)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add(Weight::from_ref_time(4_387_000 as u64).saturating_mul(b as u64))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(b as u64)))
|
||||
}
|
||||
// Storage: Gilt ActiveTotal (r:1 w:1)
|
||||
// Storage: Gilt QueueTotals (r:1 w:1)
|
||||
// Storage: Gilt Queues (r:1 w:1)
|
||||
// Storage: Gilt Active (r:0 w:1)
|
||||
/// The range of component `q` is `[1, 300]`.
|
||||
fn pursue_target_per_queue(q: u32, ) -> Weight {
|
||||
Weight::from_ref_time(12_881_000 as u64)
|
||||
// Standard Error: 8_000
|
||||
.saturating_add(Weight::from_ref_time(8_285_000 as u64).saturating_mul(q as u64))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as u64))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(q as u64)))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(q as u64)))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
// Copyright 2017-2022 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
//! Autogenerated weights for `pallet_nis`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2022-12-05, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// /home/benchbot/cargo_target_dir/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --heap-pages=4096
|
||||
// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/polkadot/.git/.artifacts/bench.json
|
||||
// --pallet=pallet_nis
|
||||
// --chain=rococo-dev
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/rococo/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_nis`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_nis::WeightInfo for WeightInfo<T> {
|
||||
// Storage: Nis Queues (r:1 w:1)
|
||||
// Storage: Nis QueueTotals (r:1 w:1)
|
||||
/// The range of component `l` is `[0, 999]`.
|
||||
fn place_bid(l: u32, ) -> Weight {
|
||||
// Minimum execution time: 32_457 nanoseconds.
|
||||
Weight::from_ref_time(33_597_943)
|
||||
// Standard Error: 673
|
||||
.saturating_add(Weight::from_ref_time(70_280).saturating_mul(l.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
// Storage: Nis Queues (r:1 w:1)
|
||||
// Storage: Nis QueueTotals (r:1 w:1)
|
||||
fn place_bid_max() -> Weight {
|
||||
// Minimum execution time: 100_314 nanoseconds.
|
||||
Weight::from_ref_time(102_734_000)
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
// Storage: Nis Queues (r:1 w:1)
|
||||
// Storage: Nis QueueTotals (r:1 w:1)
|
||||
/// The range of component `l` is `[1, 1000]`.
|
||||
fn retract_bid(l: u32, ) -> Weight {
|
||||
// Minimum execution time: 37_304 nanoseconds.
|
||||
Weight::from_ref_time(34_619_946)
|
||||
// Standard Error: 610
|
||||
.saturating_add(Weight::from_ref_time(56_607).saturating_mul(l.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
// Storage: Nis Summary (r:1 w:0)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn fund_deficit() -> Weight {
|
||||
// Minimum execution time: 40_499 nanoseconds.
|
||||
Weight::from_ref_time(41_972_000)
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
// Storage: Nis Receipts (r:1 w:1)
|
||||
// Storage: Nis Summary (r:1 w:1)
|
||||
// Storage: NisCounterpartBalances Account (r:1 w:1)
|
||||
// Storage: NisCounterpartBalances TotalIssuance (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn thaw() -> Weight {
|
||||
// Minimum execution time: 59_864 nanoseconds.
|
||||
Weight::from_ref_time(60_602_000)
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
// Storage: Nis Summary (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:0)
|
||||
// Storage: Nis QueueTotals (r:1 w:1)
|
||||
fn process_queues() -> Weight {
|
||||
// Minimum execution time: 32_098 nanoseconds.
|
||||
Weight::from_ref_time(33_421_000)
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
// Storage: Nis Queues (r:1 w:1)
|
||||
fn process_queue() -> Weight {
|
||||
// Minimum execution time: 4_011 nanoseconds.
|
||||
Weight::from_ref_time(4_159_000)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
// Storage: System Account (r:1 w:0)
|
||||
// Storage: Nis Receipts (r:0 w:1)
|
||||
fn process_bid() -> Weight {
|
||||
// Minimum execution time: 12_778 nanoseconds.
|
||||
Weight::from_ref_time(13_083_000)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user