mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 15:11:02 +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:
Generated
+198
-197
File diff suppressed because it is too large
Load Diff
@@ -767,10 +767,10 @@ fn kusama_staging_testnet_config_genesis(wasm_binary: &[u8]) -> kusama::GenesisC
|
|||||||
configuration: kusama::ConfigurationConfig {
|
configuration: kusama::ConfigurationConfig {
|
||||||
config: default_parachains_host_configuration(),
|
config: default_parachains_host_configuration(),
|
||||||
},
|
},
|
||||||
gilt: Default::default(),
|
|
||||||
paras: Default::default(),
|
paras: Default::default(),
|
||||||
xcm_pallet: Default::default(),
|
xcm_pallet: Default::default(),
|
||||||
nomination_pools: Default::default(),
|
nomination_pools: Default::default(),
|
||||||
|
nis_counterpart_balances: Default::default(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1073,11 +1073,11 @@ fn rococo_staging_testnet_config_genesis(wasm_binary: &[u8]) -> rococo_runtime::
|
|||||||
configuration: rococo_runtime::ConfigurationConfig {
|
configuration: rococo_runtime::ConfigurationConfig {
|
||||||
config: default_parachains_host_configuration(),
|
config: default_parachains_host_configuration(),
|
||||||
},
|
},
|
||||||
gilt: Default::default(),
|
|
||||||
registrar: rococo_runtime::RegistrarConfig {
|
registrar: rococo_runtime::RegistrarConfig {
|
||||||
next_free_para_id: polkadot_primitives::v2::LOWEST_PUBLIC_ID,
|
next_free_para_id: polkadot_primitives::v2::LOWEST_PUBLIC_ID,
|
||||||
},
|
},
|
||||||
xcm_pallet: Default::default(),
|
xcm_pallet: Default::default(),
|
||||||
|
nis_counterpart_balances: Default::default(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1466,10 +1466,10 @@ pub fn kusama_testnet_genesis(
|
|||||||
configuration: kusama::ConfigurationConfig {
|
configuration: kusama::ConfigurationConfig {
|
||||||
config: default_parachains_host_configuration(),
|
config: default_parachains_host_configuration(),
|
||||||
},
|
},
|
||||||
gilt: Default::default(),
|
|
||||||
paras: Default::default(),
|
paras: Default::default(),
|
||||||
xcm_pallet: Default::default(),
|
xcm_pallet: Default::default(),
|
||||||
nomination_pools: Default::default(),
|
nomination_pools: Default::default(),
|
||||||
|
nis_counterpart_balances: Default::default(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1629,12 +1629,12 @@ pub fn rococo_testnet_genesis(
|
|||||||
..default_parachains_host_configuration()
|
..default_parachains_host_configuration()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
gilt: Default::default(),
|
|
||||||
paras: rococo_runtime::ParasConfig { paras: vec![] },
|
paras: rococo_runtime::ParasConfig { paras: vec![] },
|
||||||
registrar: rococo_runtime::RegistrarConfig {
|
registrar: rococo_runtime::RegistrarConfig {
|
||||||
next_free_para_id: polkadot_primitives::v2::LOWEST_PUBLIC_ID,
|
next_free_para_id: polkadot_primitives::v2::LOWEST_PUBLIC_ID,
|
||||||
},
|
},
|
||||||
xcm_pallet: Default::default(),
|
xcm_pallet: Default::default(),
|
||||||
|
nis_counterpart_balances: Default::default(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ where
|
|||||||
|
|
||||||
pub fn era_payout(
|
pub fn era_payout(
|
||||||
total_staked: Balance,
|
total_staked: Balance,
|
||||||
non_gilt_issuance: Balance,
|
total_stakable: Balance,
|
||||||
max_annual_inflation: Perquintill,
|
max_annual_inflation: Perquintill,
|
||||||
period_fraction: Perquintill,
|
period_fraction: Perquintill,
|
||||||
auctioned_slots: u64,
|
auctioned_slots: u64,
|
||||||
@@ -79,17 +79,17 @@ pub fn era_payout(
|
|||||||
// amount that we expect to be taken up with auctions.
|
// amount that we expect to be taken up with auctions.
|
||||||
let ideal_stake = Perquintill::from_percent(75).saturating_sub(auction_proportion);
|
let ideal_stake = Perquintill::from_percent(75).saturating_sub(auction_proportion);
|
||||||
|
|
||||||
let stake = Perquintill::from_rational(total_staked, non_gilt_issuance);
|
let stake = Perquintill::from_rational(total_staked, total_stakable);
|
||||||
let falloff = Perquintill::from_percent(5);
|
let falloff = Perquintill::from_percent(5);
|
||||||
let adjustment = compute_inflation(stake, ideal_stake, falloff);
|
let adjustment = compute_inflation(stake, ideal_stake, falloff);
|
||||||
let staking_inflation =
|
let staking_inflation =
|
||||||
min_annual_inflation.saturating_add(delta_annual_inflation * adjustment);
|
min_annual_inflation.saturating_add(delta_annual_inflation * adjustment);
|
||||||
|
|
||||||
let max_payout = period_fraction * max_annual_inflation * non_gilt_issuance;
|
let max_payout = period_fraction * max_annual_inflation * total_stakable;
|
||||||
let staking_payout = (period_fraction * staking_inflation) * non_gilt_issuance;
|
let staking_payout = (period_fraction * staking_inflation) * total_stakable;
|
||||||
let rest = max_payout.saturating_sub(staking_payout);
|
let rest = max_payout.saturating_sub(staking_payout);
|
||||||
|
|
||||||
let other_issuance = non_gilt_issuance.saturating_sub(total_staked);
|
let other_issuance = total_stakable.saturating_sub(total_staked);
|
||||||
if total_staked > other_issuance {
|
if total_staked > other_issuance {
|
||||||
let _cap_rest = Perquintill::from_rational(other_issuance, total_staked) * staking_payout;
|
let _cap_rest = Perquintill::from_rational(other_issuance, total_staked) * staking_payout;
|
||||||
// We don't do anything with this, but if we wanted to, we could introduce a cap on the
|
// We don't do anything with this, but if we wanted to, we could introduce a cap on the
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/su
|
|||||||
pallet-fast-unstake = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-fast-unstake = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
frame-executive = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
frame-executive = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-gilt = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-nis = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
@@ -150,7 +150,7 @@ std = [
|
|||||||
"pallet-election-provider-multi-phase/std",
|
"pallet-election-provider-multi-phase/std",
|
||||||
"pallet-fast-unstake/std",
|
"pallet-fast-unstake/std",
|
||||||
"pallet-democracy/std",
|
"pallet-democracy/std",
|
||||||
"pallet-gilt/std",
|
"pallet-nis/std",
|
||||||
"pallet-grandpa/std",
|
"pallet-grandpa/std",
|
||||||
"pallet-identity/std",
|
"pallet-identity/std",
|
||||||
"pallet-im-online/std",
|
"pallet-im-online/std",
|
||||||
@@ -216,7 +216,7 @@ runtime-benchmarks = [
|
|||||||
"pallet-election-provider-multi-phase/runtime-benchmarks",
|
"pallet-election-provider-multi-phase/runtime-benchmarks",
|
||||||
"pallet-election-provider-support-benchmarking/runtime-benchmarks",
|
"pallet-election-provider-support-benchmarking/runtime-benchmarks",
|
||||||
"pallet-fast-unstake/runtime-benchmarks",
|
"pallet-fast-unstake/runtime-benchmarks",
|
||||||
"pallet-gilt/runtime-benchmarks",
|
"pallet-nis/runtime-benchmarks",
|
||||||
"pallet-grandpa/runtime-benchmarks",
|
"pallet-grandpa/runtime-benchmarks",
|
||||||
"pallet-identity/runtime-benchmarks",
|
"pallet-identity/runtime-benchmarks",
|
||||||
"pallet-im-online/runtime-benchmarks",
|
"pallet-im-online/runtime-benchmarks",
|
||||||
@@ -267,7 +267,7 @@ try-runtime = [
|
|||||||
"pallet-election-provider-multi-phase/try-runtime",
|
"pallet-election-provider-multi-phase/try-runtime",
|
||||||
"pallet-fast-unstake/try-runtime",
|
"pallet-fast-unstake/try-runtime",
|
||||||
"pallet-democracy/try-runtime",
|
"pallet-democracy/try-runtime",
|
||||||
"pallet-gilt/try-runtime",
|
"pallet-nis/try-runtime",
|
||||||
"pallet-grandpa/try-runtime",
|
"pallet-grandpa/try-runtime",
|
||||||
"pallet-identity/try-runtime",
|
"pallet-identity/try-runtime",
|
||||||
"pallet-im-online/try-runtime",
|
"pallet-im-online/try-runtime",
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.
|
// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.
|
||||||
#![recursion_limit = "256"]
|
#![recursion_limit = "256"]
|
||||||
|
|
||||||
|
use pallet_nis::WithMaximumOf;
|
||||||
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
|
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
|
||||||
use primitives::v2::{
|
use primitives::v2::{
|
||||||
AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CommittedCandidateReceipt,
|
AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CommittedCandidateReceipt,
|
||||||
@@ -53,7 +54,7 @@ use frame_support::{
|
|||||||
construct_runtime, parameter_types,
|
construct_runtime, parameter_types,
|
||||||
traits::{
|
traits::{
|
||||||
ConstU32, Contains, EitherOf, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem,
|
ConstU32, Contains, EitherOf, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem,
|
||||||
LockIdentifier, PrivilegeCmp, WithdrawReasons,
|
LockIdentifier, PrivilegeCmp, StorageMapShim, WithdrawReasons,
|
||||||
},
|
},
|
||||||
weights::ConstantMultiplier,
|
weights::ConstantMultiplier,
|
||||||
PalletId, RuntimeDebug,
|
PalletId, RuntimeDebug,
|
||||||
@@ -63,7 +64,7 @@ use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};
|
|||||||
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
|
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
|
||||||
use pallet_session::historical as session_historical;
|
use pallet_session::historical as session_historical;
|
||||||
use pallet_transaction_payment::{CurrencyAdapter, FeeDetails, RuntimeDispatchInfo};
|
use pallet_transaction_payment::{CurrencyAdapter, FeeDetails, RuntimeDispatchInfo};
|
||||||
use sp_core::OpaqueMetadata;
|
use sp_core::{ConstU128, OpaqueMetadata};
|
||||||
use sp_mmr_primitives as mmr;
|
use sp_mmr_primitives as mmr;
|
||||||
use sp_runtime::{
|
use sp_runtime::{
|
||||||
create_runtime_str, generic, impl_opaque_keys,
|
create_runtime_str, generic, impl_opaque_keys,
|
||||||
@@ -537,7 +538,7 @@ impl pallet_staking::EraPayout<Balance> for EraPayout {
|
|||||||
|
|
||||||
runtime_common::impls::era_payout(
|
runtime_common::impls::era_payout(
|
||||||
total_staked,
|
total_staked,
|
||||||
Gilt::issuance().non_gilt,
|
Nis::issuance().other,
|
||||||
MAX_ANNUAL_INFLATION,
|
MAX_ANNUAL_INFLATION,
|
||||||
Perquintill::from_rational(era_duration_millis, MILLISECONDS_PER_YEAR),
|
Perquintill::from_rational(era_duration_millis, MILLISECONDS_PER_YEAR),
|
||||||
auctioned_slots,
|
auctioned_slots,
|
||||||
@@ -1027,7 +1028,7 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
|
|||||||
RuntimeCall::Scheduler(..) |
|
RuntimeCall::Scheduler(..) |
|
||||||
RuntimeCall::Proxy(..) |
|
RuntimeCall::Proxy(..) |
|
||||||
RuntimeCall::Multisig(..) |
|
RuntimeCall::Multisig(..) |
|
||||||
RuntimeCall::Gilt(..) |
|
RuntimeCall::Nis(..) |
|
||||||
RuntimeCall::Registrar(paras_registrar::Call::register {..}) |
|
RuntimeCall::Registrar(paras_registrar::Call::register {..}) |
|
||||||
RuntimeCall::Registrar(paras_registrar::Call::deregister {..}) |
|
RuntimeCall::Registrar(paras_registrar::Call::deregister {..}) |
|
||||||
// Specifically omitting Registrar `swap`
|
// Specifically omitting Registrar `swap`
|
||||||
@@ -1246,33 +1247,57 @@ impl auctions::Config for Runtime {
|
|||||||
type WeightInfo = weights::runtime_common_auctions::WeightInfo<Runtime>;
|
type WeightInfo = weights::runtime_common_auctions::WeightInfo<Runtime>;
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
type NisCounterpartInstance = pallet_balances::Instance2;
|
||||||
pub IgnoredIssuance: Balance = Treasury::pot();
|
impl pallet_balances::Config<NisCounterpartInstance> for Runtime {
|
||||||
pub const QueueCount: u32 = 300;
|
type Balance = Balance;
|
||||||
pub const MaxQueueLen: u32 = 1000;
|
type DustRemoval = ();
|
||||||
pub const FifoQueueLen: u32 = 250;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
pub const GiltPeriod: BlockNumber = 30 * DAYS;
|
type ExistentialDeposit = ConstU128<10_000_000_000>; // One KTC cent
|
||||||
pub const MinFreeze: Balance = 10_000 * CENTS;
|
type AccountStore = StorageMapShim<
|
||||||
pub const IntakePeriod: BlockNumber = 5 * MINUTES;
|
pallet_balances::Account<Runtime, NisCounterpartInstance>,
|
||||||
pub const MaxIntakeBids: u32 = 100;
|
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 * QUID;
|
||||||
|
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 RuntimeEvent = RuntimeEvent;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type CurrencyBalance = Balance;
|
type CurrencyBalance = Balance;
|
||||||
type AdminOrigin = EnsureRoot<AccountId>;
|
type FundOrigin = frame_system::EnsureSigned<AccountId>;
|
||||||
|
type Counterpart = NisCounterpartBalances;
|
||||||
|
type CounterpartAmount = WithMaximumOf<ConstU128<21_000_000_000_000_000_000u128>>;
|
||||||
type Deficit = (); // Mint
|
type Deficit = (); // Mint
|
||||||
type Surplus = (); // Burn
|
|
||||||
type IgnoredIssuance = IgnoredIssuance;
|
type IgnoredIssuance = IgnoredIssuance;
|
||||||
type QueueCount = QueueCount;
|
type Target = NisTarget;
|
||||||
type MaxQueueLen = MaxQueueLen;
|
type PalletId = NisPalletId;
|
||||||
type FifoQueueLen = FifoQueueLen;
|
type QueueCount = ConstU32<300>;
|
||||||
type Period = GiltPeriod;
|
type MaxQueueLen = ConstU32<1000>;
|
||||||
type MinFreeze = MinFreeze;
|
type FifoQueueLen = ConstU32<250>;
|
||||||
|
type BasePeriod = NisBasePeriod;
|
||||||
|
type MinBid = MinBid;
|
||||||
|
type MinReceipt = MinReceipt;
|
||||||
type IntakePeriod = IntakePeriod;
|
type IntakePeriod = IntakePeriod;
|
||||||
type MaxIntakeBids = MaxIntakeBids;
|
type MaxIntakeWeight = MaxIntakeWeight;
|
||||||
type WeightInfo = weights::pallet_gilt::WeightInfo<Runtime>;
|
type ThawThrottle = ThawThrottle;
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
@@ -1386,8 +1411,10 @@ construct_runtime! {
|
|||||||
// Election pallet. Only works with staking, but placed here to maintain indices.
|
// Election pallet. Only works with staking, but placed here to maintain indices.
|
||||||
ElectionProviderMultiPhase: pallet_election_provider_multi_phase::{Pallet, Call, Storage, Event<T>, ValidateUnsigned} = 37,
|
ElectionProviderMultiPhase: pallet_election_provider_multi_phase::{Pallet, Call, Storage, Event<T>, ValidateUnsigned} = 37,
|
||||||
|
|
||||||
// Gilts pallet.
|
// NIS pallet.
|
||||||
Gilt: pallet_gilt::{Pallet, Call, Storage, Event<T>, Config} = 38,
|
Nis: pallet_nis::{Pallet, Call, Storage, Event<T>} = 38,
|
||||||
|
// pub type NisCounterpartInstance = pallet_balances::Instance2;
|
||||||
|
NisCounterpartBalances: pallet_balances::<Instance2> = 45,
|
||||||
|
|
||||||
// Provides a semi-sorted list of nominators for staking.
|
// Provides a semi-sorted list of nominators for staking.
|
||||||
VoterList: pallet_bags_list::<Instance1>::{Pallet, Call, Storage, Event<T>} = 39,
|
VoterList: pallet_bags_list::<Instance1>::{Pallet, Call, Storage, Event<T>} = 39,
|
||||||
@@ -1477,7 +1504,7 @@ mod benches {
|
|||||||
define_benchmarks!(
|
define_benchmarks!(
|
||||||
// Polkadot
|
// Polkadot
|
||||||
// NOTE: Make sure to prefix these with `runtime_common::` so
|
// NOTE: Make sure to prefix these with `runtime_common::` so
|
||||||
// the that path resolves correctly in the generated file.
|
// that the path resolves correctly in the generated file.
|
||||||
[runtime_common::auctions, Auctions]
|
[runtime_common::auctions, Auctions]
|
||||||
[runtime_common::crowdloan, Crowdloan]
|
[runtime_common::crowdloan, Crowdloan]
|
||||||
[runtime_common::claims, Claims]
|
[runtime_common::claims, Claims]
|
||||||
@@ -1492,6 +1519,7 @@ mod benches {
|
|||||||
[runtime_parachains::ump, Ump]
|
[runtime_parachains::ump, Ump]
|
||||||
// Substrate
|
// Substrate
|
||||||
[pallet_balances, Balances]
|
[pallet_balances, Balances]
|
||||||
|
[pallet_balances, NisCounterpartBalances]
|
||||||
[pallet_bags_list, VoterList]
|
[pallet_bags_list, VoterList]
|
||||||
[frame_benchmarking::baseline, Baseline::<Runtime>]
|
[frame_benchmarking::baseline, Baseline::<Runtime>]
|
||||||
[pallet_bounties, Bounties]
|
[pallet_bounties, Bounties]
|
||||||
@@ -1504,7 +1532,7 @@ mod benches {
|
|||||||
[pallet_election_provider_multi_phase, ElectionProviderMultiPhase]
|
[pallet_election_provider_multi_phase, ElectionProviderMultiPhase]
|
||||||
[frame_election_provider_support, ElectionProviderBench::<Runtime>]
|
[frame_election_provider_support, ElectionProviderBench::<Runtime>]
|
||||||
[pallet_fast_unstake, FastUnstake]
|
[pallet_fast_unstake, FastUnstake]
|
||||||
[pallet_gilt, Gilt]
|
[pallet_nis, Nis]
|
||||||
[pallet_identity, Identity]
|
[pallet_identity, Identity]
|
||||||
[pallet_im_online, ImOnline]
|
[pallet_im_online, ImOnline]
|
||||||
[pallet_indices, Indices]
|
[pallet_indices, Indices]
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ pub mod frame_election_provider_support;
|
|||||||
pub mod frame_system;
|
pub mod frame_system;
|
||||||
pub mod pallet_bags_list;
|
pub mod pallet_bags_list;
|
||||||
pub mod pallet_balances;
|
pub mod pallet_balances;
|
||||||
|
pub mod pallet_balances_nis_counterpart_balances;
|
||||||
pub mod pallet_bounties;
|
pub mod pallet_bounties;
|
||||||
pub mod pallet_child_bounties;
|
pub mod pallet_child_bounties;
|
||||||
pub mod pallet_collective_council;
|
pub mod pallet_collective_council;
|
||||||
@@ -28,12 +29,12 @@ pub mod pallet_democracy;
|
|||||||
pub mod pallet_election_provider_multi_phase;
|
pub mod pallet_election_provider_multi_phase;
|
||||||
pub mod pallet_elections_phragmen;
|
pub mod pallet_elections_phragmen;
|
||||||
pub mod pallet_fast_unstake;
|
pub mod pallet_fast_unstake;
|
||||||
pub mod pallet_gilt;
|
|
||||||
pub mod pallet_identity;
|
pub mod pallet_identity;
|
||||||
pub mod pallet_im_online;
|
pub mod pallet_im_online;
|
||||||
pub mod pallet_indices;
|
pub mod pallet_indices;
|
||||||
pub mod pallet_membership;
|
pub mod pallet_membership;
|
||||||
pub mod pallet_multisig;
|
pub mod pallet_multisig;
|
||||||
|
pub mod pallet_nis;
|
||||||
pub mod pallet_nomination_pools;
|
pub mod pallet_nomination_pools;
|
||||||
pub mod pallet_preimage;
|
pub mod pallet_preimage;
|
||||||
pub mod pallet_proxy;
|
pub mod pallet_proxy;
|
||||||
|
|||||||
@@ -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("kusama-dev"), DB CACHE: 1024
|
||||||
|
|
||||||
|
// Executed Command:
|
||||||
|
// ./target/production/polkadot
|
||||||
|
// benchmark
|
||||||
|
// pallet
|
||||||
|
// --chain=kusama-dev
|
||||||
|
// --steps=50
|
||||||
|
// --repeat=20
|
||||||
|
// --pallet=pallet-balances
|
||||||
|
// --extrinsic=*
|
||||||
|
// --execution=wasm
|
||||||
|
// --wasm-execution=compiled
|
||||||
|
// --header=./file_header.txt
|
||||||
|
// --output=./runtime/kusama/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_890 nanoseconds.
|
||||||
|
Weight::from_ref_time(42_832_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: 30_130 nanoseconds.
|
||||||
|
Weight::from_ref_time(31_076_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: 20_254 nanoseconds.
|
||||||
|
Weight::from_ref_time(20_956_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_767 nanoseconds.
|
||||||
|
Weight::from_ref_time(28_472_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: 41_369 nanoseconds.
|
||||||
|
Weight::from_ref_time(41_831_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_413 nanoseconds.
|
||||||
|
Weight::from_ref_time(38_587_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: 19_049 nanoseconds.
|
||||||
|
Weight::from_ref_time(19_464_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-09-08, 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("kusama-dev"), DB CACHE: 1024
|
|
||||||
|
|
||||||
// Executed Command:
|
|
||||||
// ./target/production/polkadot
|
|
||||||
// benchmark
|
|
||||||
// pallet
|
|
||||||
// --chain=kusama-dev
|
|
||||||
// --steps=50
|
|
||||||
// --repeat=20
|
|
||||||
// --pallet=pallet_gilt
|
|
||||||
// --extrinsic=*
|
|
||||||
// --execution=wasm
|
|
||||||
// --wasm-execution=compiled
|
|
||||||
// --header=./file_header.txt
|
|
||||||
// --output=./runtime/kusama/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_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(33_022_000 as u64)
|
|
||||||
// Standard Error: 0
|
|
||||||
.saturating_add(Weight::from_ref_time(81_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(105_031_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(33_573_000 as u64)
|
|
||||||
// Standard Error: 0
|
|
||||||
.saturating_add(Weight::from_ref_time(62_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(6_386_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(45_459_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(2_669_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(33_549_000 as u64)
|
|
||||||
// Standard Error: 2_000
|
|
||||||
.saturating_add(Weight::from_ref_time(3_979_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(28_306_000 as u64)
|
|
||||||
// Standard Error: 6_000
|
|
||||||
.saturating_add(Weight::from_ref_time(6_651_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("kusama-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=kusama-dev
|
||||||
|
// --header=./file_header.txt
|
||||||
|
// --output=./runtime/kusama/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: 31_836 nanoseconds.
|
||||||
|
Weight::from_ref_time(33_284_190)
|
||||||
|
// Standard Error: 663
|
||||||
|
.saturating_add(Weight::from_ref_time(70_316).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_161 nanoseconds.
|
||||||
|
Weight::from_ref_time(102_736_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: 36_993 nanoseconds.
|
||||||
|
Weight::from_ref_time(34_181_184)
|
||||||
|
// Standard Error: 634
|
||||||
|
.saturating_add(Weight::from_ref_time(56_251).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_822 nanoseconds.
|
||||||
|
Weight::from_ref_time(41_752_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: 61_305 nanoseconds.
|
||||||
|
Weight::from_ref_time(61_909_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_369 nanoseconds.
|
||||||
|
Weight::from_ref_time(33_715_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_065 nanoseconds.
|
||||||
|
Weight::from_ref_time(4_212_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_606 nanoseconds.
|
||||||
|
Weight::from_ref_time(12_994_000)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(1))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(1))
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -578,7 +578,6 @@ impl pallet_staking::EraPayout<Balance> for EraPayout {
|
|||||||
|
|
||||||
runtime_common::impls::era_payout(
|
runtime_common::impls::era_payout(
|
||||||
total_staked,
|
total_staked,
|
||||||
// Polkadot has no notion of gilts, the entire issuance is non-guilt.
|
|
||||||
total_issuance,
|
total_issuance,
|
||||||
MAX_ANNUAL_INFLATION,
|
MAX_ANNUAL_INFLATION,
|
||||||
Perquintill::from_rational(era_duration_millis, MILLISECONDS_PER_YEAR),
|
Perquintill::from_rational(era_duration_millis, MILLISECONDS_PER_YEAR),
|
||||||
|
|||||||
@@ -49,13 +49,13 @@ pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "
|
|||||||
pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
frame-executive = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
frame-executive = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-gilt = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
|
||||||
pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-mmr = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-mmr = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
|
pallet-nis = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
@@ -130,7 +130,7 @@ std = [
|
|||||||
"pallet-collective/std",
|
"pallet-collective/std",
|
||||||
"pallet-elections-phragmen/std",
|
"pallet-elections-phragmen/std",
|
||||||
"pallet-democracy/std",
|
"pallet-democracy/std",
|
||||||
"pallet-gilt/std",
|
"pallet-nis/std",
|
||||||
"pallet-grandpa/std",
|
"pallet-grandpa/std",
|
||||||
"pallet-identity/std",
|
"pallet-identity/std",
|
||||||
"pallet-im-online/std",
|
"pallet-im-online/std",
|
||||||
@@ -188,7 +188,7 @@ runtime-benchmarks = [
|
|||||||
"pallet-collective/runtime-benchmarks",
|
"pallet-collective/runtime-benchmarks",
|
||||||
"pallet-democracy/runtime-benchmarks",
|
"pallet-democracy/runtime-benchmarks",
|
||||||
"pallet-elections-phragmen/runtime-benchmarks",
|
"pallet-elections-phragmen/runtime-benchmarks",
|
||||||
"pallet-gilt/runtime-benchmarks",
|
"pallet-nis/runtime-benchmarks",
|
||||||
"pallet-grandpa/runtime-benchmarks",
|
"pallet-grandpa/runtime-benchmarks",
|
||||||
"pallet-identity/runtime-benchmarks",
|
"pallet-identity/runtime-benchmarks",
|
||||||
"pallet-im-online/runtime-benchmarks",
|
"pallet-im-online/runtime-benchmarks",
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.
|
// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.
|
||||||
#![recursion_limit = "256"]
|
#![recursion_limit = "256"]
|
||||||
|
|
||||||
|
use pallet_nis::WithMaximumOf;
|
||||||
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
|
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
|
||||||
use primitives::v2::{
|
use primitives::v2::{
|
||||||
AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CandidateHash,
|
AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CandidateHash,
|
||||||
@@ -55,7 +56,7 @@ use frame_support::{
|
|||||||
construct_runtime, parameter_types,
|
construct_runtime, parameter_types,
|
||||||
traits::{
|
traits::{
|
||||||
Contains, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, LockIdentifier,
|
Contains, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, LockIdentifier,
|
||||||
PrivilegeCmp, WithdrawReasons,
|
PrivilegeCmp, StorageMapShim, WithdrawReasons,
|
||||||
},
|
},
|
||||||
weights::ConstantMultiplier,
|
weights::ConstantMultiplier,
|
||||||
PalletId, RuntimeDebug,
|
PalletId, RuntimeDebug,
|
||||||
@@ -65,7 +66,7 @@ use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};
|
|||||||
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
|
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
|
||||||
use pallet_session::historical as session_historical;
|
use pallet_session::historical as session_historical;
|
||||||
use pallet_transaction_payment::{CurrencyAdapter, FeeDetails, RuntimeDispatchInfo};
|
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_mmr_primitives as mmr;
|
||||||
use sp_runtime::{
|
use sp_runtime::{
|
||||||
create_runtime_str, generic, impl_opaque_keys,
|
create_runtime_str, generic, impl_opaque_keys,
|
||||||
@@ -954,7 +955,7 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
|
|||||||
RuntimeCall::Scheduler(..) |
|
RuntimeCall::Scheduler(..) |
|
||||||
RuntimeCall::Proxy(..) |
|
RuntimeCall::Proxy(..) |
|
||||||
RuntimeCall::Multisig(..) |
|
RuntimeCall::Multisig(..) |
|
||||||
RuntimeCall::Gilt(..) |
|
RuntimeCall::Nis(..) |
|
||||||
RuntimeCall::Registrar(paras_registrar::Call::register {..}) |
|
RuntimeCall::Registrar(paras_registrar::Call::register {..}) |
|
||||||
RuntimeCall::Registrar(paras_registrar::Call::deregister {..}) |
|
RuntimeCall::Registrar(paras_registrar::Call::deregister {..}) |
|
||||||
// Specifically omitting Registrar `swap`
|
// Specifically omitting Registrar `swap`
|
||||||
@@ -1186,33 +1187,57 @@ impl auctions::Config for Runtime {
|
|||||||
type WeightInfo = weights::runtime_common_auctions::WeightInfo<Runtime>;
|
type WeightInfo = weights::runtime_common_auctions::WeightInfo<Runtime>;
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
type NisCounterpartInstance = pallet_balances::Instance2;
|
||||||
pub IgnoredIssuance: Balance = Treasury::pot();
|
impl pallet_balances::Config<NisCounterpartInstance> for Runtime {
|
||||||
pub const QueueCount: u32 = 300;
|
type Balance = Balance;
|
||||||
pub const MaxQueueLen: u32 = 1000;
|
type DustRemoval = ();
|
||||||
pub const FifoQueueLen: u32 = 250;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
pub const GiltPeriod: BlockNumber = 30 * DAYS;
|
type ExistentialDeposit = ConstU128<10_000_000_000>; // One RTC cent
|
||||||
pub const MinFreeze: Balance = 10_000 * CENTS;
|
type AccountStore = StorageMapShim<
|
||||||
pub const IntakePeriod: BlockNumber = 5 * MINUTES;
|
pallet_balances::Account<Runtime, NisCounterpartInstance>,
|
||||||
pub const MaxIntakeBids: u32 = 100;
|
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 RuntimeEvent = RuntimeEvent;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type CurrencyBalance = Balance;
|
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 Deficit = (); // Mint
|
||||||
type Surplus = (); // Burn
|
|
||||||
type IgnoredIssuance = IgnoredIssuance;
|
type IgnoredIssuance = IgnoredIssuance;
|
||||||
type QueueCount = QueueCount;
|
type Target = NisTarget;
|
||||||
type MaxQueueLen = MaxQueueLen;
|
type PalletId = NisPalletId;
|
||||||
type FifoQueueLen = FifoQueueLen;
|
type QueueCount = ConstU32<300>;
|
||||||
type Period = GiltPeriod;
|
type MaxQueueLen = ConstU32<1000>;
|
||||||
type MinFreeze = MinFreeze;
|
type FifoQueueLen = ConstU32<250>;
|
||||||
|
type BasePeriod = NisBasePeriod;
|
||||||
|
type MinBid = MinBid;
|
||||||
|
type MinReceipt = MinReceipt;
|
||||||
type IntakePeriod = IntakePeriod;
|
type IntakePeriod = IntakePeriod;
|
||||||
type MaxIntakeBids = MaxIntakeBids;
|
type MaxIntakeWeight = MaxIntakeWeight;
|
||||||
type WeightInfo = weights::pallet_gilt::WeightInfo<Runtime>;
|
type ThawThrottle = ThawThrottle;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_beefy::Config for Runtime {
|
impl pallet_beefy::Config for Runtime {
|
||||||
@@ -1375,8 +1400,10 @@ construct_runtime! {
|
|||||||
// Tips module.
|
// Tips module.
|
||||||
Tips: pallet_tips::{Pallet, Call, Storage, Event<T>} = 36,
|
Tips: pallet_tips::{Pallet, Call, Storage, Event<T>} = 36,
|
||||||
|
|
||||||
// Gilts pallet.
|
// NIS pallet.
|
||||||
Gilt: pallet_gilt::{Pallet, Call, Storage, Event<T>, Config} = 38,
|
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.
|
// Parachains pallets. Start indices at 50 to leave room.
|
||||||
ParachainsOrigin: parachains_origin::{Pallet, Origin} = 50,
|
ParachainsOrigin: parachains_origin::{Pallet, Origin} = 50,
|
||||||
@@ -1510,6 +1537,7 @@ mod benches {
|
|||||||
[runtime_parachains::ump, Ump]
|
[runtime_parachains::ump, Ump]
|
||||||
// Substrate
|
// Substrate
|
||||||
[pallet_balances, Balances]
|
[pallet_balances, Balances]
|
||||||
|
[pallet_balances, NisCounterpartBalances]
|
||||||
[frame_benchmarking::baseline, Baseline::<Runtime>]
|
[frame_benchmarking::baseline, Baseline::<Runtime>]
|
||||||
[pallet_bounties, Bounties]
|
[pallet_bounties, Bounties]
|
||||||
[pallet_child_bounties, ChildBounties]
|
[pallet_child_bounties, ChildBounties]
|
||||||
@@ -1517,7 +1545,7 @@ mod benches {
|
|||||||
[pallet_collective, TechnicalCommittee]
|
[pallet_collective, TechnicalCommittee]
|
||||||
[pallet_democracy, Democracy]
|
[pallet_democracy, Democracy]
|
||||||
[pallet_elections_phragmen, PhragmenElection]
|
[pallet_elections_phragmen, PhragmenElection]
|
||||||
[pallet_gilt, Gilt]
|
[pallet_nis, Nis]
|
||||||
[pallet_identity, Identity]
|
[pallet_identity, Identity]
|
||||||
[pallet_im_online, ImOnline]
|
[pallet_im_online, ImOnline]
|
||||||
[pallet_indices, Indices]
|
[pallet_indices, Indices]
|
||||||
|
|||||||
@@ -17,18 +17,19 @@
|
|||||||
|
|
||||||
pub mod frame_system;
|
pub mod frame_system;
|
||||||
pub mod pallet_balances;
|
pub mod pallet_balances;
|
||||||
|
pub mod pallet_balances_nis_counterpart_balances;
|
||||||
pub mod pallet_bounties;
|
pub mod pallet_bounties;
|
||||||
pub mod pallet_child_bounties;
|
pub mod pallet_child_bounties;
|
||||||
pub mod pallet_collective_council;
|
pub mod pallet_collective_council;
|
||||||
pub mod pallet_collective_technical_committee;
|
pub mod pallet_collective_technical_committee;
|
||||||
pub mod pallet_democracy;
|
pub mod pallet_democracy;
|
||||||
pub mod pallet_elections_phragmen;
|
pub mod pallet_elections_phragmen;
|
||||||
pub mod pallet_gilt;
|
|
||||||
pub mod pallet_identity;
|
pub mod pallet_identity;
|
||||||
pub mod pallet_im_online;
|
pub mod pallet_im_online;
|
||||||
pub mod pallet_indices;
|
pub mod pallet_indices;
|
||||||
pub mod pallet_membership;
|
pub mod pallet_membership;
|
||||||
pub mod pallet_multisig;
|
pub mod pallet_multisig;
|
||||||
|
pub mod pallet_nis;
|
||||||
pub mod pallet_preimage;
|
pub mod pallet_preimage;
|
||||||
pub mod pallet_proxy;
|
pub mod pallet_proxy;
|
||||||
pub mod pallet_scheduler;
|
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