feat: Rebrand Polkadot/Substrate references to PezkuwiChain
This commit systematically rebrands various references from Parity Technologies' Polkadot/Substrate ecosystem to PezkuwiChain within the kurdistan-sdk. Key changes include: - Updated external repository URLs (zombienet-sdk, parity-db, parity-scale-codec, wasm-instrument) to point to pezkuwichain forks. - Modified internal documentation and code comments to reflect PezkuwiChain naming and structure. - Replaced direct references to with or specific paths within the for XCM, Pezkuwi, and other modules. - Cleaned up deprecated issue and PR references in various and files, particularly in and modules. - Adjusted image and logo URLs in documentation to point to PezkuwiChain assets. - Removed or rephrased comments related to external Polkadot/Substrate PRs and issues. This is a significant step towards fully customizing the SDK for the PezkuwiChain ecosystem.
This commit is contained in:
@@ -0,0 +1,98 @@
|
||||
[package]
|
||||
name = "pezpallet-staking-async"
|
||||
version = "0.1.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license = "Apache-2.0"
|
||||
homepage.workspace = true
|
||||
repository.workspace = true
|
||||
description = "FRAME pallet staking async"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { features = ["derive"], workspace = true }
|
||||
pezframe-election-provider-support = { workspace = true }
|
||||
pezframe-support = { workspace = true }
|
||||
pezframe-system = { workspace = true }
|
||||
log = { workspace = true }
|
||||
pezpallet-staking-async-rc-client = { workspace = true }
|
||||
rand = { features = ["alloc"], workspace = true }
|
||||
rand_chacha = { workspace = true }
|
||||
scale-info = { features = ["derive", "serde"], workspace = true }
|
||||
serde = { features = ["alloc", "derive"], workspace = true }
|
||||
pezsp-application-crypto = { features = ["serde"], workspace = true }
|
||||
pezsp-core = { workspace = true }
|
||||
pezsp-io = { workspace = true }
|
||||
pezsp-npos-elections = { workspace = true }
|
||||
pezsp-runtime = { features = ["serde"], workspace = true }
|
||||
pezsp-staking = { features = ["serde"], workspace = true }
|
||||
|
||||
# Optional imports for benchmarking
|
||||
pezframe-benchmarking = { optional = true, workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
anyhow = { workspace = true }
|
||||
env_logger = { workspace = true }
|
||||
pezframe-benchmarking = { workspace = true, default-features = true }
|
||||
pezframe-support = { features = [
|
||||
"experimental",
|
||||
], workspace = true, default-features = true }
|
||||
pezpallet-bags-list = { workspace = true, default-features = true }
|
||||
pezpallet-balances = { workspace = true, default-features = true }
|
||||
rand_chacha = { workspace = true, default-features = true }
|
||||
pezsp-tracing = { workspace = true, default-features = true }
|
||||
bizinikiwi-test-utils = { workspace = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"anyhow/std",
|
||||
"codec/std",
|
||||
"pezframe-benchmarking?/std",
|
||||
"pezframe-election-provider-support/std",
|
||||
"pezframe-support/std",
|
||||
"pezframe-system/std",
|
||||
"log/std",
|
||||
"pezpallet-bags-list/std",
|
||||
"pezpallet-balances/std",
|
||||
"pezpallet-staking-async-rc-client/std",
|
||||
"rand/std",
|
||||
"rand_chacha/std",
|
||||
"scale-info/std",
|
||||
"serde/std",
|
||||
"pezsp-application-crypto/std",
|
||||
"pezsp-core/std",
|
||||
"pezsp-core/std",
|
||||
"pezsp-io/std",
|
||||
"pezsp-npos-elections/std",
|
||||
"pezsp-runtime/std",
|
||||
"pezsp-staking/std",
|
||||
"pezsp-tracing/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"pezframe-benchmarking/runtime-benchmarks",
|
||||
"pezframe-election-provider-support/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"pezframe-system/runtime-benchmarks",
|
||||
"pezpallet-bags-list/runtime-benchmarks",
|
||||
"pezpallet-balances/runtime-benchmarks",
|
||||
"pezpallet-staking-async-rc-client/runtime-benchmarks",
|
||||
"pezsp-io/runtime-benchmarks",
|
||||
"pezsp-npos-elections/runtime-benchmarks",
|
||||
"pezsp-runtime/runtime-benchmarks",
|
||||
"pezsp-staking/runtime-benchmarks",
|
||||
]
|
||||
try-runtime = [
|
||||
"pezframe-election-provider-support/try-runtime",
|
||||
"pezframe-support/try-runtime",
|
||||
"pezframe-system/try-runtime",
|
||||
"pezpallet-bags-list/try-runtime",
|
||||
"pezpallet-balances/try-runtime",
|
||||
"pezpallet-staking-async-rc-client/try-runtime",
|
||||
"pezsp-runtime/try-runtime",
|
||||
]
|
||||
@@ -0,0 +1,67 @@
|
||||
[package]
|
||||
name = "pezpallet-staking-async-ah-client"
|
||||
description = "Pallet handling the communication with staking-rc-client. It's role is to glue the staking pallet (on AssetHub chain) and session pallet (on Relay Chain) in a transparent way."
|
||||
license = "Apache-2.0"
|
||||
version = "0.1.0"
|
||||
edition.workspace = true
|
||||
authors.workspace = true
|
||||
repository.workspace = true
|
||||
|
||||
[dependencies]
|
||||
codec = { workspace = true, features = ["derive"] }
|
||||
log = { workspace = true }
|
||||
scale-info = { workspace = true, features = ["derive"] }
|
||||
serde = { features = ["alloc", "derive"], workspace = true }
|
||||
|
||||
pezsp-core = { workspace = true }
|
||||
pezsp-runtime = { workspace = true }
|
||||
pezsp-staking = { workspace = true }
|
||||
|
||||
pezframe-benchmarking = { workspace = true, optional = true }
|
||||
pezframe-support = { workspace = true }
|
||||
pezframe-system = { workspace = true }
|
||||
|
||||
pezpallet-authorship = { workspace = true }
|
||||
pezpallet-session = { features = ["historical"], workspace = true }
|
||||
pezpallet-staking-async-rc-client = { workspace = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"codec/std",
|
||||
"pezframe-benchmarking?/std",
|
||||
"pezframe-support/std",
|
||||
"pezframe-system/std",
|
||||
"log/std",
|
||||
"pezpallet-authorship/std",
|
||||
"pezpallet-session/std",
|
||||
"pezpallet-staking-async-rc-client/std",
|
||||
"scale-info/std",
|
||||
"serde/std",
|
||||
"pezsp-core/std",
|
||||
"pezsp-io/std",
|
||||
"pezsp-runtime/std",
|
||||
"pezsp-staking/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"pezframe-benchmarking/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"pezframe-system/runtime-benchmarks",
|
||||
"pezpallet-authorship/runtime-benchmarks",
|
||||
"pezpallet-session/runtime-benchmarks",
|
||||
"pezpallet-staking-async-rc-client/runtime-benchmarks",
|
||||
"pezsp-io/runtime-benchmarks",
|
||||
"pezsp-runtime/runtime-benchmarks",
|
||||
"pezsp-staking/runtime-benchmarks",
|
||||
]
|
||||
try-runtime = [
|
||||
"pezframe-support/try-runtime",
|
||||
"pezframe-system/try-runtime",
|
||||
"pezpallet-authorship/try-runtime",
|
||||
"pezpallet-session/try-runtime",
|
||||
"pezpallet-staking-async-rc-client/try-runtime",
|
||||
"pezsp-runtime/try-runtime",
|
||||
]
|
||||
|
||||
[dev-dependencies]
|
||||
pezsp-io = { workspace = true }
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,112 @@
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! Mock runtime for pezpallet-staking-async-ah-client tests.
|
||||
|
||||
use crate::*;
|
||||
use pezframe_support::{derive_impl, parameter_types, weights::Weight};
|
||||
use pezsp_runtime::{BuildStorage, Perbill};
|
||||
use pezsp_staking::offence::{OffenceSeverity, OnOffenceHandler};
|
||||
|
||||
type Block = pezframe_system::mocking::MockBlock<Test>;
|
||||
|
||||
pezframe_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: pezframe_system,
|
||||
StakingAsyncAhClient: crate,
|
||||
}
|
||||
);
|
||||
|
||||
#[derive_impl(pezframe_system::config_preludes::TestDefaultConfig)]
|
||||
impl pezframe_system::Config for Test {
|
||||
type Block = Block;
|
||||
type AccountData = ();
|
||||
}
|
||||
|
||||
pub struct MockSessionInterface;
|
||||
impl SessionInterface for MockSessionInterface {
|
||||
type ValidatorId = u64;
|
||||
fn validators() -> Vec<Self::ValidatorId> {
|
||||
vec![1, 2, 3]
|
||||
}
|
||||
fn prune_up_to(_up_to: u32) {}
|
||||
fn report_offence(_offender: Self::ValidatorId, _severity: OffenceSeverity) {}
|
||||
}
|
||||
|
||||
pub struct MockFallback;
|
||||
impl pezpallet_session::SessionManager<u64> for MockFallback {
|
||||
fn new_session(_new_index: u32) -> Option<Vec<u64>> {
|
||||
None
|
||||
}
|
||||
fn start_session(_start_index: u32) {}
|
||||
fn end_session(_end_index: u32) {}
|
||||
}
|
||||
|
||||
impl OnOffenceHandler<u64, (u64, pezsp_staking::Exposure<u64, u128>), Weight> for MockFallback {
|
||||
fn on_offence(
|
||||
_offenders: &[pezsp_staking::offence::OffenceDetails<
|
||||
u64,
|
||||
(u64, pezsp_staking::Exposure<u64, u128>),
|
||||
>],
|
||||
_slash_fraction: &[Perbill],
|
||||
_slash_session: u32,
|
||||
) -> Weight {
|
||||
Weight::zero()
|
||||
}
|
||||
}
|
||||
|
||||
impl pezframe_support::traits::RewardsReporter<u64> for MockFallback {
|
||||
fn reward_by_ids(_rewards_by_ids: impl IntoIterator<Item = (u64, u32)>) {}
|
||||
}
|
||||
|
||||
impl pezpallet_authorship::EventHandler<u64, u64> for MockFallback {
|
||||
fn note_author(_author: u64) {}
|
||||
}
|
||||
|
||||
pub struct MockUnixTime;
|
||||
impl pezframe_support::traits::UnixTime for MockUnixTime {
|
||||
fn now() -> core::time::Duration {
|
||||
core::time::Duration::from_secs(1234567890)
|
||||
}
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const MinimumValidatorSetSize: u32 = 3;
|
||||
pub const PointsPerBlock: u32 = 1;
|
||||
pub const MaxOffenceBatchSize: u32 = 100;
|
||||
}
|
||||
|
||||
impl Config for Test {
|
||||
type CurrencyBalance = u128;
|
||||
type AssetHubOrigin = pezframe_system::EnsureRoot<u64>;
|
||||
type AdminOrigin = pezframe_system::EnsureRoot<u64>;
|
||||
type SendToAssetHub = ();
|
||||
type MinimumValidatorSetSize = MinimumValidatorSetSize;
|
||||
type MaximumValidatorsWithPoints = ConstU32<128>;
|
||||
type UnixTime = MockUnixTime;
|
||||
type PointsPerBlock = PointsPerBlock;
|
||||
type MaxOffenceBatchSize = MaxOffenceBatchSize;
|
||||
type SessionInterface = MockSessionInterface;
|
||||
type Fallback = MockFallback;
|
||||
type MaxSessionReportRetries = ConstU32<3>;
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub fn new_test_ext() -> pezsp_io::TestExternalities {
|
||||
pezframe_system::GenesisConfig::<Test>::default().build_storage().unwrap().into()
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
[package]
|
||||
name = "pezpallet-ahm-test"
|
||||
version = "1.0.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license = "Apache-2.0"
|
||||
homepage.workspace = true
|
||||
repository.workspace = true
|
||||
description = "e2e unit tests for staking in AHM"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dev-dependencies]
|
||||
codec = { features = ["derive"], workspace = true, default-features = true }
|
||||
frame = { workspace = true, default-features = true }
|
||||
pezframe-support = { workspace = true, default-features = true }
|
||||
log = { workspace = true }
|
||||
scale-info = { features = [
|
||||
"derive",
|
||||
], workspace = true, default-features = true }
|
||||
pezsp-core = { workspace = true, default-features = true }
|
||||
pezsp-session = { workspace = true, default-features = true }
|
||||
pezsp-staking = { workspace = true, default-features = true }
|
||||
pezsp-tracing = { workspace = true, default-features = true }
|
||||
|
||||
# pallets we need in both
|
||||
pezpallet-balances = { workspace = true, default-features = true }
|
||||
|
||||
# pallets that we need in AH
|
||||
pezframe-election-provider-support = { workspace = true, default-features = true }
|
||||
pezpallet-election-provider-multi-block = { workspace = true, default-features = true }
|
||||
pezpallet-staking-async = { workspace = true, default-features = true }
|
||||
pezpallet-staking-async-rc-client = { workspace = true, default-features = true }
|
||||
|
||||
# pallets we need in the RC
|
||||
pezpallet-authorship = { workspace = true, default-features = true }
|
||||
pezpallet-session = { workspace = true, default-features = true }
|
||||
pezpallet-staking-async-ah-client = { workspace = true, default-features = true }
|
||||
pezpallet-timestamp = { workspace = true, default-features = true }
|
||||
# staking classic which will be replaced by ah-client
|
||||
pezpallet-offences = { workspace = true, default-features = true }
|
||||
pezpallet-root-offences = { workspace = true, default-features = true }
|
||||
pezpallet-staking = { workspace = true, default-features = true }
|
||||
|
||||
[features]
|
||||
std = ["log/std"]
|
||||
try-runtime = [
|
||||
"pezpallet-balances/try-runtime",
|
||||
|
||||
"pezpallet-staking/try-runtime",
|
||||
|
||||
"pezpallet-staking-async-rc-client/try-runtime",
|
||||
"pezpallet-staking-async/try-runtime",
|
||||
|
||||
"pezframe-election-provider-support/try-runtime",
|
||||
"pezframe-support/try-runtime",
|
||||
"frame/try-runtime",
|
||||
"pezpallet-authorship/try-runtime",
|
||||
"pezpallet-election-provider-multi-block/try-runtime",
|
||||
"pezpallet-offences/try-runtime",
|
||||
"pezpallet-root-offences/try-runtime",
|
||||
"pezpallet-session/try-runtime",
|
||||
"pezpallet-staking-async-ah-client/try-runtime",
|
||||
"pezpallet-timestamp/try-runtime",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"pezframe-election-provider-support/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"frame/runtime-benchmarks",
|
||||
"pezpallet-authorship/runtime-benchmarks",
|
||||
"pezpallet-balances/runtime-benchmarks",
|
||||
"pezpallet-election-provider-multi-block/runtime-benchmarks",
|
||||
"pezpallet-offences/runtime-benchmarks",
|
||||
"pezpallet-root-offences/runtime-benchmarks",
|
||||
"pezpallet-session/runtime-benchmarks",
|
||||
"pezpallet-staking-async-ah-client/runtime-benchmarks",
|
||||
"pezpallet-staking-async-rc-client/runtime-benchmarks",
|
||||
"pezpallet-staking-async/runtime-benchmarks",
|
||||
"pezpallet-staking/runtime-benchmarks",
|
||||
"pezpallet-timestamp/runtime-benchmarks",
|
||||
"pezsp-session/runtime-benchmarks",
|
||||
"pezsp-staking/runtime-benchmarks",
|
||||
]
|
||||
@@ -0,0 +1,574 @@
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use crate::shared;
|
||||
use frame::testing_prelude::*;
|
||||
use pezframe_election_provider_support::{
|
||||
bounds::{ElectionBounds, ElectionBoundsBuilder},
|
||||
SequentialPhragmen,
|
||||
};
|
||||
use pezframe_support::pezsp_runtime::testing::TestXt;
|
||||
use pezpallet_election_provider_multi_block as multi_block;
|
||||
use pezpallet_staking_async::Forcing;
|
||||
use pezpallet_staking_async_rc_client::{SessionReport, ValidatorSetReport};
|
||||
use pezsp_staking::SessionIndex;
|
||||
|
||||
construct_runtime! {
|
||||
pub enum Runtime {
|
||||
System: pezframe_system,
|
||||
Balances: pezpallet_balances,
|
||||
|
||||
// NOTE: the validator set is given by pezpallet-staking to rc-client on-init, and rc-client
|
||||
// will not send it immediately, but rather store it and sends it over on its own next
|
||||
// on-init call. Yet, because staking comes first here, its on-init is called before
|
||||
// rc-client, so under normal conditions, the message is sent immediately.
|
||||
Staking: pezpallet_staking_async,
|
||||
RcClient: pezpallet_staking_async_rc_client,
|
||||
|
||||
MultiBlock: multi_block,
|
||||
MultiBlockVerifier: multi_block::verifier,
|
||||
MultiBlockSigned: multi_block::signed,
|
||||
MultiBlockUnsigned: multi_block::unsigned,
|
||||
}
|
||||
}
|
||||
|
||||
// alias Runtime with T.
|
||||
pub type T = Runtime;
|
||||
|
||||
pub fn roll_next() {
|
||||
let now = System::block_number();
|
||||
let next = now + 1;
|
||||
|
||||
System::set_block_number(next);
|
||||
|
||||
Staking::on_initialize(next);
|
||||
RcClient::on_initialize(next);
|
||||
MultiBlock::on_initialize(next);
|
||||
MultiBlockVerifier::on_initialize(next);
|
||||
MultiBlockSigned::on_initialize(next);
|
||||
MultiBlockUnsigned::on_initialize(next);
|
||||
}
|
||||
|
||||
pub fn roll_many(blocks: BlockNumber) {
|
||||
let current = System::block_number();
|
||||
while System::block_number() < current + blocks {
|
||||
roll_next();
|
||||
}
|
||||
}
|
||||
|
||||
pub fn roll_until_matches(criteria: impl Fn() -> bool, with_rc: bool) {
|
||||
while !criteria() {
|
||||
roll_next();
|
||||
if with_rc {
|
||||
if LocalQueue::get().is_some() {
|
||||
panic!("when local queue is set, you cannot roll ah forward as well!")
|
||||
}
|
||||
shared::in_rc(|| {
|
||||
crate::rc::roll_next();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Use the given `end_index` as the first session report, and increment as per needed.
|
||||
pub(crate) fn roll_until_next_active(mut end_index: SessionIndex) -> Vec<AccountId> {
|
||||
// receive enough session reports, such that we plan a new era
|
||||
let planned_era = pezpallet_staking_async::session_rotation::Rotator::<Runtime>::planned_era();
|
||||
let active_era = pezpallet_staking_async::session_rotation::Rotator::<Runtime>::active_era();
|
||||
|
||||
while pezpallet_staking_async::session_rotation::Rotator::<Runtime>::planned_era() == planned_era {
|
||||
let report = SessionReport {
|
||||
end_index,
|
||||
activation_timestamp: None,
|
||||
leftover: false,
|
||||
validator_points: Default::default(),
|
||||
};
|
||||
assert_ok!(pezpallet_staking_async_rc_client::Pallet::<Runtime>::relay_session_report(
|
||||
RuntimeOrigin::root(),
|
||||
report
|
||||
));
|
||||
roll_next();
|
||||
end_index += 1;
|
||||
}
|
||||
|
||||
// now we have planned a new session. Roll until we have an outgoing message ready, meaning the
|
||||
// election is done
|
||||
LocalQueue::flush();
|
||||
loop {
|
||||
let messages = LocalQueue::get_since_last_call();
|
||||
match messages.len() {
|
||||
0 => {
|
||||
roll_next();
|
||||
continue;
|
||||
},
|
||||
1 => {
|
||||
assert_eq!(
|
||||
messages[0],
|
||||
(
|
||||
System::block_number(),
|
||||
OutgoingMessages::ValidatorSet(ValidatorSetReport {
|
||||
id: planned_era + 1,
|
||||
leftover: false,
|
||||
// arbitrary, feel free to change if test setup updates
|
||||
new_validator_set: vec![3, 5, 6, 8],
|
||||
prune_up_to: active_era.checked_sub(BondingDuration::get()),
|
||||
})
|
||||
)
|
||||
);
|
||||
break;
|
||||
},
|
||||
_ => panic!("Expected only one message in local queue, but got: {:?}", messages),
|
||||
}
|
||||
}
|
||||
|
||||
// active era is still 0
|
||||
assert_eq!(
|
||||
pezpallet_staking_async::session_rotation::Rotator::<Runtime>::active_era(),
|
||||
active_era
|
||||
);
|
||||
|
||||
// rc will not tell us that it has instantly activated a validator set.
|
||||
let report = SessionReport {
|
||||
end_index,
|
||||
activation_timestamp: Some((1000, planned_era + 1)),
|
||||
leftover: false,
|
||||
validator_points: Default::default(),
|
||||
};
|
||||
assert_ok!(pezpallet_staking_async_rc_client::Pallet::<Runtime>::relay_session_report(
|
||||
RuntimeOrigin::root(),
|
||||
report
|
||||
));
|
||||
|
||||
// active era is now 1.
|
||||
assert_eq!(
|
||||
pezpallet_staking_async::session_rotation::Rotator::<Runtime>::active_era(),
|
||||
active_era + 1
|
||||
);
|
||||
|
||||
// arbitrary, feel free to change if test setup updates
|
||||
vec![3, 5, 6, 8]
|
||||
}
|
||||
|
||||
pub type AccountId = <Runtime as pezframe_system::Config>::AccountId;
|
||||
pub type Balance = <Runtime as pezpallet_balances::Config>::Balance;
|
||||
pub type Hash = <Runtime as pezframe_system::Config>::Hash;
|
||||
pub type BlockNumber = BlockNumberFor<Runtime>;
|
||||
|
||||
#[derive_impl(pezframe_system::config_preludes::TestDefaultConfig)]
|
||||
impl pezframe_system::Config for Runtime {
|
||||
type Block = MockBlock<Self>;
|
||||
type AccountData = pezpallet_balances::AccountData<Balance>;
|
||||
}
|
||||
|
||||
#[derive_impl(pezpallet_balances::config_preludes::TestDefaultConfig)]
|
||||
impl pezpallet_balances::Config for Runtime {
|
||||
type Balance = u128;
|
||||
type AccountStore = System;
|
||||
}
|
||||
|
||||
pezframe_election_provider_support::generate_solution_type!(
|
||||
pub struct TestNposSolution::<
|
||||
VoterIndex = u16,
|
||||
TargetIndex = u16,
|
||||
Accuracy = PerU16,
|
||||
MaxVoters = ConstU32::<1000>
|
||||
>(16)
|
||||
);
|
||||
|
||||
type Extrinsic = TestXt<RuntimeCall, ()>;
|
||||
impl<LocalCall> pezframe_system::offchain::CreateTransactionBase<LocalCall> for Runtime
|
||||
where
|
||||
RuntimeCall: From<LocalCall>,
|
||||
{
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Extrinsic = Extrinsic;
|
||||
}
|
||||
|
||||
impl<LocalCall> pezframe_system::offchain::CreateBare<LocalCall> for Runtime
|
||||
where
|
||||
RuntimeCall: From<LocalCall>,
|
||||
{
|
||||
fn create_bare(call: Self::RuntimeCall) -> Self::Extrinsic {
|
||||
Extrinsic::new_bare(call)
|
||||
}
|
||||
}
|
||||
|
||||
type MaxVotesPerVoter = pezpallet_staking_async::MaxNominationsOf<Runtime>;
|
||||
parameter_types! {
|
||||
pub static MaxValidators: u32 = 32;
|
||||
pub static MaxBackersPerWinner: u32 = 16;
|
||||
pub static MaxExposurePageSize: u32 = 8;
|
||||
pub static MaxBackersPerWinnerFinal: u32 = 16;
|
||||
pub static MaxWinnersPerPage: u32 = 16;
|
||||
pub static MaxLength: u32 = 4 * 1024 * 1024;
|
||||
pub static Pages: u32 = 3;
|
||||
pub static TargetSnapshotPerBlock: u32 = 4;
|
||||
pub static VoterSnapshotPerBlock: u32 = 4;
|
||||
|
||||
pub static SignedPhase: BlockNumber = 4;
|
||||
pub static UnsignedPhase: BlockNumber = 4;
|
||||
pub static SignedValidationPhase: BlockNumber = (2 * Pages::get() as BlockNumber);
|
||||
}
|
||||
|
||||
impl multi_block::unsigned::miner::MinerConfig for Runtime {
|
||||
type AccountId = AccountId;
|
||||
type Hash = Hash;
|
||||
type MaxBackersPerWinner = MaxBackersPerWinner;
|
||||
type MaxWinnersPerPage = MaxWinnersPerPage;
|
||||
type MaxBackersPerWinnerFinal = MaxBackersPerWinnerFinal;
|
||||
type MaxVotesPerVoter = MaxVotesPerVoter;
|
||||
type Solution = TestNposSolution;
|
||||
type MaxLength = MaxLength;
|
||||
type Pages = Pages;
|
||||
type Solver = SequentialPhragmen<AccountId, Perbill>;
|
||||
type TargetSnapshotPerBlock = TargetSnapshotPerBlock;
|
||||
type VoterSnapshotPerBlock = VoterSnapshotPerBlock;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub Bounds: ElectionBounds = ElectionBoundsBuilder::default().build();
|
||||
}
|
||||
|
||||
pub struct OnChainConfig;
|
||||
impl pezframe_election_provider_support::onchain::Config for OnChainConfig {
|
||||
// unbounded
|
||||
type Bounds = Bounds;
|
||||
// We should not need sorting, as our bounds are large enough for the number of
|
||||
// nominators/validators in this test setup.
|
||||
type Sort = ConstBool<false>;
|
||||
type DataProvider = Staking;
|
||||
type MaxBackersPerWinner = MaxBackersPerWinner;
|
||||
type MaxWinnersPerPage = MaxWinnersPerPage;
|
||||
type Solver = SequentialPhragmen<AccountId, Perbill>;
|
||||
type System = Runtime;
|
||||
type WeightInfo = ();
|
||||
}
|
||||
|
||||
impl multi_block::Config for Runtime {
|
||||
type AdminOrigin = EnsureRoot<AccountId>;
|
||||
type ManagerOrigin = EnsureRoot<AccountId>;
|
||||
type DataProvider = Staking;
|
||||
type Fallback = pezframe_election_provider_support::onchain::OnChainExecution<OnChainConfig>;
|
||||
type MinerConfig = Self;
|
||||
|
||||
type Pages = Pages;
|
||||
type SignedPhase = SignedPhase;
|
||||
type UnsignedPhase = UnsignedPhase;
|
||||
type SignedValidationPhase = SignedValidationPhase;
|
||||
type TargetSnapshotPerBlock = TargetSnapshotPerBlock;
|
||||
type VoterSnapshotPerBlock = VoterSnapshotPerBlock;
|
||||
type Verifier = MultiBlockVerifier;
|
||||
type AreWeDone = multi_block::ProceedRegardlessOf<Self>;
|
||||
type OnRoundRotation = multi_block::CleanRound<Self>;
|
||||
type WeightInfo = ();
|
||||
}
|
||||
|
||||
impl multi_block::verifier::Config for Runtime {
|
||||
type MaxBackersPerWinner = MaxBackersPerWinner;
|
||||
type MaxBackersPerWinnerFinal = MaxBackersPerWinnerFinal;
|
||||
type MaxWinnersPerPage = MaxWinnersPerPage;
|
||||
|
||||
type SolutionDataProvider = MultiBlockSigned;
|
||||
type WeightInfo = ();
|
||||
}
|
||||
|
||||
impl multi_block::unsigned::Config for Runtime {
|
||||
type MinerPages = ConstU32<1>;
|
||||
type WeightInfo = ();
|
||||
type OffchainStorage = ConstBool<true>;
|
||||
type MinerTxPriority = ConstU64<{ u64::MAX }>;
|
||||
type OffchainRepeat = ();
|
||||
type OffchainSolver = SequentialPhragmen<AccountId, Perbill>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub static DepositBase: Balance = 1;
|
||||
pub static DepositPerPage: Balance = 1;
|
||||
pub static MaxSubmissions: u32 = 2;
|
||||
pub static RewardBase: Balance = 5;
|
||||
}
|
||||
|
||||
impl multi_block::signed::Config for Runtime {
|
||||
type Currency = Balances;
|
||||
type EjectGraceRatio = ();
|
||||
type BailoutGraceRatio = ();
|
||||
type InvulnerableDeposit = ();
|
||||
type DepositBase = DepositBase;
|
||||
type DepositPerPage = DepositPerPage;
|
||||
type EstimateCallFee = ConstU32<1>;
|
||||
type MaxSubmissions = MaxSubmissions;
|
||||
type RewardBase = RewardBase;
|
||||
type WeightInfo = ();
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub static BondingDuration: u32 = 3;
|
||||
pub static SlashDeferredDuration: u32 = 2;
|
||||
pub static SessionsPerEra: u32 = 6;
|
||||
pub static PlanningEraOffset: u32 = 2;
|
||||
pub MaxPruningItems: u32 = 100;
|
||||
}
|
||||
|
||||
impl pezpallet_staking_async::Config for Runtime {
|
||||
type Filter = ();
|
||||
type RuntimeHoldReason = RuntimeHoldReason;
|
||||
|
||||
type AdminOrigin = EnsureRoot<AccountId>;
|
||||
type BondingDuration = BondingDuration;
|
||||
type SessionsPerEra = SessionsPerEra;
|
||||
type PlanningEraOffset = PlanningEraOffset;
|
||||
|
||||
type Currency = Balances;
|
||||
type OldCurrency = Balances;
|
||||
type CurrencyBalance = Balance;
|
||||
type CurrencyToVote = ();
|
||||
|
||||
type ElectionProvider = MultiBlock;
|
||||
|
||||
type EraPayout = ();
|
||||
type EventListeners = ();
|
||||
type Reward = ();
|
||||
type RewardRemainder = ();
|
||||
type Slash = ();
|
||||
type SlashDeferDuration = SlashDeferredDuration;
|
||||
type MaxEraDuration = ();
|
||||
type MaxPruningItems = MaxPruningItems;
|
||||
|
||||
type HistoryDepth = ConstU32<7>;
|
||||
type MaxControllersInDeprecationBatch = ();
|
||||
|
||||
type MaxValidatorSet = MaxValidators;
|
||||
type MaxExposurePageSize = MaxExposurePageSize;
|
||||
type MaxInvulnerables = MaxValidators;
|
||||
type MaxUnlockingChunks = ConstU32<16>;
|
||||
type NominationsQuota = pezpallet_staking_async::FixedNominationsQuota<16>;
|
||||
|
||||
type VoterList = pezpallet_staking_async::UseNominatorsAndValidatorsMap<Self>;
|
||||
type TargetList = pezpallet_staking_async::UseValidatorsMap<Self>;
|
||||
|
||||
type RcClientInterface = RcClient;
|
||||
|
||||
type WeightInfo = ();
|
||||
}
|
||||
|
||||
impl pezpallet_staking_async_rc_client::Config for Runtime {
|
||||
type AHStakingInterface = Staking;
|
||||
type SendToRelayChain = DeliverToRelay;
|
||||
type RelayChainOrigin = EnsureRoot<AccountId>;
|
||||
type MaxValidatorSetRetries = ConstU32<3>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub static NextRelayDeliveryFails: bool = false;
|
||||
}
|
||||
|
||||
pub struct DeliverToRelay;
|
||||
|
||||
impl DeliverToRelay {
|
||||
fn ensure_delivery_guard() -> Result<(), ()> {
|
||||
// `::take` will set it back to the default value, `false`.
|
||||
if NextRelayDeliveryFails::take() {
|
||||
Err(())
|
||||
} else {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl pezpallet_staking_async_rc_client::SendToRelayChain for DeliverToRelay {
|
||||
type AccountId = AccountId;
|
||||
|
||||
fn validator_set(
|
||||
report: pezpallet_staking_async_rc_client::ValidatorSetReport<Self::AccountId>,
|
||||
) -> Result<(), ()> {
|
||||
Self::ensure_delivery_guard()?;
|
||||
if let Some(mut local_queue) = LocalQueue::get() {
|
||||
local_queue.push((System::block_number(), OutgoingMessages::ValidatorSet(report)));
|
||||
LocalQueue::set(Some(local_queue));
|
||||
} else {
|
||||
shared::CounterAHRCValidatorSet::mutate(|x| *x += 1);
|
||||
shared::in_rc(|| {
|
||||
let origin = crate::rc::RuntimeOrigin::root();
|
||||
pezpallet_staking_async_ah_client::Pallet::<crate::rc::Runtime>::validator_set(
|
||||
origin,
|
||||
report.clone(),
|
||||
)
|
||||
.unwrap();
|
||||
});
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
const INITIAL_BALANCE: Balance = 1000;
|
||||
const INITIAL_STAKE: Balance = 100;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub enum OutgoingMessages {
|
||||
ValidatorSet(pezpallet_staking_async_rc_client::ValidatorSetReport<AccountId>),
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub static LocalQueue: Option<Vec<(BlockNumber, OutgoingMessages)>> = None;
|
||||
pub static LocalQueueLastIndex: usize = 0;
|
||||
}
|
||||
|
||||
impl LocalQueue {
|
||||
pub fn get_since_last_call() -> Vec<(BlockNumber, OutgoingMessages)> {
|
||||
if let Some(all) = Self::get() {
|
||||
let last = LocalQueueLastIndex::get();
|
||||
LocalQueueLastIndex::set(all.len());
|
||||
all.into_iter().skip(last).collect()
|
||||
} else {
|
||||
panic!("Must set local_queue()!")
|
||||
}
|
||||
}
|
||||
|
||||
pub fn flush() {
|
||||
let _ = Self::get_since_last_call();
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ExtBuilder {
|
||||
// if true, emulate pre-ahm-migration state
|
||||
pre_migration: bool,
|
||||
}
|
||||
|
||||
impl Default for ExtBuilder {
|
||||
fn default() -> Self {
|
||||
Self { pre_migration: false }
|
||||
}
|
||||
}
|
||||
|
||||
impl ExtBuilder {
|
||||
/// Set this if you want to emulate pre-migration state of staking-async.
|
||||
pub fn pre_migration(self) -> Self {
|
||||
Self { pre_migration: true }
|
||||
}
|
||||
|
||||
/// Set this if you want to test the ah-runtime locally. This will push outgoing messages to
|
||||
/// `LocalQueue` instead of enacting them on RC.
|
||||
pub fn local_queue(self) -> Self {
|
||||
LocalQueue::set(Some(Default::default()));
|
||||
self
|
||||
}
|
||||
|
||||
pub fn slash_defer_duration(self, duration: u32) -> Self {
|
||||
SlashDeferredDuration::set(duration);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn build(self) -> TestState {
|
||||
let _ = pezsp_tracing::try_init_simple();
|
||||
let mut t = pezframe_system::GenesisConfig::<Runtime>::default().build_storage().unwrap();
|
||||
|
||||
// Note: The state in pezpallet-staking-async is retained even when pre-migration is set.
|
||||
// This does not impact the tests, but for strict accuracy, be aware that the state isn't
|
||||
// fully representative.
|
||||
let validators = vec![1, 2, 3, 4, 5, 6, 7, 8]
|
||||
.into_iter()
|
||||
.map(|x| (x, INITIAL_STAKE, pezpallet_staking_async::StakerStatus::Validator));
|
||||
|
||||
let nominators = vec![
|
||||
(100, vec![1, 2]),
|
||||
(101, vec![2, 5]),
|
||||
(102, vec![1, 1]),
|
||||
(103, vec![3, 3]),
|
||||
(104, vec![1, 5]),
|
||||
(105, vec![5, 4]),
|
||||
(106, vec![6, 2]),
|
||||
(107, vec![1, 6]),
|
||||
(108, vec![2, 7]),
|
||||
(109, vec![4, 8]),
|
||||
(110, vec![5, 2]),
|
||||
(111, vec![6, 6]),
|
||||
(112, vec![8, 1]),
|
||||
]
|
||||
.into_iter()
|
||||
.map(|(x, y)| (x, INITIAL_STAKE, pezpallet_staking_async::StakerStatus::Nominator(y)));
|
||||
|
||||
let stakers = validators.chain(nominators).collect::<Vec<_>>();
|
||||
let balances = stakers
|
||||
.clone()
|
||||
.into_iter()
|
||||
.map(|(x, _, _)| (x, INITIAL_BALANCE))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
pezpallet_balances::GenesisConfig::<Runtime> { balances, ..Default::default() }
|
||||
.assimilate_storage(&mut t)
|
||||
.unwrap();
|
||||
|
||||
pezpallet_staking_async::GenesisConfig::<Runtime> {
|
||||
stakers,
|
||||
validator_count: 4,
|
||||
active_era: (0, 0, 0),
|
||||
force_era: if self.pre_migration { Forcing::ForceNone } else { Forcing::default() },
|
||||
..Default::default()
|
||||
}
|
||||
.assimilate_storage(&mut t)
|
||||
.unwrap();
|
||||
|
||||
let mut state: TestState = t.into();
|
||||
|
||||
state.execute_with(|| {
|
||||
// initialises events
|
||||
roll_next();
|
||||
});
|
||||
|
||||
state
|
||||
}
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
static StakingEventsIndex: usize = 0;
|
||||
static ElectionEventsIndex: usize = 0;
|
||||
static RcClientEventsIndex: usize = 0;
|
||||
}
|
||||
|
||||
pub(crate) fn rc_client_events_since_last_call() -> Vec<pezpallet_staking_async_rc_client::Event<T>> {
|
||||
let all: Vec<_> = System::events()
|
||||
.into_iter()
|
||||
.filter_map(
|
||||
|r| if let RuntimeEvent::RcClient(inner) = r.event { Some(inner) } else { None },
|
||||
)
|
||||
.collect();
|
||||
let seen = RcClientEventsIndex::get();
|
||||
RcClientEventsIndex::set(all.len());
|
||||
all.into_iter().skip(seen).collect()
|
||||
}
|
||||
|
||||
pub(crate) fn staking_events_since_last_call() -> Vec<pezpallet_staking_async::Event<T>> {
|
||||
let all: Vec<_> = System::events()
|
||||
.into_iter()
|
||||
.filter_map(|r| if let RuntimeEvent::Staking(inner) = r.event { Some(inner) } else { None })
|
||||
.collect();
|
||||
let seen = StakingEventsIndex::get();
|
||||
StakingEventsIndex::set(all.len());
|
||||
all.into_iter().skip(seen).collect()
|
||||
}
|
||||
|
||||
pub(crate) fn election_events_since_last_call() -> Vec<multi_block::Event<T>> {
|
||||
let all: Vec<_> = System::events()
|
||||
.into_iter()
|
||||
.filter_map(
|
||||
|r| if let RuntimeEvent::MultiBlock(inner) = r.event { Some(inner) } else { None },
|
||||
)
|
||||
.collect();
|
||||
let seen = ElectionEventsIndex::get();
|
||||
ElectionEventsIndex::set(all.len());
|
||||
all.into_iter().skip(seen).collect()
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
pub mod mock;
|
||||
pub mod test;
|
||||
|
||||
// re-export for easier use in dual runtime tests.
|
||||
pub use mock::*;
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,967 @@
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[cfg(test)]
|
||||
pub mod ah;
|
||||
#[cfg(test)]
|
||||
pub mod rc;
|
||||
|
||||
#[cfg(test)]
|
||||
pub mod shared;
|
||||
|
||||
// shared tests.
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::{
|
||||
ah::{rc_client_events_since_last_call, staking_events_since_last_call},
|
||||
rc::RootOffences,
|
||||
};
|
||||
use ah_client::OperatingMode;
|
||||
use frame::testing_prelude::*;
|
||||
use pezframe_support::traits::Get;
|
||||
use pezpallet_election_provider_multi_block as multi_block;
|
||||
use pezpallet_staking as staking_classic;
|
||||
use pezpallet_staking_async::{ActiveEra, ActiveEraInfo, Forcing};
|
||||
use pezpallet_staking_async_ah_client::{self as ah_client, OffenceSendQueue};
|
||||
use pezpallet_staking_async_rc_client as rc_client;
|
||||
|
||||
#[test]
|
||||
fn rc_session_change_reported_to_ah() {
|
||||
// sets up AH chain with current and active era.
|
||||
shared::put_ah_state(ah::ExtBuilder::default().build());
|
||||
shared::put_rc_state(rc::ExtBuilder::default().build());
|
||||
// shared::RC_STATE.with(|state| *state.get_mut() = rc::ExtBuilder::default().build());
|
||||
|
||||
// initial state of ah
|
||||
shared::in_ah(|| {
|
||||
assert_eq!(pezframe_system::Pallet::<ah::Runtime>::block_number(), 1);
|
||||
assert_eq!(pezpallet_staking_async::CurrentEra::<ah::Runtime>::get(), Some(0));
|
||||
assert_eq!(
|
||||
ActiveEra::<ah::Runtime>::get(),
|
||||
Some(ActiveEraInfo { index: 0, start: Some(0) })
|
||||
);
|
||||
});
|
||||
|
||||
shared::in_rc(|| {
|
||||
// initial state of rc
|
||||
assert_eq!(ah_client::Mode::<rc::Runtime>::get(), OperatingMode::Active);
|
||||
// go to session 1 in RC and test.
|
||||
// when
|
||||
assert!(pezframe_system::Pallet::<rc::Runtime>::block_number() == 1);
|
||||
|
||||
// given end session 0, start session 1, plan 2
|
||||
rc::roll_until_matches(
|
||||
|| pezpallet_session::CurrentIndex::<rc::Runtime>::get() == 1,
|
||||
true,
|
||||
);
|
||||
|
||||
// then
|
||||
assert_eq!(pezframe_system::Pallet::<rc::Runtime>::block_number(), rc::Period::get());
|
||||
});
|
||||
|
||||
shared::in_rc(|| {
|
||||
// roll a few more sessions
|
||||
rc::roll_until_matches(
|
||||
|| pezpallet_session::CurrentIndex::<rc::Runtime>::get() == 4,
|
||||
true,
|
||||
);
|
||||
});
|
||||
|
||||
shared::in_ah(|| {
|
||||
// ah's rc-client has also progressed some blocks, equal to 4 sessions
|
||||
assert_eq!(pezframe_system::Pallet::<ah::Runtime>::block_number(), 120);
|
||||
// election is ongoing, and has just started
|
||||
assert!(matches!(
|
||||
multi_block::CurrentPhase::<ah::Runtime>::get(),
|
||||
multi_block::Phase::Snapshot(_)
|
||||
));
|
||||
});
|
||||
|
||||
// go to session 5 in rc, and forward AH too.
|
||||
shared::in_rc(|| {
|
||||
rc::roll_until_matches(
|
||||
|| pezpallet_session::CurrentIndex::<rc::Runtime>::get() == 5,
|
||||
true,
|
||||
);
|
||||
});
|
||||
|
||||
// ah has bumped the current era, but not the active era
|
||||
shared::in_ah(|| {
|
||||
assert_eq!(pezpallet_staking_async::CurrentEra::<ah::Runtime>::get(), Some(1));
|
||||
assert_eq!(
|
||||
ActiveEra::<ah::Runtime>::get(),
|
||||
Some(ActiveEraInfo { index: 0, start: Some(0) })
|
||||
);
|
||||
});
|
||||
|
||||
// go to session 6 in rc, and forward AH too.
|
||||
shared::in_rc(|| {
|
||||
rc::roll_until_matches(
|
||||
|| pezpallet_session::CurrentIndex::<rc::Runtime>::get() == 6,
|
||||
true,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn ah_takes_over_staking_post_migration() {
|
||||
// SCENE (1): Pre AHM Migration
|
||||
shared::put_rc_state(
|
||||
rc::ExtBuilder::default()
|
||||
.pre_migration()
|
||||
// set session keys for all "potential" validators
|
||||
.session_keys(vec![1, 2, 3, 4, 5, 6, 7, 8])
|
||||
// set a very low `MaxOffenceBatchSize` to test batching behavior
|
||||
.max_offence_batch_size(2)
|
||||
.build(),
|
||||
);
|
||||
shared::put_ah_state(ah::ExtBuilder::default().build());
|
||||
|
||||
shared::in_rc(|| {
|
||||
assert!(staking_classic::ActiveEra::<rc::Runtime>::get().is_none());
|
||||
|
||||
// - staking-classic is active on RC.
|
||||
rc::roll_until_matches(
|
||||
|| {
|
||||
staking_classic::ActiveEra::<rc::Runtime>::get().map(|a| a.index).unwrap_or(0) ==
|
||||
1
|
||||
},
|
||||
true,
|
||||
);
|
||||
|
||||
// No offence exist so far
|
||||
assert!(staking_classic::UnappliedSlashes::<rc::Runtime>::get(4).is_empty());
|
||||
|
||||
assert_ok!(RootOffences::create_offence(
|
||||
rc::RuntimeOrigin::root(),
|
||||
vec![(2, Perbill::from_percent(100))],
|
||||
None,
|
||||
None
|
||||
));
|
||||
|
||||
// offence is expected to be deferred to era 1 + 3 = 4
|
||||
assert_eq!(staking_classic::UnappliedSlashes::<rc::Runtime>::get(4).len(), 1);
|
||||
});
|
||||
|
||||
// nothing happened in ah-staking so far
|
||||
shared::in_ah(|| {
|
||||
// Ensure AH does not receive any
|
||||
// - offences
|
||||
// - session change reports.
|
||||
assert_eq!(shared::CounterRCAHNewOffence::get(), 0);
|
||||
assert_eq!(shared::CounterRCAHSessionReport::get(), 0);
|
||||
|
||||
assert_eq!(ah::mock::staking_events_since_last_call(), vec![]);
|
||||
});
|
||||
|
||||
// SCENE (2): AHM migration begins
|
||||
let mut pre_migration_block_number = 0;
|
||||
shared::in_rc(|| {
|
||||
rc::roll_next();
|
||||
|
||||
let pre_migration_era_points =
|
||||
staking_classic::ErasRewardPoints::<rc::Runtime>::get(1).total;
|
||||
|
||||
ah_client::Pallet::<rc::Runtime>::on_migration_start();
|
||||
assert_eq!(ah_client::Mode::<rc::Runtime>::get(), OperatingMode::Buffered);
|
||||
|
||||
// get current session
|
||||
let current_session = pezpallet_session::CurrentIndex::<rc::Runtime>::get();
|
||||
pre_migration_block_number = pezframe_system::Pallet::<rc::Runtime>::block_number();
|
||||
|
||||
// assume migration takes at least one era
|
||||
// go forward by more than `SessionsPerEra` sessions -- staking will not rotate a new
|
||||
// era.
|
||||
rc::roll_until_matches(
|
||||
|| {
|
||||
pezpallet_session::CurrentIndex::<rc::Runtime>::get() ==
|
||||
current_session + ah::SessionsPerEra::get() + 1
|
||||
},
|
||||
true,
|
||||
);
|
||||
let migration_start_block_number = pezframe_system::Pallet::<rc::Runtime>::block_number();
|
||||
|
||||
// ensure era is still 1 on RC.
|
||||
// (Session events are received by AHClient and never passed on to staking-classic once
|
||||
// migration starts)
|
||||
assert_eq!(staking_classic::ActiveEra::<rc::Runtime>::get().unwrap().index, 1);
|
||||
// no new era is planned
|
||||
assert_eq!(staking_classic::CurrentEra::<rc::Runtime>::get().unwrap(), 1);
|
||||
|
||||
// no new block author points accumulated
|
||||
assert_eq!(
|
||||
staking_classic::ErasRewardPoints::<rc::Runtime>::get(1).total,
|
||||
pre_migration_era_points
|
||||
);
|
||||
|
||||
// some validator points have been recorded in ah-client
|
||||
assert_eq!(
|
||||
ah_client::ValidatorPoints::<rc::Runtime>::iter().count(),
|
||||
1,
|
||||
"only 11 has authored blocks in rc"
|
||||
);
|
||||
assert_eq!(
|
||||
ah_client::ValidatorPoints::<rc::Runtime>::get(&11),
|
||||
(migration_start_block_number - pre_migration_block_number) as u32 *
|
||||
<<rc::Runtime as ah_client::Config>::PointsPerBlock as Get<u32>>::get()
|
||||
);
|
||||
|
||||
// Verify buffered mode doesn't send anything to AH
|
||||
let offence_counter_before = shared::CounterRCAHNewOffence::get();
|
||||
|
||||
// ---------- Offences in session 12 (6 total) ----------
|
||||
assert_eq!(pezpallet_session::CurrentIndex::<rc::Runtime>::get(), 12);
|
||||
|
||||
// 3 for validator 2
|
||||
assert_ok!(RootOffences::create_offence(
|
||||
rc::RuntimeOrigin::root(),
|
||||
vec![(2, Perbill::from_percent(50))],
|
||||
None,
|
||||
None,
|
||||
));
|
||||
assert_ok!(RootOffences::create_offence(
|
||||
rc::RuntimeOrigin::root(),
|
||||
vec![(2, Perbill::from_percent(100))],
|
||||
None,
|
||||
None,
|
||||
));
|
||||
assert_ok!(RootOffences::create_offence(
|
||||
rc::RuntimeOrigin::root(),
|
||||
vec![(2, Perbill::from_percent(25))],
|
||||
None,
|
||||
None,
|
||||
));
|
||||
|
||||
// 2 for validator 1
|
||||
assert_ok!(RootOffences::create_offence(
|
||||
rc::RuntimeOrigin::root(),
|
||||
vec![(1, Perbill::from_percent(75))],
|
||||
None,
|
||||
None,
|
||||
));
|
||||
assert_ok!(RootOffences::create_offence(
|
||||
rc::RuntimeOrigin::root(),
|
||||
vec![(1, Perbill::from_percent(60))],
|
||||
None,
|
||||
None,
|
||||
));
|
||||
|
||||
// one for validator 4
|
||||
assert_ok!(RootOffences::create_offence(
|
||||
rc::RuntimeOrigin::root(),
|
||||
vec![(5, Perbill::from_percent(55))],
|
||||
None,
|
||||
None,
|
||||
));
|
||||
|
||||
// Move to the next session to create offences in different sessions for batching test
|
||||
rc::roll_to_next_session(false);
|
||||
|
||||
// ---------- Offences in session 13 (4 total) ----------
|
||||
assert_eq!(pezpallet_session::CurrentIndex::<rc::Runtime>::get(), 13);
|
||||
|
||||
// 2 for validator 2
|
||||
assert_ok!(RootOffences::create_offence(
|
||||
rc::RuntimeOrigin::root(),
|
||||
vec![(2, Perbill::from_percent(90))],
|
||||
None,
|
||||
None,
|
||||
));
|
||||
assert_ok!(RootOffences::create_offence(
|
||||
rc::RuntimeOrigin::root(),
|
||||
vec![(2, Perbill::from_percent(80))],
|
||||
None,
|
||||
None,
|
||||
));
|
||||
// 1 for validator 1
|
||||
assert_ok!(RootOffences::create_offence(
|
||||
rc::RuntimeOrigin::root(),
|
||||
vec![(1, Perbill::from_percent(85))],
|
||||
None,
|
||||
None,
|
||||
));
|
||||
// 1 for validator 5
|
||||
assert_ok!(RootOffences::create_offence(
|
||||
rc::RuntimeOrigin::root(),
|
||||
vec![(5, Perbill::from_percent(45))],
|
||||
None,
|
||||
None,
|
||||
));
|
||||
|
||||
// Move to another session and create more offences
|
||||
rc::roll_to_next_session(false);
|
||||
|
||||
// ---------- Offences in session 14 (3 total) ----------
|
||||
assert_eq!(pezpallet_session::CurrentIndex::<rc::Runtime>::get(), 14);
|
||||
|
||||
// 1 for validator 2
|
||||
assert_ok!(RootOffences::create_offence(
|
||||
rc::RuntimeOrigin::root(),
|
||||
vec![(2, Perbill::from_percent(70))],
|
||||
None,
|
||||
None,
|
||||
));
|
||||
// 1 for validator 1
|
||||
assert_ok!(RootOffences::create_offence(
|
||||
rc::RuntimeOrigin::root(),
|
||||
vec![(1, Perbill::from_percent(65))],
|
||||
None,
|
||||
None,
|
||||
));
|
||||
// 1 for validator 5
|
||||
assert_ok!(RootOffences::create_offence(
|
||||
rc::RuntimeOrigin::root(),
|
||||
vec![(5, Perbill::from_percent(40))],
|
||||
None,
|
||||
None,
|
||||
));
|
||||
|
||||
// ---------- End of offences created so far (13 total) ----------
|
||||
|
||||
// Verify nothing was sent to AH in buffered mode
|
||||
assert_eq!(
|
||||
shared::CounterRCAHNewOffence::get(),
|
||||
offence_counter_before,
|
||||
"No offences should be sent to AH in buffered mode"
|
||||
);
|
||||
|
||||
// no new unapplied slashes are created in staking-classic (other than the previously
|
||||
// created).
|
||||
assert_eq!(staking_classic::UnappliedSlashes::<rc::Runtime>::get(4).len(), 1);
|
||||
|
||||
// we have stored a total of 13 offences, in 7 pages
|
||||
assert_eq!(OffenceSendQueue::<rc::Runtime>::count(), 13);
|
||||
assert_eq!(OffenceSendQueue::<rc::Runtime>::pages(), 7);
|
||||
});
|
||||
|
||||
// Ensure AH still does not receive any offence while migration is ongoing.
|
||||
shared::in_ah(|| {
|
||||
assert_eq!(shared::CounterRCAHNewOffence::get(), 0);
|
||||
assert_eq!(shared::CounterRCAHSessionReport::get(), 0);
|
||||
|
||||
assert_eq!(ah::mock::staking_events_since_last_call(), vec![]);
|
||||
});
|
||||
|
||||
// let's migrate state from RC::staking-classic to AH::staking-async
|
||||
shared::migrate_state();
|
||||
|
||||
// SCENE (3): AHM migration ends.
|
||||
shared::in_rc(|| {
|
||||
// Before migration ends, verify we have 9 buffered offences across multiple sessions
|
||||
assert_eq!(OffenceSendQueue::<rc::Runtime>::count(), 13);
|
||||
|
||||
ah_client::Pallet::<rc::Runtime>::on_migration_end();
|
||||
assert_eq!(ah_client::Mode::<rc::Runtime>::get(), OperatingMode::Active);
|
||||
|
||||
// `MaxOffenceBatchSize` is set to 2 in this test, so we will send over the 13 offences
|
||||
// in 7 next blocks.
|
||||
assert_eq!(crate::rc::MaxOffenceBatchSize::get(), 2);
|
||||
|
||||
// in the first block we process the half finished page.
|
||||
rc::roll_next();
|
||||
assert_eq!(OffenceSendQueue::<rc::Runtime>::count(), 12);
|
||||
assert_eq!(shared::CounterRCAHNewOffence::get(), 1);
|
||||
|
||||
// the rest are full pages of 2 offences each.
|
||||
rc::roll_next();
|
||||
assert_eq!(OffenceSendQueue::<rc::Runtime>::count(), 10);
|
||||
assert_eq!(shared::CounterRCAHNewOffence::get(), 3);
|
||||
rc::roll_next();
|
||||
assert_eq!(OffenceSendQueue::<rc::Runtime>::count(), 8);
|
||||
assert_eq!(shared::CounterRCAHNewOffence::get(), 5);
|
||||
rc::roll_next();
|
||||
assert_eq!(OffenceSendQueue::<rc::Runtime>::count(), 6);
|
||||
assert_eq!(shared::CounterRCAHNewOffence::get(), 7);
|
||||
rc::roll_next();
|
||||
assert_eq!(OffenceSendQueue::<rc::Runtime>::count(), 4);
|
||||
assert_eq!(shared::CounterRCAHNewOffence::get(), 9);
|
||||
rc::roll_next();
|
||||
assert_eq!(OffenceSendQueue::<rc::Runtime>::count(), 2);
|
||||
assert_eq!(shared::CounterRCAHNewOffence::get(), 11);
|
||||
rc::roll_next();
|
||||
assert_eq!(OffenceSendQueue::<rc::Runtime>::count(), 0);
|
||||
assert_eq!(shared::CounterRCAHNewOffence::get(), 13);
|
||||
});
|
||||
|
||||
let mut post_migration_era_reward_points = 0;
|
||||
shared::in_ah(|| {
|
||||
// all offences are received by rc-client. The count of these events are not 13, because
|
||||
// in each batch we group offenders by session. Note that the sum of offenders count is
|
||||
// indeed 13.
|
||||
assert_eq!(
|
||||
rc_client_events_since_last_call(),
|
||||
vec![
|
||||
rc_client::Event::OffenceReceived { slash_session: 14, offences_count: 1 },
|
||||
rc_client::Event::OffenceReceived { slash_session: 14, offences_count: 2 },
|
||||
rc_client::Event::OffenceReceived { slash_session: 13, offences_count: 2 },
|
||||
rc_client::Event::OffenceReceived { slash_session: 13, offences_count: 2 },
|
||||
rc_client::Event::OffenceReceived { slash_session: 12, offences_count: 2 },
|
||||
rc_client::Event::OffenceReceived { slash_session: 12, offences_count: 2 },
|
||||
rc_client::Event::OffenceReceived { slash_session: 12, offences_count: 2 }
|
||||
]
|
||||
);
|
||||
|
||||
post_migration_era_reward_points =
|
||||
pezpallet_staking_async::ErasRewardPoints::<ah::Runtime>::get(1).total;
|
||||
// staking async has always been in NotForcing, not doing anything since no session
|
||||
// reports come in
|
||||
assert_eq!(pezpallet_staking_async::ForceEra::<ah::Runtime>::get(), Forcing::NotForcing);
|
||||
|
||||
// Verify all offences were properly queued in staking-async.
|
||||
// Should have offences for validators 1, 2, and 5 from different sessions (all map to
|
||||
// era 1)
|
||||
assert!(pezpallet_staking_async::OffenceQueue::<ah::Runtime>::get(1, 1).is_some());
|
||||
assert!(pezpallet_staking_async::OffenceQueue::<ah::Runtime>::get(1, 2).is_some());
|
||||
assert!(pezpallet_staking_async::OffenceQueue::<ah::Runtime>::get(1, 5).is_some());
|
||||
|
||||
// Verify specific OffenceRecord structure for all three validators
|
||||
let offence_record_v1 =
|
||||
pezpallet_staking_async::OffenceQueue::<ah::Runtime>::get(1, 1).unwrap();
|
||||
assert_eq!(
|
||||
offence_record_v1,
|
||||
pezpallet_staking_async::slashing::OffenceRecord {
|
||||
reporter: None,
|
||||
reported_era: 1,
|
||||
exposure_page: 0,
|
||||
slash_fraction: Perbill::from_percent(85), /* Should be the highest slash
|
||||
* fraction for validator 1 */
|
||||
prior_slash_fraction: Perbill::from_percent(0),
|
||||
}
|
||||
);
|
||||
|
||||
let offence_record_v2 =
|
||||
pezpallet_staking_async::OffenceQueue::<ah::Runtime>::get(1, 2).unwrap();
|
||||
assert_eq!(
|
||||
offence_record_v2,
|
||||
pezpallet_staking_async::slashing::OffenceRecord {
|
||||
reporter: None,
|
||||
reported_era: 1,
|
||||
exposure_page: 0,
|
||||
slash_fraction: Perbill::from_percent(100), /* Should be the highest slash
|
||||
* fraction for validator 2 */
|
||||
prior_slash_fraction: Perbill::from_percent(0),
|
||||
}
|
||||
);
|
||||
|
||||
let offence_record_v5 =
|
||||
pezpallet_staking_async::OffenceQueue::<ah::Runtime>::get(1, 5).unwrap();
|
||||
assert_eq!(
|
||||
offence_record_v5,
|
||||
pezpallet_staking_async::slashing::OffenceRecord {
|
||||
reporter: None,
|
||||
reported_era: 1,
|
||||
exposure_page: 0,
|
||||
slash_fraction: Perbill::from_percent(55), /* Should be the highest slash
|
||||
* fraction for validator 5 */
|
||||
prior_slash_fraction: Perbill::from_percent(0),
|
||||
}
|
||||
);
|
||||
|
||||
// NOTE:
|
||||
// - We sent 13 total offences across 3 sessions and 7 messages (3 offences per session)
|
||||
// - Each session's offences trigger OffenceReported events when received
|
||||
// - But only the highest slash fraction per validator per era gets queued for
|
||||
// processing
|
||||
// - So we see 13 OffenceReported events but only 3 offences in the processing queue
|
||||
// - The queue processing happens one offence per block in staking-async pallet.
|
||||
|
||||
// Process all queued offences (one offence per block)
|
||||
// We have 3 offences queued (one per validator), so we need to roll 3 times
|
||||
for _ in 0..3 {
|
||||
ah::roll_next();
|
||||
}
|
||||
|
||||
// Check that offences were processed for multiple validators
|
||||
let staking_events = ah::mock::staking_events_since_last_call();
|
||||
|
||||
// Verify that OffenceReported events were emitted for all validators
|
||||
let offence_reported_events: Vec<_> = staking_events
|
||||
.iter()
|
||||
.filter_map(|event| {
|
||||
if let pezpallet_staking_async::Event::OffenceReported {
|
||||
offence_era,
|
||||
validator,
|
||||
fraction,
|
||||
} = event
|
||||
{
|
||||
Some((offence_era, validator, fraction))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
|
||||
// Verify all OffenceReported events
|
||||
assert_eq!(
|
||||
offence_reported_events,
|
||||
vec![
|
||||
// 13 offences total, no deduplication here.
|
||||
(&1, &5, &Perbill::from_percent(40)),
|
||||
(&1, &2, &Perbill::from_percent(70)),
|
||||
(&1, &1, &Perbill::from_percent(65)),
|
||||
(&1, &1, &Perbill::from_percent(85)),
|
||||
(&1, &5, &Perbill::from_percent(45)),
|
||||
(&1, &2, &Perbill::from_percent(90)),
|
||||
(&1, &2, &Perbill::from_percent(80)),
|
||||
(&1, &1, &Perbill::from_percent(60)),
|
||||
(&1, &5, &Perbill::from_percent(55)),
|
||||
(&1, &2, &Perbill::from_percent(25)),
|
||||
(&1, &1, &Perbill::from_percent(75)),
|
||||
(&1, &2, &Perbill::from_percent(50)),
|
||||
(&1, &2, &Perbill::from_percent(100))
|
||||
]
|
||||
);
|
||||
|
||||
// Verify that SlashComputed events were emitted for all three validators
|
||||
let slash_computed_events: Vec<_> = staking_events
|
||||
.iter()
|
||||
.filter_map(|event| {
|
||||
if let pezpallet_staking_async::Event::SlashComputed {
|
||||
offence_era,
|
||||
slash_era,
|
||||
offender,
|
||||
page,
|
||||
} = event
|
||||
{
|
||||
Some((offence_era, slash_era, offender, page))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
|
||||
// Should have SlashComputed events for all three validators. Here we deduplicate for
|
||||
// maximum per session. Note: OffenceQueue uses StorageDoubleMap with Twox64Concat
|
||||
// hasher, so iteration order depends on hash(validator_id).
|
||||
assert_eq!(
|
||||
slash_computed_events,
|
||||
vec![
|
||||
(&1, &3, &5, &0), /* validator 5: offence_era=1, slash_era=3, offender=5,
|
||||
* page=0 */
|
||||
(&1, &3, &1, &0), /* validator 1: offence_era=1, slash_era=3, offender=1,
|
||||
* page=0 */
|
||||
(&1, &3, &2, &0), /* validator 2: offence_era=1, slash_era=3, offender=2,
|
||||
* page=0 */
|
||||
]
|
||||
);
|
||||
|
||||
// Verify that all offences have been processed (no longer in queue)
|
||||
assert!(
|
||||
!pezpallet_staking_async::OffenceQueue::<ah::Runtime>::contains_key(1, 1),
|
||||
"Expected no remaining offences for validator 1"
|
||||
);
|
||||
assert!(
|
||||
!pezpallet_staking_async::OffenceQueue::<ah::Runtime>::contains_key(1, 2),
|
||||
"Expected no remaining offences for validator 2"
|
||||
);
|
||||
assert!(
|
||||
!pezpallet_staking_async::OffenceQueue::<ah::Runtime>::contains_key(1, 5),
|
||||
"Expected no remaining offences for validator 5"
|
||||
);
|
||||
// offence is deferred by two eras, ie 1 + 2 = 3. Note that this is one era less than
|
||||
// staking-classic since slashing happens in multi-block, and we want to apply all
|
||||
// slashes before the era 4 starts.
|
||||
// Check if at least one of the validators has an unapplied slash
|
||||
// Check for unapplied slashes for all validators with any of the slash fractions
|
||||
|
||||
// Check validator 2 slashes
|
||||
let slash_v2_100_present = pezpallet_staking_async::UnappliedSlashes::<ah::Runtime>::get(
|
||||
3,
|
||||
(2, Perbill::from_percent(100), 0),
|
||||
)
|
||||
.is_some();
|
||||
let slash_v2_90_present = pezpallet_staking_async::UnappliedSlashes::<ah::Runtime>::get(
|
||||
3,
|
||||
(2, Perbill::from_percent(90), 0),
|
||||
)
|
||||
.is_some();
|
||||
let slash_v2_70_present = pezpallet_staking_async::UnappliedSlashes::<ah::Runtime>::get(
|
||||
3,
|
||||
(2, Perbill::from_percent(70), 0),
|
||||
)
|
||||
.is_some();
|
||||
|
||||
let total_slashes_v2 =
|
||||
slash_v2_100_present as u8 + slash_v2_90_present as u8 + slash_v2_70_present as u8;
|
||||
assert_eq!(
|
||||
total_slashes_v2, 1,
|
||||
"Expected exactly 1 unapplied slash for validator 2, got {} (100%:{}, 90%:{}, 70%:{})",
|
||||
total_slashes_v2, slash_v2_100_present, slash_v2_90_present, slash_v2_70_present
|
||||
);
|
||||
|
||||
// Check validator 1 slashes
|
||||
let slash_v1_75_present = pezpallet_staking_async::UnappliedSlashes::<ah::Runtime>::get(
|
||||
3,
|
||||
(1, Perbill::from_percent(75), 0),
|
||||
)
|
||||
.is_some();
|
||||
let slash_v1_85_present = pezpallet_staking_async::UnappliedSlashes::<ah::Runtime>::get(
|
||||
3,
|
||||
(1, Perbill::from_percent(85), 0),
|
||||
)
|
||||
.is_some();
|
||||
let slash_v1_65_present = pezpallet_staking_async::UnappliedSlashes::<ah::Runtime>::get(
|
||||
3,
|
||||
(1, Perbill::from_percent(65), 0),
|
||||
)
|
||||
.is_some();
|
||||
|
||||
let total_slashes_v1 =
|
||||
slash_v1_75_present as u8 + slash_v1_85_present as u8 + slash_v1_65_present as u8;
|
||||
assert_eq!(
|
||||
total_slashes_v1, 1,
|
||||
"Expected exactly 1 unapplied slash for validator 1, got {} (75%:{}, 85%:{}, 65%:{})",
|
||||
total_slashes_v1, slash_v1_75_present, slash_v1_85_present, slash_v1_65_present
|
||||
);
|
||||
|
||||
// Check validator 5 slashes
|
||||
let slash_v5_55_present = pezpallet_staking_async::UnappliedSlashes::<ah::Runtime>::get(
|
||||
3,
|
||||
(5, Perbill::from_percent(55), 0),
|
||||
)
|
||||
.is_some();
|
||||
let slash_v5_45_present = pezpallet_staking_async::UnappliedSlashes::<ah::Runtime>::get(
|
||||
3,
|
||||
(5, Perbill::from_percent(45), 0),
|
||||
)
|
||||
.is_some();
|
||||
let slash_v5_40_present = pezpallet_staking_async::UnappliedSlashes::<ah::Runtime>::get(
|
||||
3,
|
||||
(5, Perbill::from_percent(40), 0),
|
||||
)
|
||||
.is_some();
|
||||
|
||||
let total_slashes_v5 =
|
||||
slash_v5_55_present as u8 + slash_v5_45_present as u8 + slash_v5_40_present as u8;
|
||||
assert_eq!(
|
||||
total_slashes_v5, 1,
|
||||
"Expected exactly 1 unapplied slash for validator 5, got {} (55%:{}, 45%:{}, 40%:{})",
|
||||
total_slashes_v5, slash_v5_55_present, slash_v5_45_present, slash_v5_40_present
|
||||
);
|
||||
});
|
||||
|
||||
// NOW: lets verify we kick off the election at the appropriate time
|
||||
shared::in_ah(|| {
|
||||
// roll another block just to strongly prove election is not kicked off at the end of
|
||||
// migration.
|
||||
ah::roll_next();
|
||||
|
||||
// ensure no election is kicked off yet
|
||||
// (when election is kicked off, current_era = active_era + 1)
|
||||
assert_eq!(pezpallet_staking_async::CurrentEra::<ah::Runtime>::get(), Some(1));
|
||||
assert_eq!(pezpallet_staking_async::ActiveEra::<ah::Runtime>::get().unwrap().index, 1);
|
||||
// also no session report is sent to AH yet.
|
||||
assert_eq!(shared::CounterRCAHSessionReport::get(), 0);
|
||||
});
|
||||
|
||||
// It was more than 6 sessions since the last election, on RC, so an election is already
|
||||
// overdue. The next session change should trigger an election.
|
||||
|
||||
let mut post_migration_session_block_number = 0;
|
||||
shared::in_rc(|| {
|
||||
rc::roll_to_next_session(true);
|
||||
post_migration_session_block_number =
|
||||
pezframe_system::Pallet::<rc::Runtime>::block_number();
|
||||
|
||||
// all the buffered validators points are flushed
|
||||
assert_eq!(ah_client::ValidatorPoints::<rc::Runtime>::iter().count(), 0,);
|
||||
});
|
||||
|
||||
// AH receives the session report.
|
||||
assert_eq!(shared::CounterRCAHSessionReport::get(), 1);
|
||||
shared::in_ah(|| {
|
||||
assert_eq!(pezpallet_staking_async::ActiveEra::<ah::Runtime>::get().unwrap().index, 1);
|
||||
assert_eq!(pezpallet_staking_async::CurrentEra::<ah::Runtime>::get(), Some(1 + 1));
|
||||
|
||||
// by now one session report should have been received in staking
|
||||
assert_eq!(
|
||||
ah::rc_client_events_since_last_call(),
|
||||
vec![rc_client::Event::SessionReportReceived {
|
||||
end_index: 14,
|
||||
activation_timestamp: None,
|
||||
validator_points_counts: 1,
|
||||
leftover: false
|
||||
}]
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
staking_events_since_last_call(),
|
||||
vec![pezpallet_staking_async::Event::SessionRotated {
|
||||
starting_session: 15,
|
||||
active_era: 1,
|
||||
planned_era: 2
|
||||
}]
|
||||
);
|
||||
|
||||
// all expected era reward points are here
|
||||
assert_eq!(
|
||||
pezpallet_staking_async::ErasRewardPoints::<ah::Runtime>::get(1).total,
|
||||
((post_migration_session_block_number - pre_migration_block_number) * 20) as u32 +
|
||||
// --- ^^ these were buffered in ah-client
|
||||
post_migration_era_reward_points // --- ^^ these were migrated as part of AHM
|
||||
);
|
||||
|
||||
// ensure new validator is sent once election is complete.
|
||||
ah::roll_until_matches(|| shared::CounterAHRCValidatorSet::get() == 1, true);
|
||||
|
||||
assert_eq!(
|
||||
ah::staking_events_since_last_call(),
|
||||
vec![
|
||||
pezpallet_staking_async::Event::PagedElectionProceeded { page: 2, result: Ok(4) },
|
||||
pezpallet_staking_async::Event::PagedElectionProceeded { page: 1, result: Ok(0) },
|
||||
pezpallet_staking_async::Event::PagedElectionProceeded { page: 0, result: Ok(0) }
|
||||
]
|
||||
);
|
||||
});
|
||||
|
||||
shared::in_rc(|| {
|
||||
assert_eq!(
|
||||
rc::ah_client_events_since_last_call(),
|
||||
vec![ah_client::Event::ValidatorSetReceived {
|
||||
id: 2,
|
||||
new_validator_set_count: 4,
|
||||
prune_up_to: None,
|
||||
leftover: false
|
||||
}]
|
||||
);
|
||||
|
||||
let (planned_era, next_validator_set) =
|
||||
ah_client::ValidatorSet::<rc::Runtime>::get().unwrap();
|
||||
|
||||
assert_eq!(planned_era, 2);
|
||||
assert!(next_validator_set.len() >= rc::MinimumValidatorSetSize::get() as usize);
|
||||
});
|
||||
|
||||
shared::in_ah(|| {
|
||||
assert_eq!(pezpallet_staking_async::ActiveEra::<ah::Runtime>::get().unwrap().index, 1);
|
||||
// at next session, the validator set is queued but not applied yet.
|
||||
ah::roll_until_matches(|| shared::CounterRCAHSessionReport::get() == 2, true);
|
||||
// active era is still 1.
|
||||
assert_eq!(pezpallet_staking_async::ActiveEra::<ah::Runtime>::get().unwrap().index, 1);
|
||||
// the following session, the validator set is applied.
|
||||
ah::roll_until_matches(|| shared::CounterRCAHSessionReport::get() == 3, true);
|
||||
assert_eq!(pezpallet_staking_async::ActiveEra::<ah::Runtime>::get().unwrap().index, 2);
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn election_result_on_ah_reported_to_rc() {
|
||||
// when election result is complete
|
||||
// staking stores all exposures
|
||||
// validators reported to rc
|
||||
// validators enacted for next session
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn rc_continues_with_same_validators_if_ah_is_late() {
|
||||
// A test where ah is late to give us election result.
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn authoring_points_reported_to_ah_per_session() {}
|
||||
|
||||
#[test]
|
||||
fn rc_is_late_to_report_session_change() {}
|
||||
|
||||
#[test]
|
||||
fn pruning_is_at_least_bonding_duration() {}
|
||||
|
||||
#[test]
|
||||
fn ah_eras_are_delayed() {
|
||||
// rc will trigger new sessions,
|
||||
// ah cannot start a new era (election fail)
|
||||
// we don't prune anything, because era should not be increased.
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn ah_knows_good_era_duration() {
|
||||
// era duration and rewards work.
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn election_provider_fails_to_start() {
|
||||
// call to ElectionProvider::start fails because it is already ongoing. What do we do?
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn overlapping_election_wont_happen() {
|
||||
// while one election is ongoing, enough sessions pass that we think we should plan yet
|
||||
// another era.
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn session_report_burst() {
|
||||
// AH is offline for a while, and it suddenly receives 3 eras worth of session reports. What
|
||||
// do we do?
|
||||
}
|
||||
|
||||
mod message_queue_sizes {
|
||||
use super::*;
|
||||
use pezsp_core::crypto::AccountId32;
|
||||
|
||||
#[test]
|
||||
fn normal_session_report() {
|
||||
assert_eq!(
|
||||
rc_client::SessionReport::<AccountId32> {
|
||||
end_index: 0,
|
||||
activation_timestamp: Some((0, 0)),
|
||||
leftover: false,
|
||||
validator_points: (0..1000)
|
||||
.map(|i| (AccountId32::from([i as u8; 32]), 1000))
|
||||
.collect(),
|
||||
}
|
||||
.encoded_size(),
|
||||
36_020
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn normal_validator_set() {
|
||||
assert_eq!(
|
||||
rc_client::ValidatorSetReport::<AccountId32> {
|
||||
id: 42,
|
||||
leftover: false,
|
||||
new_validator_set: (0..1000)
|
||||
.map(|i| AccountId32::from([i as u8; 32]))
|
||||
.collect(),
|
||||
prune_up_to: Some(69),
|
||||
}
|
||||
.encoded_size(),
|
||||
32_012
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn offence() {
|
||||
// when one validator had an offence
|
||||
let offences = (0..1)
|
||||
.map(|i| rc_client::Offence::<AccountId32> {
|
||||
offender: AccountId32::from([i as u8; 32]),
|
||||
reporters: vec![AccountId32::from([42; 32])],
|
||||
slash_fraction: Perbill::from_percent(50),
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
// offence + session-index
|
||||
let encoded_size = offences.encoded_size() + 42u32.encoded_size();
|
||||
assert_eq!(encoded_size, 74);
|
||||
}
|
||||
|
||||
// Kusama has the same configurations as of now.
|
||||
const PEZKUWI_MAX_DOWNWARD_MESSAGE_SIZE: u32 = 51200; // 50 Kib
|
||||
const PEZKUWI_MAX_UPWARD_MESSAGE_SIZE: u32 = 65531; // 64 Kib
|
||||
|
||||
#[test]
|
||||
fn maximum_session_report() {
|
||||
let mut num_validator_points = 1;
|
||||
loop {
|
||||
let session_report = rc_client::SessionReport::<AccountId32> {
|
||||
end_index: 0,
|
||||
activation_timestamp: Some((0, 0)),
|
||||
leftover: false,
|
||||
validator_points: (0..num_validator_points)
|
||||
.map(|i| (AccountId32::from([i as u8; 32]), 1000))
|
||||
.collect(),
|
||||
};
|
||||
|
||||
// Note: the real encoded size of the message will be a few bytes more, due to call
|
||||
// indices and XCM instructions, but not significant.
|
||||
let encoded_size = session_report.encoded_size() as u32;
|
||||
|
||||
if encoded_size > PEZKUWI_MAX_DOWNWARD_MESSAGE_SIZE {
|
||||
println!(
|
||||
"SessionReport: num_validator_points: {}, encoded len: {}, max: {:?}, largest session report: {}",
|
||||
num_validator_points, encoded_size, PEZKUWI_MAX_DOWNWARD_MESSAGE_SIZE, num_validator_points - 1
|
||||
);
|
||||
break;
|
||||
}
|
||||
num_validator_points += 1;
|
||||
}
|
||||
|
||||
// We can send up to 1422 32-octet validators + u32 points in a single message. This
|
||||
// should inform the configuration `MaximumValidatorsWithPoints`.
|
||||
assert_eq!(num_validator_points, 1422);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn maximum_validator_set() {
|
||||
let mut num_validators = 1;
|
||||
loop {
|
||||
let validator_set_report = rc_client::ValidatorSetReport::<AccountId32> {
|
||||
id: 42,
|
||||
leftover: false,
|
||||
new_validator_set: (0..num_validators)
|
||||
.map(|i| AccountId32::from([i as u8; 32]))
|
||||
.collect(),
|
||||
prune_up_to: Some(69),
|
||||
};
|
||||
|
||||
// Note: the real encoded size of the message will be a few bytes more, due to call
|
||||
// indices and XCM instructions, but not significant.
|
||||
let encoded_size = validator_set_report.encoded_size() as u32;
|
||||
if encoded_size > PEZKUWI_MAX_DOWNWARD_MESSAGE_SIZE {
|
||||
println!(
|
||||
"ValidatorSetReport: num_validators: {}, encoded len: {}, max: {:?}, largest validator set: {}",
|
||||
num_validators, encoded_size, PEZKUWI_MAX_DOWNWARD_MESSAGE_SIZE, num_validators - 1
|
||||
);
|
||||
break;
|
||||
}
|
||||
num_validators += 1;
|
||||
}
|
||||
|
||||
// We can send up to 1599 32-octet validator keys (+ other small metadata) in a single
|
||||
// validator set report.
|
||||
assert_eq!(num_validators, 1600);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn maximum_offence_batched() {
|
||||
let mut num_offences = 1;
|
||||
let session_index: u32 = 42;
|
||||
loop {
|
||||
let offences = (0..num_offences)
|
||||
.map(|i| {
|
||||
(
|
||||
session_index,
|
||||
rc_client::Offence::<AccountId32> {
|
||||
offender: AccountId32::from([i as u8; 32]),
|
||||
reporters: vec![AccountId32::from([42; 32])],
|
||||
slash_fraction: Perbill::from_percent(50),
|
||||
},
|
||||
)
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
let encoded_size = offences.encoded_size();
|
||||
|
||||
if encoded_size as u32 > PEZKUWI_MAX_UPWARD_MESSAGE_SIZE {
|
||||
println!(
|
||||
"Offence (batched): num_offences: {}, encoded len: {}, max: {:?}, largest offence batch: {}",
|
||||
num_offences, encoded_size, PEZKUWI_MAX_UPWARD_MESSAGE_SIZE, num_offences - 1
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
num_offences += 1;
|
||||
}
|
||||
|
||||
// expectedly, this is a bit less than `offence_legacy` since we encode the session
|
||||
// index over and over again.
|
||||
assert_eq!(num_offences, 898);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,591 @@
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use crate::shared;
|
||||
use ah_client::OperatingMode;
|
||||
use frame::{
|
||||
deps::pezsp_runtime::testing::UintAuthorityId, testing_prelude::*, traits::fungible::Mutate,
|
||||
};
|
||||
use pezframe_election_provider_support::{
|
||||
bounds::{ElectionBounds, ElectionBoundsBuilder},
|
||||
onchain, SequentialPhragmen,
|
||||
};
|
||||
use pezframe_support::traits::FindAuthor;
|
||||
use pezpallet_staking_async_ah_client as ah_client;
|
||||
use pezpallet_staking_async_rc_client::{self as rc_client, ValidatorSetReport};
|
||||
use pezsp_staking::SessionIndex;
|
||||
|
||||
pub type T = Runtime;
|
||||
|
||||
construct_runtime! {
|
||||
pub enum Runtime {
|
||||
System: pezframe_system,
|
||||
Authorship: pezpallet_authorship,
|
||||
Balances: pezpallet_balances,
|
||||
Timestamp: pezpallet_timestamp,
|
||||
|
||||
Session: pezpallet_session,
|
||||
SessionHistorical: pezpallet_session::historical,
|
||||
Staking: pezpallet_staking,
|
||||
// NOTE: the session report is given by pezpallet-session to ah-client on-init, and ah-client
|
||||
// will not send it immediately, but rather store it and sends it over on its own next
|
||||
// on-init call. Yet, because session comes first here, its on-init is called before
|
||||
// ah-client, so under normal conditions, the message is sent immediately.
|
||||
StakingAhClient: pezpallet_staking_async_ah_client,
|
||||
RootOffences: pezpallet_root_offences,
|
||||
Offences: pezpallet_offences,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn roll_next() {
|
||||
let now = System::block_number();
|
||||
let next = now + 1;
|
||||
|
||||
System::set_block_number(next);
|
||||
// Timestamp is always the RC block number * 1000
|
||||
Timestamp::set_timestamp(next * 1000);
|
||||
Authorship::on_initialize(next);
|
||||
|
||||
Session::on_initialize(next);
|
||||
StakingAhClient::on_initialize(next);
|
||||
Staking::on_initialize(next);
|
||||
Staking::on_finalize(next);
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
/// The maximum number of blocks to roll before we stop rolling.
|
||||
///
|
||||
/// Avoids infinite loops in tests.
|
||||
pub static MaxRollsUntilCriteria: u16 = 1000;
|
||||
}
|
||||
|
||||
pub fn roll_until_matches(criteria: impl Fn() -> bool, with_ah: bool) {
|
||||
let mut rolls = 0;
|
||||
while !criteria() {
|
||||
roll_next();
|
||||
rolls += 1;
|
||||
if with_ah {
|
||||
if LocalQueue::get().is_some() {
|
||||
panic!("when local queue is set, you cannot roll ah forward as well!")
|
||||
}
|
||||
shared::in_ah(|| {
|
||||
crate::ah::roll_next();
|
||||
});
|
||||
}
|
||||
|
||||
if rolls > MaxRollsUntilCriteria::get() {
|
||||
panic!("rolled too many times");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn roll_to_next_session(with_ah: bool) {
|
||||
let current_session = pezpallet_session::CurrentIndex::<Runtime>::get();
|
||||
roll_until_matches(
|
||||
|| pezpallet_session::CurrentIndex::<Runtime>::get() == current_session + 1,
|
||||
with_ah,
|
||||
);
|
||||
}
|
||||
|
||||
pub type AccountId = <Runtime as pezframe_system::Config>::AccountId;
|
||||
pub type Balance = <Runtime as pezpallet_balances::Config>::Balance;
|
||||
pub type Hash = <Runtime as pezframe_system::Config>::Hash;
|
||||
pub type BlockNumber = BlockNumberFor<Runtime>;
|
||||
|
||||
#[derive_impl(pezframe_system::config_preludes::TestDefaultConfig)]
|
||||
impl pezframe_system::Config for Runtime {
|
||||
type Block = MockBlock<Self>;
|
||||
type AccountData = pezpallet_balances::AccountData<u128>;
|
||||
}
|
||||
|
||||
#[derive_impl(pezpallet_balances::config_preludes::TestDefaultConfig)]
|
||||
impl pezpallet_balances::Config for Runtime {
|
||||
type Balance = u128;
|
||||
type AccountStore = System;
|
||||
}
|
||||
|
||||
impl pezpallet_timestamp::Config for Runtime {
|
||||
type Moment = u64;
|
||||
type OnTimestampSet = ();
|
||||
type MinimumPeriod = ConstU64<3>;
|
||||
type WeightInfo = ();
|
||||
}
|
||||
|
||||
pub struct ValidatorIdOf;
|
||||
impl Convert<AccountId, Option<AccountId>> for ValidatorIdOf {
|
||||
fn convert(a: AccountId) -> Option<AccountId> {
|
||||
Some(a)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct OtherSessionHandler;
|
||||
impl OneSessionHandler<AccountId> for OtherSessionHandler {
|
||||
type Key = UintAuthorityId;
|
||||
|
||||
fn on_genesis_session<'a, I: 'a>(_: I)
|
||||
where
|
||||
I: Iterator<Item = (&'a AccountId, Self::Key)>,
|
||||
AccountId: 'a,
|
||||
{
|
||||
}
|
||||
|
||||
fn on_new_session<'a, I: 'a>(_: bool, _: I, _: I)
|
||||
where
|
||||
I: Iterator<Item = (&'a AccountId, Self::Key)>,
|
||||
AccountId: 'a,
|
||||
{
|
||||
}
|
||||
|
||||
fn on_disabled(_validator_index: u32) {}
|
||||
}
|
||||
|
||||
impl BoundToRuntimeAppPublic for OtherSessionHandler {
|
||||
type Public = UintAuthorityId;
|
||||
}
|
||||
|
||||
frame::deps::pezsp_runtime::impl_opaque_keys! {
|
||||
pub struct SessionKeys {
|
||||
pub other: OtherSessionHandler,
|
||||
}
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub static Period: BlockNumber = 30;
|
||||
pub static Offset: BlockNumber = 0;
|
||||
}
|
||||
|
||||
impl pezpallet_session::historical::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type FullIdentification = pezsp_staking::Exposure<AccountId, Balance>;
|
||||
type FullIdentificationOf = ah_client::DefaultExposureOf<Self>;
|
||||
}
|
||||
|
||||
impl pezpallet_session::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
|
||||
type ValidatorIdOf = ValidatorIdOf;
|
||||
type ValidatorId = AccountId;
|
||||
|
||||
type DisablingStrategy = pezpallet_session::disabling::UpToLimitDisablingStrategy<1>;
|
||||
|
||||
type Keys = SessionKeys;
|
||||
type SessionHandler = <SessionKeys as frame::traits::OpaqueKeys>::KeyTypeIdProviders;
|
||||
|
||||
type NextSessionRotation = Self::ShouldEndSession;
|
||||
type ShouldEndSession = pezpallet_session::PeriodicSessions<Period, Offset>;
|
||||
|
||||
// Should be AH-client
|
||||
type SessionManager = pezpallet_session::historical::NoteHistoricalRoot<Self, StakingAhClient>;
|
||||
|
||||
type WeightInfo = ();
|
||||
type Currency = Balances;
|
||||
type KeyDeposit = ();
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub static DefaultAuthor: Option<AccountId> = Some(11);
|
||||
}
|
||||
|
||||
pub struct GetAuthor;
|
||||
impl FindAuthor<AccountId> for GetAuthor {
|
||||
fn find_author<'a, I>(_digests: I) -> Option<AccountId>
|
||||
where
|
||||
I: 'a + IntoIterator<Item = (pezframe_support::ConsensusEngineId, &'a [u8])>,
|
||||
{
|
||||
DefaultAuthor::get()
|
||||
}
|
||||
}
|
||||
|
||||
impl pezpallet_authorship::Config for Runtime {
|
||||
type FindAuthor = GetAuthor;
|
||||
type EventHandler = StakingAhClient;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub static MaxBackersPerWinner: u32 = 256;
|
||||
pub static MaxWinnersPerPage: u32 = 100;
|
||||
pub static ElectionsBounds: ElectionBounds = ElectionBoundsBuilder::default().build();
|
||||
}
|
||||
pub struct OnChainSeqPhragmen;
|
||||
impl onchain::Config for OnChainSeqPhragmen {
|
||||
type System = Runtime;
|
||||
type Solver = SequentialPhragmen<AccountId, Perbill>;
|
||||
type DataProvider = Staking;
|
||||
type WeightInfo = ();
|
||||
type MaxBackersPerWinner = MaxBackersPerWinner;
|
||||
type MaxWinnersPerPage = MaxWinnersPerPage;
|
||||
type Bounds = ElectionsBounds;
|
||||
type Sort = ConstBool<true>;
|
||||
}
|
||||
|
||||
#[derive_impl(pezpallet_staking::config_preludes::TestDefaultConfig)]
|
||||
impl pezpallet_staking::Config for Runtime {
|
||||
type OldCurrency = Balances;
|
||||
type Currency = Balances;
|
||||
type UnixTime = pezpallet_timestamp::Pallet<Self>;
|
||||
type AdminOrigin = pezframe_system::EnsureRoot<Self::AccountId>;
|
||||
type EraPayout = ();
|
||||
type ElectionProvider = onchain::OnChainExecution<OnChainSeqPhragmen>;
|
||||
type GenesisElectionProvider = Self::ElectionProvider;
|
||||
type VoterList = pezpallet_staking::UseNominatorsAndValidatorsMap<Self>;
|
||||
type TargetList = pezpallet_staking::UseValidatorsMap<Self>;
|
||||
type BenchmarkingConfig = pezpallet_staking::TestBenchmarkingConfig;
|
||||
type SlashDeferDuration = ConstU32<2>;
|
||||
type SessionInterface = Self;
|
||||
type BondingDuration = ConstU32<3>;
|
||||
}
|
||||
|
||||
impl pezpallet_offences::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type IdentificationTuple = pezpallet_session::historical::IdentificationTuple<Self>;
|
||||
type OnOffenceHandler = StakingAhClient;
|
||||
}
|
||||
|
||||
impl pezpallet_root_offences::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type OffenceHandler = StakingAhClient;
|
||||
type ReportOffence = Offences;
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub enum OutgoingMessages {
|
||||
SessionReport(rc_client::SessionReport<AccountId>),
|
||||
OffenceReportPaged(Vec<(SessionIndex, rc_client::Offence<AccountId>)>),
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub static MinimumValidatorSetSize: u32 = 4;
|
||||
pub static MaximumValidatorsWithPoints: u32 = 32;
|
||||
pub static MaxOffenceBatchSize: u32 = 50;
|
||||
pub static LocalQueue: Option<Vec<(BlockNumber, OutgoingMessages)>> = None;
|
||||
pub static LocalQueueLastIndex: usize = 0;
|
||||
}
|
||||
|
||||
impl LocalQueue {
|
||||
pub fn get_since_last_call() -> Vec<(BlockNumber, OutgoingMessages)> {
|
||||
if let Some(all) = Self::get() {
|
||||
let last = LocalQueueLastIndex::get();
|
||||
LocalQueueLastIndex::set(all.len());
|
||||
all.into_iter().skip(last).collect()
|
||||
} else {
|
||||
panic!("Must set local_queue()!")
|
||||
}
|
||||
}
|
||||
|
||||
pub fn flush() {
|
||||
let _ = Self::get_since_last_call();
|
||||
}
|
||||
}
|
||||
|
||||
impl ah_client::Config for Runtime {
|
||||
type CurrencyBalance = Balance;
|
||||
type AdminOrigin = EnsureRoot<AccountId>;
|
||||
type SendToAssetHub = DeliverToAH;
|
||||
type AssetHubOrigin = EnsureSigned<AccountId>;
|
||||
type UnixTime = Timestamp;
|
||||
type MinimumValidatorSetSize = MinimumValidatorSetSize;
|
||||
type MaximumValidatorsWithPoints = MaximumValidatorsWithPoints;
|
||||
type PointsPerBlock = ConstU32<20>;
|
||||
type MaxOffenceBatchSize = MaxOffenceBatchSize;
|
||||
type SessionInterface = Self;
|
||||
type Fallback = Staking;
|
||||
type MaxSessionReportRetries = ConstU32<3>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub static NextAhDeliveryFails: bool = false;
|
||||
}
|
||||
|
||||
pub struct DeliverToAH;
|
||||
impl DeliverToAH {
|
||||
fn ensure_delivery_guard() -> Result<(), ()> {
|
||||
// `::take` will set it back to the default value, `false`.
|
||||
if NextAhDeliveryFails::take() {
|
||||
Err(())
|
||||
} else {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ah_client::SendToAssetHub for DeliverToAH {
|
||||
type AccountId = AccountId;
|
||||
|
||||
fn relay_session_report(
|
||||
session_report: rc_client::SessionReport<Self::AccountId>,
|
||||
) -> Result<(), ()> {
|
||||
Self::ensure_delivery_guard()?;
|
||||
if let Some(mut local_queue) = LocalQueue::get() {
|
||||
local_queue
|
||||
.push((System::block_number(), OutgoingMessages::SessionReport(session_report)));
|
||||
LocalQueue::set(Some(local_queue));
|
||||
} else {
|
||||
shared::CounterRCAHSessionReport::mutate(|x| *x += 1);
|
||||
shared::in_ah(|| {
|
||||
let origin = crate::ah::RuntimeOrigin::root();
|
||||
rc_client::Pallet::<crate::ah::Runtime>::relay_session_report(
|
||||
origin,
|
||||
session_report.clone(),
|
||||
)
|
||||
.unwrap();
|
||||
});
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn relay_new_offence_paged(
|
||||
offences: Vec<(SessionIndex, pezpallet_staking_async_rc_client::Offence<Self::AccountId>)>,
|
||||
) -> Result<(), ()> {
|
||||
Self::ensure_delivery_guard()?;
|
||||
if let Some(mut local_queue) = LocalQueue::get() {
|
||||
local_queue
|
||||
.push((System::block_number(), OutgoingMessages::OffenceReportPaged(offences)));
|
||||
LocalQueue::set(Some(local_queue));
|
||||
} else {
|
||||
shared::in_ah(|| {
|
||||
crate::shared::CounterRCAHNewOffence::mutate(|x| *x += offences.len() as u32);
|
||||
let origin = crate::ah::RuntimeOrigin::root();
|
||||
rc_client::Pallet::<crate::ah::Runtime>::relay_new_offence_paged(
|
||||
origin,
|
||||
offences.clone(),
|
||||
)
|
||||
.unwrap();
|
||||
});
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub static SessionEventsIndex: usize = 0;
|
||||
pub static HistoricalEventsIndex: usize = 0;
|
||||
pub static AhClientEventsIndex: usize = 0;
|
||||
pub static OffenceEventsIndex: usize = 0;
|
||||
}
|
||||
|
||||
pub fn historical_events_since_last_call() -> Vec<pezpallet_session::historical::Event<Runtime>> {
|
||||
let all = pezframe_system::Pallet::<Runtime>::read_events_for_pallet::<
|
||||
pezpallet_session::historical::Event<Runtime>,
|
||||
>();
|
||||
let seen = HistoricalEventsIndex::get();
|
||||
HistoricalEventsIndex::set(all.len());
|
||||
all.into_iter().skip(seen).collect()
|
||||
}
|
||||
|
||||
pub fn offence_events_since_last_call() -> Vec<pezpallet_offences::Event> {
|
||||
let all = pezframe_system::Pallet::<Runtime>::read_events_for_pallet::<pezpallet_offences::Event>();
|
||||
let seen = OffenceEventsIndex::get();
|
||||
OffenceEventsIndex::set(all.len());
|
||||
all.into_iter().skip(seen).collect()
|
||||
}
|
||||
|
||||
pub fn session_events_since_last_call() -> Vec<pezpallet_session::Event<Runtime>> {
|
||||
let all =
|
||||
pezframe_system::Pallet::<Runtime>::read_events_for_pallet::<pezpallet_session::Event<Runtime>>();
|
||||
let seen = SessionEventsIndex::get();
|
||||
SessionEventsIndex::set(all.len());
|
||||
all.into_iter().skip(seen).collect()
|
||||
}
|
||||
|
||||
pub fn ah_client_events_since_last_call() -> Vec<ah_client::Event<Runtime>> {
|
||||
let all =
|
||||
pezframe_system::Pallet::<Runtime>::read_events_for_pallet::<ah_client::Event<Runtime>>();
|
||||
let seen = AhClientEventsIndex::get();
|
||||
AhClientEventsIndex::set(all.len());
|
||||
all.into_iter().skip(seen).collect()
|
||||
}
|
||||
|
||||
const INITIAL_STAKE: Balance = 100;
|
||||
const INITIAL_BALANCE: Balance = 1000;
|
||||
|
||||
pub struct ExtBuilder {
|
||||
session_keys: Vec<AccountId>,
|
||||
pre_migration: bool,
|
||||
}
|
||||
|
||||
impl Default for ExtBuilder {
|
||||
fn default() -> Self {
|
||||
Self { session_keys: vec![], pre_migration: false }
|
||||
}
|
||||
}
|
||||
|
||||
impl ExtBuilder {
|
||||
/// Set this if you want to test the rc-runtime locally. This will push outgoing messages to
|
||||
/// `LocalQueue` instead of enacting them on AH.
|
||||
pub fn local_queue(self) -> Self {
|
||||
LocalQueue::set(Some(Default::default()));
|
||||
self
|
||||
}
|
||||
|
||||
/// Set the session keys for the given accounts.
|
||||
pub fn session_keys(mut self, session_keys: Vec<AccountId>) -> Self {
|
||||
self.session_keys = session_keys;
|
||||
self
|
||||
}
|
||||
|
||||
/// Don't set 11 as the automatic block author of every block
|
||||
pub fn no_default_author(self) -> Self {
|
||||
DefaultAuthor::set(None);
|
||||
self
|
||||
}
|
||||
|
||||
/// Set the staking-classic state to be pre-AHM-migration state.
|
||||
pub fn pre_migration(mut self) -> Self {
|
||||
self.pre_migration = true;
|
||||
self
|
||||
}
|
||||
|
||||
/// Set the smallest number of validators to be received by ah-client
|
||||
pub fn minimum_validator_set_size(self, size: u32) -> Self {
|
||||
MinimumValidatorSetSize::set(size);
|
||||
self
|
||||
}
|
||||
|
||||
/// Set the maximum offence batch size for testing batching behavior
|
||||
pub fn max_offence_batch_size(self, size: u32) -> Self {
|
||||
MaxOffenceBatchSize::set(size);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn build(self) -> TestState {
|
||||
let _ = pezsp_tracing::try_init_simple();
|
||||
let mut t = pezframe_system::GenesisConfig::<T>::default().build_storage().unwrap();
|
||||
|
||||
// add pre-migration state to staking-classic.
|
||||
let operating_mode = if self.pre_migration {
|
||||
let validators = vec![1, 2, 3, 4, 5, 6, 7, 8]
|
||||
.into_iter()
|
||||
.map(|x| (x, x, INITIAL_STAKE, pezpallet_staking::StakerStatus::Validator));
|
||||
|
||||
let nominators = vec![
|
||||
(100, vec![1, 2]),
|
||||
(101, vec![2, 5]),
|
||||
(102, vec![1, 1]),
|
||||
(103, vec![3, 3]),
|
||||
(104, vec![1, 5]),
|
||||
(105, vec![5, 4]),
|
||||
(106, vec![6, 2]),
|
||||
(107, vec![1, 6]),
|
||||
(108, vec![2, 7]),
|
||||
(109, vec![4, 8]),
|
||||
(110, vec![5, 2]),
|
||||
(111, vec![6, 6]),
|
||||
(112, vec![8, 1]),
|
||||
]
|
||||
.into_iter()
|
||||
.map(|(x, y)| (x, x, INITIAL_STAKE, pezpallet_staking_async::StakerStatus::Nominator(y)));
|
||||
|
||||
let stakers = validators.chain(nominators).collect::<Vec<_>>();
|
||||
let balances = stakers
|
||||
.clone()
|
||||
.into_iter()
|
||||
.map(|(x, _, _, _)| (x, INITIAL_BALANCE))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
pezpallet_balances::GenesisConfig::<Runtime> { balances, ..Default::default() }
|
||||
.assimilate_storage(&mut t)
|
||||
.unwrap();
|
||||
|
||||
pezpallet_staking::GenesisConfig::<Runtime> {
|
||||
stakers,
|
||||
validator_count: 4,
|
||||
minimum_validator_count: 2,
|
||||
..Default::default()
|
||||
}
|
||||
.assimilate_storage(&mut t)
|
||||
.unwrap();
|
||||
|
||||
// Set ah client in passive mode -> implies it is inactive and staking-classic is
|
||||
// active.
|
||||
OperatingMode::Passive
|
||||
} else {
|
||||
OperatingMode::Active
|
||||
};
|
||||
|
||||
let mut state: TestState = t.into();
|
||||
|
||||
state.execute_with(|| {
|
||||
// so events can be deposited.
|
||||
roll_next();
|
||||
|
||||
for v in self.session_keys {
|
||||
// min some funds, create account and ref counts
|
||||
pezpallet_balances::Pallet::<T>::mint_into(&v, INITIAL_BALANCE).unwrap();
|
||||
pezpallet_session::Pallet::<T>::set_keys(
|
||||
RuntimeOrigin::signed(v),
|
||||
SessionKeys { other: UintAuthorityId(v) },
|
||||
vec![],
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
ah_client::Mode::<T>::put(operating_mode);
|
||||
});
|
||||
|
||||
state
|
||||
}
|
||||
}
|
||||
|
||||
/// Progress until `sessions`, receive a `new_validator_set` with `id`, and go forward to `sessions
|
||||
/// + 1` such that it is queued in pezpallet-session. If `active`, then progress until `sessions + 2`
|
||||
/// such that it is in the active session validators.
|
||||
pub(crate) fn receive_validator_set_at(
|
||||
sessions: SessionIndex,
|
||||
id: u32,
|
||||
new_validator_set: Vec<AccountId>,
|
||||
activate: bool,
|
||||
) {
|
||||
roll_until_matches(|| pezpallet_session::CurrentIndex::<Runtime>::get() == sessions, false);
|
||||
assert_eq!(pezpallet_session::CurrentIndex::<Runtime>::get(), sessions);
|
||||
|
||||
let report = ValidatorSetReport {
|
||||
id,
|
||||
prune_up_to: None,
|
||||
leftover: false,
|
||||
new_validator_set: new_validator_set.clone(),
|
||||
};
|
||||
|
||||
assert_ok!(ah_client::Pallet::<Runtime>::validator_set(RuntimeOrigin::root(), report));
|
||||
|
||||
// go forward till one more session such that these validators are in the session queue now
|
||||
roll_until_matches(|| pezpallet_session::CurrentIndex::<Runtime>::get() == sessions + 1, false);
|
||||
assert_eq!(pezpallet_session::CurrentIndex::<Runtime>::get(), sessions + 1);
|
||||
|
||||
assert_eq!(
|
||||
pezpallet_session::QueuedKeys::<Runtime>::get()
|
||||
.into_iter()
|
||||
.map(|(x, _)| x)
|
||||
.collect::<Vec<_>>(),
|
||||
new_validator_set.clone(),
|
||||
);
|
||||
|
||||
if activate {
|
||||
// if need be go one more session to activate them
|
||||
roll_until_matches(
|
||||
|| pezpallet_session::CurrentIndex::<Runtime>::get() == sessions + 2,
|
||||
false,
|
||||
);
|
||||
assert_eq!(pezpallet_session::Validators::<Runtime>::get(), new_validator_set);
|
||||
}
|
||||
}
|
||||
|
||||
/// The queued validator points in the ah-client sorted by account id.
|
||||
pub(crate) fn validator_points() -> Vec<(AccountId, u32)> {
|
||||
let mut points = ah_client::ValidatorPoints::<Runtime>::iter().collect::<Vec<_>>();
|
||||
points.sort_by(|a, b| a.0.cmp(&b.0));
|
||||
points
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
pub mod mock;
|
||||
pub mod test;
|
||||
|
||||
// re-export for easier use in dual runtime tests.
|
||||
pub use mock::*;
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,124 @@
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use crate::*;
|
||||
use frame::testing_prelude::*;
|
||||
use std::cell::UnsafeCell;
|
||||
|
||||
thread_local! {
|
||||
pub static RC_STATE: UnsafeCell<TestState> = UnsafeCell::new(Default::default());
|
||||
pub static AH_STATE: UnsafeCell<TestState> = UnsafeCell::new(Default::default());
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
// counts how many times a new offence message is sent from RC -> AH.
|
||||
pub static CounterRCAHNewOffence: u32 = 0;
|
||||
// counts how many times a new session report is sent from RC -> AH.
|
||||
pub static CounterRCAHSessionReport: u32 = 0;
|
||||
// counts how many times a validator set is sent to RC.
|
||||
pub static CounterAHRCValidatorSet: u32 = 0;
|
||||
}
|
||||
|
||||
pub fn put_ah_state(ah: TestState) {
|
||||
AH_STATE.with(|state| unsafe {
|
||||
let ptr = state.get();
|
||||
*ptr = ah;
|
||||
})
|
||||
}
|
||||
|
||||
pub fn in_ah(f: impl FnMut() -> ()) {
|
||||
AH_STATE.with(|state| unsafe {
|
||||
let ptr = state.get();
|
||||
(*ptr).execute_with(f)
|
||||
})
|
||||
}
|
||||
|
||||
pub fn put_rc_state(rc: TestState) {
|
||||
RC_STATE.with(|state| unsafe {
|
||||
let ptr = state.get();
|
||||
*ptr = rc;
|
||||
})
|
||||
}
|
||||
|
||||
pub fn in_rc(f: impl FnMut() -> ()) {
|
||||
RC_STATE.with(|state| unsafe {
|
||||
let ptr = state.get();
|
||||
(*ptr).execute_with(f)
|
||||
})
|
||||
}
|
||||
|
||||
pub fn migrate_state() {
|
||||
// NOTE: this is not exhaustive, only migrates the state that is needed for the tests.
|
||||
shared::in_rc(|| {
|
||||
let current_era = pezpallet_staking::CurrentEra::<rc::Runtime>::take();
|
||||
let active_era = pezpallet_staking::ActiveEra::<rc::Runtime>::take().unwrap();
|
||||
shared::in_ah(|| {
|
||||
pezpallet_staking_async::CurrentEra::<ah::Runtime>::set(current_era);
|
||||
pezpallet_staking_async::ActiveEra::<ah::Runtime>::set(Some(
|
||||
pezpallet_staking_async::ActiveEraInfo {
|
||||
index: active_era.index,
|
||||
start: active_era.start,
|
||||
},
|
||||
));
|
||||
});
|
||||
|
||||
for (era, reward_points) in pezpallet_staking::ErasRewardPoints::<rc::Runtime>::drain() {
|
||||
shared::in_ah(|| {
|
||||
pezpallet_staking_async::ErasRewardPoints::<ah::Runtime>::insert(
|
||||
era,
|
||||
pezpallet_staking_async::EraRewardPoints {
|
||||
total: reward_points.total,
|
||||
individual: reward_points.individual.clone().try_into().unwrap(),
|
||||
},
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
// exposure
|
||||
for (era, account, overview) in pezpallet_staking::ErasStakersOverview::<rc::Runtime>::drain()
|
||||
{
|
||||
shared::in_ah(|| {
|
||||
pezpallet_staking_async::ErasStakersOverview::<ah::Runtime>::insert(
|
||||
era, account, overview,
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
for ((era, account, page), exposure_page) in
|
||||
pezpallet_staking::ErasStakersPaged::<rc::Runtime>::drain()
|
||||
{
|
||||
shared::in_ah(|| {
|
||||
pezpallet_staking_async::ErasStakersPaged::<ah::Runtime>::insert(
|
||||
(era, account, page),
|
||||
exposure_page.clone(),
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
shared::in_ah(|| {
|
||||
pezpallet_staking_async::BondedEras::<ah::Runtime>::kill();
|
||||
});
|
||||
|
||||
for (era, session) in pezpallet_staking::BondedEras::<rc::Runtime>::get() {
|
||||
shared::in_ah(|| {
|
||||
pezpallet_staking_async::BondedEras::<ah::Runtime>::mutate(|bonded| {
|
||||
bonded.try_push((era, session)).unwrap()
|
||||
})
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
[package]
|
||||
name = "pezpallet-staking-async-rc-client"
|
||||
description = "Pallet handling the communication with staking-ah-client. It's role is to glue the staking pallet (on AssetHub chain) and session pallet (on Relay Chain) in a transparent way."
|
||||
license = "Apache-2.0"
|
||||
version = "0.1.0"
|
||||
edition.workspace = true
|
||||
authors.workspace = true
|
||||
repository.workspace = true
|
||||
|
||||
[dependencies]
|
||||
codec = { workspace = true, features = ["derive"] }
|
||||
pezframe-support = { workspace = true }
|
||||
pezframe-system = { workspace = true }
|
||||
impl-trait-for-tuples = "0.2.2"
|
||||
log = { workspace = true }
|
||||
scale-info = { workspace = true, features = ["derive"] }
|
||||
pezsp-core = { workspace = true }
|
||||
pezsp-runtime = { features = ["serde"], workspace = true }
|
||||
pezsp-staking = { features = ["serde"], workspace = true }
|
||||
xcm = { workspace = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"codec/std",
|
||||
"pezframe-support/std",
|
||||
"pezframe-system/std",
|
||||
"log/std",
|
||||
"scale-info/std",
|
||||
"pezsp-core/std",
|
||||
"pezsp-runtime/std",
|
||||
"pezsp-staking/std",
|
||||
"xcm/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"pezframe-system/runtime-benchmarks",
|
||||
"pezsp-runtime/runtime-benchmarks",
|
||||
"pezsp-staking/runtime-benchmarks",
|
||||
"xcm/runtime-benchmarks",
|
||||
]
|
||||
try-runtime = [
|
||||
"pezframe-support/try-runtime",
|
||||
"pezframe-system/try-runtime",
|
||||
"pezsp-runtime/try-runtime",
|
||||
]
|
||||
@@ -0,0 +1,849 @@
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! The client for the relay chain, intended to be used in AssetHub.
|
||||
//!
|
||||
//! The counter-part for this pallet is `pezpallet-staking-async-ah-client` on the relay chain.
|
||||
//!
|
||||
//! This documentation is divided into the following sections:
|
||||
//!
|
||||
//! 1. Incoming messages: the messages that we receive from the relay chian.
|
||||
//! 2. Outgoing messages: the messaged that we sent to the relay chain.
|
||||
//! 3. Local interfaces: the interfaces that we expose to other pallets in the runtime.
|
||||
//!
|
||||
//! ## Incoming Messages
|
||||
//!
|
||||
//! All incoming messages are handled via [`Call`]. They are all gated to be dispatched only by the
|
||||
//! relay chain origin, as per [`Config::RelayChainOrigin`].
|
||||
//!
|
||||
//! After potential queuing, they are passed to pezpallet-staking-async via [`AHStakingInterface`].
|
||||
//!
|
||||
//! The calls are:
|
||||
//!
|
||||
//! * [`Call::relay_session_report`]: A report from the relay chain, indicating the end of a
|
||||
//! session. We allow ourselves to know an implementation detail: **The ending of session `x`
|
||||
//! always implies start of session `x+1` and planning of session `x+2`.** This allows us to have
|
||||
//! just one message per session.
|
||||
//!
|
||||
//! > Note that in the code, due to historical reasons, planning of a new session is called
|
||||
//! > `new_session`.
|
||||
//!
|
||||
//! * [`Call::relay_new_offence_paged`]: A report of one or more offences on the relay chain.
|
||||
//!
|
||||
//! ## Outgoing Messages
|
||||
//!
|
||||
//! The outgoing messages are expressed in [`SendToRelayChain`].
|
||||
//!
|
||||
//! ## Local Interfaces
|
||||
//!
|
||||
//! Within this pallet, we need to talk to the staking-async pallet in AH. This is done via
|
||||
//! [`AHStakingInterface`] trait.
|
||||
//!
|
||||
//! The staking pallet in AH has no communication with session pallet whatsoever, therefore its
|
||||
//! implementation of `SessionManager`, and it associated type `SessionInterface` no longer exists.
|
||||
//! Moreover, pezpallet-staking-async no longer has a notion of timestamp locally, and only relies in
|
||||
//! the timestamp passed in in the `SessionReport`.
|
||||
//!
|
||||
//! ## Shared Types
|
||||
//!
|
||||
//! Note that a number of types need to be shared between this crate and `ah-client`. For now, as a
|
||||
//! convention, they are kept in this crate. This can later be decoupled into a shared crate, or
|
||||
//! `sp-staking`.
|
||||
//!
|
||||
//! TODO: the rest should go to staking-async docs.
|
||||
//!
|
||||
//! ## Session Change
|
||||
//!
|
||||
//! Further details of how the session change works follows. These details are important to how
|
||||
//! `pezpallet-staking-async` should rotate sessions/eras going forward.
|
||||
//!
|
||||
//! ### Synchronous Model
|
||||
//!
|
||||
//! Let's first consider the old school model, when staking and session lived in the same runtime.
|
||||
//! Assume 3 sessions is one era.
|
||||
//!
|
||||
//! The session pallet issues the following events:
|
||||
//!
|
||||
//! end_session / start_session / new_session (plan session)
|
||||
//!
|
||||
//! * end 0, start 1, plan 2
|
||||
//! * end 1, start 2, plan 3 (new validator set returned)
|
||||
//! * end 2, start 3 (new validator set activated), plan 4
|
||||
//! * end 3, start 4, plan 5
|
||||
//! * end 4, start 5, plan 6 (ah-client to already return validator set) and so on.
|
||||
//!
|
||||
//! Staking should then do the following:
|
||||
//!
|
||||
//! * once a request to plan session 3 comes in, it must return a validator set. This is queued
|
||||
//! internally in the session pallet, and is enacted later.
|
||||
//! * at the same time, staking increases its notion of `current_era` by 1. Yet, `active_era` is
|
||||
//! intact. This is because the validator elected for era n+1 are not yet active in the session
|
||||
//! pallet.
|
||||
//! * once a request to _start_ session 3 comes in, staking will rotate its `active_era` to also be
|
||||
//! incremented to n+1.
|
||||
//!
|
||||
//! ### Asynchronous Model
|
||||
//!
|
||||
//! Now, if staking lives in AH and the session pallet lives in the relay chain, how will this look
|
||||
//! like?
|
||||
//!
|
||||
//! Staking knows that by the time the relay-chain session index `3` (and later on `6` and so on) is
|
||||
//! _planned_, it must have already returned a validator set via XCM.
|
||||
//!
|
||||
//! conceptually, staking must:
|
||||
//!
|
||||
//! - listen to the [`SessionReport`]s coming in, and start a new staking election such that we can
|
||||
//! be sure it is delivered to the RC well before the the message for planning session 3 received.
|
||||
//! - Staking should know that, regardless of the timing, these validators correspond to session 3,
|
||||
//! and an upcoming era.
|
||||
//! - Staking will keep these pending validators internally within its state.
|
||||
//! - Once the message to start session 3 is received, staking will act upon it locally.
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
extern crate alloc;
|
||||
use alloc::{vec, vec::Vec};
|
||||
use core::fmt::Display;
|
||||
use pezframe_support::{pezpallet_prelude::*, storage::transactional::with_transaction_opaque_err};
|
||||
use pezsp_runtime::{traits::Convert, Perbill, TransactionOutcome};
|
||||
use pezsp_staking::SessionIndex;
|
||||
use xcm::latest::{send_xcm, Location, SendError, SendXcm, Xcm};
|
||||
|
||||
/// Export everything needed for the pallet to be used in the runtime.
|
||||
pub use pallet::*;
|
||||
|
||||
const LOG_TARGET: &str = "runtime::staking-async::rc-client";
|
||||
|
||||
// syntactic sugar for logging.
|
||||
#[macro_export]
|
||||
macro_rules! log {
|
||||
($level:tt, $patter:expr $(, $values:expr)* $(,)?) => {
|
||||
log::$level!(
|
||||
target: $crate::LOG_TARGET,
|
||||
concat!("[{:?}] ⬆️ ", $patter), <pezframe_system::Pallet<T>>::block_number() $(, $values)*
|
||||
)
|
||||
};
|
||||
}
|
||||
|
||||
/// The communication trait of `pezpallet-staking-async-rc-client` -> `relay-chain`.
|
||||
///
|
||||
/// This trait should only encapsulate our _outgoing_ communication to the RC. Any incoming
|
||||
/// communication comes it directly via our calls.
|
||||
///
|
||||
/// In a real runtime, this is implemented via XCM calls, much like how the core-time pallet works.
|
||||
/// In a test runtime, it can be wired to direct function calls.
|
||||
pub trait SendToRelayChain {
|
||||
/// The validator account ids.
|
||||
type AccountId;
|
||||
|
||||
/// Send a new validator set report to relay chain.
|
||||
#[allow(clippy::result_unit_err)]
|
||||
fn validator_set(report: ValidatorSetReport<Self::AccountId>) -> Result<(), ()>;
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
impl SendToRelayChain for () {
|
||||
type AccountId = u64;
|
||||
fn validator_set(_report: ValidatorSetReport<Self::AccountId>) -> Result<(), ()> {
|
||||
unimplemented!();
|
||||
}
|
||||
}
|
||||
|
||||
/// The interface to communicate to asset hub.
|
||||
///
|
||||
/// This trait should only encapsulate our outgoing communications. Any incoming message is handled
|
||||
/// with `Call`s.
|
||||
///
|
||||
/// In a real runtime, this is implemented via XCM calls, much like how the coretime pallet works.
|
||||
/// In a test runtime, it can be wired to direct function call.
|
||||
pub trait SendToAssetHub {
|
||||
/// The validator account ids.
|
||||
type AccountId;
|
||||
|
||||
/// Report a session change to AssetHub.
|
||||
///
|
||||
/// Returning `Err(())` means the DMP queue is full, and you should try again in the next block.
|
||||
#[allow(clippy::result_unit_err)]
|
||||
fn relay_session_report(session_report: SessionReport<Self::AccountId>) -> Result<(), ()>;
|
||||
|
||||
#[allow(clippy::result_unit_err)]
|
||||
fn relay_new_offence_paged(
|
||||
offences: Vec<(SessionIndex, Offence<Self::AccountId>)>,
|
||||
) -> Result<(), ()>;
|
||||
}
|
||||
|
||||
/// A no-op implementation of [`SendToAssetHub`].
|
||||
#[cfg(feature = "std")]
|
||||
impl SendToAssetHub for () {
|
||||
type AccountId = u64;
|
||||
|
||||
fn relay_session_report(_session_report: SessionReport<Self::AccountId>) -> Result<(), ()> {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
fn relay_new_offence_paged(
|
||||
_offences: Vec<(SessionIndex, Offence<Self::AccountId>)>,
|
||||
) -> Result<(), ()> {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Encode, Decode, DecodeWithMemTracking, Clone, PartialEq, TypeInfo)]
|
||||
/// A report about a new validator set. This is sent from AH -> RC.
|
||||
pub struct ValidatorSetReport<AccountId> {
|
||||
/// The new validator set.
|
||||
pub new_validator_set: Vec<AccountId>,
|
||||
/// The id of this validator set.
|
||||
///
|
||||
/// Is an always incrementing identifier for this validator set, the activation of which can be
|
||||
/// later pointed to in a `SessionReport`.
|
||||
///
|
||||
/// Implementation detail: within `pezpallet-staking-async`, this is always set to the
|
||||
/// `planning-era` (aka. `CurrentEra`).
|
||||
pub id: u32,
|
||||
/// Signal the relay chain that it can prune up to this session, and enough eras have passed.
|
||||
///
|
||||
/// This can always have a safety buffer. For example, whatever is a sane value, it can be
|
||||
/// `value - 5`.
|
||||
pub prune_up_to: Option<SessionIndex>,
|
||||
/// Same semantics as [`SessionReport::leftover`].
|
||||
pub leftover: bool,
|
||||
}
|
||||
|
||||
impl<AccountId: core::fmt::Debug> core::fmt::Debug for ValidatorSetReport<AccountId> {
|
||||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||
f.debug_struct("ValidatorSetReport")
|
||||
.field("new_validator_set", &self.new_validator_set)
|
||||
.field("id", &self.id)
|
||||
.field("prune_up_to", &self.prune_up_to)
|
||||
.field("leftover", &self.leftover)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl<AccountId> core::fmt::Display for ValidatorSetReport<AccountId> {
|
||||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||
f.debug_struct("ValidatorSetReport")
|
||||
.field("new_validator_set", &self.new_validator_set.len())
|
||||
.field("id", &self.id)
|
||||
.field("prune_up_to", &self.prune_up_to)
|
||||
.field("leftover", &self.leftover)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl<AccountId> ValidatorSetReport<AccountId> {
|
||||
/// A new instance of self that is terminal. This is useful when we want to send everything in
|
||||
/// one go.
|
||||
pub fn new_terminal(
|
||||
new_validator_set: Vec<AccountId>,
|
||||
id: u32,
|
||||
prune_up_to: Option<SessionIndex>,
|
||||
) -> Self {
|
||||
Self { new_validator_set, id, prune_up_to, leftover: false }
|
||||
}
|
||||
|
||||
/// Merge oneself with another instance.
|
||||
pub fn merge(mut self, other: Self) -> Result<Self, UnexpectedKind> {
|
||||
if self.id != other.id || self.prune_up_to != other.prune_up_to {
|
||||
// Must be some bug -- don't merge.
|
||||
return Err(UnexpectedKind::ValidatorSetIntegrityFailed);
|
||||
}
|
||||
self.new_validator_set.extend(other.new_validator_set);
|
||||
self.leftover = other.leftover;
|
||||
Ok(self)
|
||||
}
|
||||
|
||||
/// Split self into chunks of `chunk_size` element.
|
||||
pub fn split(self, chunk_size: usize) -> Vec<Self>
|
||||
where
|
||||
AccountId: Clone,
|
||||
{
|
||||
let splitted_points = self.new_validator_set.chunks(chunk_size.max(1)).map(|x| x.to_vec());
|
||||
let mut parts = splitted_points
|
||||
.into_iter()
|
||||
.map(|new_validator_set| Self { new_validator_set, leftover: true, ..self })
|
||||
.collect::<Vec<_>>();
|
||||
if let Some(x) = parts.last_mut() {
|
||||
x.leftover = false
|
||||
}
|
||||
parts
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Encode, Decode, DecodeWithMemTracking, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
|
||||
/// The information that is sent from RC -> AH on session end.
|
||||
pub struct SessionReport<AccountId> {
|
||||
/// The session that is ending.
|
||||
///
|
||||
/// This always implies start of `end_index + 1`, and planning of `end_index + 2`.
|
||||
pub end_index: SessionIndex,
|
||||
/// All of the points that validators have accumulated.
|
||||
///
|
||||
/// This can be either from block authoring, or from teyrchain consensus, or anything else.
|
||||
pub validator_points: Vec<(AccountId, u32)>,
|
||||
/// If none, it means no new validator set was activated as a part of this session.
|
||||
///
|
||||
/// If `Some((timestamp, id))`, it means that the new validator set was activated at the given
|
||||
/// timestamp, and the id of the validator set is `id`.
|
||||
///
|
||||
/// This `id` is what was previously communicated to the RC as a part of
|
||||
/// [`ValidatorSetReport::id`].
|
||||
pub activation_timestamp: Option<(u64, u32)>,
|
||||
/// If this session report is self-contained, then it is false.
|
||||
///
|
||||
/// If this session report has some leftover, it should not be acted upon until a subsequent
|
||||
/// message with `leftover = true` comes in. The client pallets should handle this queuing.
|
||||
///
|
||||
/// This is in place to future proof us against possibly needing to send multiple rounds of
|
||||
/// messages to convey all of the `validator_points`.
|
||||
///
|
||||
/// Upon processing, this should always be true, and it should be ignored.
|
||||
pub leftover: bool,
|
||||
}
|
||||
|
||||
impl<AccountId: core::fmt::Debug> core::fmt::Debug for SessionReport<AccountId> {
|
||||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||
f.debug_struct("SessionReport")
|
||||
.field("end_index", &self.end_index)
|
||||
.field("validator_points", &self.validator_points)
|
||||
.field("activation_timestamp", &self.activation_timestamp)
|
||||
.field("leftover", &self.leftover)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl<AccountId> core::fmt::Display for SessionReport<AccountId> {
|
||||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||
f.debug_struct("SessionReport")
|
||||
.field("end_index", &self.end_index)
|
||||
.field("validator_points", &self.validator_points.len())
|
||||
.field("activation_timestamp", &self.activation_timestamp)
|
||||
.field("leftover", &self.leftover)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl<AccountId> SessionReport<AccountId> {
|
||||
/// A new instance of self that is terminal. This is useful when we want to send everything in
|
||||
/// one go.
|
||||
pub fn new_terminal(
|
||||
end_index: SessionIndex,
|
||||
validator_points: Vec<(AccountId, u32)>,
|
||||
activation_timestamp: Option<(u64, u32)>,
|
||||
) -> Self {
|
||||
Self { end_index, validator_points, activation_timestamp, leftover: false }
|
||||
}
|
||||
|
||||
/// Merge oneself with another instance.
|
||||
pub fn merge(mut self, other: Self) -> Result<Self, UnexpectedKind> {
|
||||
if self.end_index != other.end_index ||
|
||||
self.activation_timestamp != other.activation_timestamp
|
||||
{
|
||||
// Must be some bug -- don't merge.
|
||||
return Err(UnexpectedKind::SessionReportIntegrityFailed);
|
||||
}
|
||||
self.validator_points.extend(other.validator_points);
|
||||
self.leftover = other.leftover;
|
||||
Ok(self)
|
||||
}
|
||||
|
||||
/// Split oneself into `count` number of pieces.
|
||||
pub fn split(self, chunk_size: usize) -> Vec<Self>
|
||||
where
|
||||
AccountId: Clone,
|
||||
{
|
||||
let splitted_points = self.validator_points.chunks(chunk_size.max(1)).map(|x| x.to_vec());
|
||||
let mut parts = splitted_points
|
||||
.into_iter()
|
||||
.map(|validator_points| Self { validator_points, leftover: true, ..self })
|
||||
.collect::<Vec<_>>();
|
||||
if let Some(x) = parts.last_mut() {
|
||||
x.leftover = false
|
||||
}
|
||||
parts
|
||||
}
|
||||
}
|
||||
|
||||
/// A trait to encapsulate messages between RC and AH that can be splitted into smaller chunks.
|
||||
///
|
||||
/// Implemented for [`SessionReport`] and [`ValidatorSetReport`].
|
||||
#[allow(clippy::len_without_is_empty)]
|
||||
pub trait SplittableMessage: Sized {
|
||||
/// Split yourself into pieces of `chunk_size` size.
|
||||
fn split_by(self, chunk_size: usize) -> Vec<Self>;
|
||||
|
||||
/// Current length of the message.
|
||||
fn len(&self) -> usize;
|
||||
}
|
||||
|
||||
impl<AccountId: Clone> SplittableMessage for SessionReport<AccountId> {
|
||||
fn split_by(self, chunk_size: usize) -> Vec<Self> {
|
||||
self.split(chunk_size)
|
||||
}
|
||||
fn len(&self) -> usize {
|
||||
self.validator_points.len()
|
||||
}
|
||||
}
|
||||
|
||||
impl<AccountId: Clone> SplittableMessage for ValidatorSetReport<AccountId> {
|
||||
fn split_by(self, chunk_size: usize) -> Vec<Self> {
|
||||
self.split(chunk_size)
|
||||
}
|
||||
fn len(&self) -> usize {
|
||||
self.new_validator_set.len()
|
||||
}
|
||||
}
|
||||
|
||||
/// Common utility to send XCM messages that can use [`SplittableMessage`].
|
||||
///
|
||||
/// It can be used both in the RC and AH. `Message` is the splittable message type, and `ToXcm`
|
||||
/// should be configured by the user, converting `message` to a valida `Xcm<()>`. It should utilize
|
||||
/// the correct call indices, which we only know at the runtime level.
|
||||
pub struct XCMSender<Sender, Destination, Message, ToXcm>(
|
||||
core::marker::PhantomData<(Sender, Destination, Message, ToXcm)>,
|
||||
);
|
||||
|
||||
impl<Sender, Destination, Message, ToXcm> XCMSender<Sender, Destination, Message, ToXcm>
|
||||
where
|
||||
Sender: SendXcm,
|
||||
Destination: Get<Location>,
|
||||
Message: Clone + Encode,
|
||||
ToXcm: Convert<Message, Xcm<()>>,
|
||||
{
|
||||
/// Send the message single-shot; no splitting.
|
||||
///
|
||||
/// Useful for sending messages that are already paged/chunked, so we are sure that they fit in
|
||||
/// one message.
|
||||
#[allow(clippy::result_unit_err)]
|
||||
pub fn send(message: Message) -> Result<(), ()> {
|
||||
let xcm = ToXcm::convert(message);
|
||||
let dest = Destination::get();
|
||||
// send_xcm already calls validate internally
|
||||
send_xcm::<Sender>(dest, xcm).map(|_| ()).map_err(|_| ())
|
||||
}
|
||||
}
|
||||
|
||||
impl<Sender, Destination, Message, ToXcm> XCMSender<Sender, Destination, Message, ToXcm>
|
||||
where
|
||||
Sender: SendXcm,
|
||||
Destination: Get<Location>,
|
||||
Message: SplittableMessage + Display + Clone + Encode,
|
||||
ToXcm: Convert<Message, Xcm<()>>,
|
||||
{
|
||||
/// Safe send method to send a `message`, while validating it and using [`SplittableMessage`] to
|
||||
/// split it into smaller pieces if XCM validation fails with `ExceedsMaxMessageSize`. It will
|
||||
/// fail on other errors.
|
||||
///
|
||||
/// Returns `Ok()` if the message was sent using `XCM`, potentially with splitting up to
|
||||
/// `maybe_max_step` times, `Err(())` otherwise.
|
||||
#[deprecated(
|
||||
note = "all staking related VMP messages should fit the single message limits. Should not be used."
|
||||
)]
|
||||
#[allow(clippy::result_unit_err)]
|
||||
pub fn split_then_send(message: Message, maybe_max_steps: Option<u32>) -> Result<(), ()> {
|
||||
let message_type_name = core::any::type_name::<Message>();
|
||||
let dest = Destination::get();
|
||||
let xcms = Self::prepare(message, maybe_max_steps).map_err(|e| {
|
||||
log::error!(target: "runtime::staking-async::rc-client", "📨 Failed to split message {}: {:?}", message_type_name, e);
|
||||
})?;
|
||||
|
||||
match with_transaction_opaque_err(|| {
|
||||
let all_sent = xcms.into_iter().enumerate().try_for_each(|(idx, xcm)| {
|
||||
log::debug!(target: "runtime::staking-async::rc-client", "📨 sending {} message index {}, size: {:?}", message_type_name, idx, xcm.encoded_size());
|
||||
send_xcm::<Sender>(dest.clone(), xcm).map(|_| {
|
||||
log::debug!(target: "runtime::staking-async::rc-client", "📨 Successfully sent {} message part {} to relay chain", message_type_name, idx);
|
||||
}).inspect_err(|e| {
|
||||
log::error!(target: "runtime::staking-async::rc-client", "📨 Failed to send {} message to relay chain: {:?}", message_type_name, e);
|
||||
})
|
||||
});
|
||||
|
||||
match all_sent {
|
||||
Ok(()) => TransactionOutcome::Commit(Ok(())),
|
||||
Err(send_err) => TransactionOutcome::Rollback(Err(send_err)),
|
||||
}
|
||||
}) {
|
||||
// just like https://doc.rust-lang.org/src/core/result.rs.html#1746 which I cannot use yet because not in 1.89
|
||||
Ok(inner) => inner.map_err(|_| ()),
|
||||
// unreachable; `with_transaction_opaque_err` always returns `Ok(inner)`
|
||||
Err(_) => Err(()),
|
||||
}
|
||||
}
|
||||
|
||||
fn prepare(message: Message, maybe_max_steps: Option<u32>) -> Result<Vec<Xcm<()>>, SendError> {
|
||||
// initial chunk size is the entire thing, so it will be a vector of 1 item.
|
||||
let mut chunk_size = message.len();
|
||||
let mut steps = 0;
|
||||
|
||||
loop {
|
||||
let current_messages = message.clone().split_by(chunk_size);
|
||||
|
||||
// the first message is the heaviest, the last one might be smaller.
|
||||
let first_message = if let Some(r) = current_messages.first() {
|
||||
r
|
||||
} else {
|
||||
log::debug!(target: "runtime::staking-async::xcm", "📨 unexpected: no messages to send");
|
||||
return Ok(vec![]);
|
||||
};
|
||||
|
||||
log::debug!(
|
||||
target: "runtime::staking-async::xcm",
|
||||
"📨 step: {:?}, chunk_size: {:?}, message_size: {:?}",
|
||||
steps,
|
||||
chunk_size,
|
||||
first_message.encoded_size(),
|
||||
);
|
||||
|
||||
let first_xcm = ToXcm::convert(first_message.clone());
|
||||
match <Sender as SendXcm>::validate(&mut Some(Destination::get()), &mut Some(first_xcm))
|
||||
{
|
||||
Ok((_ticket, price)) => {
|
||||
log::debug!(target: "runtime::staking-async::xcm", "📨 validated, price: {:?}", price);
|
||||
return Ok(current_messages.into_iter().map(ToXcm::convert).collect::<Vec<_>>());
|
||||
},
|
||||
Err(SendError::ExceedsMaxMessageSize) => {
|
||||
log::debug!(target: "runtime::staking-async::xcm", "📨 ExceedsMaxMessageSize -- reducing chunk_size");
|
||||
chunk_size = chunk_size.saturating_div(2);
|
||||
steps += 1;
|
||||
if maybe_max_steps.is_some_and(|max_steps| steps > max_steps) ||
|
||||
chunk_size.is_zero()
|
||||
{
|
||||
log::error!(target: "runtime::staking-async::xcm", "📨 Exceeded max steps or chunk_size = 0");
|
||||
return Err(SendError::ExceedsMaxMessageSize);
|
||||
} else {
|
||||
// try again with the new `chunk_size`
|
||||
continue;
|
||||
}
|
||||
},
|
||||
Err(other) => {
|
||||
log::error!(target: "runtime::staking-async::xcm", "📨 other error -- cannot send XCM: {:?}", other);
|
||||
return Err(other);
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Our communication trait of `pezpallet-staking-async-rc-client` -> `pezpallet-staking-async`.
|
||||
///
|
||||
/// This is merely a shorthand to avoid tightly-coupling the staking pallet to this pallet. It
|
||||
/// limits what we can say to `pezpallet-staking-async` to only these functions.
|
||||
pub trait AHStakingInterface {
|
||||
/// The validator account id type.
|
||||
type AccountId;
|
||||
/// Maximum number of validators that the staking system may have.
|
||||
type MaxValidatorSet: Get<u32>;
|
||||
|
||||
/// New session report from the relay chain.
|
||||
fn on_relay_session_report(report: SessionReport<Self::AccountId>) -> Weight;
|
||||
|
||||
/// Return the weight of `on_relay_session_report` call without executing it.
|
||||
///
|
||||
/// This will return the worst case estimate of the weight. The actual execution will return the
|
||||
/// accurate amount.
|
||||
fn weigh_on_relay_session_report(report: &SessionReport<Self::AccountId>) -> Weight;
|
||||
|
||||
/// Report one or more offences on the relay chain.
|
||||
fn on_new_offences(
|
||||
slash_session: SessionIndex,
|
||||
offences: Vec<Offence<Self::AccountId>>,
|
||||
) -> Weight;
|
||||
|
||||
/// Return the weight of `on_new_offences` call without executing it.
|
||||
///
|
||||
/// This will return the worst case estimate of the weight. The actual execution will return the
|
||||
/// accurate amount.
|
||||
fn weigh_on_new_offences(offence_count: u32) -> Weight;
|
||||
}
|
||||
|
||||
/// The communication trait of `pezpallet-staking-async` -> `pezpallet-staking-async-rc-client`.
|
||||
pub trait RcClientInterface {
|
||||
/// The validator account ids.
|
||||
type AccountId;
|
||||
|
||||
/// Report a new validator set.
|
||||
fn validator_set(new_validator_set: Vec<Self::AccountId>, id: u32, prune_up_tp: Option<u32>);
|
||||
}
|
||||
|
||||
/// An offence on the relay chain. Based on [`pezsp_staking::offence::OffenceDetails`].
|
||||
#[derive(Encode, Decode, DecodeWithMemTracking, Debug, Clone, PartialEq, TypeInfo)]
|
||||
pub struct Offence<AccountId> {
|
||||
/// The offender.
|
||||
pub offender: AccountId,
|
||||
/// Those who have reported this offence.
|
||||
pub reporters: Vec<AccountId>,
|
||||
/// The amount that they should be slashed.
|
||||
pub slash_fraction: Perbill,
|
||||
}
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
pub mod pallet {
|
||||
use super::*;
|
||||
use alloc::vec;
|
||||
use pezframe_system::pezpallet_prelude::{BlockNumberFor, *};
|
||||
|
||||
/// The in-code storage version.
|
||||
const STORAGE_VERSION: StorageVersion = StorageVersion::new(1);
|
||||
|
||||
/// An incomplete incoming session report that we have not acted upon yet.
|
||||
// Note: this can remain unbounded, as the internals of `AHStakingInterface` is benchmarked, and
|
||||
// is worst case.
|
||||
#[pallet::storage]
|
||||
#[pallet::unbounded]
|
||||
pub type IncompleteSessionReport<T: Config> =
|
||||
StorageValue<_, SessionReport<T::AccountId>, OptionQuery>;
|
||||
|
||||
/// The last session report's `end_index` that we have acted upon.
|
||||
///
|
||||
/// This allows this pallet to ensure a sequentially increasing sequence of session reports
|
||||
/// passed to staking.
|
||||
///
|
||||
/// Note that with the XCM being the backbone of communication, we have a guarantee on the
|
||||
/// ordering of messages. As long as the RC sends session reports in order, we _eventually_
|
||||
/// receive them in the same correct order as well.
|
||||
#[pallet::storage]
|
||||
pub type LastSessionReportEndingIndex<T: Config> = StorageValue<_, SessionIndex, OptionQuery>;
|
||||
|
||||
/// A validator set that is outgoing, and should be sent.
|
||||
///
|
||||
/// This will be attempted to be sent, possibly on every `on_initialize` call, until it is sent,
|
||||
/// or the second value reaches zero, at which point we drop it.
|
||||
#[pallet::storage]
|
||||
// TODO: for now we know this ValidatorSetReport is at most validator-count * 32, and we don't
|
||||
// need its MEL critically.
|
||||
#[pallet::unbounded]
|
||||
pub type OutgoingValidatorSet<T: Config> =
|
||||
StorageValue<_, (ValidatorSetReport<T::AccountId>, u32), OptionQuery>;
|
||||
|
||||
#[pallet::pallet]
|
||||
#[pallet::storage_version(STORAGE_VERSION)]
|
||||
pub struct Pallet<T>(_);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
|
||||
fn on_initialize(_: BlockNumberFor<T>) -> Weight {
|
||||
if let Some((report, retries_left)) = OutgoingValidatorSet::<T>::take() {
|
||||
match T::SendToRelayChain::validator_set(report.clone()) {
|
||||
Ok(()) => {
|
||||
// report was sent, all good, it is already deleted.
|
||||
},
|
||||
Err(()) => {
|
||||
log!(error, "Failed to send validator set report to relay chain");
|
||||
Self::deposit_event(Event::<T>::Unexpected(
|
||||
UnexpectedKind::ValidatorSetSendFailed,
|
||||
));
|
||||
if let Some(new_retries_left) = retries_left.checked_sub(One::one()) {
|
||||
OutgoingValidatorSet::<T>::put((report, new_retries_left))
|
||||
} else {
|
||||
Self::deposit_event(Event::<T>::Unexpected(
|
||||
UnexpectedKind::ValidatorSetDropped,
|
||||
));
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
T::DbWeight::get().reads_writes(1, 1)
|
||||
}
|
||||
}
|
||||
|
||||
#[pallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
/// An origin type that allows us to be sure a call is being dispatched by the relay chain.
|
||||
///
|
||||
/// It be can be configured to something like `Root` or relay chain or similar.
|
||||
type RelayChainOrigin: EnsureOrigin<Self::RuntimeOrigin>;
|
||||
|
||||
/// Our communication handle to the local staking pallet.
|
||||
type AHStakingInterface: AHStakingInterface<AccountId = Self::AccountId>;
|
||||
|
||||
/// Our communication handle to the relay chain.
|
||||
type SendToRelayChain: SendToRelayChain<AccountId = Self::AccountId>;
|
||||
|
||||
/// Maximum number of times that we retry sending a validator set to RC, after which, if
|
||||
/// sending still fails, we emit an [`UnexpectedKind::ValidatorSetDropped`] event and drop
|
||||
/// it.
|
||||
type MaxValidatorSetRetries: Get<u32>;
|
||||
}
|
||||
|
||||
#[pallet::event]
|
||||
#[pallet::generate_deposit(pub(crate) fn deposit_event)]
|
||||
pub enum Event<T: Config> {
|
||||
/// A said session report was received.
|
||||
SessionReportReceived {
|
||||
end_index: SessionIndex,
|
||||
activation_timestamp: Option<(u64, u32)>,
|
||||
validator_points_counts: u32,
|
||||
leftover: bool,
|
||||
},
|
||||
/// A new offence was reported.
|
||||
OffenceReceived { slash_session: SessionIndex, offences_count: u32 },
|
||||
/// Something occurred that should never happen under normal operation.
|
||||
/// Logged as an event for fail-safe observability.
|
||||
Unexpected(UnexpectedKind),
|
||||
}
|
||||
|
||||
/// Represents unexpected or invariant-breaking conditions encountered during execution.
|
||||
///
|
||||
/// These variants are emitted as [`Event::Unexpected`] and indicate a defensive check has
|
||||
/// failed. While these should never occur under normal operation, they are useful for
|
||||
/// diagnosing issues in production or test environments.
|
||||
#[derive(Clone, Encode, Decode, DecodeWithMemTracking, PartialEq, TypeInfo, RuntimeDebug)]
|
||||
pub enum UnexpectedKind {
|
||||
/// We could not merge the chunks, and therefore dropped the session report.
|
||||
SessionReportIntegrityFailed,
|
||||
/// We could not merge the chunks, and therefore dropped the validator set.
|
||||
ValidatorSetIntegrityFailed,
|
||||
/// The received session index is more than what we expected.
|
||||
SessionSkipped,
|
||||
/// A session in the past was received. This will not raise any errors, just emit an event
|
||||
/// and stop processing the report.
|
||||
SessionAlreadyProcessed,
|
||||
/// A validator set failed to be sent to RC.
|
||||
///
|
||||
/// We will store, and retry it for [`Config::MaxValidatorSetRetries`] future blocks.
|
||||
ValidatorSetSendFailed,
|
||||
/// A validator set was dropped.
|
||||
ValidatorSetDropped,
|
||||
}
|
||||
|
||||
impl<T: Config> RcClientInterface for Pallet<T> {
|
||||
type AccountId = T::AccountId;
|
||||
|
||||
fn validator_set(
|
||||
new_validator_set: Vec<Self::AccountId>,
|
||||
id: u32,
|
||||
prune_up_tp: Option<u32>,
|
||||
) {
|
||||
let report = ValidatorSetReport::new_terminal(new_validator_set, id, prune_up_tp);
|
||||
// just store the report to be outgoing, it will be sent in the next on-init.
|
||||
OutgoingValidatorSet::<T>::put((report, T::MaxValidatorSetRetries::get()));
|
||||
}
|
||||
}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
/// Called to indicate the start of a new session on the relay chain.
|
||||
#[pallet::call_index(0)]
|
||||
#[pallet::weight(
|
||||
// `LastSessionReportEndingIndex`: rw
|
||||
// `IncompleteSessionReport`: rw
|
||||
T::DbWeight::get().reads_writes(2, 2) + T::AHStakingInterface::weigh_on_relay_session_report(report)
|
||||
)]
|
||||
pub fn relay_session_report(
|
||||
origin: OriginFor<T>,
|
||||
report: SessionReport<T::AccountId>,
|
||||
) -> DispatchResultWithPostInfo {
|
||||
log!(debug, "Received session report: {}", report);
|
||||
T::RelayChainOrigin::ensure_origin_or_root(origin)?;
|
||||
let local_weight = T::DbWeight::get().reads_writes(2, 2);
|
||||
|
||||
match LastSessionReportEndingIndex::<T>::get() {
|
||||
None => {
|
||||
// first session report post genesis, okay.
|
||||
},
|
||||
Some(last) if report.end_index == last + 1 => {
|
||||
// incremental -- good
|
||||
},
|
||||
Some(last) if report.end_index > last + 1 => {
|
||||
// deposit a warning event, but proceed
|
||||
Self::deposit_event(Event::Unexpected(UnexpectedKind::SessionSkipped));
|
||||
log!(
|
||||
warn,
|
||||
"Session report end index is more than expected. last_index={:?}, report.index={:?}",
|
||||
last,
|
||||
report.end_index
|
||||
);
|
||||
},
|
||||
Some(past) => {
|
||||
log!(
|
||||
error,
|
||||
"Session report end index is not valid. last_index={:?}, report.index={:?}",
|
||||
past,
|
||||
report.end_index
|
||||
);
|
||||
Self::deposit_event(Event::Unexpected(UnexpectedKind::SessionAlreadyProcessed));
|
||||
IncompleteSessionReport::<T>::kill();
|
||||
return Ok(Some(local_weight).into());
|
||||
},
|
||||
}
|
||||
|
||||
Self::deposit_event(Event::SessionReportReceived {
|
||||
end_index: report.end_index,
|
||||
activation_timestamp: report.activation_timestamp,
|
||||
validator_points_counts: report.validator_points.len() as u32,
|
||||
leftover: report.leftover,
|
||||
});
|
||||
|
||||
// If we have anything previously buffered, then merge it.
|
||||
let maybe_new_session_report = match IncompleteSessionReport::<T>::take() {
|
||||
Some(old) => old.merge(report.clone()),
|
||||
None => Ok(report),
|
||||
};
|
||||
|
||||
if let Err(e) = maybe_new_session_report {
|
||||
Self::deposit_event(Event::Unexpected(e));
|
||||
debug_assert!(
|
||||
IncompleteSessionReport::<T>::get().is_none(),
|
||||
"we have ::take() it above, we don't want to keep the old data"
|
||||
);
|
||||
return Ok(().into());
|
||||
}
|
||||
let new_session_report = maybe_new_session_report.expect("checked above; qed");
|
||||
|
||||
if new_session_report.leftover {
|
||||
// this is still not final -- buffer it.
|
||||
IncompleteSessionReport::<T>::put(new_session_report);
|
||||
Ok(().into())
|
||||
} else {
|
||||
// this is final, report it.
|
||||
LastSessionReportEndingIndex::<T>::put(new_session_report.end_index);
|
||||
let weight = T::AHStakingInterface::on_relay_session_report(new_session_report);
|
||||
Ok((Some(local_weight + weight)).into())
|
||||
}
|
||||
}
|
||||
|
||||
#[pallet::call_index(1)]
|
||||
#[pallet::weight(
|
||||
T::AHStakingInterface::weigh_on_new_offences(offences.len() as u32)
|
||||
)]
|
||||
pub fn relay_new_offence_paged(
|
||||
origin: OriginFor<T>,
|
||||
offences: Vec<(SessionIndex, Offence<T::AccountId>)>,
|
||||
) -> DispatchResultWithPostInfo {
|
||||
T::RelayChainOrigin::ensure_origin_or_root(origin)?;
|
||||
log!(info, "Received new page of {} offences", offences.len());
|
||||
|
||||
let mut offences_by_session =
|
||||
alloc::collections::BTreeMap::<SessionIndex, Vec<Offence<T::AccountId>>>::new();
|
||||
for (session_index, offence) in offences {
|
||||
offences_by_session.entry(session_index).or_default().push(offence);
|
||||
}
|
||||
|
||||
let mut weight: Weight = Default::default();
|
||||
for (slash_session, offences) in offences_by_session {
|
||||
Self::deposit_event(Event::OffenceReceived {
|
||||
slash_session,
|
||||
offences_count: offences.len() as u32,
|
||||
});
|
||||
let new_weight = T::AHStakingInterface::on_new_offences(slash_session, offences);
|
||||
weight.saturating_accrue(new_weight)
|
||||
}
|
||||
|
||||
Ok(Some(weight).into())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
[package]
|
||||
name = "pezpallet-staking-async-reward-fn"
|
||||
version = "19.0.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license = "Apache-2.0"
|
||||
homepage.workspace = true
|
||||
repository.workspace = true
|
||||
description = "Reward function for FRAME staking pallet"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[lib]
|
||||
|
||||
[dependencies]
|
||||
log = { workspace = true }
|
||||
pezsp-arithmetic = { workspace = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = ["log/std", "pezsp-arithmetic/std"]
|
||||
@@ -0,0 +1,224 @@
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
//! Useful function for inflation for nominated proof of stake.
|
||||
|
||||
use pezsp_arithmetic::{
|
||||
biguint::BigUint,
|
||||
traits::{SaturatedConversion, Zero},
|
||||
PerThing, Perquintill,
|
||||
};
|
||||
|
||||
/// Compute yearly inflation using function
|
||||
///
|
||||
/// ```ignore
|
||||
/// I(x) = for x between 0 and x_ideal: x / x_ideal,
|
||||
/// for x between x_ideal and 1: 2^((x_ideal - x) / d)
|
||||
/// ```
|
||||
///
|
||||
/// where:
|
||||
/// * x is the stake rate, i.e. fraction of total issued tokens that actively staked behind
|
||||
/// validators.
|
||||
/// * d is the falloff or `decay_rate`
|
||||
/// * x_ideal: the ideal stake rate.
|
||||
///
|
||||
/// The result is meant to be scaled with minimum inflation and maximum inflation.
|
||||
///
|
||||
/// (as detailed
|
||||
/// [here](https://research.web3.foundation/Polkadot/overview/token-economics#inflation-model-with-parachains))
|
||||
///
|
||||
/// Arguments are:
|
||||
/// * `stake`: The fraction of total issued tokens that actively staked behind validators. Known as
|
||||
/// `x` in the literature. Must be between 0 and 1.
|
||||
/// * `ideal_stake`: The fraction of total issued tokens that should be actively staked behind
|
||||
/// validators. Known as `x_ideal` in the literature. Must be between 0 and 1.
|
||||
/// * `falloff`: Known as `decay_rate` in the literature. A co-efficient dictating the strength of
|
||||
/// the global incentivization to get the `ideal_stake`. A higher number results in less typical
|
||||
/// inflation at the cost of greater volatility for validators. Must be more than 0.01.
|
||||
pub fn compute_inflation<P: PerThing>(stake: P, ideal_stake: P, falloff: P) -> P {
|
||||
if stake < ideal_stake {
|
||||
// ideal_stake is more than 0 because it is strictly more than stake
|
||||
return stake / ideal_stake;
|
||||
}
|
||||
|
||||
if falloff < P::from_percent(1.into()) {
|
||||
log::error!("Invalid inflation computation: falloff less than 1% is not supported");
|
||||
return PerThing::zero();
|
||||
}
|
||||
|
||||
let accuracy = {
|
||||
let mut a = BigUint::from(Into::<u128>::into(P::ACCURACY));
|
||||
a.lstrip();
|
||||
a
|
||||
};
|
||||
|
||||
let mut falloff = BigUint::from(falloff.deconstruct().into());
|
||||
falloff.lstrip();
|
||||
|
||||
let ln2 = {
|
||||
/// `ln(2)` expressed in as perquintillionth.
|
||||
const LN2: u64 = 0_693_147_180_559_945_309;
|
||||
let ln2 = P::from_rational(LN2.into(), Perquintill::ACCURACY.into());
|
||||
BigUint::from(ln2.deconstruct().into())
|
||||
};
|
||||
|
||||
// falloff is stripped above.
|
||||
let ln2_div_d = div_by_stripped(ln2.mul(&accuracy), &falloff);
|
||||
|
||||
let inpos_param = INPoSParam {
|
||||
x_ideal: BigUint::from(ideal_stake.deconstruct().into()),
|
||||
x: BigUint::from(stake.deconstruct().into()),
|
||||
accuracy,
|
||||
ln2_div_d,
|
||||
};
|
||||
|
||||
let res = compute_taylor_serie_part(&inpos_param);
|
||||
|
||||
match u128::try_from(res.clone()) {
|
||||
Ok(res) if res <= Into::<u128>::into(P::ACCURACY) => P::from_parts(res.saturated_into()),
|
||||
// If result is beyond bounds there is nothing we can do
|
||||
_ => {
|
||||
log::error!("Invalid inflation computation: unexpected result {:?}", res);
|
||||
P::zero()
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/// Internal struct holding parameter info alongside other cached value.
|
||||
///
|
||||
/// All expressed in part from `accuracy`
|
||||
struct INPoSParam {
|
||||
ln2_div_d: BigUint,
|
||||
x_ideal: BigUint,
|
||||
x: BigUint,
|
||||
/// Must be stripped and have no leading zeros.
|
||||
accuracy: BigUint,
|
||||
}
|
||||
|
||||
/// Compute `2^((x_ideal - x) / d)` using taylor serie.
|
||||
///
|
||||
/// x must be strictly more than x_ideal.
|
||||
///
|
||||
/// result is expressed with accuracy `INPoSParam.accuracy`
|
||||
fn compute_taylor_serie_part(p: &INPoSParam) -> BigUint {
|
||||
// The last computed taylor term.
|
||||
let mut last_taylor_term = p.accuracy.clone();
|
||||
|
||||
// Whereas taylor sum is positive.
|
||||
let mut taylor_sum_positive = true;
|
||||
|
||||
// The sum of all taylor term.
|
||||
let mut taylor_sum = last_taylor_term.clone();
|
||||
|
||||
for k in 1..300 {
|
||||
last_taylor_term = compute_taylor_term(k, &last_taylor_term, p);
|
||||
|
||||
if last_taylor_term.is_zero() {
|
||||
break;
|
||||
}
|
||||
|
||||
let last_taylor_term_positive = k % 2 == 0;
|
||||
|
||||
if taylor_sum_positive == last_taylor_term_positive {
|
||||
taylor_sum = taylor_sum.add(&last_taylor_term);
|
||||
} else if taylor_sum >= last_taylor_term {
|
||||
taylor_sum = taylor_sum
|
||||
.sub(&last_taylor_term)
|
||||
// NOTE: Should never happen as checked above
|
||||
.unwrap_or_else(|e| e);
|
||||
} else {
|
||||
taylor_sum_positive = !taylor_sum_positive;
|
||||
taylor_sum = last_taylor_term
|
||||
.clone()
|
||||
.sub(&taylor_sum)
|
||||
// NOTE: Should never happen as checked above
|
||||
.unwrap_or_else(|e| e);
|
||||
}
|
||||
}
|
||||
|
||||
if !taylor_sum_positive {
|
||||
return BigUint::zero();
|
||||
}
|
||||
|
||||
taylor_sum.lstrip();
|
||||
taylor_sum
|
||||
}
|
||||
|
||||
/// Return the absolute value of k-th taylor term of `2^((x_ideal - x))/d` i.e.
|
||||
/// `((x - x_ideal) * ln(2) / d)^k / k!`
|
||||
///
|
||||
/// x must be strictly more x_ideal.
|
||||
///
|
||||
/// We compute the term from the last term using this formula:
|
||||
///
|
||||
/// `((x - x_ideal) * ln(2) / d)^k / k! == previous_term * (x - x_ideal) * ln(2) / d / k`
|
||||
///
|
||||
/// `previous_taylor_term` and result are expressed with accuracy `INPoSParam.accuracy`
|
||||
fn compute_taylor_term(k: u32, previous_taylor_term: &BigUint, p: &INPoSParam) -> BigUint {
|
||||
let x_minus_x_ideal =
|
||||
p.x.clone()
|
||||
.sub(&p.x_ideal)
|
||||
// NOTE: Should never happen, as x must be more than x_ideal
|
||||
.unwrap_or_else(|_| BigUint::zero());
|
||||
|
||||
let res = previous_taylor_term.clone().mul(&x_minus_x_ideal).mul(&p.ln2_div_d).div_unit(k);
|
||||
|
||||
// p.accuracy is stripped by definition.
|
||||
let res = div_by_stripped(res, &p.accuracy);
|
||||
let mut res = div_by_stripped(res, &p.accuracy);
|
||||
|
||||
res.lstrip();
|
||||
res
|
||||
}
|
||||
|
||||
/// Compute a div b.
|
||||
///
|
||||
/// requires `b` to be stripped and have no leading zeros.
|
||||
fn div_by_stripped(mut a: BigUint, b: &BigUint) -> BigUint {
|
||||
a.lstrip();
|
||||
|
||||
if b.len() == 0 {
|
||||
log::error!("Computation error: Invalid division");
|
||||
return BigUint::zero();
|
||||
}
|
||||
|
||||
if b.len() == 1 {
|
||||
return a.div_unit(b.checked_get(0).unwrap_or(1));
|
||||
}
|
||||
|
||||
if b.len() > a.len() {
|
||||
return BigUint::zero();
|
||||
}
|
||||
|
||||
if b.len() == a.len() {
|
||||
// 100_000^2 is more than 2^32-1, thus `new_a` has more limbs than `b`.
|
||||
let mut new_a = a.mul(&BigUint::from(100_000u64.pow(2)));
|
||||
new_a.lstrip();
|
||||
|
||||
debug_assert!(new_a.len() > b.len());
|
||||
return new_a
|
||||
.div(b, false)
|
||||
.map(|res| res.0)
|
||||
.unwrap_or_else(BigUint::zero)
|
||||
.div_unit(100_000)
|
||||
.div_unit(100_000);
|
||||
}
|
||||
|
||||
a.div(b, false).map(|res| res.0).unwrap_or_else(BigUint::zero)
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use pezsp_arithmetic::{PerThing, PerU16, Perbill, Percent, Perquintill};
|
||||
|
||||
/// This test the precision and panics if error too big error.
|
||||
///
|
||||
/// error is asserted to be less or equal to 8/accuracy or 8*f64::EPSILON
|
||||
fn test_precision<P: PerThing>(stake: P, ideal_stake: P, falloff: P) {
|
||||
let accuracy_f64 = Into::<u128>::into(P::ACCURACY) as f64;
|
||||
let res = pezpallet_staking_async_reward_fn::compute_inflation(stake, ideal_stake, falloff);
|
||||
let res = Into::<u128>::into(res.deconstruct()) as f64 / accuracy_f64;
|
||||
|
||||
let expect = float_i_npos(stake, ideal_stake, falloff);
|
||||
|
||||
let error = (res - expect).abs();
|
||||
|
||||
if error > 8f64 / accuracy_f64 && error > 8.0 * f64::EPSILON {
|
||||
panic!(
|
||||
"stake: {:?}, ideal_stake: {:?}, falloff: {:?}, res: {}, expect: {}",
|
||||
stake, ideal_stake, falloff, res, expect
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// compute the inflation using floats
|
||||
fn float_i_npos<P: PerThing>(stake: P, ideal_stake: P, falloff: P) -> f64 {
|
||||
let accuracy_f64 = Into::<u128>::into(P::ACCURACY) as f64;
|
||||
|
||||
let ideal_stake = Into::<u128>::into(ideal_stake.deconstruct()) as f64 / accuracy_f64;
|
||||
let stake = Into::<u128>::into(stake.deconstruct()) as f64 / accuracy_f64;
|
||||
let falloff = Into::<u128>::into(falloff.deconstruct()) as f64 / accuracy_f64;
|
||||
|
||||
let x_ideal = ideal_stake;
|
||||
let x = stake;
|
||||
let d = falloff;
|
||||
|
||||
if x < x_ideal {
|
||||
x / x_ideal
|
||||
} else {
|
||||
2_f64.powf((x_ideal - x) / d)
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_precision_for_minimum_falloff() {
|
||||
fn test_falloff_precision_for_minimum_falloff<P: PerThing>() {
|
||||
for stake in 0..1_000 {
|
||||
let stake = P::from_rational(stake, 1_000);
|
||||
let ideal_stake = P::zero();
|
||||
let falloff = P::from_rational(1, 100);
|
||||
test_precision(stake, ideal_stake, falloff);
|
||||
}
|
||||
}
|
||||
|
||||
test_falloff_precision_for_minimum_falloff::<Perquintill>();
|
||||
|
||||
test_falloff_precision_for_minimum_falloff::<PerU16>();
|
||||
|
||||
test_falloff_precision_for_minimum_falloff::<Perbill>();
|
||||
|
||||
test_falloff_precision_for_minimum_falloff::<Percent>();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn compute_inflation_works() {
|
||||
fn compute_inflation_works<P: PerThing>() {
|
||||
for stake in 0..100 {
|
||||
for ideal_stake in 0..10 {
|
||||
for falloff in 1..10 {
|
||||
let stake = P::from_rational(stake, 100);
|
||||
let ideal_stake = P::from_rational(ideal_stake, 10);
|
||||
let falloff = P::from_rational(falloff, 100);
|
||||
test_precision(stake, ideal_stake, falloff);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
compute_inflation_works::<Perquintill>();
|
||||
|
||||
compute_inflation_works::<PerU16>();
|
||||
|
||||
compute_inflation_works::<Perbill>();
|
||||
|
||||
compute_inflation_works::<Percent>();
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
[package]
|
||||
name = "pezpallet-staking-async-runtime-api"
|
||||
version = "14.0.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license = "Apache-2.0"
|
||||
homepage.workspace = true
|
||||
repository.workspace = true
|
||||
description = "RPC runtime API for transaction payment FRAME pallet"
|
||||
readme = "README.md"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { features = ["derive"], workspace = true }
|
||||
pezsp-api = { workspace = true }
|
||||
pezsp-staking = { workspace = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = ["codec/std", "pezsp-api/std", "pezsp-staking/std"]
|
||||
runtime-benchmarks = [
|
||||
"pezsp-api/runtime-benchmarks",
|
||||
"pezsp-staking/runtime-benchmarks",
|
||||
]
|
||||
@@ -0,0 +1,3 @@
|
||||
Runtime API definition for the staking pallet.
|
||||
|
||||
License: Apache-2.0
|
||||
@@ -0,0 +1,39 @@
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! Runtime API definition for the staking pallet.
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use codec::Codec;
|
||||
|
||||
pezsp_api::decl_runtime_apis! {
|
||||
pub trait StakingApi<Balance, AccountId>
|
||||
where
|
||||
Balance: Codec,
|
||||
AccountId: Codec,
|
||||
{
|
||||
/// Returns the nominations quota for a nominator with a given balance.
|
||||
fn nominations_quota(balance: Balance) -> u32;
|
||||
|
||||
/// Returns the page count of exposures for a validator `account` in a given era.
|
||||
fn eras_stakers_page_count(era: pezsp_staking::EraIndex, account: AccountId) -> pezsp_staking::Page;
|
||||
|
||||
/// Returns true if validator `account` has pages to be claimed for the given era.
|
||||
fn pending_rewards(era: pezsp_staking::EraIndex, account: AccountId) -> bool;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
# dependencies (bun install)
|
||||
node_modules
|
||||
|
||||
# output
|
||||
out
|
||||
dist
|
||||
*.tgz
|
||||
|
||||
# code coverage
|
||||
coverage
|
||||
*.lcov
|
||||
|
||||
# logs
|
||||
logs
|
||||
_.log
|
||||
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
|
||||
|
||||
# dotenv environment variable files
|
||||
.env
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
.env.local
|
||||
|
||||
# caches
|
||||
.eslintcache
|
||||
.cache
|
||||
*.tsbuildinfo
|
||||
|
||||
# IntelliJ based IDEs
|
||||
.idea
|
||||
|
||||
# Finder (MacOS) folder config
|
||||
.DS_Store
|
||||
.papi
|
||||
|
||||
rc.json
|
||||
parachain.json
|
||||
miner.log
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"tabWidth": 4,
|
||||
"useTabs": true,
|
||||
"printWidth": 100
|
||||
}
|
||||
@@ -0,0 +1,201 @@
|
||||
# Staking Async Test Teyrchain
|
||||
|
||||
- [Staking Async Test Teyrchain](#staking-async-test-teyrchain)
|
||||
- [Runtime Overview](#runtime-overview)
|
||||
- [Runtime Presets + Other Hacks](#runtime-presets--other-hacks)
|
||||
- [`parameter_types! { pub storage }` FTW](#parameter_types--pub-storage--ftw)
|
||||
- [Optionally Ignoring New Validators](#optionally-ignoring-new-validators)
|
||||
- [Presets](#presets)
|
||||
- [Setup](#setup)
|
||||
- [Quick Start](#quick-start)
|
||||
- [Development Workflow](#development-workflow)
|
||||
- [How To Write Tests](#how-to-write-tests)
|
||||
- [Log Formatting](#log-formatting)
|
||||
|
||||
This folder contains a Node+PAPI+Bun setup to:
|
||||
|
||||
1. run the `pezpallet-staking-async-runtimes` teyrchain and relay-chain. It uses Zombienet under the
|
||||
hood.
|
||||
2. Contains integration tests, based on ZN as well, that spawns a particular test, submits
|
||||
transactions, and inspects the chain state (notably events) for verification.
|
||||
|
||||
The [next section](#runtime-overview) describes the runtimes and further details. To jump right into
|
||||
the setup, see [Setup](#setup).
|
||||
|
||||
## Runtime Overview
|
||||
|
||||
This teyrchain runtime is a fake fork of the asset-hub next (created originally by Dónal). It is here
|
||||
to test the async-staking pallet in a real environment.
|
||||
|
||||
This teyrchain contains:
|
||||
|
||||
- `pezpallet-staking-async`
|
||||
- `pezpallet-staking-async-rc-client`
|
||||
- `pezpallet-election-provider-multi-block` and family
|
||||
- aux staking pallets `pezpallet-nomination-pools`, `pezpallet-fast-unstake`, `pezpallet-bags-list`, and
|
||||
`pezpallet-delegated-staking`.
|
||||
|
||||
All of the above are means to stake and select validators for the RELAY-CHAIN, which is eventually
|
||||
communicated to it via the `pezpallet-staking-async-rc-client` pallet.
|
||||
|
||||
A lot more is in the runtime, and can be eventually removed.
|
||||
|
||||
Note that the teyrchain runtime also contains a `pezpallet-session` that works with
|
||||
`pezpallet-collator-selection` for the TEYRCHAIN block author selection.
|
||||
|
||||
The counterpart `rc` runtime is a relay chain that is meant to host the teyrchain. It contains:
|
||||
|
||||
- `pezpallet-staking-async-ah-client`
|
||||
- `pezpallet-session`
|
||||
- `pezpallet-authorship`
|
||||
- And all of the consensus pallets that feed the authority set from the session, such as
|
||||
aura/babe/grandpa/beefy and so on.
|
||||
|
||||
### Runtime Presets + Other Hacks
|
||||
|
||||
The above runtimes contain a number of hacks, and `genesis presets` that allow them to be quickly
|
||||
adapted to a specific scenario. This section covers these topics.
|
||||
|
||||
#### `parameter_types! { pub storage }` FTW
|
||||
|
||||
In both runtimes, we extensively use `parameter_types! { pub storage }` as a shorthand for
|
||||
`pezpallet-parameters`. This allows us to stick values that are fed into different pallets' `trait
|
||||
Config`, such as `type SignedPhase` (the duration of a phase) into an orphan storage item. This has
|
||||
two benefits:
|
||||
|
||||
1. In manual testing, we can update them on the fly via `sudo(system.set_storage)` calls.
|
||||
[This](https://docs.pezkuwichain.io/sdk/master/src/frame_support/lib.rs.html#357) is how
|
||||
the key for these is generated.
|
||||
2. We can easily tweak them based on startup.
|
||||
|
||||
#### Optionally Ignoring New Validators
|
||||
|
||||
The relay chain runtime contains an important hack. A type called `MaybeUsePreviousValidatorsElse`.
|
||||
This type looks into `parameter_types! { pub storage UsePreviousValidators: bool = true }`, and
|
||||
|
||||
- If set to `true`, it will ignore the new validators coming from AH, and use the previous ones.
|
||||
**Why is this needed**? Because in ZN, our test relay chain is running with usually a set of known
|
||||
validators run by ZN (often alice and bob). If AH sends us back a validator set that contains a
|
||||
large new validator set, the setup will break. As seen in the next section, a number of runtime
|
||||
presets are designed to generate large validator/nominator sets to mimic the behavior of PezkuwiChain
|
||||
and Kusama. We thereofre must use this hack in such cases.
|
||||
- If set to `false`, it will use the new validator set.
|
||||
|
||||
#### Presets
|
||||
|
||||
The runtime presets are generally divided into few categories:
|
||||
|
||||
- `real-s` / `real-m`: imply that the relay chain will not use `MaybeUsePreviousValidatorsElse`.
|
||||
Consequently, AH will NOT generate random validators, and instead use 2 or 4 well know keys
|
||||
(alice, bob, dave, eve) as validator candidates. This setup is useful for slashing testing.
|
||||
`real-s` uses 2 validators, while `real-m` uses 4 validators. The latter is useful for testing
|
||||
disabling. Note that we need at least 2 non-disabled validators to run a teyrchain.
|
||||
- `fake-x`: these presets instruct asset-hub to generate various number of fake validators and
|
||||
nominators. Useful for testing large elections. `MaybeUsePreviousValidatorsElse` is used in the
|
||||
relay runtime to ignore the new validators, and stick to alice and bob.
|
||||
|
||||
More concretely, the presets are:
|
||||
|
||||
- Teyrchain:
|
||||
- `fake-dev`: 4 page, small number of fake validators and nominators.
|
||||
- `fake-hez`: 32 pages, large number of fake validators and nominators.
|
||||
- `fake-ksm`: 16 pages, large number of fake validators and nominators.
|
||||
- `real-s`: 4 pages, alice and bob as validators, 500 fake nominators
|
||||
- `real-m`: 4 pages, alice, bob, dave, eve as validators, 2000 fake nominators.
|
||||
- Relay Chain
|
||||
- `fake-s`: alice and bob as relay validators, `UsePreviousValidators` set to true. Should be
|
||||
used with all 3 `fake-x` presets in the teyrchain.
|
||||
- `real-s`: alice and bob as relay validators, `UsePreviousValidators` set to false. Should be
|
||||
used with `real-s` presets in the teyrchain.
|
||||
- `real-m`: alice, bob, dave, eve as relay validators, `UsePreviousValidators` set to false.
|
||||
Should be used with `real-m` presets in the teyrchain.
|
||||
|
||||
See `genesis_config_presets.rs`, and `fn build_state` in each runtime for more details.
|
||||
|
||||
## Setup
|
||||
|
||||
This section describes how to set up and run this code. Make sure to have the latest version of
|
||||
node, bun and [just](https://github.com/casey/just) installed. Moreover, you are expected to have
|
||||
`zombienet`, `pezkuwi`, `pezkuwi-teyrchain`, `pezkuwi-prepare-worker` and
|
||||
`pezkuwi-execution-worker` in your `PATH` already. Rest of the binaries (`chain-spec-builder`) are
|
||||
compiled from the sdk.
|
||||
|
||||
> verified compatible zombienet version: 1.3.126
|
||||
|
||||
### Quick Start
|
||||
|
||||
For first-time setup, run:
|
||||
|
||||
```bash
|
||||
just setup
|
||||
```
|
||||
|
||||
This single command will:
|
||||
|
||||
- Start the chains and generate fresh metadata
|
||||
- Generate PAPI descriptors from the running chains
|
||||
- Install all dependencies including the generated descriptors
|
||||
- Clean up chain processes
|
||||
|
||||
After this, you can use regular `just install` (or `bun install`) commands without issues.
|
||||
|
||||
### Development Workflow
|
||||
|
||||
```bash
|
||||
# First time setup. Compiles the binaries, spawns ZN, generates PAPI types against it.
|
||||
just setup
|
||||
|
||||
# Regular development - install dependencies
|
||||
just install # or equivalently: bun install
|
||||
|
||||
# Run tests
|
||||
just test
|
||||
|
||||
# Running specific tests
|
||||
bun test tests/example.test.ts
|
||||
bun test tests/unsigned-dev.ts
|
||||
# and so on..
|
||||
```
|
||||
|
||||
Further useful commands:
|
||||
|
||||
```bash
|
||||
# Generate fresh descriptors (when chains are running)
|
||||
just generate-descriptors
|
||||
|
||||
# Run with a specific preset
|
||||
just run <preset>
|
||||
|
||||
# See available presets
|
||||
just presets
|
||||
|
||||
# Clean everything and start fresh
|
||||
just reset
|
||||
|
||||
# See all available commands
|
||||
just help
|
||||
```
|
||||
|
||||
|
||||
## How To Write Tests
|
||||
|
||||
See `tests/example.test.ts`.
|
||||
|
||||
## Log Formatting
|
||||
|
||||
The tests, for each block which contains an event in which we are interested in, will emit a log like this:
|
||||
|
||||
```
|
||||
verbose: [Rely#91][⛓ 2,039ms / 777 kb] Processing event: ...
|
||||
verbose: [Para#71][⛓ 38ms / 852 kb][✍️ hd=0.22, xt=4.07, st=6.82, sum=11.11, cmp=9.74, time=2ms] Processing event: ...
|
||||
```
|
||||
|
||||
- `Rely` indicates the relay chain (truncated to be 4 chars), `Para` indicates the teyrchain.
|
||||
- Both chains' logs contain onchain (⛓) weight information, obtained from `pezframe-system`.
|
||||
- `Para` logs contain more information from the collator/author's logs (✍️). They are:
|
||||
- `hd` header size,
|
||||
- `xt` extrinsics siz
|
||||
- `st` storage proof size
|
||||
- `sum` total PoV,
|
||||
- `cmp` compressed PoV
|
||||
- and `time`, authoring time in the collator.
|
||||
@@ -0,0 +1,576 @@
|
||||
{
|
||||
"lockfileVersion": 1,
|
||||
"workspaces": {
|
||||
"": {
|
||||
"name": "papi-tests",
|
||||
"dependencies": {
|
||||
"@polkadot-labs/hdkd": "^0.0.16",
|
||||
"commander": "^14.0.0",
|
||||
"polkadot-api": "^1.13.1",
|
||||
"strip-ansi": "^7.1.0",
|
||||
"winston": "^3.17.0",
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot-api/cli": "^0.14.0",
|
||||
"@types/bun": "latest",
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@polkadot-api/descriptors": "file:.papi/descriptors",
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": "^5",
|
||||
},
|
||||
},
|
||||
},
|
||||
"packages": {
|
||||
"@babel/code-frame": ["@babel/code-frame@7.27.1", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.27.1", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" } }, "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg=="],
|
||||
|
||||
"@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.27.1", "", {}, "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow=="],
|
||||
|
||||
"@colors/colors": ["@colors/colors@1.6.0", "", {}, "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA=="],
|
||||
|
||||
"@commander-js/extra-typings": ["@commander-js/extra-typings@14.0.0", "", { "peerDependencies": { "commander": "~14.0.0" } }, "sha512-hIn0ncNaJRLkZrxBIp5AsW/eXEHNKYQBh0aPdoUqNgD+Io3NIykQqpKFyKcuasZhicGaEZJX/JBSIkZ4e5x8Dg=="],
|
||||
|
||||
"@dabh/diagnostics": ["@dabh/diagnostics@2.0.3", "", { "dependencies": { "colorspace": "1.1.x", "enabled": "2.0.x", "kuler": "^2.0.0" } }, "sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA=="],
|
||||
|
||||
"@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.25.5", "", { "os": "aix", "cpu": "ppc64" }, "sha512-9o3TMmpmftaCMepOdA5k/yDw8SfInyzWWTjYTFCX3kPSDJMROQTb8jg+h9Cnwnmm1vOzvxN7gIfB5V2ewpjtGA=="],
|
||||
|
||||
"@esbuild/android-arm": ["@esbuild/android-arm@0.25.5", "", { "os": "android", "cpu": "arm" }, "sha512-AdJKSPeEHgi7/ZhuIPtcQKr5RQdo6OO2IL87JkianiMYMPbCtot9fxPbrMiBADOWWm3T2si9stAiVsGbTQFkbA=="],
|
||||
|
||||
"@esbuild/android-arm64": ["@esbuild/android-arm64@0.25.5", "", { "os": "android", "cpu": "arm64" }, "sha512-VGzGhj4lJO+TVGV1v8ntCZWJktV7SGCs3Pn1GRWI1SBFtRALoomm8k5E9Pmwg3HOAal2VDc2F9+PM/rEY6oIDg=="],
|
||||
|
||||
"@esbuild/android-x64": ["@esbuild/android-x64@0.25.5", "", { "os": "android", "cpu": "x64" }, "sha512-D2GyJT1kjvO//drbRT3Hib9XPwQeWd9vZoBJn+bu/lVsOZ13cqNdDeqIF/xQ5/VmWvMduP6AmXvylO/PIc2isw=="],
|
||||
|
||||
"@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.25.5", "", { "os": "darwin", "cpu": "arm64" }, "sha512-GtaBgammVvdF7aPIgH2jxMDdivezgFu6iKpmT+48+F8Hhg5J/sfnDieg0aeG/jfSvkYQU2/pceFPDKlqZzwnfQ=="],
|
||||
|
||||
"@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.25.5", "", { "os": "darwin", "cpu": "x64" }, "sha512-1iT4FVL0dJ76/q1wd7XDsXrSW+oLoquptvh4CLR4kITDtqi2e/xwXwdCVH8hVHU43wgJdsq7Gxuzcs6Iq/7bxQ=="],
|
||||
|
||||
"@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.25.5", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-nk4tGP3JThz4La38Uy/gzyXtpkPW8zSAmoUhK9xKKXdBCzKODMc2adkB2+8om9BDYugz+uGV7sLmpTYzvmz6Sw=="],
|
||||
|
||||
"@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.25.5", "", { "os": "freebsd", "cpu": "x64" }, "sha512-PrikaNjiXdR2laW6OIjlbeuCPrPaAl0IwPIaRv+SMV8CiM8i2LqVUHFC1+8eORgWyY7yhQY+2U2fA55mBzReaw=="],
|
||||
|
||||
"@esbuild/linux-arm": ["@esbuild/linux-arm@0.25.5", "", { "os": "linux", "cpu": "arm" }, "sha512-cPzojwW2okgh7ZlRpcBEtsX7WBuqbLrNXqLU89GxWbNt6uIg78ET82qifUy3W6OVww6ZWobWub5oqZOVtwolfw=="],
|
||||
|
||||
"@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.25.5", "", { "os": "linux", "cpu": "arm64" }, "sha512-Z9kfb1v6ZlGbWj8EJk9T6czVEjjq2ntSYLY2cw6pAZl4oKtfgQuS4HOq41M/BcoLPzrUbNd+R4BXFyH//nHxVg=="],
|
||||
|
||||
"@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.25.5", "", { "os": "linux", "cpu": "ia32" }, "sha512-sQ7l00M8bSv36GLV95BVAdhJ2QsIbCuCjh/uYrWiMQSUuV+LpXwIqhgJDcvMTj+VsQmqAHL2yYaasENvJ7CDKA=="],
|
||||
|
||||
"@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.25.5", "", { "os": "linux", "cpu": "none" }, "sha512-0ur7ae16hDUC4OL5iEnDb0tZHDxYmuQyhKhsPBV8f99f6Z9KQM02g33f93rNH5A30agMS46u2HP6qTdEt6Q1kg=="],
|
||||
|
||||
"@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.25.5", "", { "os": "linux", "cpu": "none" }, "sha512-kB/66P1OsHO5zLz0i6X0RxlQ+3cu0mkxS3TKFvkb5lin6uwZ/ttOkP3Z8lfR9mJOBk14ZwZ9182SIIWFGNmqmg=="],
|
||||
|
||||
"@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.25.5", "", { "os": "linux", "cpu": "ppc64" }, "sha512-UZCmJ7r9X2fe2D6jBmkLBMQetXPXIsZjQJCjgwpVDz+YMcS6oFR27alkgGv3Oqkv07bxdvw7fyB71/olceJhkQ=="],
|
||||
|
||||
"@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.25.5", "", { "os": "linux", "cpu": "none" }, "sha512-kTxwu4mLyeOlsVIFPfQo+fQJAV9mh24xL+y+Bm6ej067sYANjyEw1dNHmvoqxJUCMnkBdKpvOn0Ahql6+4VyeA=="],
|
||||
|
||||
"@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.25.5", "", { "os": "linux", "cpu": "s390x" }, "sha512-K2dSKTKfmdh78uJ3NcWFiqyRrimfdinS5ErLSn3vluHNeHVnBAFWC8a4X5N+7FgVE1EjXS1QDZbpqZBjfrqMTQ=="],
|
||||
|
||||
"@esbuild/linux-x64": ["@esbuild/linux-x64@0.25.5", "", { "os": "linux", "cpu": "x64" }, "sha512-uhj8N2obKTE6pSZ+aMUbqq+1nXxNjZIIjCjGLfsWvVpy7gKCOL6rsY1MhRh9zLtUtAI7vpgLMK6DxjO8Qm9lJw=="],
|
||||
|
||||
"@esbuild/netbsd-arm64": ["@esbuild/netbsd-arm64@0.25.5", "", { "os": "none", "cpu": "arm64" }, "sha512-pwHtMP9viAy1oHPvgxtOv+OkduK5ugofNTVDilIzBLpoWAM16r7b/mxBvfpuQDpRQFMfuVr5aLcn4yveGvBZvw=="],
|
||||
|
||||
"@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.25.5", "", { "os": "none", "cpu": "x64" }, "sha512-WOb5fKrvVTRMfWFNCroYWWklbnXH0Q5rZppjq0vQIdlsQKuw6mdSihwSo4RV/YdQ5UCKKvBy7/0ZZYLBZKIbwQ=="],
|
||||
|
||||
"@esbuild/openbsd-arm64": ["@esbuild/openbsd-arm64@0.25.5", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-7A208+uQKgTxHd0G0uqZO8UjK2R0DDb4fDmERtARjSHWxqMTye4Erz4zZafx7Di9Cv+lNHYuncAkiGFySoD+Mw=="],
|
||||
|
||||
"@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.25.5", "", { "os": "openbsd", "cpu": "x64" }, "sha512-G4hE405ErTWraiZ8UiSoesH8DaCsMm0Cay4fsFWOOUcz8b8rC6uCvnagr+gnioEjWn0wC+o1/TAHt+It+MpIMg=="],
|
||||
|
||||
"@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.25.5", "", { "os": "sunos", "cpu": "x64" }, "sha512-l+azKShMy7FxzY0Rj4RCt5VD/q8mG/e+mDivgspo+yL8zW7qEwctQ6YqKX34DTEleFAvCIUviCFX1SDZRSyMQA=="],
|
||||
|
||||
"@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.25.5", "", { "os": "win32", "cpu": "arm64" }, "sha512-O2S7SNZzdcFG7eFKgvwUEZ2VG9D/sn/eIiz8XRZ1Q/DO5a3s76Xv0mdBzVM5j5R639lXQmPmSo0iRpHqUUrsxw=="],
|
||||
|
||||
"@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.25.5", "", { "os": "win32", "cpu": "ia32" }, "sha512-onOJ02pqs9h1iMJ1PQphR+VZv8qBMQ77Klcsqv9CNW2w6yLqoURLcgERAIurY6QE63bbLuqgP9ATqajFLK5AMQ=="],
|
||||
|
||||
"@esbuild/win32-x64": ["@esbuild/win32-x64@0.25.5", "", { "os": "win32", "cpu": "x64" }, "sha512-TXv6YnJ8ZMVdX+SXWVBo/0p8LTcrUYngpWjvm91TMjjBQii7Oz11Lw5lbDV5Y0TzuhSJHwiH4hEtC1I42mMS0g=="],
|
||||
|
||||
"@isaacs/cliui": ["@isaacs/cliui@8.0.2", "", { "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", "strip-ansi": "^7.0.1", "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", "wrap-ansi": "^8.1.0", "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" } }, "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA=="],
|
||||
|
||||
"@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.8", "", { "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA=="],
|
||||
|
||||
"@jridgewell/resolve-uri": ["@jridgewell/resolve-uri@3.1.2", "", {}, "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw=="],
|
||||
|
||||
"@jridgewell/set-array": ["@jridgewell/set-array@1.2.1", "", {}, "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A=="],
|
||||
|
||||
"@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.0", "", {}, "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ=="],
|
||||
|
||||
"@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.25", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ=="],
|
||||
|
||||
"@noble/curves": ["@noble/curves@1.9.2", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-HxngEd2XUcg9xi20JkwlLCtYwfoFw4JGkuZpT+WlsPD4gB/cxkvTD8fSsoAnphGZhFdZYKeQIPCuFlWPm1uE0g=="],
|
||||
|
||||
"@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="],
|
||||
|
||||
"@pkgjs/parseargs": ["@pkgjs/parseargs@0.11.0", "", {}, "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg=="],
|
||||
|
||||
"@polkadot-api/cli": ["@polkadot-api/cli@0.14.0", "", { "dependencies": { "@commander-js/extra-typings": "^14.0.0", "@polkadot-api/codegen": "0.16.3", "@polkadot-api/ink-contracts": "0.3.4", "@polkadot-api/json-rpc-provider": "0.0.4", "@polkadot-api/known-chains": "0.9.0", "@polkadot-api/metadata-compatibility": "0.3.0", "@polkadot-api/observable-client": "0.12.0", "@polkadot-api/polkadot-sdk-compat": "2.3.2", "@polkadot-api/sm-provider": "0.1.7", "@polkadot-api/smoldot": "0.3.10", "@polkadot-api/bizinikiwi-bindings": "0.14.0", "@polkadot-api/bizinikiwi-client": "0.4.1", "@polkadot-api/utils": "0.2.0", "@polkadot-api/wasm-executor": "^0.2.1", "@polkadot-api/ws-provider": "0.4.0", "@types/node": "^22.15.30", "commander": "^14.0.0", "execa": "^9.6.0", "fs.promises.exists": "^1.1.4", "ora": "^8.2.0", "read-pkg": "^9.0.1", "rxjs": "^7.8.2", "tsc-prog": "^2.3.0", "tsup": "^8.5.0", "typescript": "^5.8.3", "write-package": "^7.1.0" }, "bin": { "papi": "dist/main.js", "polkadot-api": "dist/main.js" } }, "sha512-bDNWSbSVWNRYYjOQgCWp321Rut4/yDxjfn0wJcACcCiWboJNu4ErZ6370yLovkbTDrOUqMPO+Mnq7cnN4xPzGA=="],
|
||||
|
||||
"@polkadot-api/codegen": ["@polkadot-api/codegen@0.16.3", "", { "dependencies": { "@polkadot-api/ink-contracts": "0.3.4", "@polkadot-api/metadata-builders": "0.12.2", "@polkadot-api/metadata-compatibility": "0.3.0", "@polkadot-api/bizinikiwi-bindings": "0.14.0", "@polkadot-api/utils": "0.2.0" } }, "sha512-vZy4r/AlkYdTPIxgvifmC2YqwVQgBA2RRLV7apGF2WzmqTTIGjLITAw+6M78X4pKZEkPR35+gVE4Wgvk+TvliQ=="],
|
||||
|
||||
"@polkadot-api/descriptors": ["@polkadot-api/descriptors@file:.papi/descriptors", { "peerDependencies": { "polkadot-api": ">=1.11.2" } }],
|
||||
|
||||
"@polkadot-api/ink-contracts": ["@polkadot-api/ink-contracts@0.3.4", "", { "dependencies": { "@polkadot-api/metadata-builders": "0.12.2", "@polkadot-api/bizinikiwi-bindings": "0.14.0", "@polkadot-api/utils": "0.2.0" } }, "sha512-JnCIX3GCV47u9h9poUJUJMcZ+wr1/2wCbg6NftmpqeQfin5BsWYOnKSkrMY7SEWpXC4EfACK8ucub9oo2rv/jg=="],
|
||||
|
||||
"@polkadot-api/json-rpc-provider": ["@polkadot-api/json-rpc-provider@0.0.4", "", {}, "sha512-9cDijLIxzHOBuq6yHqpqjJ9jBmXrctjc1OFqU+tQrS96adQze3mTIH6DTgfb/0LMrqxzxffz1HQGrIlEH00WrA=="],
|
||||
|
||||
"@polkadot-api/json-rpc-provider-proxy": ["@polkadot-api/json-rpc-provider-proxy@0.2.4", "", {}, "sha512-nuGoY9QpBAiRU7xmXN3nugFvPcnSu3IxTLm1OWcNTGlZ1LW5bvdQHz3JLk56+Jlyb3GJ971hqdg2DJsMXkKCOg=="],
|
||||
|
||||
"@polkadot-api/known-chains": ["@polkadot-api/known-chains@0.9.0", "", {}, "sha512-m/YF29FJBX9rTEgBKo63JHEg13Kw5EHbLRM9QCNMmT/mkvKlCgj5pm/T38Y8w3NS+4M8TRCyoXrUDXKUL1lX7g=="],
|
||||
|
||||
"@polkadot-api/logs-provider": ["@polkadot-api/logs-provider@0.0.6", "", { "dependencies": { "@polkadot-api/json-rpc-provider": "0.0.4" } }, "sha512-4WgHlvy+xee1ADaaVf6+MlK/+jGMtsMgAzvbQOJZnP4PfQuagoTqaeayk8HYKxXGphogLlPbD06tANxcb+nvAg=="],
|
||||
|
||||
"@polkadot-api/merkleize-metadata": ["@polkadot-api/merkleize-metadata@1.1.18", "", { "dependencies": { "@polkadot-api/metadata-builders": "0.12.2", "@polkadot-api/bizinikiwi-bindings": "0.14.0", "@polkadot-api/utils": "0.2.0" } }, "sha512-WKP4urGv6YDO9rGeCLX+I/I0uJCXunytNzyPfBMOK9dwJD48UpX+oHf2aNnWvP4j9zQImY/oaBQQ9Sp89ABZOw=="],
|
||||
|
||||
"@polkadot-api/metadata-builders": ["@polkadot-api/metadata-builders@0.12.2", "", { "dependencies": { "@polkadot-api/bizinikiwi-bindings": "0.14.0", "@polkadot-api/utils": "0.2.0" } }, "sha512-Mmivj1YZve1fCkM90eIIo73B0jkiqMA3zwhFcqYaBfuAu4x5t0rt+Ucfx76t4qxJOhG8wXp/tmdbzWIrWG909A=="],
|
||||
|
||||
"@polkadot-api/metadata-compatibility": ["@polkadot-api/metadata-compatibility@0.3.0", "", { "dependencies": { "@polkadot-api/metadata-builders": "0.12.2", "@polkadot-api/bizinikiwi-bindings": "0.14.0" } }, "sha512-9GNHY7YM5Jb3/TAphwd6iy46Vl1n4m7IEVwLZVZ9ZLlJLJrW+gxVOz1htE+iIHVohDak4lIJiXioza3mNKAvaw=="],
|
||||
|
||||
"@polkadot-api/observable-client": ["@polkadot-api/observable-client@0.12.0", "", { "dependencies": { "@polkadot-api/metadata-builders": "0.12.2", "@polkadot-api/bizinikiwi-bindings": "0.14.0", "@polkadot-api/utils": "0.2.0" }, "peerDependencies": { "@polkadot-api/bizinikiwi-client": "0.4.1", "rxjs": ">=7.8.0" } }, "sha512-2edI5Ke3EOWT5F4+m13alJx3zTQGJd9CPvL9iHvwyBpgJ+5T+VNf69lHpTQ16ruWGnravPG0ixkz1FhFh8ZOKA=="],
|
||||
|
||||
"@polkadot-api/pjs-signer": ["@polkadot-api/pjs-signer@0.6.9", "", { "dependencies": { "@polkadot-api/metadata-builders": "0.12.2", "@polkadot-api/polkadot-signer": "0.1.6", "@polkadot-api/signers-common": "0.1.10", "@polkadot-api/bizinikiwi-bindings": "0.14.0", "@polkadot-api/utils": "0.2.0" } }, "sha512-WXWiIbYnN2N9VgUlGT5M1qKJBHB2EvrxPo/eHm9gjwsTwWU/x0RvInAE4P1lcNztCtyqZL41FiwEyYZnNzh1CQ=="],
|
||||
|
||||
"@polkadot-api/polkadot-sdk-compat": ["@polkadot-api/polkadot-sdk-compat@2.3.2", "", { "dependencies": { "@polkadot-api/json-rpc-provider": "0.0.4" } }, "sha512-rLCveP3a6Xd0r218yRqVY34lJ8bXVmE12cArbU4JFp9p8e8Jbb6xdqOdu7bQtjlZUsahhcmfIHYQSXKziST7PA=="],
|
||||
|
||||
"@polkadot-api/polkadot-signer": ["@polkadot-api/polkadot-signer@0.1.6", "", {}, "sha512-X7ghAa4r7doETtjAPTb50IpfGtrBmy3BJM5WCfNKa1saK04VFY9w+vDn+hwEcM4p0PcDHt66Ts74hzvHq54d9A=="],
|
||||
|
||||
"@polkadot-api/signer": ["@polkadot-api/signer@0.2.2", "", { "dependencies": { "@noble/hashes": "^1.8.0", "@polkadot-api/merkleize-metadata": "1.1.18", "@polkadot-api/polkadot-signer": "0.1.6", "@polkadot-api/signers-common": "0.1.10", "@polkadot-api/bizinikiwi-bindings": "0.14.0", "@polkadot-api/utils": "0.2.0" } }, "sha512-COIOOCgnwHwcwVle4eBmHNHbrqjIL7Bff94GZQlOMaOULlY1ajSthVGOZQ2b04rda6r3mlhNE+sAoDBPXPpq7w=="],
|
||||
|
||||
"@polkadot-api/signers-common": ["@polkadot-api/signers-common@0.1.10", "", { "dependencies": { "@polkadot-api/metadata-builders": "0.12.2", "@polkadot-api/polkadot-signer": "0.1.6", "@polkadot-api/bizinikiwi-bindings": "0.14.0", "@polkadot-api/utils": "0.2.0" } }, "sha512-Or2wTrbnc6FXHbjPDf8OU2mPoFYdkcr3tx35W4FYML4OTsSnDORX+h3Q6cGbWSHdWp0VeT6QcEj6ewfaTuLREA=="],
|
||||
|
||||
"@polkadot-api/sm-provider": ["@polkadot-api/sm-provider@0.1.7", "", { "dependencies": { "@polkadot-api/json-rpc-provider": "0.0.4", "@polkadot-api/json-rpc-provider-proxy": "0.2.4" }, "peerDependencies": { "@polkadot-api/smoldot": ">=0.3" } }, "sha512-BhNKVeIFZdawpPVadXszLl8IP4EDjcLHe/GchfRRFkvoNFuwS2nNv/npYIqCviXV+dd2R8VnEELxwScsf380Og=="],
|
||||
|
||||
"@polkadot-api/smoldot": ["@polkadot-api/smoldot@0.3.10", "", { "dependencies": { "@types/node": "^22.15.30", "smoldot": "2.0.36" } }, "sha512-oL0Qsq2p3h2mU1/+gNq4h2rC/S99WoDiqkpmxg/phzknjXcbYXouYLSvhGbECygE1vWPVPl3IWAOjW/gcKdYKw=="],
|
||||
|
||||
"@polkadot-api/bizinikiwi-bindings": ["@polkadot-api/bizinikiwi-bindings@0.14.0", "", { "dependencies": { "@noble/hashes": "^1.8.0", "@polkadot-api/utils": "0.2.0", "@scure/base": "^1.2.6", "scale-ts": "^1.6.1" } }, "sha512-ZmZnw4IbxCXIqI1thEtQ83WrXwsvkqnbo0S6GRzbmrfZFh2JyVxGckPrMMLPH3ScqGgNJJkEdGGU/jSFffqTCA=="],
|
||||
|
||||
"@polkadot-api/bizinikiwi-client": ["@polkadot-api/bizinikiwi-client@0.4.1", "", { "dependencies": { "@polkadot-api/json-rpc-provider": "0.0.4", "@polkadot-api/utils": "0.2.0" } }, "sha512-g88H0ksYNxNyfidgDNpE5QvTUGb8dC5NNx12bICbMCWu4NGokbH6jW6eucWNLI0VxWCAfzGjxzibCw5NDl/6+g=="],
|
||||
|
||||
"@polkadot-api/utils": ["@polkadot-api/utils@0.2.0", "", {}, "sha512-nY3i5fQJoAxU4n3bD7Fs208/KR2J95SGfVc58kDjbRYN5a84kWaGEqzjBNtP9oqht49POM8Bm9mbIrkvC1Bzuw=="],
|
||||
|
||||
"@polkadot-api/wasm-executor": ["@polkadot-api/wasm-executor@0.2.1", "", {}, "sha512-EN3qtu9Aurz1PoEjvrvL/Z9lSMrLkRU2K1fOjzWFpI5siBgQ2eN/tMLbX1VjaSk1VhvXmbXPaqBrkfdMCxLdsg=="],
|
||||
|
||||
"@polkadot-api/ws-provider": ["@polkadot-api/ws-provider@0.4.0", "", { "dependencies": { "@polkadot-api/json-rpc-provider": "0.0.4", "@polkadot-api/json-rpc-provider-proxy": "0.2.4", "ws": "^8.18.1" } }, "sha512-ZurjUHHAlQ1Ux8HiZz7mtkg1qjq6LmqxcHljcZxne0U7foCZrXdWHsohwlV8kUQUir5kXuDsNvdZN/MFCUMaVw=="],
|
||||
|
||||
"@polkadot-labs/hdkd": ["@polkadot-labs/hdkd@0.0.16", "", { "dependencies": { "@polkadot-labs/hdkd-helpers": "0.0.16" } }, "sha512-72vOaxBUzzEXdR5nPbsgbA3ReJ0uuBpt6ZU9TNMYACKVIRH0ivjBtsH6HRo0YGEmNbWLCma40hJ2HfVd16xgTQ=="],
|
||||
|
||||
"@polkadot-labs/hdkd-helpers": ["@polkadot-labs/hdkd-helpers@0.0.16", "", { "dependencies": { "@noble/curves": "^1.9.1", "@noble/hashes": "^1.8.0", "@scure/base": "^1.2.5", "micro-sr25519": "^0.1.3", "scale-ts": "^1.6.1" } }, "sha512-Lc6ydojO2X93+LyxG0sMJStP340xlqaHweLbClZXqt33himfTSba+X6cX+8bzi8tCx/sFwgWVKQpsZ55UlFgMQ=="],
|
||||
|
||||
"@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.44.0", "", { "os": "android", "cpu": "arm" }, "sha512-xEiEE5oDW6tK4jXCAyliuntGR+amEMO7HLtdSshVuhFnKTYoeYMyXQK7pLouAJJj5KHdwdn87bfHAR2nSdNAUA=="],
|
||||
|
||||
"@rollup/rollup-android-arm64": ["@rollup/rollup-android-arm64@4.44.0", "", { "os": "android", "cpu": "arm64" }, "sha512-uNSk/TgvMbskcHxXYHzqwiyBlJ/lGcv8DaUfcnNwict8ba9GTTNxfn3/FAoFZYgkaXXAdrAA+SLyKplyi349Jw=="],
|
||||
|
||||
"@rollup/rollup-darwin-arm64": ["@rollup/rollup-darwin-arm64@4.44.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-VGF3wy0Eq1gcEIkSCr8Ke03CWT+Pm2yveKLaDvq51pPpZza3JX/ClxXOCmTYYq3us5MvEuNRTaeyFThCKRQhOA=="],
|
||||
|
||||
"@rollup/rollup-darwin-x64": ["@rollup/rollup-darwin-x64@4.44.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-fBkyrDhwquRvrTxSGH/qqt3/T0w5Rg0L7ZIDypvBPc1/gzjJle6acCpZ36blwuwcKD/u6oCE/sRWlUAcxLWQbQ=="],
|
||||
|
||||
"@rollup/rollup-freebsd-arm64": ["@rollup/rollup-freebsd-arm64@4.44.0", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-u5AZzdQJYJXByB8giQ+r4VyfZP+walV+xHWdaFx/1VxsOn6eWJhK2Vl2eElvDJFKQBo/hcYIBg/jaKS8ZmKeNQ=="],
|
||||
|
||||
"@rollup/rollup-freebsd-x64": ["@rollup/rollup-freebsd-x64@4.44.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-qC0kS48c/s3EtdArkimctY7h3nHicQeEUdjJzYVJYR3ct3kWSafmn6jkNCA8InbUdge6PVx6keqjk5lVGJf99g=="],
|
||||
|
||||
"@rollup/rollup-linux-arm-gnueabihf": ["@rollup/rollup-linux-arm-gnueabihf@4.44.0", "", { "os": "linux", "cpu": "arm" }, "sha512-x+e/Z9H0RAWckn4V2OZZl6EmV0L2diuX3QB0uM1r6BvhUIv6xBPL5mrAX2E3e8N8rEHVPwFfz/ETUbV4oW9+lQ=="],
|
||||
|
||||
"@rollup/rollup-linux-arm-musleabihf": ["@rollup/rollup-linux-arm-musleabihf@4.44.0", "", { "os": "linux", "cpu": "arm" }, "sha512-1exwiBFf4PU/8HvI8s80icyCcnAIB86MCBdst51fwFmH5dyeoWVPVgmQPcKrMtBQ0W5pAs7jBCWuRXgEpRzSCg=="],
|
||||
|
||||
"@rollup/rollup-linux-arm64-gnu": ["@rollup/rollup-linux-arm64-gnu@4.44.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-ZTR2mxBHb4tK4wGf9b8SYg0Y6KQPjGpR4UWwTFdnmjB4qRtoATZ5dWn3KsDwGa5Z2ZBOE7K52L36J9LueKBdOQ=="],
|
||||
|
||||
"@rollup/rollup-linux-arm64-musl": ["@rollup/rollup-linux-arm64-musl@4.44.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-GFWfAhVhWGd4r6UxmnKRTBwP1qmModHtd5gkraeW2G490BpFOZkFtem8yuX2NyafIP/mGpRJgTJ2PwohQkUY/Q=="],
|
||||
|
||||
"@rollup/rollup-linux-loongarch64-gnu": ["@rollup/rollup-linux-loongarch64-gnu@4.44.0", "", { "os": "linux", "cpu": "none" }, "sha512-xw+FTGcov/ejdusVOqKgMGW3c4+AgqrfvzWEVXcNP6zq2ue+lsYUgJ+5Rtn/OTJf7e2CbgTFvzLW2j0YAtj0Gg=="],
|
||||
|
||||
"@rollup/rollup-linux-powerpc64le-gnu": ["@rollup/rollup-linux-powerpc64le-gnu@4.44.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-bKGibTr9IdF0zr21kMvkZT4K6NV+jjRnBoVMt2uNMG0BYWm3qOVmYnXKzx7UhwrviKnmK46IKMByMgvpdQlyJQ=="],
|
||||
|
||||
"@rollup/rollup-linux-riscv64-gnu": ["@rollup/rollup-linux-riscv64-gnu@4.44.0", "", { "os": "linux", "cpu": "none" }, "sha512-vV3cL48U5kDaKZtXrti12YRa7TyxgKAIDoYdqSIOMOFBXqFj2XbChHAtXquEn2+n78ciFgr4KIqEbydEGPxXgA=="],
|
||||
|
||||
"@rollup/rollup-linux-riscv64-musl": ["@rollup/rollup-linux-riscv64-musl@4.44.0", "", { "os": "linux", "cpu": "none" }, "sha512-TDKO8KlHJuvTEdfw5YYFBjhFts2TR0VpZsnLLSYmB7AaohJhM8ctDSdDnUGq77hUh4m/djRafw+9zQpkOanE2Q=="],
|
||||
|
||||
"@rollup/rollup-linux-s390x-gnu": ["@rollup/rollup-linux-s390x-gnu@4.44.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-8541GEyktXaw4lvnGp9m84KENcxInhAt6vPWJ9RodsB/iGjHoMB2Pp5MVBCiKIRxrxzJhGCxmNzdu+oDQ7kwRA=="],
|
||||
|
||||
"@rollup/rollup-linux-x64-gnu": ["@rollup/rollup-linux-x64-gnu@4.44.0", "", { "os": "linux", "cpu": "x64" }, "sha512-iUVJc3c0o8l9Sa/qlDL2Z9UP92UZZW1+EmQ4xfjTc1akr0iUFZNfxrXJ/R1T90h/ILm9iXEY6+iPrmYB3pXKjw=="],
|
||||
|
||||
"@rollup/rollup-linux-x64-musl": ["@rollup/rollup-linux-x64-musl@4.44.0", "", { "os": "linux", "cpu": "x64" }, "sha512-PQUobbhLTQT5yz/SPg116VJBgz+XOtXt8D1ck+sfJJhuEsMj2jSej5yTdp8CvWBSceu+WW+ibVL6dm0ptG5fcA=="],
|
||||
|
||||
"@rollup/rollup-win32-arm64-msvc": ["@rollup/rollup-win32-arm64-msvc@4.44.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-M0CpcHf8TWn+4oTxJfh7LQuTuaYeXGbk0eageVjQCKzYLsajWS/lFC94qlRqOlyC2KvRT90ZrfXULYmukeIy7w=="],
|
||||
|
||||
"@rollup/rollup-win32-ia32-msvc": ["@rollup/rollup-win32-ia32-msvc@4.44.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-3XJ0NQtMAXTWFW8FqZKcw3gOQwBtVWP/u8TpHP3CRPXD7Pd6s8lLdH3sHWh8vqKCyyiI8xW5ltJScQmBU9j7WA=="],
|
||||
|
||||
"@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.44.0", "", { "os": "win32", "cpu": "x64" }, "sha512-Q2Mgwt+D8hd5FIPUuPDsvPR7Bguza6yTkJxspDGkZj7tBRn2y4KSWYuIXpftFSjBra76TbKerCV7rgFPQrn+wQ=="],
|
||||
|
||||
"@rx-state/core": ["@rx-state/core@0.1.4", "", { "peerDependencies": { "rxjs": ">=7" } }, "sha512-Z+3hjU2xh1HisLxt+W5hlYX/eGSDaXXP+ns82gq/PLZpkXLu0uwcNUh9RLY3Clq4zT+hSsA3vcpIGt6+UAb8rQ=="],
|
||||
|
||||
"@scure/base": ["@scure/base@1.2.6", "", {}, "sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg=="],
|
||||
|
||||
"@sec-ant/readable-stream": ["@sec-ant/readable-stream@0.4.1", "", {}, "sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg=="],
|
||||
|
||||
"@sindresorhus/merge-streams": ["@sindresorhus/merge-streams@4.0.0", "", {}, "sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ=="],
|
||||
|
||||
"@types/bun": ["@types/bun@1.2.16", "", { "dependencies": { "bun-types": "1.2.16" } }, "sha512-1aCZJ/6nSiViw339RsaNhkNoEloLaPzZhxMOYEa7OzRzO41IGg5n/7I43/ZIAW/c+Q6cT12Vf7fOZOoVIzb5BQ=="],
|
||||
|
||||
"@types/estree": ["@types/estree@1.0.8", "", {}, "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="],
|
||||
|
||||
"@types/node": ["@types/node@22.15.32", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-3jigKqgSjsH6gYZv2nEsqdXfZqIFGAV36XYYjf9KGZ3PSG+IhLecqPnI310RvjutyMwifE2hhhNEklOUrvx/wA=="],
|
||||
|
||||
"@types/normalize-package-data": ["@types/normalize-package-data@2.4.4", "", {}, "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA=="],
|
||||
|
||||
"@types/triple-beam": ["@types/triple-beam@1.3.5", "", {}, "sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw=="],
|
||||
|
||||
"acorn": ["acorn@8.15.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg=="],
|
||||
|
||||
"ansi-regex": ["ansi-regex@6.1.0", "", {}, "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA=="],
|
||||
|
||||
"ansi-styles": ["ansi-styles@6.2.1", "", {}, "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug=="],
|
||||
|
||||
"any-promise": ["any-promise@1.3.0", "", {}, "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A=="],
|
||||
|
||||
"async": ["async@3.2.6", "", {}, "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA=="],
|
||||
|
||||
"balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
|
||||
|
||||
"brace-expansion": ["brace-expansion@2.0.2", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ=="],
|
||||
|
||||
"bun-types": ["bun-types@1.2.16", "", { "dependencies": { "@types/node": "*" } }, "sha512-ciXLrHV4PXax9vHvUrkvun9VPVGOVwbbbBF/Ev1cXz12lyEZMoJpIJABOfPcN9gDJRaiKF9MVbSygLg4NXu3/A=="],
|
||||
|
||||
"bundle-require": ["bundle-require@5.1.0", "", { "dependencies": { "load-tsconfig": "^0.2.3" }, "peerDependencies": { "esbuild": ">=0.18" } }, "sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA=="],
|
||||
|
||||
"cac": ["cac@6.7.14", "", {}, "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ=="],
|
||||
|
||||
"chalk": ["chalk@5.4.1", "", {}, "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w=="],
|
||||
|
||||
"chokidar": ["chokidar@4.0.3", "", { "dependencies": { "readdirp": "^4.0.1" } }, "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA=="],
|
||||
|
||||
"cli-cursor": ["cli-cursor@5.0.0", "", { "dependencies": { "restore-cursor": "^5.0.0" } }, "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw=="],
|
||||
|
||||
"cli-spinners": ["cli-spinners@2.9.2", "", {}, "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg=="],
|
||||
|
||||
"color": ["color@3.2.1", "", { "dependencies": { "color-convert": "^1.9.3", "color-string": "^1.6.0" } }, "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA=="],
|
||||
|
||||
"color-convert": ["color-convert@1.9.3", "", { "dependencies": { "color-name": "1.1.3" } }, "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg=="],
|
||||
|
||||
"color-name": ["color-name@1.1.3", "", {}, "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="],
|
||||
|
||||
"color-string": ["color-string@1.9.1", "", { "dependencies": { "color-name": "^1.0.0", "simple-swizzle": "^0.2.2" } }, "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg=="],
|
||||
|
||||
"colorspace": ["colorspace@1.1.4", "", { "dependencies": { "color": "^3.1.3", "text-hex": "1.0.x" } }, "sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w=="],
|
||||
|
||||
"commander": ["commander@14.0.0", "", {}, "sha512-2uM9rYjPvyq39NwLRqaiLtWHyDC1FvryJDa2ATTVims5YAS4PupsEQsDvP14FqhFr0P49CYDugi59xaxJlTXRA=="],
|
||||
|
||||
"confbox": ["confbox@0.1.8", "", {}, "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w=="],
|
||||
|
||||
"consola": ["consola@3.4.2", "", {}, "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA=="],
|
||||
|
||||
"cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="],
|
||||
|
||||
"debug": ["debug@4.4.1", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ=="],
|
||||
|
||||
"deepmerge-ts": ["deepmerge-ts@7.1.5", "", {}, "sha512-HOJkrhaYsweh+W+e74Yn7YStZOilkoPb6fycpwNLKzSPtruFs48nYis0zy5yJz1+ktUhHxoRDJ27RQAWLIJVJw=="],
|
||||
|
||||
"detect-indent": ["detect-indent@7.0.1", "", {}, "sha512-Mc7QhQ8s+cLrnUfU/Ji94vG/r8M26m8f++vyres4ZoojaRDpZ1eSIh/EpzLNwlWuvzSZ3UbDFspjFvTDXe6e/g=="],
|
||||
|
||||
"eastasianwidth": ["eastasianwidth@0.2.0", "", {}, "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="],
|
||||
|
||||
"emoji-regex": ["emoji-regex@10.4.0", "", {}, "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw=="],
|
||||
|
||||
"enabled": ["enabled@2.0.0", "", {}, "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ=="],
|
||||
|
||||
"esbuild": ["esbuild@0.25.5", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.25.5", "@esbuild/android-arm": "0.25.5", "@esbuild/android-arm64": "0.25.5", "@esbuild/android-x64": "0.25.5", "@esbuild/darwin-arm64": "0.25.5", "@esbuild/darwin-x64": "0.25.5", "@esbuild/freebsd-arm64": "0.25.5", "@esbuild/freebsd-x64": "0.25.5", "@esbuild/linux-arm": "0.25.5", "@esbuild/linux-arm64": "0.25.5", "@esbuild/linux-ia32": "0.25.5", "@esbuild/linux-loong64": "0.25.5", "@esbuild/linux-mips64el": "0.25.5", "@esbuild/linux-ppc64": "0.25.5", "@esbuild/linux-riscv64": "0.25.5", "@esbuild/linux-s390x": "0.25.5", "@esbuild/linux-x64": "0.25.5", "@esbuild/netbsd-arm64": "0.25.5", "@esbuild/netbsd-x64": "0.25.5", "@esbuild/openbsd-arm64": "0.25.5", "@esbuild/openbsd-x64": "0.25.5", "@esbuild/sunos-x64": "0.25.5", "@esbuild/win32-arm64": "0.25.5", "@esbuild/win32-ia32": "0.25.5", "@esbuild/win32-x64": "0.25.5" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-P8OtKZRv/5J5hhz0cUAdu/cLuPIKXpQl1R9pZtvmHWQvrAUVd0UNIPT4IB4W3rNOqVO0rlqHmCIbSwxh/c9yUQ=="],
|
||||
|
||||
"execa": ["execa@9.6.0", "", { "dependencies": { "@sindresorhus/merge-streams": "^4.0.0", "cross-spawn": "^7.0.6", "figures": "^6.1.0", "get-stream": "^9.0.0", "human-signals": "^8.0.1", "is-plain-obj": "^4.1.0", "is-stream": "^4.0.1", "npm-run-path": "^6.0.0", "pretty-ms": "^9.2.0", "signal-exit": "^4.1.0", "strip-final-newline": "^4.0.0", "yoctocolors": "^2.1.1" } }, "sha512-jpWzZ1ZhwUmeWRhS7Qv3mhpOhLfwI+uAX4e5fOcXqwMR7EcJ0pj2kV1CVzHVMX/LphnKWD3LObjZCoJ71lKpHw=="],
|
||||
|
||||
"fdir": ["fdir@6.4.6", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w=="],
|
||||
|
||||
"fecha": ["fecha@4.2.3", "", {}, "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw=="],
|
||||
|
||||
"figures": ["figures@6.1.0", "", { "dependencies": { "is-unicode-supported": "^2.0.0" } }, "sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg=="],
|
||||
|
||||
"fix-dts-default-cjs-exports": ["fix-dts-default-cjs-exports@1.0.1", "", { "dependencies": { "magic-string": "^0.30.17", "mlly": "^1.7.4", "rollup": "^4.34.8" } }, "sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg=="],
|
||||
|
||||
"fn.name": ["fn.name@1.1.0", "", {}, "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw=="],
|
||||
|
||||
"foreground-child": ["foreground-child@3.3.1", "", { "dependencies": { "cross-spawn": "^7.0.6", "signal-exit": "^4.0.1" } }, "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw=="],
|
||||
|
||||
"fs.promises.exists": ["fs.promises.exists@1.1.4", "", {}, "sha512-lJzUGWbZn8vhGWBedA+RYjB/BeJ+3458ljUfmplqhIeb6ewzTFWNPCR1HCiYCkXV9zxcHz9zXkJzMsEgDLzh3Q=="],
|
||||
|
||||
"fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="],
|
||||
|
||||
"get-east-asian-width": ["get-east-asian-width@1.3.0", "", {}, "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ=="],
|
||||
|
||||
"get-stream": ["get-stream@9.0.1", "", { "dependencies": { "@sec-ant/readable-stream": "^0.4.1", "is-stream": "^4.0.1" } }, "sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA=="],
|
||||
|
||||
"glob": ["glob@10.4.5", "", { "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" } }, "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg=="],
|
||||
|
||||
"hosted-git-info": ["hosted-git-info@7.0.2", "", { "dependencies": { "lru-cache": "^10.0.1" } }, "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w=="],
|
||||
|
||||
"human-signals": ["human-signals@8.0.1", "", {}, "sha512-eKCa6bwnJhvxj14kZk5NCPc6Hb6BdsU9DZcOnmQKSnO1VKrfV0zCvtttPZUsBvjmNDn8rpcJfpwSYnHBjc95MQ=="],
|
||||
|
||||
"imurmurhash": ["imurmurhash@0.1.4", "", {}, "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA=="],
|
||||
|
||||
"index-to-position": ["index-to-position@1.1.0", "", {}, "sha512-XPdx9Dq4t9Qk1mTMbWONJqU7boCoumEH7fRET37HX5+khDUl3J2W6PdALxhILYlIYx2amlwYcRPp28p0tSiojg=="],
|
||||
|
||||
"inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="],
|
||||
|
||||
"is-arrayish": ["is-arrayish@0.3.2", "", {}, "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="],
|
||||
|
||||
"is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="],
|
||||
|
||||
"is-interactive": ["is-interactive@2.0.0", "", {}, "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ=="],
|
||||
|
||||
"is-plain-obj": ["is-plain-obj@4.1.0", "", {}, "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg=="],
|
||||
|
||||
"is-stream": ["is-stream@2.0.1", "", {}, "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg=="],
|
||||
|
||||
"is-unicode-supported": ["is-unicode-supported@2.1.0", "", {}, "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ=="],
|
||||
|
||||
"isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="],
|
||||
|
||||
"jackspeak": ["jackspeak@3.4.3", "", { "dependencies": { "@isaacs/cliui": "^8.0.2" }, "optionalDependencies": { "@pkgjs/parseargs": "^0.11.0" } }, "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw=="],
|
||||
|
||||
"joycon": ["joycon@3.1.1", "", {}, "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw=="],
|
||||
|
||||
"js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="],
|
||||
|
||||
"kuler": ["kuler@2.0.0", "", {}, "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A=="],
|
||||
|
||||
"lilconfig": ["lilconfig@3.1.3", "", {}, "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw=="],
|
||||
|
||||
"lines-and-columns": ["lines-and-columns@1.2.4", "", {}, "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="],
|
||||
|
||||
"load-tsconfig": ["load-tsconfig@0.2.5", "", {}, "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg=="],
|
||||
|
||||
"lodash.sortby": ["lodash.sortby@4.7.0", "", {}, "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA=="],
|
||||
|
||||
"log-symbols": ["log-symbols@6.0.0", "", { "dependencies": { "chalk": "^5.3.0", "is-unicode-supported": "^1.3.0" } }, "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw=="],
|
||||
|
||||
"logform": ["logform@2.7.0", "", { "dependencies": { "@colors/colors": "1.6.0", "@types/triple-beam": "^1.3.2", "fecha": "^4.2.0", "ms": "^2.1.1", "safe-stable-stringify": "^2.3.1", "triple-beam": "^1.3.0" } }, "sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ=="],
|
||||
|
||||
"lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="],
|
||||
|
||||
"magic-string": ["magic-string@0.30.17", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" } }, "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA=="],
|
||||
|
||||
"micro-sr25519": ["micro-sr25519@0.1.3", "", { "dependencies": { "@noble/curves": "~1.8.0", "@noble/hashes": "~1.7.1" } }, "sha512-Tw1I3Yjq9XySsU3hsgPVkQTG3NIje070VUWtT4tb9d1tVwQqpCIBH4SM5h4Mxp2Ua4PUyPsot2F40eyJ0QnzTg=="],
|
||||
|
||||
"mimic-function": ["mimic-function@5.0.1", "", {}, "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA=="],
|
||||
|
||||
"minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="],
|
||||
|
||||
"minipass": ["minipass@7.1.2", "", {}, "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw=="],
|
||||
|
||||
"mlly": ["mlly@1.7.4", "", { "dependencies": { "acorn": "^8.14.0", "pathe": "^2.0.1", "pkg-types": "^1.3.0", "ufo": "^1.5.4" } }, "sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw=="],
|
||||
|
||||
"ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="],
|
||||
|
||||
"mz": ["mz@2.7.0", "", { "dependencies": { "any-promise": "^1.0.0", "object-assign": "^4.0.1", "thenify-all": "^1.0.0" } }, "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q=="],
|
||||
|
||||
"normalize-package-data": ["normalize-package-data@6.0.2", "", { "dependencies": { "hosted-git-info": "^7.0.0", "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4" } }, "sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g=="],
|
||||
|
||||
"npm-run-path": ["npm-run-path@6.0.0", "", { "dependencies": { "path-key": "^4.0.0", "unicorn-magic": "^0.3.0" } }, "sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA=="],
|
||||
|
||||
"object-assign": ["object-assign@4.1.1", "", {}, "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="],
|
||||
|
||||
"one-time": ["one-time@1.0.0", "", { "dependencies": { "fn.name": "1.x.x" } }, "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g=="],
|
||||
|
||||
"onetime": ["onetime@7.0.0", "", { "dependencies": { "mimic-function": "^5.0.0" } }, "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ=="],
|
||||
|
||||
"ora": ["ora@8.2.0", "", { "dependencies": { "chalk": "^5.3.0", "cli-cursor": "^5.0.0", "cli-spinners": "^2.9.2", "is-interactive": "^2.0.0", "is-unicode-supported": "^2.0.0", "log-symbols": "^6.0.0", "stdin-discarder": "^0.2.2", "string-width": "^7.2.0", "strip-ansi": "^7.1.0" } }, "sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw=="],
|
||||
|
||||
"package-json-from-dist": ["package-json-from-dist@1.0.1", "", {}, "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw=="],
|
||||
|
||||
"parse-json": ["parse-json@8.3.0", "", { "dependencies": { "@babel/code-frame": "^7.26.2", "index-to-position": "^1.1.0", "type-fest": "^4.39.1" } }, "sha512-ybiGyvspI+fAoRQbIPRddCcSTV9/LsJbf0e/S85VLowVGzRmokfneg2kwVW/KU5rOXrPSbF1qAKPMgNTqqROQQ=="],
|
||||
|
||||
"parse-ms": ["parse-ms@4.0.0", "", {}, "sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw=="],
|
||||
|
||||
"path-key": ["path-key@3.1.1", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="],
|
||||
|
||||
"path-scurry": ["path-scurry@1.11.1", "", { "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" } }, "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA=="],
|
||||
|
||||
"pathe": ["pathe@2.0.3", "", {}, "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w=="],
|
||||
|
||||
"picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="],
|
||||
|
||||
"picomatch": ["picomatch@4.0.2", "", {}, "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg=="],
|
||||
|
||||
"pirates": ["pirates@4.0.7", "", {}, "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA=="],
|
||||
|
||||
"pkg-types": ["pkg-types@1.3.1", "", { "dependencies": { "confbox": "^0.1.8", "mlly": "^1.7.4", "pathe": "^2.0.1" } }, "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ=="],
|
||||
|
||||
"polkadot-api": ["polkadot-api@1.14.0", "", { "dependencies": { "@polkadot-api/cli": "0.14.0", "@polkadot-api/ink-contracts": "0.3.4", "@polkadot-api/json-rpc-provider": "0.0.4", "@polkadot-api/known-chains": "0.9.0", "@polkadot-api/logs-provider": "0.0.6", "@polkadot-api/metadata-builders": "0.12.2", "@polkadot-api/metadata-compatibility": "0.3.0", "@polkadot-api/observable-client": "0.12.0", "@polkadot-api/pjs-signer": "0.6.9", "@polkadot-api/polkadot-sdk-compat": "2.3.2", "@polkadot-api/polkadot-signer": "0.1.6", "@polkadot-api/signer": "0.2.2", "@polkadot-api/sm-provider": "0.1.7", "@polkadot-api/smoldot": "0.3.10", "@polkadot-api/bizinikiwi-bindings": "0.14.0", "@polkadot-api/bizinikiwi-client": "0.4.1", "@polkadot-api/utils": "0.2.0", "@polkadot-api/ws-provider": "0.4.0", "@rx-state/core": "^0.1.4" }, "peerDependencies": { "rxjs": ">=7.8.0" }, "bin": { "papi": "bin/cli.mjs", "polkadot-api": "bin/cli.mjs" } }, "sha512-9mHj6V5/lwslwtHIEXi9xoqWOJSTy+GVtSGmJ1hhUlunhYMs6w8JiiIf4WZB8P/er2+S53QNCaegbYWCFdMBgA=="],
|
||||
|
||||
"postcss-load-config": ["postcss-load-config@6.0.1", "", { "dependencies": { "lilconfig": "^3.1.1" }, "peerDependencies": { "jiti": ">=1.21.0", "postcss": ">=8.0.9", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["jiti", "postcss", "tsx", "yaml"] }, "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g=="],
|
||||
|
||||
"pretty-ms": ["pretty-ms@9.2.0", "", { "dependencies": { "parse-ms": "^4.0.0" } }, "sha512-4yf0QO/sllf/1zbZWYnvWw3NxCQwLXKzIj0G849LSufP15BXKM0rbD2Z3wVnkMfjdn/CB0Dpp444gYAACdsplg=="],
|
||||
|
||||
"punycode": ["punycode@2.3.1", "", {}, "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="],
|
||||
|
||||
"read-pkg": ["read-pkg@9.0.1", "", { "dependencies": { "@types/normalize-package-data": "^2.4.3", "normalize-package-data": "^6.0.0", "parse-json": "^8.0.0", "type-fest": "^4.6.0", "unicorn-magic": "^0.1.0" } }, "sha512-9viLL4/n1BJUCT1NXVTdS1jtm80yDEgR5T4yCelII49Mbj0v1rZdKqj7zCiYdbB0CuCgdrvHcNogAKTFPBocFA=="],
|
||||
|
||||
"readable-stream": ["readable-stream@3.6.2", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="],
|
||||
|
||||
"readdirp": ["readdirp@4.1.2", "", {}, "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg=="],
|
||||
|
||||
"resolve-from": ["resolve-from@5.0.0", "", {}, "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw=="],
|
||||
|
||||
"restore-cursor": ["restore-cursor@5.1.0", "", { "dependencies": { "onetime": "^7.0.0", "signal-exit": "^4.1.0" } }, "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA=="],
|
||||
|
||||
"rollup": ["rollup@4.44.0", "", { "dependencies": { "@types/estree": "1.0.8" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.44.0", "@rollup/rollup-android-arm64": "4.44.0", "@rollup/rollup-darwin-arm64": "4.44.0", "@rollup/rollup-darwin-x64": "4.44.0", "@rollup/rollup-freebsd-arm64": "4.44.0", "@rollup/rollup-freebsd-x64": "4.44.0", "@rollup/rollup-linux-arm-gnueabihf": "4.44.0", "@rollup/rollup-linux-arm-musleabihf": "4.44.0", "@rollup/rollup-linux-arm64-gnu": "4.44.0", "@rollup/rollup-linux-arm64-musl": "4.44.0", "@rollup/rollup-linux-loongarch64-gnu": "4.44.0", "@rollup/rollup-linux-powerpc64le-gnu": "4.44.0", "@rollup/rollup-linux-riscv64-gnu": "4.44.0", "@rollup/rollup-linux-riscv64-musl": "4.44.0", "@rollup/rollup-linux-s390x-gnu": "4.44.0", "@rollup/rollup-linux-x64-gnu": "4.44.0", "@rollup/rollup-linux-x64-musl": "4.44.0", "@rollup/rollup-win32-arm64-msvc": "4.44.0", "@rollup/rollup-win32-ia32-msvc": "4.44.0", "@rollup/rollup-win32-x64-msvc": "4.44.0", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-qHcdEzLCiktQIfwBq420pn2dP+30uzqYxv9ETm91wdt2R9AFcWfjNAmje4NWlnCIQ5RMTzVf0ZyisOKqHR6RwA=="],
|
||||
|
||||
"rxjs": ["rxjs@7.8.2", "", { "dependencies": { "tslib": "^2.1.0" } }, "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA=="],
|
||||
|
||||
"safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="],
|
||||
|
||||
"safe-stable-stringify": ["safe-stable-stringify@2.5.0", "", {}, "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA=="],
|
||||
|
||||
"scale-ts": ["scale-ts@1.6.1", "", {}, "sha512-PBMc2AWc6wSEqJYBDPcyCLUj9/tMKnLX70jLOSndMtcUoLQucP/DM0vnQo1wJAYjTrQiq8iG9rD0q6wFzgjH7g=="],
|
||||
|
||||
"semver": ["semver@7.7.2", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="],
|
||||
|
||||
"shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="],
|
||||
|
||||
"shebang-regex": ["shebang-regex@3.0.0", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="],
|
||||
|
||||
"signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="],
|
||||
|
||||
"simple-swizzle": ["simple-swizzle@0.2.2", "", { "dependencies": { "is-arrayish": "^0.3.1" } }, "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg=="],
|
||||
|
||||
"smoldot": ["smoldot@2.0.36", "", { "dependencies": { "ws": "^8.8.1" } }, "sha512-0GtHgxOs1VGs+WzpUgTQ52Zg92/q4mnIPEl+smArI4pis6aduQ6ZiXRllbDafsIb18wWYsxaBLNjBkNOB8xBrw=="],
|
||||
|
||||
"sort-keys": ["sort-keys@5.1.0", "", { "dependencies": { "is-plain-obj": "^4.0.0" } }, "sha512-aSbHV0DaBcr7u0PVHXzM6NbZNAtrr9sF6+Qfs9UUVG7Ll3jQ6hHi8F/xqIIcn2rvIVbr0v/2zyjSdwSV47AgLQ=="],
|
||||
|
||||
"source-map": ["source-map@0.8.0-beta.0", "", { "dependencies": { "whatwg-url": "^7.0.0" } }, "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA=="],
|
||||
|
||||
"spdx-correct": ["spdx-correct@3.2.0", "", { "dependencies": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" } }, "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA=="],
|
||||
|
||||
"spdx-exceptions": ["spdx-exceptions@2.5.0", "", {}, "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w=="],
|
||||
|
||||
"spdx-expression-parse": ["spdx-expression-parse@3.0.1", "", { "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" } }, "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q=="],
|
||||
|
||||
"spdx-license-ids": ["spdx-license-ids@3.0.21", "", {}, "sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg=="],
|
||||
|
||||
"stack-trace": ["stack-trace@0.0.10", "", {}, "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg=="],
|
||||
|
||||
"stdin-discarder": ["stdin-discarder@0.2.2", "", {}, "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ=="],
|
||||
|
||||
"string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="],
|
||||
|
||||
"string-width-cjs": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
|
||||
|
||||
"string_decoder": ["string_decoder@1.3.0", "", { "dependencies": { "safe-buffer": "~5.2.0" } }, "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA=="],
|
||||
|
||||
"strip-ansi": ["strip-ansi@7.1.0", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ=="],
|
||||
|
||||
"strip-ansi-cjs": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
|
||||
|
||||
"strip-final-newline": ["strip-final-newline@4.0.0", "", {}, "sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw=="],
|
||||
|
||||
"sucrase": ["sucrase@3.35.0", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.2", "commander": "^4.0.0", "glob": "^10.3.10", "lines-and-columns": "^1.1.6", "mz": "^2.7.0", "pirates": "^4.0.1", "ts-interface-checker": "^0.1.9" }, "bin": { "sucrase": "bin/sucrase", "sucrase-node": "bin/sucrase-node" } }, "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA=="],
|
||||
|
||||
"text-hex": ["text-hex@1.0.0", "", {}, "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg=="],
|
||||
|
||||
"thenify": ["thenify@3.3.1", "", { "dependencies": { "any-promise": "^1.0.0" } }, "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw=="],
|
||||
|
||||
"thenify-all": ["thenify-all@1.6.0", "", { "dependencies": { "thenify": ">= 3.1.0 < 4" } }, "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA=="],
|
||||
|
||||
"tinyexec": ["tinyexec@0.3.2", "", {}, "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA=="],
|
||||
|
||||
"tinyglobby": ["tinyglobby@0.2.14", "", { "dependencies": { "fdir": "^6.4.4", "picomatch": "^4.0.2" } }, "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ=="],
|
||||
|
||||
"tr46": ["tr46@1.0.1", "", { "dependencies": { "punycode": "^2.1.0" } }, "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA=="],
|
||||
|
||||
"tree-kill": ["tree-kill@1.2.2", "", { "bin": { "tree-kill": "cli.js" } }, "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A=="],
|
||||
|
||||
"triple-beam": ["triple-beam@1.4.1", "", {}, "sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg=="],
|
||||
|
||||
"ts-interface-checker": ["ts-interface-checker@0.1.13", "", {}, "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA=="],
|
||||
|
||||
"tsc-prog": ["tsc-prog@2.3.0", "", { "peerDependencies": { "typescript": ">=4" } }, "sha512-ycET2d75EgcX7y8EmG4KiZkLAwUzbY4xRhA6NU0uVbHkY4ZjrAAuzTMxXI85kOwATqPnBI5C/7y7rlpY0xdqHA=="],
|
||||
|
||||
"tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"tsup": ["tsup@8.5.0", "", { "dependencies": { "bundle-require": "^5.1.0", "cac": "^6.7.14", "chokidar": "^4.0.3", "consola": "^3.4.0", "debug": "^4.4.0", "esbuild": "^0.25.0", "fix-dts-default-cjs-exports": "^1.0.0", "joycon": "^3.1.1", "picocolors": "^1.1.1", "postcss-load-config": "^6.0.1", "resolve-from": "^5.0.0", "rollup": "^4.34.8", "source-map": "0.8.0-beta.0", "sucrase": "^3.35.0", "tinyexec": "^0.3.2", "tinyglobby": "^0.2.11", "tree-kill": "^1.2.2" }, "peerDependencies": { "@microsoft/api-extractor": "^7.36.0", "@swc/core": "^1", "postcss": "^8.4.12", "typescript": ">=4.5.0" }, "optionalPeers": ["@microsoft/api-extractor", "@swc/core", "postcss", "typescript"], "bin": { "tsup": "dist/cli-default.js", "tsup-node": "dist/cli-node.js" } }, "sha512-VmBp77lWNQq6PfuMqCHD3xWl22vEoWsKajkF8t+yMBawlUS8JzEI+vOVMeuNZIuMML8qXRizFKi9oD5glKQVcQ=="],
|
||||
|
||||
"type-fest": ["type-fest@4.41.0", "", {}, "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA=="],
|
||||
|
||||
"typescript": ["typescript@5.8.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ=="],
|
||||
|
||||
"ufo": ["ufo@1.6.1", "", {}, "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA=="],
|
||||
|
||||
"undici-types": ["undici-types@6.21.0", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="],
|
||||
|
||||
"unicorn-magic": ["unicorn-magic@0.1.0", "", {}, "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ=="],
|
||||
|
||||
"util-deprecate": ["util-deprecate@1.0.2", "", {}, "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="],
|
||||
|
||||
"validate-npm-package-license": ["validate-npm-package-license@3.0.4", "", { "dependencies": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" } }, "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew=="],
|
||||
|
||||
"webidl-conversions": ["webidl-conversions@4.0.2", "", {}, "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg=="],
|
||||
|
||||
"whatwg-url": ["whatwg-url@7.1.0", "", { "dependencies": { "lodash.sortby": "^4.7.0", "tr46": "^1.0.1", "webidl-conversions": "^4.0.2" } }, "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg=="],
|
||||
|
||||
"which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="],
|
||||
|
||||
"winston": ["winston@3.17.0", "", { "dependencies": { "@colors/colors": "^1.6.0", "@dabh/diagnostics": "^2.0.2", "async": "^3.2.3", "is-stream": "^2.0.0", "logform": "^2.7.0", "one-time": "^1.0.0", "readable-stream": "^3.4.0", "safe-stable-stringify": "^2.3.1", "stack-trace": "0.0.x", "triple-beam": "^1.3.0", "winston-transport": "^4.9.0" } }, "sha512-DLiFIXYC5fMPxaRg832S6F5mJYvePtmO5G9v9IgUFPhXm9/GkXarH/TUrBAVzhTCzAj9anE/+GjrgXp/54nOgw=="],
|
||||
|
||||
"winston-transport": ["winston-transport@4.9.0", "", { "dependencies": { "logform": "^2.7.0", "readable-stream": "^3.6.2", "triple-beam": "^1.3.0" } }, "sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A=="],
|
||||
|
||||
"wrap-ansi": ["wrap-ansi@8.1.0", "", { "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", "strip-ansi": "^7.0.1" } }, "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ=="],
|
||||
|
||||
"wrap-ansi-cjs": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="],
|
||||
|
||||
"write-file-atomic": ["write-file-atomic@5.0.1", "", { "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^4.0.1" } }, "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw=="],
|
||||
|
||||
"write-json-file": ["write-json-file@6.0.0", "", { "dependencies": { "detect-indent": "^7.0.1", "is-plain-obj": "^4.1.0", "sort-keys": "^5.0.0", "write-file-atomic": "^5.0.1" } }, "sha512-MNHcU3f9WxnNyR6MxsYSj64Jz0+dwIpisWKWq9gqLj/GwmA9INg3BZ3vt70/HB3GEwrnDQWr4RPrywnhNzmUFA=="],
|
||||
|
||||
"write-package": ["write-package@7.1.0", "", { "dependencies": { "deepmerge-ts": "^7.1.0", "read-pkg": "^9.0.1", "sort-keys": "^5.0.0", "type-fest": "^4.23.0", "write-json-file": "^6.0.0" } }, "sha512-DqUx8GI3r9BFWwU2DPKddL1E7xWfbFED82mLVhGXKlFEPe8IkBftzO7WfNwHtk7oGDHDeuH/o8VMpzzfMwmLUA=="],
|
||||
|
||||
"ws": ["ws@8.18.2", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ=="],
|
||||
|
||||
"yoctocolors": ["yoctocolors@2.1.1", "", {}, "sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ=="],
|
||||
|
||||
"@isaacs/cliui/string-width": ["string-width@5.1.2", "", { "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", "strip-ansi": "^7.0.1" } }, "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA=="],
|
||||
|
||||
"bun-types/@types/node": ["@types/node@24.0.3", "", { "dependencies": { "undici-types": "~7.8.0" } }, "sha512-R4I/kzCYAdRLzfiCabn9hxWfbuHS573x+r0dJMkkzThEa7pbrcDWK+9zu3e7aBOouf+rQAciqPFMnxwr0aWgKg=="],
|
||||
|
||||
"color-string/color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="],
|
||||
|
||||
"execa/is-stream": ["is-stream@4.0.1", "", {}, "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A=="],
|
||||
|
||||
"get-stream/is-stream": ["is-stream@4.0.1", "", {}, "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A=="],
|
||||
|
||||
"log-symbols/is-unicode-supported": ["is-unicode-supported@1.3.0", "", {}, "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ=="],
|
||||
|
||||
"micro-sr25519/@noble/curves": ["@noble/curves@1.8.2", "", { "dependencies": { "@noble/hashes": "1.7.2" } }, "sha512-vnI7V6lFNe0tLAuJMu+2sX+FcL14TaCWy1qiczg1VwRmPrpQCdq5ESXQMqUc2tluRNf6irBXrWbl1mGN8uaU/g=="],
|
||||
|
||||
"micro-sr25519/@noble/hashes": ["@noble/hashes@1.7.2", "", {}, "sha512-biZ0NUSxyjLLqo6KxEJ1b+C2NAx0wtDoFvCaXHGgUkeHzf3Xc1xKumFKREuT7f7DARNZ/slvYUwFG6B0f2b6hQ=="],
|
||||
|
||||
"npm-run-path/path-key": ["path-key@4.0.0", "", {}, "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ=="],
|
||||
|
||||
"npm-run-path/unicorn-magic": ["unicorn-magic@0.3.0", "", {}, "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA=="],
|
||||
|
||||
"string-width-cjs/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],
|
||||
|
||||
"string-width-cjs/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
|
||||
|
||||
"strip-ansi-cjs/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
|
||||
|
||||
"sucrase/commander": ["commander@4.1.1", "", {}, "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA=="],
|
||||
|
||||
"wrap-ansi/string-width": ["string-width@5.1.2", "", { "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", "strip-ansi": "^7.0.1" } }, "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA=="],
|
||||
|
||||
"wrap-ansi-cjs/ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],
|
||||
|
||||
"wrap-ansi-cjs/string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
|
||||
|
||||
"wrap-ansi-cjs/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
|
||||
|
||||
"@isaacs/cliui/string-width/emoji-regex": ["emoji-regex@9.2.2", "", {}, "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="],
|
||||
|
||||
"bun-types/@types/node/undici-types": ["undici-types@7.8.0", "", {}, "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw=="],
|
||||
|
||||
"string-width-cjs/strip-ansi/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
|
||||
|
||||
"wrap-ansi-cjs/ansi-styles/color-convert": ["color-convert@2.0.1", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="],
|
||||
|
||||
"wrap-ansi-cjs/string-width/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],
|
||||
|
||||
"wrap-ansi-cjs/strip-ansi/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
|
||||
|
||||
"wrap-ansi/string-width/emoji-regex": ["emoji-regex@9.2.2", "", {}, "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="],
|
||||
|
||||
"wrap-ansi-cjs/ansi-styles/color-convert/color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="],
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
# PAPI Tests Development Workflow
|
||||
|
||||
# Install dependencies (descriptors needs to be generated and installed the 1st time only via `setup`)
|
||||
install:
|
||||
echo "🔄 Install bun dependencies"
|
||||
bun install
|
||||
|
||||
# Generate fresh metadata and descriptors, then install all dependencies
|
||||
setup:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
echo "🧹 Killing any existing zombienet or chain processes..."
|
||||
just killall
|
||||
|
||||
just install || echo "🚧 Generate and installed missing descriptors..."
|
||||
just build-and-generate-chains
|
||||
|
||||
# Start zombienet and wait for ws endpoints to be ready
|
||||
zombienet --provider native -l text spawn zn-s.toml 2>&1 &
|
||||
CHAINS_PID=$!
|
||||
|
||||
echo "⏳ Waiting for chains to be ready (ws endpoints on 9944, 9945 and 9946)..."
|
||||
for port in 9944 9945 9946; do
|
||||
for i in {1..24}; do
|
||||
if nc -z localhost $port; then
|
||||
echo "✅ Port $port is open."
|
||||
break
|
||||
fi
|
||||
sleep 10
|
||||
if [ $i -eq 24 ]; then
|
||||
echo "❌ Timeout waiting for port $port"
|
||||
kill $CHAINS_PID || true
|
||||
pkill -f zombienet || true
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
just generate-descriptors
|
||||
|
||||
echo "🧹 Cleaning up chain processes..."
|
||||
kill $CHAINS_PID || true
|
||||
just killall
|
||||
|
||||
echo "✅ Setup complete! You can now run tests or development commands."
|
||||
|
||||
# Clean generated files and dependencies
|
||||
clean:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
rm -rf .papi node_modules bun.lockb
|
||||
echo "🧹 Cleaned .papi, node_modules, and lockfile"
|
||||
|
||||
# Generate descriptors from running chains (assumes chains are already running)
|
||||
generate-descriptors:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
echo "📋 Generating PAPI descriptors from ws endpoints..."
|
||||
npx papi add -w ws://localhost:9946 parachain
|
||||
npx papi add -w ws://localhost:9945 rc
|
||||
npx papi
|
||||
bun install --only-missing
|
||||
|
||||
echo "📋 Descriptors generated and dependencies updated"
|
||||
|
||||
|
||||
# Run tests
|
||||
test:
|
||||
bun test
|
||||
|
||||
# Build and generate chain specs (shared logic)
|
||||
build-and-generate-chains:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
echo "🔧 Building chain-spec-builder and runtimes..."
|
||||
LOG="runtime::multiblock-election=info,runtime::staking=info"
|
||||
RUST_LOG=${LOG} cargo build --release -p pallet-staking-async-rc-runtime -p pallet-staking-async-parachain-runtime -p staging-chain-spec-builder
|
||||
echo "✅ Removing any old chain-spec file"
|
||||
rm -f ./parachain.json
|
||||
rm -f ./rc.json
|
||||
echo "✅ Creating parachain chain specs"
|
||||
RUST_LOG=${LOG} ../../../../../target/release/chain-spec-builder \
|
||||
create \
|
||||
-t development \
|
||||
--runtime ../../../../../target/release/wbuild/pallet-staking-async-parachain-runtime/pallet_staking_async_parachain_runtime.compact.compressed.wasm \
|
||||
--relay-chain rococo-local \
|
||||
--para-id 1100 \
|
||||
named-preset fake-dot
|
||||
mv ./chain_spec.json ./parachain.json
|
||||
echo "✅ Creating rc chain specs"
|
||||
RUST_LOG=${LOG} ../../../../../target/release/chain-spec-builder \
|
||||
create \
|
||||
-t development \
|
||||
--runtime ../../../../../target/release/wbuild/pallet-staking-async-rc-runtime/fast_runtime_binary.rs.wasm \
|
||||
named-preset fake-s
|
||||
mv ./chain_spec.json ./rc.json
|
||||
|
||||
# Run a specific runtime preset, or print presets if none is given
|
||||
run preset='':
|
||||
#!/usr/bin/env bash
|
||||
if [ -z "{{preset}}" ]; then
|
||||
echo "⚠️ Please specify a preset."
|
||||
just presets
|
||||
else
|
||||
bun run src/index.ts run --para-preset {{preset}}
|
||||
fi
|
||||
|
||||
# Show available presets
|
||||
presets:
|
||||
@echo "Available parachain presets:"
|
||||
@echo " fake-dev - 4 pages, small number of fake validators and nominators"
|
||||
@echo " fake-dot - 32 pages, large number of fake validators and nominators"
|
||||
@echo " fake-ksm - 16 pages, large number of fake validators and nominators"
|
||||
@echo " real-s - 4 pages, alice and bob as validators, 500 fake nominators"
|
||||
@echo " real-m - 4 pages, alice, bob, dave, eve as validators, 2000 fake nominators"
|
||||
|
||||
# Full development setup (clean + setup)
|
||||
reset: clean setup
|
||||
|
||||
# Show help
|
||||
help:
|
||||
just --list
|
||||
|
||||
# kill all relevant processes. This is useful in case you see weird errors, most likely it is
|
||||
# because you have other old stale ones running.
|
||||
killall:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
pkill -f zombienet || true
|
||||
pkill -f chain-spec-builder || true
|
||||
pkill -f polkadot || true
|
||||
pkill -f polkadot-parachain || true
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "papi-tests",
|
||||
"module": "index.ts",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@pezkuwi-api/cli": "^0.14.0",
|
||||
"@types/bun": "latest"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": "^5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pezkuwi-labs/hdkd": "^0.0.16",
|
||||
"commander": "^14.0.0",
|
||||
"pezkuwi-api": "^1.13.1",
|
||||
"strip-ansi": "^7.1.0",
|
||||
"winston": "^3.17.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@pezkuwi-api/descriptors": "file:.papi/descriptors"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
import { spawn, spawnSync } from "child_process";
|
||||
import { Presets } from "./index";
|
||||
import { logger } from "./utils";
|
||||
import { join } from "path";
|
||||
import stripAnsi from "strip-ansi";
|
||||
import { createWriteStream } from "fs";
|
||||
|
||||
export function rcPresetFor(paraPreset: Presets): string {
|
||||
return paraPreset == Presets.FakeDev ||
|
||||
paraPreset == Presets.FakeDot ||
|
||||
paraPreset == Presets.FakeKsm
|
||||
? "fake-s"
|
||||
: paraPreset;
|
||||
}
|
||||
|
||||
export function znConfigFor(paraPreset: Presets): string {
|
||||
return paraPreset == Presets.RealM ? "../zn-m.toml" : "../zn-s.toml";
|
||||
}
|
||||
|
||||
/// Returns the teyrchain log file.
|
||||
export async function runPreset(paraPreset: Presets): Promise<void> {
|
||||
prepPreset(paraPreset);
|
||||
const znConfig = znConfigFor(paraPreset);
|
||||
logger.info(`Launching ZN config for preset: ${paraPreset}, config: ${znConfig}`);
|
||||
cmd("zombienet", ["--provider", "native", "-l", "text", "spawn", znConfig], "inherit");
|
||||
}
|
||||
|
||||
export async function runPresetUntilLaunched(
|
||||
paraPreset: Presets
|
||||
): Promise<{ killZn: () => void; paraLog: string | null }> {
|
||||
prepPreset(paraPreset);
|
||||
const znConfig = znConfigFor(paraPreset);
|
||||
logger.info(`Launching ZN config for preset: ${paraPreset}, config: ${znConfig}`);
|
||||
const child = spawn("zombienet", ["--provider", "native", "-l", "text", "spawn", znConfig], {
|
||||
stdio: "pipe",
|
||||
cwd: __dirname,
|
||||
});
|
||||
|
||||
return new Promise<{ killZn: () => void; paraLog: string | null }>((resolve, reject) => {
|
||||
const logCmds: string[] = [];
|
||||
child.stdout.on("data", (data) => {
|
||||
const raw: string = stripAnsi(data.toString());
|
||||
if (raw.includes("Log Cmd : ")) {
|
||||
raw.split("\n")
|
||||
.filter((line) => line.includes("Log Cmd : "))
|
||||
.forEach((line) => {
|
||||
logCmds.push(line.replace("Log Cmd : ", "").trim());
|
||||
});
|
||||
}
|
||||
// our hacky way to know ZN is done.
|
||||
if (raw.includes("Teyrchain ID : 1100")) {
|
||||
for (const cmd of logCmds) {
|
||||
logger.info(`${cmd}`);
|
||||
}
|
||||
logger.info(`Launched ZN: ${paraPreset}`);
|
||||
|
||||
// Extract log path from the last log command
|
||||
const lastCmd = logCmds[logCmds.length - 1];
|
||||
const paraLog = lastCmd ? lastCmd.match(/tail -f\s+(.+\.log)/)?.[1] || null : null;
|
||||
|
||||
resolve({
|
||||
killZn: () => {
|
||||
child.kill();
|
||||
logger.verbose(`Killed zn process`);
|
||||
},
|
||||
paraLog,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
child.on("error", (err) => {
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export async function spawnMiner(): Promise<() => void> {
|
||||
logger.info(`Spawning miner in background`);
|
||||
|
||||
const logFile = createWriteStream(join(__dirname, "miner.log"), { flags: "a" });
|
||||
|
||||
const child = spawn(
|
||||
"polkadot-staking-miner",
|
||||
[
|
||||
"--uri",
|
||||
"ws://127.0.0.1:9946",
|
||||
"experimental-monitor-multi-block",
|
||||
"--seed-or-path",
|
||||
"//Bob",
|
||||
],
|
||||
{ stdio: "pipe", cwd: __dirname }
|
||||
);
|
||||
|
||||
child.stdout?.pipe(logFile);
|
||||
child.stderr?.pipe(logFile);
|
||||
|
||||
return new Promise<() => void>((resolve, reject) => {
|
||||
child.on("error", (err) => {
|
||||
logger.error(`Error in miner miner: ${err}`);
|
||||
reject(err);
|
||||
});
|
||||
resolve(() => {
|
||||
logger.verbose(`Killing miner process`);
|
||||
logFile.end();
|
||||
child.kill();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function prepPreset(paraPreset: Presets): void {
|
||||
const rcPreset = rcPresetFor(paraPreset);
|
||||
const targetDir = "../../../../../../target";
|
||||
|
||||
logger.info(`Running para-preset: ${paraPreset}, rc-preset: ${rcPreset}`);
|
||||
cmd("cargo", [
|
||||
"build",
|
||||
"--release",
|
||||
`-p`,
|
||||
`pallet-staking-async-rc-runtime`,
|
||||
`-p`,
|
||||
`pallet-staking-async-teyrchain-runtime`,
|
||||
`-p`,
|
||||
`staging-chain-spec-builder`,
|
||||
]);
|
||||
|
||||
cmd("rm", ["./teyrchain.json"]);
|
||||
cmd("rm", ["./rc.json"]);
|
||||
|
||||
cmd(join(targetDir, "/release/chain-spec-builder"), [
|
||||
"create",
|
||||
"-t",
|
||||
"development",
|
||||
"--runtime",
|
||||
join(
|
||||
targetDir,
|
||||
"/release/wbuild/pallet-staking-async-teyrchain-runtime/pallet_staking_async_teyrchain_runtime.compact.compressed.wasm"
|
||||
),
|
||||
"--relay-chain",
|
||||
"pezkuwichain-local",
|
||||
"--para-id",
|
||||
"1100",
|
||||
"named-preset",
|
||||
paraPreset,
|
||||
]);
|
||||
cmd("mv", ["chain_spec.json", "teyrchain.json"]);
|
||||
|
||||
cmd(join(targetDir, "/release/chain-spec-builder"), [
|
||||
"create",
|
||||
"-t",
|
||||
"development",
|
||||
"--runtime",
|
||||
join(
|
||||
targetDir,
|
||||
"/release/wbuild/pallet-staking-async-rc-runtime/fast_runtime_binary.rs.wasm"
|
||||
),
|
||||
"named-preset",
|
||||
rcPreset,
|
||||
]);
|
||||
cmd("mv", ["chain_spec.json", "rc.json"]);
|
||||
}
|
||||
|
||||
function cmd(cmd: string, args: string[], stdio: string = "ignore"): void {
|
||||
logger.info(`Running command: ${cmd} ${args.join(" ")}`);
|
||||
// @ts-ignore
|
||||
const result = spawnSync(cmd, args, { stdio: stdio, cwd: __dirname });
|
||||
if (result.error || result.status !== 0) {
|
||||
logger.error(`Error running command: ${cmd} ${args.join(" ")}`);
|
||||
logger.error(`Status: ${result.status}`);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
import { rcPresetFor, runPreset } from "./cmd";
|
||||
import { logger } from "./utils";
|
||||
import { monitorVmpQueues } from "./vmp-monitor";
|
||||
import { Command } from "commander";
|
||||
|
||||
export enum Presets {
|
||||
FakeDev = "fake-dev",
|
||||
FakeDot = "fake-dot",
|
||||
FakeKsm = "fake-ksm",
|
||||
RealS = "real-s",
|
||||
RealM = "real-m",
|
||||
}
|
||||
|
||||
if (require.main === module) {
|
||||
const program = new Command();
|
||||
program
|
||||
.name("staking-async-papi-tests")
|
||||
.description("Run staking-async PAPI tests")
|
||||
.version("0.1.0");
|
||||
|
||||
program
|
||||
.command("run")
|
||||
.description("Run a given preset. This just sets up the ZN env and runs it")
|
||||
.option(
|
||||
"-p, --para-preset <preset>",
|
||||
"run the given teyrchain preset. The right relay preset, and zn-toml file are auto-chosen.",
|
||||
Presets.FakeDev
|
||||
)
|
||||
.action(async (options) => {
|
||||
const { paraPreset } = options;
|
||||
runPreset(paraPreset);
|
||||
});
|
||||
|
||||
program
|
||||
.command("monitor-vmp")
|
||||
.description("Monitor VMP (Vertical Message Passing) - both DMP and UMP queues")
|
||||
.option(
|
||||
"--relay-port <port>",
|
||||
"Relay chain WebSocket port",
|
||||
"9944"
|
||||
)
|
||||
.option(
|
||||
"--para-port <port>",
|
||||
"Teyrchain WebSocket port (optional)",
|
||||
"9946"
|
||||
)
|
||||
.option(
|
||||
"-r, --refresh <seconds>",
|
||||
"Refresh interval in seconds",
|
||||
"3"
|
||||
)
|
||||
.option(
|
||||
"--para-id <id>",
|
||||
"Specific teyrchain ID to monitor (default: all)"
|
||||
)
|
||||
.action(async (options) => {
|
||||
const { relayPort, paraPort, refresh, paraId } = options;
|
||||
await monitorVmpQueues({
|
||||
relayPort: parseInt(relayPort),
|
||||
paraPort: paraPort ? parseInt(paraPort) : undefined,
|
||||
refreshInterval: parseInt(refresh),
|
||||
paraId: paraId ? parseInt(paraId) : undefined
|
||||
});
|
||||
});
|
||||
|
||||
program.parse(process.argv);
|
||||
}
|
||||
@@ -0,0 +1,452 @@
|
||||
import { readFileSync } from "fs";
|
||||
import { logger, safeJsonStringify, type ApiDeclarations } from "./utils";
|
||||
import { exit } from "process";
|
||||
import chalk from "chalk";
|
||||
|
||||
export enum Chain {
|
||||
Relay = "Rely",
|
||||
Teyrchain = "Para",
|
||||
}
|
||||
|
||||
interface IEvent {
|
||||
module: string;
|
||||
event: string;
|
||||
data: any | undefined;
|
||||
}
|
||||
|
||||
interface IBlock {
|
||||
chain: Chain;
|
||||
number: number;
|
||||
hash: string;
|
||||
events: IEvent[];
|
||||
weights: any;
|
||||
authorship: IAuthorshipData | null;
|
||||
}
|
||||
|
||||
/// The on-chain weight consumed in a block, exactly as stored by `frame-system`
|
||||
interface IWeight {
|
||||
normal: {
|
||||
ref_time: bigint;
|
||||
proof_size: bigint;
|
||||
};
|
||||
operational: {
|
||||
ref_time: bigint;
|
||||
proof_size: bigint;
|
||||
};
|
||||
mandatory: {
|
||||
ref_time: bigint;
|
||||
proof_size: bigint;
|
||||
};
|
||||
}
|
||||
|
||||
/// Information obtained from the collator about authorship of a block.
|
||||
interface IAuthorshipData {
|
||||
/// The header size in PoV in kb.
|
||||
header: number;
|
||||
/// The extrinsics size in PoV in kb.
|
||||
extrinsics: number;
|
||||
/// The storage proof size in PoV in kb.
|
||||
proof: number;
|
||||
/// The compressed PoV size (sum of all the above) in kb.
|
||||
compressed: number;
|
||||
/// The time it took to author the block in ms.
|
||||
time: number;
|
||||
}
|
||||
|
||||
/// Print an event.
|
||||
function pe(e: IEvent): string {
|
||||
return `${e.module} ${e.event} ${e.data ? safeJsonStringify(e.data) : "no data"}`;
|
||||
}
|
||||
|
||||
interface IObservableEvent {
|
||||
chain: Chain;
|
||||
module: string;
|
||||
event: string;
|
||||
dataCheck: ((data: any) => boolean) | undefined;
|
||||
byBlock: number | undefined;
|
||||
}
|
||||
|
||||
export class Observe {
|
||||
e: IObservableEvent;
|
||||
onPass: () => void = () => {};
|
||||
|
||||
constructor(
|
||||
chain: Chain,
|
||||
module: string,
|
||||
event: string,
|
||||
dataCheck: ((data: any) => boolean) | undefined = undefined,
|
||||
byBlock: number | undefined = undefined,
|
||||
onPass: () => void = () => {}
|
||||
) {
|
||||
this.e = { chain, module, event, dataCheck, byBlock };
|
||||
this.onPass = onPass;
|
||||
}
|
||||
|
||||
toString(): string {
|
||||
return `Observe(${this.e.chain}, ${this.e.module}, ${this.e.event}, ${
|
||||
this.e.dataCheck ? "dataCheck" : "no dataCheck"
|
||||
}, ${this.e.byBlock ? this.e.byBlock : "no byBlock"})`;
|
||||
}
|
||||
|
||||
static on(chain: Chain, mod: string, event: string): ObserveBuilder {
|
||||
return new ObserveBuilder(chain, mod, event);
|
||||
}
|
||||
}
|
||||
|
||||
export class ObserveBuilder {
|
||||
private chain: Chain;
|
||||
private module: string;
|
||||
private event: string;
|
||||
private dataCheck?: (data: any) => boolean;
|
||||
private byBlockVal?: number;
|
||||
private onPassCallback: () => void = () => {};
|
||||
|
||||
constructor(chain: Chain, module: string, event: string) {
|
||||
this.chain = chain;
|
||||
this.module = module;
|
||||
this.event = event;
|
||||
}
|
||||
|
||||
withDataCheck(check: (data: any) => boolean): ObserveBuilder {
|
||||
this.dataCheck = check;
|
||||
return this;
|
||||
}
|
||||
|
||||
byBlock(blockNumber: number): ObserveBuilder {
|
||||
this.byBlockVal = blockNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
onPass(callback: () => void): ObserveBuilder {
|
||||
this.onPassCallback = callback;
|
||||
return this;
|
||||
}
|
||||
|
||||
build(): Observe {
|
||||
if (!this.module || !this.event) {
|
||||
throw new Error("Module and event are required");
|
||||
}
|
||||
|
||||
return new Observe(
|
||||
this.chain,
|
||||
this.module,
|
||||
this.event,
|
||||
this.dataCheck,
|
||||
this.byBlockVal,
|
||||
this.onPassCallback
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export enum EventOutcome {
|
||||
TimedOut = "TimedOut",
|
||||
Done = "Done",
|
||||
}
|
||||
|
||||
export class TestCase {
|
||||
eventSequence: Observe[];
|
||||
onKill: () => void;
|
||||
allowPerChainInterleavedEvents: boolean = false;
|
||||
private resolveTestPromise: (outcome: EventOutcome) => void = () => {};
|
||||
|
||||
/// See `example.test.ts` for more info.
|
||||
constructor(e: Observe[], interleave: boolean = false, onKill: () => void = () => {}) {
|
||||
this.eventSequence = e;
|
||||
this.onKill = onKill;
|
||||
this.allowPerChainInterleavedEvents = interleave;
|
||||
}
|
||||
|
||||
setTestPromiseResolvers(resolve: (outcome: EventOutcome) => void) {
|
||||
this.resolveTestPromise = resolve;
|
||||
}
|
||||
|
||||
match(ours: IObservableEvent, theirs: IEvent, theirsChain: Chain): boolean {
|
||||
const trivialComp =
|
||||
ours.chain === theirsChain &&
|
||||
ours.module === theirs.module &&
|
||||
ours.event === theirs.event;
|
||||
if (trivialComp) {
|
||||
// note: only run data check if it is defined and all other criteria match
|
||||
const dataComp = ours.dataCheck === undefined ? true : ours.dataCheck!(theirs.data);
|
||||
return trivialComp && dataComp;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
notTimedOut(ours: IObservableEvent, block: number): boolean {
|
||||
return ours.byBlock === undefined ? true : block <= ours.byBlock;
|
||||
}
|
||||
|
||||
// with thousand separator!
|
||||
wts(num: bigint): string {
|
||||
return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
|
||||
formatWeight(weight: IWeight): string {
|
||||
const weightPerMs = BigInt(Math.pow(10, 9));
|
||||
const WeightPerKb = BigInt(1024);
|
||||
const refTime =
|
||||
weight.normal.ref_time + weight.operational.ref_time + weight.mandatory.ref_time;
|
||||
const proofSize =
|
||||
weight.normal.proof_size + weight.operational.proof_size + weight.mandatory.proof_size;
|
||||
|
||||
return `${this.wts(refTime / weightPerMs)}ms / ${this.wts(proofSize / WeightPerKb)} kb`;
|
||||
}
|
||||
|
||||
formatAuthorship(authorship: IAuthorshipData): string {
|
||||
return `hd=${authorship.header.toFixed(2)}, xt=${authorship.extrinsics.toFixed(
|
||||
2
|
||||
)}, st=${authorship.proof.toFixed(2)}, sum=${(
|
||||
authorship.header +
|
||||
authorship.extrinsics +
|
||||
authorship.proof
|
||||
).toFixed(2)}, cmp=${authorship.compressed.toFixed(2)}, time=${authorship.time}ms`;
|
||||
}
|
||||
|
||||
commonLog(blockData: IBlock): string {
|
||||
const number = `#${blockData.number}`;
|
||||
const chain = blockData.chain === Chain.Relay
|
||||
? chalk.blue(blockData.chain) // Blue for Relay - works well in both modes
|
||||
: chalk.green(blockData.chain); // Green for Teyrchain - works well in both modes
|
||||
const weight = `⛓ ${this.formatWeight(blockData.weights)}`;
|
||||
const authorship = blockData.authorship
|
||||
? `[✍️ ${this.formatAuthorship(blockData.authorship)}]`
|
||||
: "";
|
||||
return `[${chain}${number}][${weight}]${authorship}`;
|
||||
}
|
||||
|
||||
// returns a [`primary`, `maybeSecondary`] event to check. `primary` should always be checked first, and if not secondary is checked.
|
||||
nextEvent(chain: Chain): [Observe, Observe | undefined] {
|
||||
const next = this.eventSequence[0]!;
|
||||
if (this.allowPerChainInterleavedEvents && this.eventSequence.length > 1) {
|
||||
// get the next event in our list that is of type `chain`.
|
||||
const nextOfChain = this.eventSequence.slice(1).find((e) => e.e.chain === chain);
|
||||
return [next, nextOfChain];
|
||||
} else {
|
||||
return [next, undefined];
|
||||
}
|
||||
}
|
||||
|
||||
removeEvent(e: Observe): void {
|
||||
const index = this.eventSequence.findIndex((x) => x.e === e.e);
|
||||
if (index !== -1) {
|
||||
this.eventSequence.splice(index, 1);
|
||||
} else {
|
||||
logger.warn(`Event not found for removal: ${e.toString()}`);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
onBlock(blockData: IBlock) {
|
||||
// sort from small to big
|
||||
logger.debug(`${this.commonLog(blockData)} events: ${blockData.events.length}`);
|
||||
const firstTimeOut = this.eventSequence
|
||||
.filter((e) => e.e.byBlock)
|
||||
.sort((x, y) => x.e.byBlock! - y.e.byBlock!);
|
||||
if (firstTimeOut.length > 0 && blockData.number > firstTimeOut[0]!.e.byBlock!) {
|
||||
logger.error(
|
||||
`Block ${blockData.number} is past the first timeout at block ${firstTimeOut[0]}, exiting.`
|
||||
);
|
||||
this.resolveTestPromise(EventOutcome.TimedOut);
|
||||
}
|
||||
|
||||
for (const e of blockData.events) {
|
||||
this.onEvent(e, blockData);
|
||||
}
|
||||
}
|
||||
|
||||
onEvent(e: IEvent, blockData: IBlock) {
|
||||
if (!this.eventSequence.length) {
|
||||
logger.warn(`No events to process for ${blockData.chain}, event: ${pe(e)}`);
|
||||
return;
|
||||
}
|
||||
logger.verbose(`${this.commonLog(blockData)} Processing event: ${pe(e)}`);
|
||||
const [primary, maybeSecondary] = this.nextEvent(blockData.chain);
|
||||
|
||||
if (this.match(primary.e, e, blockData.chain)) {
|
||||
primary.onPass();
|
||||
this.removeEvent(primary);
|
||||
logger.info(`Primary event passed`);
|
||||
if (this.eventSequence.length === 0) {
|
||||
logger.info("All events processed.");
|
||||
this.resolveTestPromise(EventOutcome.Done);
|
||||
} else {
|
||||
logger.verbose(
|
||||
`Next expected event: ${this.eventSequence[0]!.toString()}, remaining events: ${
|
||||
this.eventSequence.length
|
||||
}`
|
||||
);
|
||||
}
|
||||
} else if (maybeSecondary && this.match(maybeSecondary.e, e, blockData.chain)) {
|
||||
maybeSecondary.onPass();
|
||||
this.removeEvent(maybeSecondary);
|
||||
logger.info(`Secondary event passed`);
|
||||
// when we check secondary events, we must have at least 2 items in the list, so no
|
||||
// need to check for the end of list.
|
||||
} else {
|
||||
logger.debug(`event not relevant`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Extract information about the authoring of `block` number from the given `logFile`. This will
|
||||
// work in 3 steps:
|
||||
// 1. After filtering for `[Teyrchain]`, and looking at the log file from end to start, it will find
|
||||
// the line containing `Prepared block for proposing at ${block}`. From this, we extract the
|
||||
// authoring time in ms
|
||||
// 2. Them, we only keep the rest of the log file (optimization). We find the first line thereafter
|
||||
// containing `PoV size header_kb=... extrinsics_kb=... storage_proof_kb=...` and extract the
|
||||
// sizes of the header, extrinsics and storage proof.
|
||||
// 3. Finally, we find the first line thereafter containing `Compressed PoV size: ...kb` and extract
|
||||
// the compressed size.
|
||||
//
|
||||
// Note: `logFile` must always relate to a teyrchain.
|
||||
function extractAuthorshipData(block: number, logFile: string): IAuthorshipData | null {
|
||||
if (block == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const log = readFileSync(logFile)
|
||||
.toString()
|
||||
.split("\n")
|
||||
.filter((l) => l.includes("[Teyrchain]"))
|
||||
.reverse();
|
||||
const target = `Prepared block for proposing at ${block}`;
|
||||
const findTime = (log: string[]): { time: number; readStack: string[] } => {
|
||||
const readStack: string[] = [];
|
||||
for (let i = 0; i < log.length; i++) {
|
||||
const line = log[i];
|
||||
if (!line) {
|
||||
continue;
|
||||
}
|
||||
readStack.push(line);
|
||||
if (line?.includes(target)) {
|
||||
const match = line.match("([0-9]+) ms");
|
||||
if (match) {
|
||||
return { time: Number(match.at(1)!), readStack };
|
||||
}
|
||||
}
|
||||
}
|
||||
throw `Could not find authorship line ${target}`;
|
||||
};
|
||||
|
||||
const findProofs = (
|
||||
readStack: string[]
|
||||
): { header: number; extrinsics: number; proof: number } => {
|
||||
for (let i = 0; i < readStack.length; i++) {
|
||||
const line = readStack[i];
|
||||
const match = line?.match(
|
||||
"PoV size header_kb=([0-9]+.[0-9]+) extrinsics_kb=([0-9]+.[0-9]+) storage_proof_kb=([0-9]+.[0-9]+)"
|
||||
);
|
||||
if (match) {
|
||||
return {
|
||||
header: Number(match[1]!),
|
||||
extrinsics: Number(match[2]!),
|
||||
proof: Number(match[3])!,
|
||||
};
|
||||
}
|
||||
}
|
||||
throw "Could not find the expected PoV data in log file.";
|
||||
};
|
||||
|
||||
const findCompressed = (readStack: string[]): number => {
|
||||
for (let i = 0; i < readStack.length; i++) {
|
||||
const line = readStack[i];
|
||||
const match = line?.match("Compressed PoV size: ([0-9]+.[0-9]+)kb");
|
||||
if (match) {
|
||||
return Number(match[1]!);
|
||||
}
|
||||
}
|
||||
throw "Could not find the expected compressed data in log file.";
|
||||
};
|
||||
|
||||
const { time, readStack } = findTime(log);
|
||||
// reverse the read stack again, as we want the first proof related prints after we `findTime`.
|
||||
readStack.reverse();
|
||||
const { header, extrinsics, proof } = findProofs(readStack);
|
||||
const compressed = findCompressed(readStack);
|
||||
return { time, header, extrinsics, proof, compressed };
|
||||
}
|
||||
|
||||
export async function runTest(
|
||||
test: TestCase,
|
||||
apis: ApiDeclarations,
|
||||
paraLog: string | null
|
||||
): Promise<EventOutcome> {
|
||||
const { rcClient, paraClient, rcApi, paraApi } = apis;
|
||||
|
||||
let completionPromise: Promise<EventOutcome> = new Promise((resolve, _) => {
|
||||
// Pass the resolve/reject functions to the TestCase instance
|
||||
test.setTestPromiseResolvers(resolve);
|
||||
|
||||
rcClient.finalizedBlock$.subscribe(async (block) => {
|
||||
const events = await rcApi.query.System.Events.getValue({ at: block.hash });
|
||||
const weights = await rcApi.query.System.BlockWeight.getValue({ at: block.hash });
|
||||
const interested = events
|
||||
.filter(
|
||||
(e) =>
|
||||
e.event.type === "Session" ||
|
||||
e.event.type === "RootOffences" ||
|
||||
e.event.type === "StakingAhClient"
|
||||
)
|
||||
.map((e) => ({
|
||||
module: e.event.type,
|
||||
event: e.event.value.type,
|
||||
data: e.event.value.value,
|
||||
}));
|
||||
test.onBlock({
|
||||
chain: Chain.Relay,
|
||||
number: block.number,
|
||||
hash: block.hash,
|
||||
events: interested,
|
||||
weights: weights,
|
||||
authorship: null,
|
||||
});
|
||||
});
|
||||
|
||||
paraClient.finalizedBlock$.subscribe(async (block) => {
|
||||
const events = await paraApi.query.System.Events.getValue({ at: block.hash });
|
||||
const weights = await paraApi.query.System.BlockWeight.getValue({ at: block.hash });
|
||||
const interested = events
|
||||
.filter(
|
||||
(e) =>
|
||||
e.event.type == "Staking" ||
|
||||
e.event.type == "MultiBlockElection" ||
|
||||
e.event.type == "MultiBlockElectionSigned" ||
|
||||
e.event.type == "MultiBlockElectionVerifier" ||
|
||||
e.event.type == "StakingRcClient"
|
||||
)
|
||||
.map((e) => ({
|
||||
module: e.event.type,
|
||||
event: e.event.value.type,
|
||||
data: e.event.value.value,
|
||||
}));
|
||||
test.onBlock({
|
||||
chain: Chain.Teyrchain,
|
||||
number: block.number,
|
||||
hash: block.hash,
|
||||
events: interested,
|
||||
weights: weights,
|
||||
authorship: paraLog ? extractAuthorshipData(block.number, paraLog!) : null,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// Handle graceful exit on SIGINT
|
||||
process.on("SIGINT", () => {
|
||||
console.log("Exiting on Ctrl+C...");
|
||||
rcClient.destroy();
|
||||
paraClient.destroy();
|
||||
test.onKill();
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
// Wait for the completionPromise to resolve/reject
|
||||
const finalOutcome = await completionPromise;
|
||||
rcClient.destroy();
|
||||
paraClient.destroy();
|
||||
logger.info(`Test completed with outcome: ${finalOutcome}, calling onKill...`);
|
||||
test.onKill();
|
||||
return finalOutcome;
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
import { teyrchain, rc } from "@polkadot-api/descriptors";
|
||||
import {
|
||||
Binary,
|
||||
createClient,
|
||||
type PolkadotClient,
|
||||
type PolkadotSigner,
|
||||
type TypedApi,
|
||||
} from "polkadot-api";
|
||||
import { fromBufferToBase58 } from "@polkadot-api/bizinikiwi-bindings";
|
||||
import { withPolkadotSdkCompat } from "polkadot-api/polkadot-sdk-compat";
|
||||
import { getWsProvider } from "polkadot-api/ws-provider/web";
|
||||
import { createLogger, format, transports } from "winston";
|
||||
import { sr25519CreateDerive } from "@polkadot-labs/hdkd";
|
||||
import { DEV_PHRASE, entropyToMiniSecret, mnemonicToEntropy, type KeyPair } from "@polkadot-labs/hdkd-helpers";
|
||||
import { getPolkadotSigner } from "polkadot-api/signer";
|
||||
|
||||
export const GlobalTimeout = 30 * 60 * 1000;
|
||||
export const aliceStash = "5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY";
|
||||
|
||||
|
||||
export const logger = createLogger({
|
||||
level: process.env.LOG_LEVEL || "verbose",
|
||||
format: format.combine(format.timestamp(), format.cli()),
|
||||
defaultMeta: { service: "staking-papi-tests" },
|
||||
transports: [new transports.Console()],
|
||||
});
|
||||
|
||||
const miniSecret = entropyToMiniSecret(mnemonicToEntropy(DEV_PHRASE));
|
||||
const derive = sr25519CreateDerive(miniSecret);
|
||||
const aliceKeyPair = derive("//Alice");
|
||||
|
||||
export const alice = getPolkadotSigner(aliceKeyPair.publicKey, "Sr25519", aliceKeyPair.sign);
|
||||
|
||||
export function deriveFrom(s: string, d: string): KeyPair {
|
||||
const miniSecret = entropyToMiniSecret(mnemonicToEntropy(s));
|
||||
const derive = sr25519CreateDerive(miniSecret);
|
||||
return derive(d);
|
||||
}
|
||||
|
||||
export function derivePubkeyFrom(d: string): string {
|
||||
const miniSecret = entropyToMiniSecret(mnemonicToEntropy(DEV_PHRASE));
|
||||
const derive = sr25519CreateDerive(miniSecret);
|
||||
const keyPair = derive(d);
|
||||
// Convert to SS58 address using Bizinikiwi format (42)
|
||||
return ss58(keyPair.publicKey);
|
||||
}
|
||||
|
||||
export function ss58(key: Uint8Array): string {
|
||||
return fromBufferToBase58(42)(key);
|
||||
}
|
||||
|
||||
export type ApiDeclarations = {
|
||||
rcClient: PolkadotClient;
|
||||
paraClient: PolkadotClient;
|
||||
rcApi: TypedApi<typeof rc>;
|
||||
paraApi: TypedApi<typeof teyrchain>;
|
||||
};
|
||||
|
||||
export async function nullifySigned(
|
||||
paraApi: TypedApi<typeof teyrchain>,
|
||||
signer: PolkadotSigner = alice
|
||||
): Promise<boolean> {
|
||||
// signed and signed validation phase to 0
|
||||
const call = paraApi.tx.System.set_storage({
|
||||
items: [
|
||||
// SignedPhase key
|
||||
[
|
||||
Binary.fromBytes(
|
||||
Uint8Array.from([
|
||||
99, 88, 172, 210, 3, 94, 196, 187, 134, 63, 169, 129, 224, 193, 119, 185,
|
||||
])
|
||||
),
|
||||
Binary.fromBytes(Uint8Array.from([0, 0, 0, 0])),
|
||||
],
|
||||
// SignedValidation key
|
||||
[
|
||||
Binary.fromBytes(
|
||||
Uint8Array.from([
|
||||
72, 56, 74, 129, 110, 79, 113, 169, 54, 203, 118, 220, 158, 48, 63, 42,
|
||||
])
|
||||
),
|
||||
Binary.fromBytes(Uint8Array.from([0, 0, 0, 0])),
|
||||
],
|
||||
],
|
||||
}).decodedCall;
|
||||
const res = await paraApi.tx.Sudo.sudo({ call }).signAndSubmit(alice);
|
||||
return res.ok;
|
||||
}
|
||||
|
||||
export async function nullifyUnsigned(
|
||||
paraApi: TypedApi<typeof teyrchain>,
|
||||
signer: PolkadotSigner = alice
|
||||
): Promise<boolean> {
|
||||
// signed and signed validation phase to 0
|
||||
const call = paraApi.tx.System.set_storage({
|
||||
items: [
|
||||
// UnsignedPhase key
|
||||
[
|
||||
Binary.fromBytes(
|
||||
Uint8Array.from([
|
||||
194, 9, 245, 216, 235, 146, 6, 129, 181, 108, 100, 184, 105, 78, 167, 140,
|
||||
])
|
||||
),
|
||||
Binary.fromBytes(Uint8Array.from([0, 0, 0, 0])),
|
||||
],
|
||||
],
|
||||
}).decodedCall;
|
||||
const res = await paraApi.tx.Sudo.sudo({ call }).signAndSubmit(alice);
|
||||
return res.ok;
|
||||
}
|
||||
|
||||
export async function getApis(): Promise<ApiDeclarations> {
|
||||
const rcClient = createClient(withPolkadotSdkCompat(getWsProvider("ws://localhost:9945")));
|
||||
const rcApi = rcClient.getTypedApi(rc);
|
||||
|
||||
const paraClient = createClient(withPolkadotSdkCompat(getWsProvider("ws://localhost:9946")));
|
||||
const paraApi = paraClient.getTypedApi(teyrchain);
|
||||
|
||||
logger.info(`Connected to ${(await rcApi.constants.System.Version()).spec_name}`);
|
||||
logger.info(`Connected to ${(await paraApi.constants.System.Version()).spec_name}`);
|
||||
|
||||
return { rcApi, paraApi, rcClient, paraClient };
|
||||
}
|
||||
|
||||
// Safely convert anything to a string so we can compare them.
|
||||
export function safeJsonStringify(data: any): string {
|
||||
const bigIntReplacer = (key: string, value: any): any => {
|
||||
if (typeof value === "bigint") {
|
||||
return value.toString();
|
||||
}
|
||||
return value;
|
||||
};
|
||||
|
||||
try {
|
||||
return JSON.stringify(data, bigIntReplacer);
|
||||
} catch (error: any) {
|
||||
// Handle potential errors during stringification (e.g., circular references)
|
||||
console.error("Error during JSON stringification:", error.message);
|
||||
throw new Error(
|
||||
"Failed to stringify data due to unsupported types or circular references."
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,502 @@
|
||||
/*
|
||||
* Vertical Message Passing (VMP) Monitor
|
||||
*
|
||||
* This tool monitors both Downward Message Passing (DMP) and Upward Message Passing (UMP) queues
|
||||
* in the Polkadot relay chain and teyrchains.
|
||||
*
|
||||
* ## Message Flow Overview
|
||||
*
|
||||
* ### Downward Message Passing (DMP): Relay Chain → Teyrchain
|
||||
*
|
||||
* 1. **Message Creation**: Messages are created on the relay chain (e.g., XCM messages from governance)
|
||||
* 2. **Queueing**: Messages are stored in `Dmp::DownwardMessageQueues` storage on the relay chain
|
||||
* - Each teyrchain has its own queue indexed by ParaId
|
||||
* - Messages include the actual message bytes and the block number when sent
|
||||
* 3. **Delivery**: During teyrchain validation, these messages are included in the teyrchain's
|
||||
* inherent data and delivered to the teyrchain
|
||||
* 4. **Processing**: The teyrchain processes these messages in `teyrchain-system` pallet
|
||||
* - Messages are passed to the configured `DmpQueue` handler
|
||||
* - In modern implementations, this is typically the `message-queue` pallet
|
||||
* 5. **Fee Management**: `Dmp::DeliveryFeeFactor` tracks fee multipliers per teyrchain
|
||||
*
|
||||
* ### Upward Message Passing (UMP): Teyrchain → Relay Chain
|
||||
*
|
||||
* 1. **Message Creation**: Messages are created on the teyrchain (e.g., XCM messages)
|
||||
* 2. **Teyrchain Queueing**: Messages are first stored in `TeyrchainSystem::PendingUpwardMessages`
|
||||
* - The teyrchain tracks bandwidth limits and adjusts fee factors based on queue size
|
||||
* 3. **Commitment**: In `on_finalize`, pending messages are moved to `TeyrchainSystem::UpwardMessages`
|
||||
* - These are included in the teyrchain block's proof of validity
|
||||
* 4. **Relay Chain Reception**: When the relay chain validates the teyrchain block:
|
||||
* - UMP messages are extracted from the proof
|
||||
* - Messages are processed by `inclusion` pallet's `receive_upward_messages`
|
||||
* 5. **Processing**: Messages are enqueued into the `message-queue` pallet with origin `Ump(ParaId)`
|
||||
* - The message-queue pallet handles actual execution with weight limits
|
||||
* - Messages can be temporarily or permanently overweight
|
||||
*
|
||||
* ## Key Components
|
||||
*
|
||||
* ### Relay Chain Pallets
|
||||
* - `dmp`: Manages downward message queues and delivery fees
|
||||
* - `inclusion`: Handles teyrchain block validation and UMP message reception
|
||||
* - `message-queue`: Generic message queue processor for various origins (UMP, DMP, HRMP)
|
||||
*
|
||||
* ### Teyrchain Pallets
|
||||
* - `teyrchain-system`: Manages UMP message sending and DMP message reception
|
||||
* - `message-queue`: Processes received DMP messages (and other message types)
|
||||
*
|
||||
* ## Storage Layout
|
||||
*
|
||||
* ### Relay Chain
|
||||
* - `Dmp::DownwardMessageQueues`: Map<ParaId, Vec<InboundDownwardMessage>>
|
||||
* - `Dmp::DeliveryFeeFactor`: Map<ParaId, FixedU128>
|
||||
* - Well-known keys for UMP queue sizes (relay_dispatch_queue_size)
|
||||
*
|
||||
* ### Teyrchain
|
||||
* - `TeyrchainSystem::PendingUpwardMessages`: Vec<UpwardMessage>
|
||||
* - `TeyrchainSystem::UpwardMessages`: Vec<UpwardMessage> (cleared each block)
|
||||
* - `TeyrchainSystem::UpwardDeliveryFeeFactor`: FixedU128
|
||||
*
|
||||
* ## Message Queue Pallet
|
||||
*
|
||||
* The `message-queue` pallet is a generic, paginated message processor that:
|
||||
* - Stores messages in "books" organized by origin (e.g., Ump(ParaId), Dmp)
|
||||
* - Each book contains pages of messages to handle large message volumes efficiently
|
||||
* - Processes messages with strict weight limits to ensure block production
|
||||
* - Handles overweight messages that exceed processing limits
|
||||
* - Emits events for processed, overweight, and failed messages
|
||||
*
|
||||
* ## Bandwidth and Fee Management
|
||||
*
|
||||
* - Both DMP and UMP implement dynamic fee mechanisms
|
||||
* - Fees increase when queues grow large (deterring spam)
|
||||
* - Fees decrease when queues are small (encouraging usage)
|
||||
* - Bandwidth limits prevent any single teyrchain from monopolizing message passing
|
||||
*
|
||||
* ## VMP Message Limits and Risk Analysis
|
||||
*
|
||||
* There are 4 key categories of limits in the VMP system:
|
||||
*
|
||||
* ### 1. Single Message Size Limit
|
||||
*
|
||||
* **DMP (Downward):**
|
||||
* - Enforced at: `polkadot/runtime/teyrchains/src/dmp.rs:189` in `can_queue_downward_message()`
|
||||
* - Configuration: `max_downward_message_size`
|
||||
* - Check: Rejects if `serialized_len > config.max_downward_message_size`
|
||||
*
|
||||
* **UMP (Upward):**
|
||||
* - Teyrchain enforcement: `cumulus/pallets/teyrchain-system/src/lib.rs:1665` in `send_upward_message()`
|
||||
* - Relay validation: `polkadot/runtime/teyrchains/src/inclusion/mod.rs:967` in `check_upward_messages()`
|
||||
* - Configuration: `max_upward_message_size` (hard bound: 128KB defined as MAX_UPWARD_MESSAGE_SIZE_BOUND)
|
||||
*
|
||||
* ### 2. Queue Total Size (Bytes)
|
||||
*
|
||||
* **DMP:**
|
||||
* - Max capacity: `MAX_POSSIBLE_ALLOCATION / max_downward_message_size`
|
||||
* - Calculated in: `polkadot/runtime/teyrchains/src/dmp.rs:318-319` in `dmq_max_length()`
|
||||
* - Enforced at: `polkadot/runtime/teyrchains/src/dmp.rs:194` in `can_queue_downward_message()`
|
||||
*
|
||||
* **UMP:**
|
||||
* - Teyrchain check: `cumulus/pallets/teyrchain-system/src/lib.rs:369-373` (respects relay's remaining capacity)
|
||||
* - Relay limit: `max_upward_queue_size` enforced at `polkadot/runtime/teyrchains/src/inclusion/mod.rs:977-980`
|
||||
*
|
||||
* ### 3. Queue Total Count (Messages)
|
||||
*
|
||||
* **DMP:**
|
||||
* - No explicit total message count limit
|
||||
* - Only implicitly limited by total queue size
|
||||
*
|
||||
* **UMP:**
|
||||
* - Relay limit: `max_upward_queue_count` at `polkadot/runtime/teyrchains/src/inclusion/mod.rs:958-961`
|
||||
* - Teyrchain respects relay's `remaining_count` from `relay_dispatch_queue_remaining_capacity`
|
||||
*
|
||||
* ### 4. Per-Block Append Limit
|
||||
*
|
||||
* **DMP:**
|
||||
* - No explicit per-block limit for senders
|
||||
* - Receivers process up to `processed_downward_messages` per block
|
||||
*
|
||||
* **UMP:**
|
||||
* - Configuration: `max_upward_message_num_per_candidate`
|
||||
* - Teyrchain limit: `cumulus/pallets/teyrchain-system/src/lib.rs:386` in `on_finalize()`
|
||||
* - Relay validation: `polkadot/runtime/teyrchains/src/inclusion/mod.rs:949-952`
|
||||
* - Max bound: 16,384 messages (MAX_UPWARD_MESSAGE_NUM in `polkadot/teyrchain/src/primitives.rs:436`)
|
||||
*
|
||||
* ### Receiver-side Risk: Weight Exhaustion
|
||||
*
|
||||
* Both DMP and UMP messages are processed through the message-queue pallet:
|
||||
* - Weight check: bizinikiwi/frame/message-queue/src/lib.rs:1591 in `process_message_payload()`
|
||||
* - Messages exceeding `overweight_limit` are marked as overweight
|
||||
* - Configuration: `ServiceWeight` and `IdleMaxServiceWeight`
|
||||
* - Overweight handling: Permanently overweight messages require manual execution via `execute_overweight()`
|
||||
*
|
||||
* **Key Insight**: DMP is less restrictive with only size-based limits, while UMP implements all four types of limits,
|
||||
* providing more granular control over message flow.
|
||||
*/
|
||||
|
||||
import { createClient, type PolkadotClient, type TypedApi } from "polkadot-api";
|
||||
import { withPolkadotSdkCompat } from "polkadot-api/polkadot-sdk-compat";
|
||||
import { getWsProvider } from "polkadot-api/ws-provider/web";
|
||||
import { rc, teyrchain } from "@polkadot-api/descriptors";
|
||||
import { logger } from "./utils";
|
||||
|
||||
interface MonitorOptions {
|
||||
relayPort: number;
|
||||
paraPort?: number;
|
||||
refreshInterval: number;
|
||||
paraId?: number;
|
||||
}
|
||||
|
||||
interface DmpQueueInfo {
|
||||
paraId: number;
|
||||
messageCount: number;
|
||||
totalSize: number;
|
||||
avgMessageSize: number;
|
||||
feeFactor: string;
|
||||
messages: Array<{
|
||||
size: number;
|
||||
sentAt: number;
|
||||
}>;
|
||||
}
|
||||
|
||||
interface UmpQueueInfo {
|
||||
paraId: number;
|
||||
relayQueueCount: number;
|
||||
relayQueueSize: number;
|
||||
pendingCount?: number;
|
||||
pendingSize?: number;
|
||||
}
|
||||
|
||||
interface MessageStats {
|
||||
dmp: {
|
||||
totalQueues: number;
|
||||
totalMessages: number;
|
||||
totalSize: number;
|
||||
avgMessagesPerQueue: number;
|
||||
avgSizePerMessage: number;
|
||||
queues: DmpQueueInfo[];
|
||||
};
|
||||
ump: {
|
||||
totalParas: number;
|
||||
totalMessages: number;
|
||||
totalSize: number;
|
||||
queues: UmpQueueInfo[];
|
||||
};
|
||||
}
|
||||
|
||||
export async function monitorVmpQueues(options: MonitorOptions): Promise<void> {
|
||||
const relayWsUrl = `ws://127.0.0.1:${options.relayPort}`;
|
||||
const paraWsUrl = options.paraPort ? `ws://127.0.0.1:${options.paraPort}` : null;
|
||||
|
||||
logger.info(`🚀 Connecting to relay chain at ${relayWsUrl}`);
|
||||
if (paraWsUrl) {
|
||||
logger.info(`🚀 Connecting to teyrchain at ${paraWsUrl}`);
|
||||
}
|
||||
logger.info(`📊 Monitoring VMP queues${options.paraId ? ` for teyrchain ${options.paraId}` : ' for all teyrchains'}`);
|
||||
logger.info(`⏱️ Refresh interval: ${options.refreshInterval}s`);
|
||||
logger.info("");
|
||||
|
||||
try {
|
||||
// Connect to relay chain
|
||||
const relayWsProvider = getWsProvider(relayWsUrl);
|
||||
const relayClient = createClient(withPolkadotSdkCompat(relayWsProvider));
|
||||
const relayApi = relayClient.getTypedApi(rc);
|
||||
|
||||
// Test relay connection
|
||||
const relayChainSpec = await relayClient.getChainSpecData();
|
||||
logger.info(`✅ Connected to relay chain: ${relayChainSpec.name}`);
|
||||
|
||||
// Connect to teyrchain if port provided
|
||||
let paraClient: PolkadotClient | null = null;
|
||||
let paraApi: any | null = null;
|
||||
if (paraWsUrl) {
|
||||
const paraWsProvider = getWsProvider(paraWsUrl);
|
||||
paraClient = createClient(withPolkadotSdkCompat(paraWsProvider));
|
||||
// Use teyrchain descriptor for the teyrchain API
|
||||
paraApi = paraClient.getTypedApi(teyrchain);
|
||||
|
||||
const paraChainSpec = await paraClient.getChainSpecData();
|
||||
logger.info(`✅ Connected to teyrchain: ${paraChainSpec.name}`);
|
||||
}
|
||||
|
||||
const version = await relayApi.constants.System.Version();
|
||||
logger.info(`Relay chain: ${version.spec_name} v${version.spec_version}`);
|
||||
logger.info("");
|
||||
|
||||
// Start monitoring loop
|
||||
while (true) {
|
||||
try {
|
||||
await displayMessageStatus(relayApi, paraApi, options.paraId);
|
||||
} catch (error) {
|
||||
logger.error("Error fetching message data:", error);
|
||||
}
|
||||
|
||||
await sleep(options.refreshInterval * 1000);
|
||||
|
||||
// Clear screen for next update
|
||||
if (process.stdout.isTTY) {
|
||||
process.stdout.write('\x1Bc');
|
||||
}
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
logger.error("Failed to initialize monitoring:", error);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
async function displayMessageStatus(relayApi: TypedApi<typeof rc>, paraApi: any | null, specificParaId?: number): Promise<void> {
|
||||
const timestamp = new Date().toLocaleString();
|
||||
|
||||
console.log("╔═══════════════════════════════════════════════════════════════╗");
|
||||
console.log("║ Vertical Message Passing Monitor ║");
|
||||
console.log(`║ Last updated: ${timestamp.padEnd(45)} ║`);
|
||||
console.log("╚═══════════════════════════════════════════════════════════════╝");
|
||||
console.log();
|
||||
|
||||
try {
|
||||
const stats = await fetchMessageStats(relayApi, paraApi, specificParaId);
|
||||
|
||||
// Display DMP Statistics
|
||||
console.log("📥 DMP (Downward Message Passing) Statistics:");
|
||||
console.log(` Active Queues: ${stats.dmp.totalQueues}`);
|
||||
console.log(` Total Messages: ${stats.dmp.totalMessages}`);
|
||||
console.log(` Total Size: ${formatBytes(stats.dmp.totalSize)}`);
|
||||
if (stats.dmp.totalQueues > 0) {
|
||||
console.log(` Avg Messages/Queue: ${stats.dmp.avgMessagesPerQueue.toFixed(1)}`);
|
||||
}
|
||||
if (stats.dmp.totalMessages > 0) {
|
||||
console.log(` Avg Message Size: ${formatBytes(stats.dmp.avgSizePerMessage)}`);
|
||||
}
|
||||
console.log();
|
||||
|
||||
// Display UMP Statistics
|
||||
console.log("📤 UMP (Upward Message Passing) Statistics:");
|
||||
console.log(` Active Paras: ${stats.ump.totalParas}`);
|
||||
console.log(` Total Messages: ${stats.ump.totalMessages}`);
|
||||
console.log(` Total Size: ${formatBytes(stats.ump.totalSize)}`);
|
||||
console.log();
|
||||
|
||||
// Display DMP queue details
|
||||
if (stats.dmp.queues.length > 0) {
|
||||
console.log("📋 DMP Queue Details:");
|
||||
console.log("┌─────────────┬───────────┬─────────────┬─────────────┬─────────────┐");
|
||||
console.log("│ Para ID │ Messages │ Total Size │ Avg Size │ Fee Factor │");
|
||||
console.log("├─────────────┼───────────┼─────────────┼─────────────┼─────────────┤");
|
||||
|
||||
for (const queue of stats.dmp.queues.slice(0, 10)) {
|
||||
console.log(
|
||||
`│ ${queue.paraId.toString().padEnd(11)} │ ${queue.messageCount.toString().padEnd(9)} │ ${formatBytes(queue.totalSize).padEnd(11)} │ ${formatBytes(queue.avgMessageSize).padEnd(11)} │ ${queue.feeFactor.padEnd(11)} │`
|
||||
);
|
||||
}
|
||||
|
||||
console.log("└─────────────┴───────────┴─────────────┴─────────────┴─────────────┘");
|
||||
|
||||
if (stats.dmp.queues.length > 10) {
|
||||
console.log(`... and ${stats.dmp.queues.length - 10} more DMP queues`);
|
||||
}
|
||||
console.log();
|
||||
}
|
||||
|
||||
// Display UMP queue details
|
||||
if (stats.ump.queues.length > 0) {
|
||||
console.log("📋 UMP Queue Details:");
|
||||
console.log("┌─────────────┬─────────────┬─────────────┬──────────────┬──────────────┐");
|
||||
console.log("│ Para ID │ Relay Msgs │ Relay Size │ Pending Msgs │ Pending Size │");
|
||||
console.log("├─────────────┼─────────────┼─────────────┼──────────────┼──────────────┤");
|
||||
|
||||
for (const queue of stats.ump.queues.slice(0, 10)) {
|
||||
const pendingStr = queue.pendingCount !== undefined ? queue.pendingCount.toString() : "N/A";
|
||||
const pendingSizeStr = queue.pendingSize !== undefined ? formatBytes(queue.pendingSize) : "N/A";
|
||||
console.log(
|
||||
`│ ${queue.paraId.toString().padEnd(11)} │ ${queue.relayQueueCount.toString().padEnd(11)} │ ${formatBytes(queue.relayQueueSize).padEnd(11)} │ ${pendingStr.padEnd(12)} │ ${pendingSizeStr.padEnd(12)} │`
|
||||
);
|
||||
}
|
||||
|
||||
console.log("└─────────────┴─────────────┴─────────────┴──────────────┴──────────────┘");
|
||||
|
||||
if (stats.ump.queues.length > 10) {
|
||||
console.log(`... and ${stats.ump.queues.length - 10} more UMP queues`);
|
||||
}
|
||||
console.log();
|
||||
}
|
||||
|
||||
// Show most active queues
|
||||
const topDmpQueues = stats.dmp.queues
|
||||
.filter(q => q.messages.length > 0)
|
||||
.sort((a, b) => b.messageCount - a.messageCount)
|
||||
.slice(0, 3);
|
||||
|
||||
if (topDmpQueues.length > 0) {
|
||||
console.log("🔥 Most Active DMP Queues:");
|
||||
for (const queue of topDmpQueues) {
|
||||
console.log(` Para ${queue.paraId}: ${queue.messageCount} messages, latest at block ${Math.max(...queue.messages.map(m => m.sentAt))}`);
|
||||
}
|
||||
console.log();
|
||||
}
|
||||
|
||||
// Warning thresholds
|
||||
const totalMessages = stats.dmp.totalMessages + stats.ump.totalMessages;
|
||||
const totalSize = stats.dmp.totalSize + stats.ump.totalSize;
|
||||
|
||||
if (totalMessages > 1000) {
|
||||
console.log("⚠️ WARNING: High message count detected!");
|
||||
}
|
||||
if (totalSize > 10 * 1024 * 1024) { // 10MB
|
||||
console.log("⚠️ WARNING: High memory usage detected!");
|
||||
}
|
||||
|
||||
// Note about teyrchain connection
|
||||
if (!paraApi && specificParaId) {
|
||||
console.log("ℹ️ Note: Connect to teyrchain with --para-port to see pending UMP messages");
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
console.log("❌ Error fetching message statistics:");
|
||||
console.log(` ${error}`);
|
||||
}
|
||||
|
||||
console.log();
|
||||
console.log("Press Ctrl+C to stop monitoring");
|
||||
console.log();
|
||||
}
|
||||
|
||||
async function fetchMessageStats(relayApi: TypedApi<typeof rc>, paraApi: any | null, specificParaId?: number): Promise<MessageStats> {
|
||||
// Fetch DMP stats from relay chain
|
||||
const [downwardMessageQueues, deliveryFeeFactors] = await Promise.all([
|
||||
relayApi.query.Dmp.DownwardMessageQueues.getEntries(),
|
||||
relayApi.query.Dmp.DeliveryFeeFactor.getEntries()
|
||||
]);
|
||||
|
||||
const dmpQueues: DmpQueueInfo[] = [];
|
||||
let dmpTotalMessages = 0;
|
||||
let dmpTotalSize = 0;
|
||||
|
||||
// Process DMP queues
|
||||
for (const { keyArgs: [paraId], value: messages } of downwardMessageQueues) {
|
||||
if (specificParaId !== undefined && paraId !== specificParaId) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const messageCount = messages.length;
|
||||
if (messageCount === 0) continue;
|
||||
|
||||
const messageSizes = messages.map((msg) => {
|
||||
return msg.msg.asBytes().length
|
||||
});
|
||||
|
||||
const queueTotalSize = messageSizes.reduce((sum: number, size: number) => sum + size, 0);
|
||||
const avgMessageSize = messageCount > 0 ? queueTotalSize / messageCount : 0;
|
||||
|
||||
const feeFactorEntry = deliveryFeeFactors.find(entry => entry.keyArgs[0] === paraId);
|
||||
const feeFactorRaw = feeFactorEntry?.value || 1_000_000_000_000_000_000n;
|
||||
const feeFactorValue = typeof feeFactorRaw === 'bigint' ?
|
||||
Number(feeFactorRaw) / 1_000_000_000_000_000_000 :
|
||||
typeof feeFactorRaw === 'number' ?
|
||||
feeFactorRaw / 1_000_000_000_000_000_000 :
|
||||
1.0;
|
||||
const feeFactor = feeFactorValue.toFixed(6);
|
||||
|
||||
dmpQueues.push({
|
||||
paraId,
|
||||
messageCount,
|
||||
totalSize: queueTotalSize,
|
||||
avgMessageSize,
|
||||
feeFactor,
|
||||
messages: messages.map((msg: any, idx: number) => ({
|
||||
size: messageSizes[idx]!,
|
||||
sentAt: msg.sent_at || 0
|
||||
}))
|
||||
});
|
||||
|
||||
dmpTotalMessages += messageCount;
|
||||
dmpTotalSize += queueTotalSize;
|
||||
}
|
||||
|
||||
// Sort DMP queues by message count
|
||||
dmpQueues.sort((a, b) => b.messageCount - a.messageCount);
|
||||
|
||||
// Fetch UMP stats
|
||||
const umpQueues: UmpQueueInfo[] = [];
|
||||
let umpTotalMessages = 0;
|
||||
let umpTotalSize = 0;
|
||||
|
||||
// Only check UMP for specified paraId when monitoring a specific teyrchain
|
||||
const paraIds = specificParaId ? [specificParaId] : [];
|
||||
|
||||
for (const paraId of paraIds) {
|
||||
try {
|
||||
// Try to get the relay dispatch queue size from well-known key
|
||||
// This is stored by the inclusion pallet when processing UMP messages
|
||||
const wellKnownKey = `0x` +
|
||||
`3a6865617070616765735f73746f726167653a` + // :heappages_storage:
|
||||
`0000` + // twox128("Teyrchains")
|
||||
`0000` + // twox128("RelayDispatchQueueSize")
|
||||
`0000` + // twox64(paraId) - simplified, would need proper encoding
|
||||
paraId.toString(16).padStart(8, '0');
|
||||
|
||||
// For now, we'll check if the para has any activity in message queue
|
||||
// This is a simplified approach - in production you'd query the actual storage
|
||||
const umpQueueInfo: UmpQueueInfo = {
|
||||
paraId,
|
||||
relayQueueCount: 0,
|
||||
relayQueueSize: 0
|
||||
};
|
||||
|
||||
// If we have teyrchain connection and it matches our paraId, get pending messages
|
||||
if (paraApi && paraId === specificParaId) {
|
||||
try {
|
||||
const pendingMessages = await paraApi.query.TeyrchainSystem.PendingUpwardMessages();
|
||||
if (pendingMessages) {
|
||||
umpQueueInfo.pendingCount = pendingMessages.length;
|
||||
umpQueueInfo.pendingSize = pendingMessages.reduce((sum: number, msg: any) => {
|
||||
return sum + (Array.isArray(msg) ? msg.length : 0);
|
||||
}, 0);
|
||||
}
|
||||
} catch (error) {
|
||||
// Teyrchain might not have this storage item
|
||||
}
|
||||
}
|
||||
|
||||
// Only add if there's any activity
|
||||
if (umpQueueInfo.relayQueueCount > 0 || umpQueueInfo.pendingCount) {
|
||||
umpQueues.push(umpQueueInfo);
|
||||
umpTotalMessages += umpQueueInfo.relayQueueCount + (umpQueueInfo.pendingCount || 0);
|
||||
umpTotalSize += umpQueueInfo.relayQueueSize + (umpQueueInfo.pendingSize || 0);
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
// Continue with next para if this one fails
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
dmp: {
|
||||
totalQueues: dmpQueues.length,
|
||||
totalMessages: dmpTotalMessages,
|
||||
totalSize: dmpTotalSize,
|
||||
avgMessagesPerQueue: dmpQueues.length > 0 ? dmpTotalMessages / dmpQueues.length : 0,
|
||||
avgSizePerMessage: dmpTotalMessages > 0 ? dmpTotalSize / dmpTotalMessages : 0,
|
||||
queues: dmpQueues
|
||||
},
|
||||
ump: {
|
||||
totalParas: umpQueues.length,
|
||||
totalMessages: umpTotalMessages,
|
||||
totalSize: umpTotalSize,
|
||||
queues: umpQueues
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function formatBytes(bytes: number): string {
|
||||
if (bytes === 0) return '0 B';
|
||||
|
||||
const k = 1024;
|
||||
const sizes = ['B', 'KB', 'MB', 'GB'];
|
||||
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
||||
|
||||
return parseFloat((bytes / Math.pow(k, i)).toFixed(1)) + ' ' + sizes[i];
|
||||
}
|
||||
|
||||
function sleep(ms: number): Promise<void> {
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
import { Chain, Observe } from "../src/test-case";
|
||||
import { logger, nullifySigned, nullifyUnsigned, type ApiDeclarations } from "../src/utils";
|
||||
|
||||
// An unsigned solution scenario:
|
||||
//
|
||||
// When no staking-miner is running (and for simplicity the signed phase is also set to zero). We
|
||||
// expect an unsigned solution to successfullly proceed and submit a solution with `minerPages` out
|
||||
// of the total `pages`.
|
||||
export function commonUnsignedSteps(
|
||||
expectedValidatorSetCount: number,
|
||||
minerPages: number,
|
||||
pages: number,
|
||||
doNullifySigned: boolean,
|
||||
apis: ApiDeclarations
|
||||
): Observe[] {
|
||||
return [
|
||||
// first relay session change at block 11
|
||||
Observe.on(Chain.Relay, "Session", "NewSession").byBlock(11),
|
||||
// by block 10 we will plan a new era
|
||||
Observe.on(Chain.Teyrchain, "Staking", "SessionRotated")
|
||||
.withDataCheck((x: any) => x.active_era == 0 && x.planned_era == 1)
|
||||
.onPass(() => {
|
||||
if (doNullifySigned) {
|
||||
nullifySigned(apis.paraApi).then((ok) => {
|
||||
logger.verbose("Nullified signed phase:", ok);
|
||||
});
|
||||
}
|
||||
}),
|
||||
// eventually we will verify all pages
|
||||
...Array.from({ length: minerPages }, (_, __) => {
|
||||
return Observe.on(Chain.Teyrchain, "MultiBlockElectionVerifier", "Verified");
|
||||
}),
|
||||
// eventually it will be queued
|
||||
Observe.on(Chain.Teyrchain, "MultiBlockElectionVerifier", "Queued"),
|
||||
// eventually multiblock election will transition to `Done`
|
||||
Observe.on(Chain.Teyrchain, "MultiBlockElection", "PhaseTransitioned").withDataCheck(
|
||||
(x: any) => x.to.type === "Done"
|
||||
),
|
||||
// eventually we will export all 4 pages to staking
|
||||
// export events.
|
||||
...Array.from({ length: pages }, (_, __) => {
|
||||
return Observe.on(Chain.Teyrchain, "Staking", "PagedElectionProceeded");
|
||||
}),
|
||||
// eventually multiblock goes back to `Off`
|
||||
Observe.on(Chain.Teyrchain, "MultiBlockElection", "PhaseTransitioned").withDataCheck(
|
||||
(x: any) => x.to.type === "Off"
|
||||
),
|
||||
// eventually we will send it back to RC
|
||||
Observe.on(Chain.Relay, "StakingAhClient", "ValidatorSetReceived").withDataCheck(
|
||||
(x: any) => x.id === 1 && x.new_validator_set_count === expectedValidatorSetCount
|
||||
),
|
||||
Observe.on(Chain.Relay, "Session", "NewQueued"),
|
||||
// eventually we will receive a session report back in AH with activation timestamp
|
||||
Observe.on(Chain.Teyrchain, "StakingRcClient", "SessionReportReceived").withDataCheck(
|
||||
(x) => x.activation_timestamp !== undefined
|
||||
),
|
||||
// eventually we will have era paid (inflation)
|
||||
Observe.on(Chain.Teyrchain, "Staking", "EraPaid"),
|
||||
].map((s) => s.build());
|
||||
}
|
||||
|
||||
// A signed solution scenario.
|
||||
//
|
||||
// This test expect you to call `spawnMiner` in the final test code. A full solution of `pages` is
|
||||
// expected to be submitted.
|
||||
export function commonSignedSteps(
|
||||
pages: number,
|
||||
expectedValidatorSetCount: number,
|
||||
apis: ApiDeclarations
|
||||
): Observe[] {
|
||||
return [
|
||||
// first relay session change at block 11
|
||||
Observe.on(Chain.Relay, "Session", "NewSession").byBlock(11),
|
||||
// by block 10 we will plan a new era
|
||||
Observe.on(Chain.Teyrchain, "Staking", "SessionRotated")
|
||||
.withDataCheck((x: any) => x.active_era == 0 && x.planned_era == 1)
|
||||
.onPass(() => {
|
||||
nullifyUnsigned(apis.paraApi).then((ok) => {
|
||||
logger.verbose("Nullified unsigned phase:", ok);
|
||||
});
|
||||
}),
|
||||
|
||||
// Eventually a signed submission is registered...
|
||||
Observe.on(Chain.Teyrchain, "MultiBlockElectionSigned", "Registered"),
|
||||
// ... and exact number of pages are generated
|
||||
...Array.from({ length: pages }, () =>
|
||||
Observe.on(Chain.Teyrchain, "MultiBlockElectionSigned", "Stored")
|
||||
),
|
||||
// ... and exact number of pages are verified
|
||||
...Array.from({ length: pages }, () =>
|
||||
Observe.on(Chain.Teyrchain, "MultiBlockElectionVerifier", "Verified")
|
||||
),
|
||||
// eventually it will be queued
|
||||
Observe.on(Chain.Teyrchain, "MultiBlockElectionVerifier", "Queued"),
|
||||
// eventually the signed submitter is rewarded.
|
||||
// TODO: check rewarded account is Bob
|
||||
Observe.on(Chain.Teyrchain, "MultiBlockElectionSigned", "Rewarded"),
|
||||
// eventually multiblock election will transition to `Done`
|
||||
Observe.on(Chain.Teyrchain, "MultiBlockElection", "PhaseTransitioned").withDataCheck(
|
||||
(x: any) => x.to.type === "Done"
|
||||
),
|
||||
// eventually we will export all pages.
|
||||
...Array.from({ length: pages }, () =>
|
||||
Observe.on(Chain.Teyrchain, "Staking", "PagedElectionProceeded")
|
||||
),
|
||||
// eventually multiblock goes back to `Off`
|
||||
Observe.on(Chain.Teyrchain, "MultiBlockElection", "PhaseTransitioned").withDataCheck(
|
||||
(x: any) => x.to.type === "Off"
|
||||
),
|
||||
// eventually we will send it back to RC
|
||||
Observe.on(Chain.Relay, "StakingAhClient", "ValidatorSetReceived").withDataCheck(
|
||||
(x: any) => x.id === 1 && x.new_validator_set_count === expectedValidatorSetCount
|
||||
),
|
||||
Observe.on(Chain.Relay, "Session", "NewQueued"),
|
||||
// eventually we will receive a session report back in AH with activation timestamp
|
||||
Observe.on(Chain.Teyrchain, "StakingRcClient", "SessionReportReceived").withDataCheck(
|
||||
(x) => x.activation_timestamp !== undefined
|
||||
),
|
||||
// eventually we will have era paid (inflation)
|
||||
Observe.on(Chain.Teyrchain, "Staking", "EraPaid"),
|
||||
].map((s) => s.build());
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
import { test, expect } from "bun:test";
|
||||
import { Presets } from "../src";
|
||||
import { runPresetUntilLaunched } from "../src/cmd";
|
||||
import { Chain, EventOutcome, Observe, runTest, TestCase } from "../src/test-case";
|
||||
import { getApis, GlobalTimeout, logger, nullifySigned } from "../src/utils";
|
||||
|
||||
/// This is the preset against which your test will run. See the README or `PResets` for more info.
|
||||
const PRESET: Presets = Presets.FakeKsm;
|
||||
|
||||
test(
|
||||
`example test with preset ${PRESET}`,
|
||||
async () => {
|
||||
/// We run the test with our defined preset.
|
||||
const { killZn, paraLog } = await runPresetUntilLaunched(PRESET);
|
||||
/// Grab PAPI Apis to both relay and teyrchain instance of the ZN.
|
||||
const apis = await getApis();
|
||||
|
||||
// Our test is defined here. We expect a sequence of events to be observed in RC or
|
||||
// Teyrchain. The events that we can observe are defined in `test-case.ts`'s `runTest`. In
|
||||
// short, they are all of the events related to staking.
|
||||
const testCase = new TestCase(
|
||||
[
|
||||
Observe.on(Chain.Relay, "Session", "NewSession")
|
||||
// An event can be expected to happen by a certain block
|
||||
.byBlock(11)
|
||||
// And it can execute a callback when it passes.
|
||||
.onPass(() => {
|
||||
logger.verbose("New session observed on relay chain");
|
||||
})
|
||||
// and we can check the data of the event.
|
||||
.withDataCheck((x: any) => {
|
||||
logger.verbose("shall we check the data? maybe", x);
|
||||
return true
|
||||
}),
|
||||
// add more `Observe`s here
|
||||
].map((s) => s.build()),
|
||||
// Passing this to true will allow events to be _interleaved_. If set to `false`, the
|
||||
// above sequence of events are expected to happen in a strict order. If `true`, the
|
||||
// events of each `Chain` must happen in a strict order, but intra-chain events can come
|
||||
// in any order. For example, assume we have the following 4 observes in our test case:
|
||||
// 1. Observe.on(Chain.Relay, "Module", "Event1")
|
||||
// 2. Observe.on(Chain.Relay, "Module", "Event2")
|
||||
// 3. Observe.on(Chain.Para, "Module", "Event3")
|
||||
// 4. Observe.on(Chain.Para, "Module", "Event4")
|
||||
//
|
||||
// Without interleaving, 1 -> 4 has to be observed as-is.
|
||||
//
|
||||
// With interleaving, at any point in time, the first unobserved event of each chain
|
||||
// type is acceptable. For example, the following is valid:
|
||||
//
|
||||
// 3 -> 1 -> 4 -> 2
|
||||
//
|
||||
// In some sense, with `interleave = true`, we break apart the test case into two stacks
|
||||
// that need to be popped in order, while in interleave = false, it is one stack.
|
||||
true,
|
||||
// Something to happen when the test is over. Always kill ZN, and any other processes
|
||||
// you might spawn.
|
||||
() => {
|
||||
killZn();
|
||||
}
|
||||
);
|
||||
|
||||
const outcome = await runTest(testCase, apis, paraLog);
|
||||
expect(outcome).toEqual(EventOutcome.Done);
|
||||
},
|
||||
{ timeout: GlobalTimeout }
|
||||
);
|
||||
@@ -0,0 +1,52 @@
|
||||
import { test, expect } from "bun:test";
|
||||
import { Presets } from "../src";
|
||||
import { runPresetUntilLaunched, spawnMiner } from "../src/cmd";
|
||||
import { Chain, EventOutcome, Observe, runTest, TestCase } from "../src/test-case";
|
||||
import { getApis, GlobalTimeout, logger, nullifyUnsigned } from "../src/utils";
|
||||
import { commonSignedSteps } from "./common";
|
||||
|
||||
const PRESET: Presets = Presets.FakeDot;
|
||||
|
||||
test(
|
||||
`pruning era with signed (full solution) on ${PRESET}`,
|
||||
async () => {
|
||||
const { killZn, paraLog } = await runPresetUntilLaunched(PRESET);
|
||||
const apis = await getApis();
|
||||
const killMiner = await spawnMiner();
|
||||
|
||||
// This test has no real assertions. Change the `HistoryDepth` to 1 in the runtime, run it,
|
||||
// and observe the logs and PoV sizes.
|
||||
const steps = [
|
||||
// first relay session change at block 11
|
||||
Observe.on(Chain.Relay, "Session", "NewSession").byBlock(11)
|
||||
.onPass(() => {
|
||||
nullifyUnsigned(apis.paraApi).then((ok) => {
|
||||
logger.verbose("Nullified signed phase:", ok);
|
||||
});
|
||||
}),
|
||||
Observe.on(Chain.Teyrchain, "Staking", "EraPruned")
|
||||
.withDataCheck((x) => x.index == 0),
|
||||
Observe.on(Chain.Teyrchain, "Staking", "EraPruned")
|
||||
.withDataCheck((x) => x.index == 1),
|
||||
// Observe.on(Chain.Teyrchain, "Staking", "EraPruned")
|
||||
// .withDataCheck((x) => x.index == 2),
|
||||
// Observe.on(Chain.Teyrchain, "Staking", "EraPruned")
|
||||
// .withDataCheck((x) => x.index == 3),
|
||||
// Observe.on(Chain.Teyrchain, "Staking", "EraPruned")
|
||||
// .withDataCheck((x) => x.index == 4),
|
||||
].map((s) => s.build())
|
||||
|
||||
const testCase = new TestCase(
|
||||
steps,
|
||||
true,
|
||||
() => {
|
||||
killMiner();
|
||||
killZn();
|
||||
}
|
||||
);
|
||||
|
||||
const outcome = await runTest(testCase, apis, paraLog);
|
||||
expect(outcome).toEqual(EventOutcome.Done);
|
||||
},
|
||||
{ timeout: GlobalTimeout * 10 }
|
||||
);
|
||||
@@ -0,0 +1,32 @@
|
||||
import { test, expect } from "bun:test";
|
||||
import { Presets } from "../src";
|
||||
import { runPresetUntilLaunched, spawnMiner } from "../src/cmd";
|
||||
import { EventOutcome, runTest, TestCase } from "../src/test-case";
|
||||
import {
|
||||
getApis,
|
||||
GlobalTimeout,
|
||||
} from "../src/utils";
|
||||
import { commonSignedSteps } from "./common";
|
||||
|
||||
const PRESET: Presets = Presets.FakeDev;
|
||||
test(
|
||||
`signed solution on ${PRESET}`,
|
||||
async () => {
|
||||
const { killZn, paraLog } = await runPresetUntilLaunched(PRESET);
|
||||
const apis = await getApis();
|
||||
const killMiner = await spawnMiner();
|
||||
|
||||
const testCase = new TestCase(
|
||||
commonSignedSteps(4, 10, apis),
|
||||
true,
|
||||
() => {
|
||||
killMiner();
|
||||
killZn();
|
||||
}
|
||||
);
|
||||
|
||||
const outcome = await runTest(testCase, apis, paraLog);
|
||||
expect(outcome).toEqual(EventOutcome.Done);
|
||||
},
|
||||
{ timeout: GlobalTimeout }
|
||||
);
|
||||
@@ -0,0 +1,30 @@
|
||||
import { test, expect } from "bun:test";
|
||||
import { Presets } from "../src";
|
||||
import { runPresetUntilLaunched, spawnMiner } from "../src/cmd";
|
||||
import { EventOutcome, runTest, TestCase } from "../src/test-case";
|
||||
import { getApis, GlobalTimeout} from "../src/utils";
|
||||
import { commonSignedSteps } from "./common";
|
||||
|
||||
const PRESET: Presets = Presets.FakeDot;
|
||||
|
||||
test(
|
||||
`signed solution on ${PRESET}`,
|
||||
async () => {
|
||||
const { killZn, paraLog } = await runPresetUntilLaunched(PRESET);
|
||||
const apis = await getApis();
|
||||
const killMiner = await spawnMiner();
|
||||
|
||||
const testCase = new TestCase(
|
||||
commonSignedSteps(32, 500, apis),
|
||||
true,
|
||||
() => {
|
||||
killMiner();
|
||||
killZn();
|
||||
}
|
||||
);
|
||||
|
||||
const outcome = await runTest(testCase, apis, paraLog);
|
||||
expect(outcome).toEqual(EventOutcome.Done);
|
||||
},
|
||||
{ timeout: GlobalTimeout }
|
||||
);
|
||||
@@ -0,0 +1,30 @@
|
||||
import { test, expect } from "bun:test";
|
||||
import { Presets } from "../src";
|
||||
import { runPresetUntilLaunched, spawnMiner } from "../src/cmd";
|
||||
import { EventOutcome, runTest, TestCase } from "../src/test-case";
|
||||
import { getApis, GlobalTimeout } from "../src/utils";
|
||||
import { commonSignedSteps } from "./common";
|
||||
|
||||
const PRESET: Presets = Presets.FakeKsm;
|
||||
|
||||
test(
|
||||
`signed solution on ${PRESET}`,
|
||||
async () => {
|
||||
const { killZn, paraLog } = await runPresetUntilLaunched(PRESET);
|
||||
const apis = await getApis();
|
||||
const killMiner = await spawnMiner();
|
||||
|
||||
const testCase = new TestCase(
|
||||
commonSignedSteps(16, 1000, apis),
|
||||
true,
|
||||
() => {
|
||||
killMiner();
|
||||
killZn();
|
||||
}
|
||||
);
|
||||
|
||||
const outcome = await runTest(testCase, apis, paraLog);
|
||||
expect(outcome).toEqual(EventOutcome.Done);
|
||||
},
|
||||
{ timeout: GlobalTimeout }
|
||||
);
|
||||
@@ -0,0 +1,103 @@
|
||||
import { test, expect } from "bun:test";
|
||||
import { Presets } from "../src";
|
||||
import { runPresetUntilLaunched } from "../src/cmd";
|
||||
import { Chain, EventOutcome, Observe, runTest, TestCase } from "../src/test-case";
|
||||
import { alice, getApis, GlobalTimeout, logger, nullifySigned, aliceStash } from "../src/utils";
|
||||
|
||||
// Note the `RealM` preset as this test MUST run with enough validators such that we can disable one.
|
||||
const PRESET: Presets = Presets.RealM;
|
||||
|
||||
test(
|
||||
`slashing with disabling on ${PRESET}`,
|
||||
async () => {
|
||||
const { killZn, paraLog } = await runPresetUntilLaunched(PRESET);
|
||||
const apis = await getApis();
|
||||
let aliceExposedNominators = 0;
|
||||
let pages = 0;
|
||||
|
||||
const steps = [
|
||||
// first relay session change at block 11
|
||||
Observe.on(Chain.Relay, "Session", "NewSession").byBlock(11),
|
||||
// eventually AH will will be instructed to plan a new session.
|
||||
Observe.on(Chain.Teyrchain, "Staking", "SessionRotated")
|
||||
.withDataCheck((x: any) => x.active_era == 0 && x.planned_era == 1)
|
||||
.onPass(() => {
|
||||
nullifySigned(apis.paraApi);
|
||||
}),
|
||||
// Eventually we will receive an activation timestamp in AH, meaning the first era was complete.
|
||||
Observe.on(Chain.Teyrchain, "StakingRcClient", "SessionReportReceived")
|
||||
.withDataCheck((x) => x.activation_timestamp !== undefined)
|
||||
.onPass(() => {
|
||||
// upon completion, submit a slash to rc
|
||||
logger.info("Submitting slash to RC");
|
||||
const call = apis.rcApi.tx.RootOffences.create_offence({
|
||||
offenders: [
|
||||
// alice//Stash, 50%, which will cause any disabling. See `DisablingStrategy` in `./runtimes/teyrchain`.
|
||||
[aliceStash, 500000000],
|
||||
],
|
||||
maybe_identifications: undefined,
|
||||
maybe_session_index: undefined,
|
||||
}).decodedCall;
|
||||
apis.rcApi.tx.Sudo.sudo({ call })
|
||||
.signAndSubmit(alice)
|
||||
.then((res: any) => {
|
||||
logger.verbose("Slash submission result:", res.ok);
|
||||
});
|
||||
}),
|
||||
// we will receive the root offence event
|
||||
Observe.on(Chain.Relay, "RootOffences", "OffenceCreated"),
|
||||
// Session pallet has insta-disabled this validator.
|
||||
Observe.on(Chain.Relay, "Session", "ValidatorDisabled").withDataCheck(
|
||||
(x: any) => x.validator === aliceStash
|
||||
),
|
||||
|
||||
// Rest of the events are the same as in the non-disabling test.
|
||||
|
||||
// eventually we will receive an offence in the teyrchain, first the rc-client
|
||||
Observe.on(Chain.Teyrchain, "StakingRcClient", "OffenceReceived").withDataCheck(
|
||||
(x: any) => x.offences_count === 1
|
||||
),
|
||||
// then staking
|
||||
Observe.on(Chain.Teyrchain, "Staking", "OffenceReported")
|
||||
.withDataCheck((x: any) => x.offence_era === 1 && x.fraction === 500000000)
|
||||
.onPass(async () => {
|
||||
// let's calculate how many pages of exposure alice has -- this will impact the number of next events.
|
||||
const overview = await apis.paraApi.query.Staking.ErasStakersOverview.getValue(
|
||||
1,
|
||||
aliceStash
|
||||
);
|
||||
pages = overview?.page_count || 0;
|
||||
aliceExposedNominators = overview?.nominator_count || 0;
|
||||
// TODO: lazily create the `Slashed` and `SlashComputed` based on this
|
||||
logger.verbose(
|
||||
`Alice has ${aliceExposedNominators} exposed nominators (${pages}) whom we expect to slash later`
|
||||
);
|
||||
}),
|
||||
|
||||
// then staking will calculate the slashes, we only check 1 page
|
||||
Observe.on(Chain.Teyrchain, "Staking", "SlashComputed").withDataCheck(
|
||||
(x: any) => x.page === 0
|
||||
),
|
||||
|
||||
// staking will eventually bump to active era 2, where slashes will be applied.
|
||||
Observe.on(Chain.Teyrchain, "Staking", "EraPaid"),
|
||||
Observe.on(Chain.Teyrchain, "Staking", "SessionRotated").withDataCheck(
|
||||
(x: any) => x.active_era === 2
|
||||
),
|
||||
|
||||
// staking will apply slashes, we only check one slash.
|
||||
Observe.on(Chain.Teyrchain, "Staking", "Slashed"),
|
||||
];
|
||||
const testCase = new TestCase(
|
||||
steps.map((s) => s.build()),
|
||||
true,
|
||||
() => {
|
||||
killZn();
|
||||
}
|
||||
);
|
||||
|
||||
const outcome = await runTest(testCase, apis, paraLog);
|
||||
expect(outcome).toEqual(EventOutcome.Done);
|
||||
},
|
||||
{ timeout: GlobalTimeout }
|
||||
);
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
import { test, expect } from "bun:test";
|
||||
import { Presets } from "../src";
|
||||
import { runPresetUntilLaunched } from "../src/cmd";
|
||||
import { Chain, EventOutcome, Observe, runTest, TestCase } from "../src/test-case";
|
||||
import { alice, getApis, GlobalTimeout, logger, nullifySigned, aliceStash } from "../src/utils";
|
||||
|
||||
const PRESET: Presets = Presets.RealS;
|
||||
|
||||
test(
|
||||
`slashing without disabling on ${PRESET}`,
|
||||
async () => {
|
||||
const { killZn, paraLog } = await runPresetUntilLaunched(PRESET);
|
||||
const apis = await getApis();
|
||||
let aliceExposedNominators = 0;
|
||||
let pages = 0;
|
||||
|
||||
const steps = [
|
||||
// first relay session change at block 11
|
||||
Observe.on(Chain.Relay, "Session", "NewSession").byBlock(11),
|
||||
// eventually AH will will be instructed to plan a new session.
|
||||
Observe.on(Chain.Teyrchain, "Staking", "SessionRotated")
|
||||
.withDataCheck((x: any) => x.active_era == 0 && x.planned_era == 1)
|
||||
.onPass(() => {
|
||||
nullifySigned(apis.paraApi);
|
||||
}),
|
||||
// Eventually we will receive an activation timestamp in AH, meaning the first era was complete.
|
||||
Observe.on(Chain.Teyrchain, "StakingRcClient", "SessionReportReceived")
|
||||
.withDataCheck((x) => x.activation_timestamp !== undefined)
|
||||
.onPass(() => {
|
||||
// upon completion, submit a slash to rc
|
||||
logger.info("Submitting slash to RC");
|
||||
const call = apis.rcApi.tx.RootOffences.create_offence({
|
||||
offenders: [
|
||||
// alice//Stash, 10%, which will NOT cause any disabling. See `DisablingStrategy` in `./runtimes/teyrchain`.
|
||||
[aliceStash, 100000000],
|
||||
],
|
||||
maybe_identifications: undefined,
|
||||
maybe_session_index: undefined,
|
||||
}).decodedCall;
|
||||
apis.rcApi.tx.Sudo.sudo({ call })
|
||||
.signAndSubmit(alice)
|
||||
.then((res: any) => {
|
||||
logger.verbose("Slash submission result:", res.ok);
|
||||
});
|
||||
}),
|
||||
// we will receive the root offence event
|
||||
Observe.on(Chain.Relay, "RootOffences", "OffenceCreated"),
|
||||
|
||||
// eventually we will receive an offence in the teyrchain, first the rc-client
|
||||
Observe.on(Chain.Teyrchain, "StakingRcClient", "OffenceReceived").withDataCheck(
|
||||
(x: any) => x.offences_count === 1
|
||||
),
|
||||
// then staking
|
||||
Observe.on(Chain.Teyrchain, "Staking", "OffenceReported")
|
||||
.withDataCheck((x: any) => x.offence_era === 1 && x.fraction === 100000000)
|
||||
.onPass(async () => {
|
||||
// let's calculate how many pages of exposure alice has -- this will impact the number of next events.
|
||||
const overview = await apis.paraApi.query.Staking.ErasStakersOverview.getValue(
|
||||
1,
|
||||
aliceStash
|
||||
);
|
||||
pages = overview?.page_count || 0;
|
||||
aliceExposedNominators = overview?.nominator_count || 0;
|
||||
// TODO: lazily create the `Slashed` and `SlashComputed` based on this
|
||||
logger.verbose(
|
||||
`Alice has ${aliceExposedNominators} exposed nominators (${pages}) whom we expect to slash later`
|
||||
);
|
||||
}),
|
||||
|
||||
// then staking will calculate the slasheh, we only check 1 page
|
||||
Observe.on(Chain.Teyrchain, "Staking", "SlashComputed").withDataCheck(
|
||||
(x: any) => x.page === 0
|
||||
),
|
||||
|
||||
// staking will eventually bump to active era 2, where slashes will be applied.
|
||||
Observe.on(Chain.Teyrchain, "Staking", "EraPaid"),
|
||||
Observe.on(Chain.Teyrchain, "Staking", "SessionRotated").withDataCheck(
|
||||
(x: any) => x.active_era === 2
|
||||
),
|
||||
|
||||
// staking will apply slashes, we only check one slash.
|
||||
Observe.on(Chain.Teyrchain, "Staking", "Slashed"),
|
||||
];
|
||||
const testCase = new TestCase(
|
||||
steps.map((s) => s.build()),
|
||||
true,
|
||||
() => {
|
||||
killZn();
|
||||
}
|
||||
);
|
||||
|
||||
const outcome = await runTest(testCase, apis, paraLog);
|
||||
expect(outcome).toEqual(EventOutcome.Done);
|
||||
},
|
||||
{ timeout: GlobalTimeout }
|
||||
);
|
||||
@@ -0,0 +1,97 @@
|
||||
import { test, expect } from "bun:test";
|
||||
import { Presets } from "../src";
|
||||
import { runPresetUntilLaunched } from "../src/cmd";
|
||||
import { Chain, EventOutcome, Observe, runTest, TestCase } from "../src/test-case";
|
||||
import { alice, getApis, GlobalTimeout, logger, nullifySigned, aliceStash, derivePubkeyFrom, ss58 } from "../src/utils";
|
||||
|
||||
const PRESET: Presets = Presets.RealS;
|
||||
|
||||
test(
|
||||
`slashing spam test on ${PRESET}`,
|
||||
async () => {
|
||||
const { killZn, paraLog } = await runPresetUntilLaunched(PRESET);
|
||||
const apis = await getApis();
|
||||
// total number of offences to send.
|
||||
const target = 1000;
|
||||
// the size of each batch.
|
||||
const batchSize = 100;
|
||||
const numBatches = Math.ceil(target / batchSize);
|
||||
let sent = 0;
|
||||
let received = 0;
|
||||
// onchain-page-size for offence queueing in RC is 50, so we expect 20 pages for 1000 offences.
|
||||
|
||||
const steps = [
|
||||
// first relay session change at block 11, just a sanity check
|
||||
Observe.on(Chain.Relay, "Session", "NewSession")
|
||||
.byBlock(11)
|
||||
.onPass(async () => {
|
||||
logger.info(`Submitting ${target} offences in batches of ${batchSize}`);
|
||||
|
||||
// Calculate number of batches needed
|
||||
|
||||
let nonce = await apis.rcApi.apis.AccountNonceApi.account_nonce(ss58(alice.publicKey));
|
||||
logger.info(`Alice nonce at start: ${nonce}`);
|
||||
|
||||
for (let batchIndex = 0; batchIndex < numBatches; batchIndex++) {
|
||||
const start = batchIndex * batchSize;
|
||||
const end = Math.min(start + batchSize, target);
|
||||
const currentBatchSize = end - start;
|
||||
|
||||
logger.info(`Processing batch ${batchIndex + 1}/${numBatches}: offences ${start} to ${end - 1}`);
|
||||
|
||||
// Create batch of offence calls
|
||||
const offenceCalls = Array.from({ length: currentBatchSize }, (_, i) => {
|
||||
const offenceIndex = start + i;
|
||||
logger.debug(`Preparing offence ${offenceIndex}: ${derivePubkeyFrom(`//${offenceIndex}`)}`);
|
||||
|
||||
return apis.rcApi.tx.RootOffences.report_offence({
|
||||
offences: [[
|
||||
[derivePubkeyFrom(`//${offenceIndex}`), { total: BigInt(0), own: BigInt(0), others: [] }],
|
||||
0, // session index
|
||||
BigInt(offenceIndex), // time slot, each being unique
|
||||
100000000 // slash ppm
|
||||
]]
|
||||
}).decodedCall;
|
||||
});
|
||||
|
||||
// Submit this batch as a single transaction
|
||||
try {
|
||||
const batchCall = apis.rcApi.tx.Utility.force_batch({ calls: offenceCalls }).decodedCall;
|
||||
const result = apis.rcApi.tx.Sudo.sudo({ call: batchCall })
|
||||
.signAndSubmit(alice, { at: "best", nonce: nonce });
|
||||
|
||||
logger.info(`Batch ${batchIndex + 1} submitted`);
|
||||
nonce += 1;
|
||||
sent += currentBatchSize;
|
||||
|
||||
} catch (error) {
|
||||
logger.error(`Batch ${batchIndex + 1} failed:`, error);
|
||||
// Continue with next batch even if this one fails
|
||||
}
|
||||
}
|
||||
}),
|
||||
|
||||
// in the meantime, we expect to see on the AH side:
|
||||
...Array.from({ length: 20 }, (_, __) =>
|
||||
Observe.on(Chain.Teyrchain, "StakingRcClient", "OffenceReceived").withDataCheck((x) => {
|
||||
received += x.offences_count;
|
||||
return true
|
||||
}),
|
||||
),
|
||||
];
|
||||
|
||||
const testCase = new TestCase(
|
||||
steps.map((s) => s.build()),
|
||||
true,
|
||||
() => {
|
||||
logger.info(`Test completed. Created ${sent} offences, processed ${received} in teyrchain`);
|
||||
killZn();
|
||||
}
|
||||
);
|
||||
|
||||
const outcome = await runTest(testCase, apis, paraLog);
|
||||
expect(outcome).toEqual(EventOutcome.Done);
|
||||
expect(sent).toEqual(received);
|
||||
},
|
||||
{ timeout: GlobalTimeout * 2 } // Double timeout for this complex test
|
||||
);
|
||||
@@ -0,0 +1,26 @@
|
||||
import { test, expect } from "bun:test";
|
||||
import { Presets } from "../src";
|
||||
import { runPresetUntilLaunched } from "../src/cmd";
|
||||
import { EventOutcome, runTest, TestCase } from "../src/test-case";
|
||||
import { getApis, GlobalTimeout} from "../src/utils";
|
||||
import { commonUnsignedSteps } from "./common";
|
||||
|
||||
const PRESET: Presets = Presets.FakeDev;
|
||||
|
||||
test(
|
||||
`unsigned solution on ${PRESET}`,
|
||||
async () => {
|
||||
const { killZn, paraLog } = await runPresetUntilLaunched(PRESET);
|
||||
|
||||
const apis = await getApis();
|
||||
const steps = commonUnsignedSteps(10, 4, 4, false, apis);
|
||||
|
||||
const testCase = new TestCase(steps, true, () => {
|
||||
killZn();
|
||||
});
|
||||
|
||||
const outcome = await runTest(testCase, apis, paraLog);
|
||||
expect(outcome).toEqual(EventOutcome.Done);
|
||||
},
|
||||
{ timeout: GlobalTimeout }
|
||||
);
|
||||
@@ -0,0 +1,33 @@
|
||||
import { test, expect } from "bun:test";
|
||||
import { Presets } from "../src";
|
||||
import { runPresetUntilLaunched } from "../src/cmd";
|
||||
import { EventOutcome, runTest, TestCase } from "../src/test-case";
|
||||
import { getApis, GlobalTimeout } from "../src/utils";
|
||||
import { commonUnsignedSteps } from "./common";
|
||||
|
||||
const PRESET: Presets = Presets.FakeDot;
|
||||
|
||||
test(
|
||||
`unsigned solution on ${PRESET}`,
|
||||
async () => {
|
||||
const { killZn, paraLog } = await runPresetUntilLaunched(PRESET);
|
||||
const apis = await getApis();
|
||||
|
||||
const expectedValidatorSetCount = await apis.paraApi.query.Staking.ValidatorCount.getValue();
|
||||
const pages = 32;
|
||||
const minerPages = 4;
|
||||
const steps = commonUnsignedSteps(expectedValidatorSetCount, minerPages, pages, true, apis);
|
||||
|
||||
const testCase = new TestCase(
|
||||
steps,
|
||||
true,
|
||||
() => {
|
||||
killZn();
|
||||
}
|
||||
);
|
||||
|
||||
const outcome = await runTest(testCase, apis, paraLog);
|
||||
expect(outcome).toEqual(EventOutcome.Done);
|
||||
},
|
||||
{ timeout: GlobalTimeout }
|
||||
);
|
||||
@@ -0,0 +1,33 @@
|
||||
import { test, expect } from "bun:test";
|
||||
import { Presets } from "../src";
|
||||
import { runPresetUntilLaunched } from "../src/cmd";
|
||||
import { EventOutcome, runTest, TestCase } from "../src/test-case";
|
||||
import { getApis, GlobalTimeout } from "../src/utils";
|
||||
import { commonUnsignedSteps } from "./common";
|
||||
|
||||
const PRESET: Presets = Presets.FakeKsm;
|
||||
|
||||
test(
|
||||
`unsigned solution on ${PRESET}`,
|
||||
async () => {
|
||||
const { killZn, paraLog } = await runPresetUntilLaunched(PRESET);
|
||||
const apis = await getApis();
|
||||
|
||||
const expectedValidatorSetCount = await apis.paraApi.query.Staking.ValidatorCount.getValue();
|
||||
const pages = 16;
|
||||
const minerPages = 4;
|
||||
const steps = commonUnsignedSteps(expectedValidatorSetCount, minerPages, pages, true, apis);
|
||||
|
||||
const testCase = new TestCase(
|
||||
steps,
|
||||
true,
|
||||
() => {
|
||||
killZn();
|
||||
}
|
||||
);
|
||||
|
||||
const outcome = await runTest(testCase, apis, paraLog);
|
||||
expect(outcome).toEqual(EventOutcome.Done);
|
||||
},
|
||||
{ timeout: GlobalTimeout }
|
||||
);
|
||||
@@ -0,0 +1,243 @@
|
||||
import { test, expect } from "bun:test";
|
||||
import { Presets } from "../src";
|
||||
import { runPresetUntilLaunched } from "../src/cmd";
|
||||
import { Chain, EventOutcome, Observe, runTest, TestCase } from "../src/test-case";
|
||||
import { alice, aliceStash, deriveFrom, getApis, GlobalTimeout, logger, safeJsonStringify, ss58, type ApiDeclarations } from "../src/utils";
|
||||
import { DEV_PHRASE } from "@polkadot-labs/hdkd-helpers";
|
||||
import { FixedSizeBinary, type PolkadotSigner, type TxCall, type TxCallData, type TypedApi } from "polkadot-api";
|
||||
import { teyrchain, rc } from "@polkadot-api/descriptors";
|
||||
|
||||
const PRESET: Presets = Presets.FakeDev;
|
||||
|
||||
async function sendUp(api: TypedApi<typeof teyrchain>, count: number) {
|
||||
const calls: TxCallData[] = [];
|
||||
const ed = await api.constants.Balances.ExistentialDeposit();
|
||||
for (let i = 0; i < count; i++) {
|
||||
const account = deriveFrom(DEV_PHRASE, `//up_${i}`);
|
||||
const endowment = BigInt(1000) * ed;
|
||||
const teleport = endowment / BigInt(10);
|
||||
|
||||
const forceSetBalance = api.tx.Balances.force_set_balance({
|
||||
new_free: endowment,
|
||||
who: { type: "Id", value: ss58(account.publicKey) }
|
||||
});
|
||||
|
||||
const xcm = api.tx.PolkadotXcm.teleport_assets({
|
||||
dest: {
|
||||
type: "V5",
|
||||
value: {
|
||||
parents: 1,
|
||||
interior: {
|
||||
type: "Here",
|
||||
value: undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
beneficiary: {
|
||||
type: "V5",
|
||||
value: {
|
||||
parents: 0,
|
||||
interior: {
|
||||
type: "X1",
|
||||
value: {
|
||||
type: "AccountId32",
|
||||
value: { id: new FixedSizeBinary(account.publicKey) }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
assets: {
|
||||
type: "V5",
|
||||
value: [
|
||||
{
|
||||
id: {
|
||||
parents: 1,
|
||||
interior: {
|
||||
type: "Here",
|
||||
value: undefined
|
||||
}
|
||||
},
|
||||
fun: {
|
||||
type: "Fungible",
|
||||
"value": teleport
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
fee_asset_id: {
|
||||
type: "V5",
|
||||
value: {
|
||||
parents: 1,
|
||||
interior: {
|
||||
type: "Here",
|
||||
value: undefined
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
const dispatchAs = api.tx.Utility.dispatch_as({
|
||||
as_origin: { type: "system", value: { type: "Signed", value: ss58(account.publicKey) } },
|
||||
call: xcm.decodedCall
|
||||
});
|
||||
|
||||
calls.push(forceSetBalance.decodedCall);
|
||||
calls.push(dispatchAs.decodedCall);
|
||||
}
|
||||
|
||||
const finalBatch = api.tx.Utility.batch_all({ calls });
|
||||
const finalSudo = api.tx.Sudo.sudo({ call: finalBatch.decodedCall });
|
||||
try {
|
||||
const res = await finalSudo.signAndSubmit(alice, { at: "best" });
|
||||
let success = 0;
|
||||
let failure = 0;
|
||||
res.events.forEach((e) => {
|
||||
logger.debug(safeJsonStringify(e.value));
|
||||
if (e.value.type === "DispatchedAs") {
|
||||
// @ts-ignore
|
||||
if (e.value.value.result.success) {
|
||||
success += 1
|
||||
} else {
|
||||
failure += 1
|
||||
}
|
||||
}
|
||||
});
|
||||
logger.info(`Sent ${count} upward messages, intercepted ${success + failure} events, ${success} succeeded, ${failure} failed`);
|
||||
} catch(e) {
|
||||
logger.warn(`Error sending upward messages: ${e}`);
|
||||
}
|
||||
}
|
||||
|
||||
async function sendDown(api: TypedApi<typeof rc>, count: number) {
|
||||
const calls: TxCallData[] = [];
|
||||
const ed = await api.constants.Balances.ExistentialDeposit();
|
||||
for (let i = 0; i < count; i++) {
|
||||
const account = deriveFrom(DEV_PHRASE, `//down_${i}`)
|
||||
const endowment = BigInt(1000) * ed;
|
||||
const teleport = endowment / BigInt(10);
|
||||
|
||||
const forceSetBalance = api.tx.Balances.force_set_balance({
|
||||
new_free: endowment,
|
||||
who: { type: "Id", value: ss58(account.publicKey) }
|
||||
})
|
||||
|
||||
const xcm = api.tx.XcmPallet.teleport_assets({
|
||||
dest: {
|
||||
type: "V5",
|
||||
value: {
|
||||
parents: 0,
|
||||
interior: {
|
||||
type: "X1",
|
||||
value: { type: "Teyrchain", value: 1100 }
|
||||
}
|
||||
}
|
||||
},
|
||||
beneficiary: {
|
||||
type: "V5",
|
||||
value: {
|
||||
parents: 0,
|
||||
interior: {
|
||||
type: "X1",
|
||||
value: {
|
||||
type: "AccountId32",
|
||||
value: { id: new FixedSizeBinary(account.publicKey) }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
assets: {
|
||||
type: "V5",
|
||||
value: [
|
||||
{
|
||||
id: {
|
||||
parents: 0,
|
||||
interior: {
|
||||
type: "Here",
|
||||
value: undefined
|
||||
}
|
||||
},
|
||||
fun: {
|
||||
type: "Fungible",
|
||||
value: teleport
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
fee_asset_id: {
|
||||
type: "V5",
|
||||
value: {
|
||||
parents: 0,
|
||||
interior: {
|
||||
type: "Here",
|
||||
value: undefined
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
const dispatchAs = api.tx.Utility.dispatch_as({
|
||||
as_origin: { type: "system", value: { type: "Signed", value: ss58(account.publicKey) } },
|
||||
call: xcm.decodedCall
|
||||
});
|
||||
calls.push(forceSetBalance.decodedCall);
|
||||
calls.push(dispatchAs.decodedCall);
|
||||
}
|
||||
|
||||
const finalBatch = api.tx.Utility.batch_all({ calls });
|
||||
const finalSudo = api.tx.Sudo.sudo({ call: finalBatch.decodedCall });
|
||||
try {
|
||||
const res = await finalSudo.signAndSubmit(alice, { at: "best" });
|
||||
let success = 0;
|
||||
let failure = 0;
|
||||
res.events.forEach((e) => {
|
||||
logger.verbose(safeJsonStringify(e.value));
|
||||
if (e.value.type === "DispatchedAs") {
|
||||
// @ts-ignore
|
||||
if (e.value.value.result.success) {
|
||||
success += 1
|
||||
} else {
|
||||
failure += 1
|
||||
}
|
||||
}
|
||||
});
|
||||
logger.info(`Sent ${count} downward messages, intercepted ${success + failure} events, ${success} succeeded, ${failure} failed`);
|
||||
} catch(e) {
|
||||
logger.warn(`Error sending downward messages: ${e}`);
|
||||
}
|
||||
}
|
||||
|
||||
test(
|
||||
`${PRESET} preset with vmp queues being spammed af`,
|
||||
async () => {
|
||||
const { killZn, paraLog } = await runPresetUntilLaunched(PRESET);
|
||||
|
||||
const apis = await getApis();
|
||||
// This test is meant to not run automatically, so most things are commented out.
|
||||
|
||||
// const downSub = apis.rcClient.blocks$.subscribe((block) => {
|
||||
// if (block.number > 10) {
|
||||
// logger.verbose(`spammer::down spamming at height ${block.number}`);
|
||||
// sendDown(apis.rcApi, (block.number * 10) + 50);
|
||||
// }
|
||||
// });
|
||||
// const upSub = apis.paraClient.blocks$.subscribe((block) => {
|
||||
// if (block.number > 0) {
|
||||
// logger.verbose(`spammer::up spamming at height ${block.number}`);
|
||||
// sendUp(apis.paraApi, 40);
|
||||
// }
|
||||
// });
|
||||
const steps: Observe[] = [
|
||||
Observe.on(Chain.Relay, "Session", "NewSession")
|
||||
.byBlock(11),
|
||||
// Observe.on(Chain.Relay, "WontReach", "WontReach")
|
||||
].map((s) => s.build());
|
||||
|
||||
const testCase = new TestCase(steps, true, () => {
|
||||
killZn();
|
||||
// downSub.unsubscribe();
|
||||
// upSub.unsubscribe()
|
||||
});
|
||||
|
||||
const outcome = await runTest(testCase, apis, paraLog);
|
||||
expect(outcome).toEqual(EventOutcome.Done);
|
||||
},
|
||||
{ timeout: GlobalTimeout }
|
||||
);
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
// Environment setup & latest features
|
||||
"lib": ["esnext"],
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
"moduleDetection": "force",
|
||||
"jsx": "react-jsx",
|
||||
"allowJs": true,
|
||||
|
||||
// Bundler mode
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
"noEmit": true,
|
||||
|
||||
// Best practices
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUncheckedIndexedAccess": true,
|
||||
|
||||
// Some stricter flags (disabled by default)
|
||||
"noUnusedLocals": false,
|
||||
"noUnusedParameters": false,
|
||||
"noPropertyAccessFromIndexSignature": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
[relaychain]
|
||||
default_command = "pezkuwi"
|
||||
chain_spec_path = "./rc.json"
|
||||
|
||||
[[relaychain.nodes]]
|
||||
name = "alice"
|
||||
validator = true
|
||||
rpc_port = 9942
|
||||
|
||||
|
||||
[[relaychain.nodes]]
|
||||
name = "bob"
|
||||
validator = true
|
||||
rpc_port = 9943
|
||||
args = [
|
||||
"-lruntime::system=debug,runtime::session=trace,runtime::staking-async::ah-client=trace,runtime::ah-client=debug",
|
||||
]
|
||||
|
||||
[[relaychain.nodes]]
|
||||
name = "eve"
|
||||
validator = true
|
||||
rpc_port = 9944
|
||||
|
||||
[[relaychain.nodes]]
|
||||
name = "dave"
|
||||
validator = true
|
||||
rpc_port = 9945
|
||||
|
||||
[[teyrchains]]
|
||||
id = 1100
|
||||
chain_spec_path = "./teyrchain.json"
|
||||
|
||||
[teyrchains.collator]
|
||||
name = "charlie"
|
||||
rpc_port = 9946
|
||||
args = [
|
||||
"-lruntime::system=debug,runtime::multiblock-election=trace,runtime::staking=debug,runtime::staking::rc-client=trace,runtime::rc-client=debug",
|
||||
]
|
||||
@@ -0,0 +1,30 @@
|
||||
[relaychain]
|
||||
default_command = "pezkuwi"
|
||||
chain_spec_path = "./rc.json"
|
||||
|
||||
[[relaychain.nodes]]
|
||||
name = "alice"
|
||||
validator = true
|
||||
rpc_port = 9944
|
||||
args = [
|
||||
"-lruntime::system=debug,runtime::session=trace,runtime::staking-async::ah-client=trace,runtime::ah-client=debug,xcm=trace",
|
||||
]
|
||||
|
||||
[[relaychain.nodes]]
|
||||
name = "bob"
|
||||
validator = true
|
||||
rpc_port = 9945
|
||||
args = [
|
||||
"-lruntime::system=debug,runtime::session=trace,runtime::staking-async::ah-client=trace,runtime::ah-client=debug",
|
||||
]
|
||||
|
||||
[[teyrchains]]
|
||||
id = 1100
|
||||
chain_spec_path = "./teyrchain.json"
|
||||
|
||||
[teyrchains.collator]
|
||||
name = "charlie"
|
||||
rpc_port = 9946
|
||||
args = [
|
||||
"-lruntime::system=debug,runtime::multiblock-election=trace,runtime::staking=debug,runtime::staking::rc-client=trace,runtime::rc-client=debug,xcm=trace,teyrchain-system=debug,runtime=info",
|
||||
]
|
||||
@@ -0,0 +1,30 @@
|
||||
[package]
|
||||
name = "pezpallet-staking-async-preset-store"
|
||||
version = "0.1.0"
|
||||
publish = false
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
description = "Simple pallet to store the preset used to generate a runtime's genesis in state"
|
||||
license.workspace = true
|
||||
homepage.workspace = true
|
||||
repository.workspace = true
|
||||
|
||||
|
||||
[dependencies]
|
||||
codec = { workspace = true }
|
||||
frame = { workspace = true, features = ["runtime"] }
|
||||
pezpallet-staking-async-ah-client = { workspace = true }
|
||||
scale-info = { workspace = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"codec/std",
|
||||
"frame/std",
|
||||
"pezpallet-staking-async-ah-client/std",
|
||||
"scale-info/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"frame/runtime-benchmarks",
|
||||
"pezpallet-staking-async-ah-client/runtime-benchmarks",
|
||||
]
|
||||
@@ -0,0 +1,53 @@
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! Simple pallet that stores the preset that was used to generate the genesis state in the state.
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
pub use pallet::*;
|
||||
|
||||
#[frame::pallet]
|
||||
pub mod pallet {
|
||||
extern crate alloc;
|
||||
use frame::prelude::*;
|
||||
|
||||
#[pallet::storage]
|
||||
#[pallet::getter(fn preset)]
|
||||
#[pallet::unbounded]
|
||||
pub type Preset<T: Config> = StorageValue<_, alloc::string::String, OptionQuery>;
|
||||
|
||||
#[pallet::genesis_config]
|
||||
#[derive(DefaultNoBound, DebugNoBound, CloneNoBound, PartialEqNoBound, EqNoBound)]
|
||||
pub struct GenesisConfig<T: Config> {
|
||||
pub preset: alloc::string::String,
|
||||
pub _marker: core::marker::PhantomData<T>,
|
||||
}
|
||||
|
||||
#[pallet::genesis_build]
|
||||
impl<T: Config> BuildGenesisConfig for GenesisConfig<T> {
|
||||
fn build(&self) {
|
||||
Preset::<T>::put(self.preset.clone());
|
||||
}
|
||||
}
|
||||
|
||||
#[pallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
}
|
||||
@@ -0,0 +1,379 @@
|
||||
[package]
|
||||
name = "pezpallet-staking-async-rc-runtime"
|
||||
build = "build.rs"
|
||||
version = "7.0.0"
|
||||
description = "Staking Async testnet Relay Chain runtime."
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
homepage.workspace = true
|
||||
repository.workspace = true
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
bitvec = { features = ["alloc"], workspace = true }
|
||||
codec = { features = ["derive", "max-encoded-len"], workspace = true }
|
||||
log = { workspace = true }
|
||||
scale-info = { features = ["derive"], workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde_derive = { optional = true, workspace = true }
|
||||
serde_json = { features = ["alloc"], workspace = true }
|
||||
smallvec = { workspace = true, default-features = true }
|
||||
|
||||
binary-merkle-tree = { workspace = true }
|
||||
pezsp-api = { workspace = true }
|
||||
pezsp-application-crypto = { workspace = true }
|
||||
pezsp-arithmetic = { workspace = true }
|
||||
pezsp-authority-discovery = { workspace = true }
|
||||
pezsp-block-builder = { workspace = true }
|
||||
pezsp-consensus-babe = { workspace = true }
|
||||
pezsp-consensus-beefy = { workspace = true }
|
||||
pezsp-consensus-grandpa = { workspace = true }
|
||||
pezsp-core = { workspace = true }
|
||||
pezsp-genesis-builder = { workspace = true }
|
||||
pezsp-inherents = { workspace = true }
|
||||
pezsp-io = { workspace = true }
|
||||
pezsp-keyring = { workspace = true }
|
||||
pezsp-mmr-primitives = { workspace = true }
|
||||
pezsp-npos-elections = { workspace = true }
|
||||
pezsp-offchain = { workspace = true }
|
||||
pezsp-runtime = { workspace = true }
|
||||
pezsp-session = { workspace = true }
|
||||
pezsp-staking = { workspace = true }
|
||||
pezsp-storage = { workspace = true }
|
||||
pezsp-transaction-pool = { workspace = true }
|
||||
pezsp-version = { workspace = true }
|
||||
|
||||
pezframe-election-provider-support = { workspace = true }
|
||||
pezframe-executive = { workspace = true }
|
||||
pezframe-metadata-hash-extension = { workspace = true }
|
||||
pezframe-support = { features = ["experimental", "tuples-96"], workspace = true }
|
||||
pezframe-system = { workspace = true }
|
||||
pezframe-system-rpc-runtime-api = { workspace = true }
|
||||
pezpallet-asset-rate = { workspace = true }
|
||||
pezpallet-authority-discovery = { workspace = true }
|
||||
pezpallet-authorship = { workspace = true }
|
||||
pezpallet-babe = { workspace = true }
|
||||
pezpallet-bags-list = { workspace = true }
|
||||
pezpallet-balances = { workspace = true }
|
||||
pezpallet-beefy = { workspace = true }
|
||||
pezpallet-beefy-mmr = { workspace = true }
|
||||
pezpallet-conviction-voting = { workspace = true }
|
||||
pezpallet-election-provider-multi-phase = { workspace = true }
|
||||
pezpallet-fast-unstake = { workspace = true }
|
||||
pezpallet-grandpa = { workspace = true }
|
||||
pezpallet-identity = { workspace = true }
|
||||
pezpallet-indices = { workspace = true }
|
||||
pezpallet-message-queue = { workspace = true }
|
||||
pezpallet-migrations = { workspace = true }
|
||||
pezpallet-mmr = { workspace = true }
|
||||
pezpallet-multisig = { workspace = true }
|
||||
pezpallet-offences = { workspace = true }
|
||||
pezpallet-parameters = { workspace = true }
|
||||
pezpallet-preimage = { workspace = true }
|
||||
pezpallet-proxy = { workspace = true }
|
||||
pezpallet-recovery = { workspace = true }
|
||||
pezpallet-referenda = { workspace = true }
|
||||
pezpallet-root-offences = { workspace = true }
|
||||
pezpallet-root-testing = { workspace = true }
|
||||
pezpallet-scheduler = { workspace = true }
|
||||
pezpallet-session = { workspace = true }
|
||||
pezpallet-staking = { workspace = true }
|
||||
pezpallet-staking-async-ah-client = { workspace = true }
|
||||
pezpallet-staking-async-preset-store = { workspace = true }
|
||||
pezpallet-staking-async-rc-client = { workspace = true }
|
||||
pezpallet-staking-async-rc-runtime-constants = { workspace = true }
|
||||
pezpallet-sudo = { workspace = true }
|
||||
pezpallet-timestamp = { workspace = true }
|
||||
pezpallet-transaction-payment = { workspace = true }
|
||||
pezpallet-transaction-payment-rpc-runtime-api = { workspace = true }
|
||||
pezpallet-treasury = { workspace = true }
|
||||
pezpallet-utility = { workspace = true }
|
||||
pezpallet-vesting = { workspace = true }
|
||||
pezpallet-whitelist = { workspace = true }
|
||||
pezpallet-xcm = { workspace = true }
|
||||
pezpallet-xcm-benchmarks = { optional = true, workspace = true }
|
||||
|
||||
pezframe-benchmarking = { optional = true, workspace = true }
|
||||
pezframe-system-benchmarking = { optional = true, workspace = true }
|
||||
pezframe-try-runtime = { optional = true, workspace = true }
|
||||
hex-literal = { workspace = true, default-features = true }
|
||||
pezpallet-election-provider-support-benchmarking = { optional = true, workspace = true }
|
||||
pezpallet-offences-benchmarking = { optional = true, workspace = true }
|
||||
pezpallet-session-benchmarking = { optional = true, workspace = true }
|
||||
|
||||
pezkuwi-primitives = { workspace = true }
|
||||
pezkuwi-runtime-common = { workspace = true }
|
||||
pezkuwi-runtime-teyrchains = { workspace = true }
|
||||
pezkuwi-teyrchain-primitives = { workspace = true }
|
||||
|
||||
xcm = { workspace = true }
|
||||
xcm-builder = { workspace = true }
|
||||
xcm-executor = { workspace = true }
|
||||
xcm-runtime-apis = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
approx = { workspace = true }
|
||||
remote-externalities = { workspace = true, default-features = true }
|
||||
serde_json = { workspace = true, default-features = true }
|
||||
pezsp-keyring = { workspace = true, default-features = true }
|
||||
pezsp-tracing = { workspace = true }
|
||||
tiny-keccak = { features = ["keccak"], workspace = true }
|
||||
tokio = { features = ["macros"], workspace = true, default-features = true }
|
||||
|
||||
[build-dependencies]
|
||||
bizinikiwi-wasm-builder = { workspace = true, default-features = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
no_std = []
|
||||
std = [
|
||||
"binary-merkle-tree/std",
|
||||
"bitvec/std",
|
||||
"codec/std",
|
||||
"pezframe-benchmarking?/std",
|
||||
"pezframe-election-provider-support/std",
|
||||
"pezframe-executive/std",
|
||||
"pezframe-metadata-hash-extension/std",
|
||||
"pezframe-support/std",
|
||||
"pezframe-system-benchmarking?/std",
|
||||
"pezframe-system-rpc-runtime-api/std",
|
||||
"pezframe-system/std",
|
||||
"pezframe-try-runtime/std",
|
||||
"log/std",
|
||||
"pezpallet-asset-rate/std",
|
||||
"pezpallet-authority-discovery/std",
|
||||
"pezpallet-authorship/std",
|
||||
"pezpallet-babe/std",
|
||||
"pezpallet-bags-list/std",
|
||||
"pezpallet-balances/std",
|
||||
"pezpallet-beefy-mmr/std",
|
||||
"pezpallet-beefy/std",
|
||||
"pezpallet-conviction-voting/std",
|
||||
"pezpallet-election-provider-multi-phase/std",
|
||||
"pezpallet-election-provider-support-benchmarking?/std",
|
||||
"pezpallet-fast-unstake/std",
|
||||
"pezpallet-grandpa/std",
|
||||
"pezpallet-identity/std",
|
||||
"pezpallet-indices/std",
|
||||
"pezpallet-message-queue/std",
|
||||
"pezpallet-migrations/std",
|
||||
"pezpallet-mmr/std",
|
||||
"pezpallet-multisig/std",
|
||||
"pezpallet-offences-benchmarking?/std",
|
||||
"pezpallet-offences/std",
|
||||
"pezpallet-parameters/std",
|
||||
"pezpallet-preimage/std",
|
||||
"pezpallet-proxy/std",
|
||||
"pezpallet-recovery/std",
|
||||
"pezpallet-referenda/std",
|
||||
"pezpallet-root-offences/std",
|
||||
"pezpallet-root-testing/std",
|
||||
"pezpallet-scheduler/std",
|
||||
"pezpallet-session-benchmarking?/std",
|
||||
"pezpallet-session/std",
|
||||
"pezpallet-staking-async-ah-client/std",
|
||||
"pezpallet-staking-async-preset-store/std",
|
||||
"pezpallet-staking-async-rc-client/std",
|
||||
"pezpallet-staking-async-rc-runtime-constants/std",
|
||||
"pezpallet-staking/std",
|
||||
"pezpallet-sudo/std",
|
||||
"pezpallet-timestamp/std",
|
||||
"pezpallet-transaction-payment-rpc-runtime-api/std",
|
||||
"pezpallet-transaction-payment/std",
|
||||
"pezpallet-treasury/std",
|
||||
"pezpallet-utility/std",
|
||||
"pezpallet-vesting/std",
|
||||
"pezpallet-whitelist/std",
|
||||
"pezpallet-xcm-benchmarks?/std",
|
||||
"pezpallet-xcm/std",
|
||||
"pezkuwi-primitives/std",
|
||||
"pezkuwi-runtime-common/std",
|
||||
"pezkuwi-runtime-teyrchains/std",
|
||||
"pezkuwi-teyrchain-primitives/std",
|
||||
"scale-info/std",
|
||||
"serde/std",
|
||||
"serde_derive",
|
||||
"serde_json/std",
|
||||
"pezsp-api/std",
|
||||
"pezsp-application-crypto/std",
|
||||
"pezsp-arithmetic/std",
|
||||
"pezsp-authority-discovery/std",
|
||||
"pezsp-block-builder/std",
|
||||
"pezsp-consensus-babe/std",
|
||||
"pezsp-consensus-beefy/std",
|
||||
"pezsp-consensus-grandpa/std",
|
||||
"pezsp-core/std",
|
||||
"pezsp-genesis-builder/std",
|
||||
"pezsp-inherents/std",
|
||||
"pezsp-io/std",
|
||||
"pezsp-mmr-primitives/std",
|
||||
"pezsp-npos-elections/std",
|
||||
"pezsp-offchain/std",
|
||||
"pezsp-runtime/std",
|
||||
"pezsp-session/std",
|
||||
"pezsp-staking/std",
|
||||
"pezsp-storage/std",
|
||||
"pezsp-tracing/std",
|
||||
"pezsp-transaction-pool/std",
|
||||
"pezsp-version/std",
|
||||
"xcm-builder/std",
|
||||
"xcm-executor/std",
|
||||
"xcm-runtime-apis/std",
|
||||
"xcm/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"binary-merkle-tree/runtime-benchmarks",
|
||||
"pezframe-benchmarking/runtime-benchmarks",
|
||||
"pezframe-election-provider-support/runtime-benchmarks",
|
||||
"pezframe-executive/runtime-benchmarks",
|
||||
"pezframe-metadata-hash-extension/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"pezframe-system-benchmarking/runtime-benchmarks",
|
||||
"pezframe-system-rpc-runtime-api/runtime-benchmarks",
|
||||
"pezframe-system/runtime-benchmarks",
|
||||
"pezframe-try-runtime?/runtime-benchmarks",
|
||||
"pezpallet-asset-rate/runtime-benchmarks",
|
||||
"pezpallet-authority-discovery/runtime-benchmarks",
|
||||
"pezpallet-authorship/runtime-benchmarks",
|
||||
"pezpallet-babe/runtime-benchmarks",
|
||||
"pezpallet-bags-list/runtime-benchmarks",
|
||||
"pezpallet-balances/runtime-benchmarks",
|
||||
"pezpallet-beefy-mmr/runtime-benchmarks",
|
||||
"pezpallet-beefy/runtime-benchmarks",
|
||||
"pezpallet-conviction-voting/runtime-benchmarks",
|
||||
"pezpallet-election-provider-multi-phase/runtime-benchmarks",
|
||||
"pezpallet-election-provider-support-benchmarking/runtime-benchmarks",
|
||||
"pezpallet-fast-unstake/runtime-benchmarks",
|
||||
"pezpallet-grandpa/runtime-benchmarks",
|
||||
"pezpallet-identity/runtime-benchmarks",
|
||||
"pezpallet-indices/runtime-benchmarks",
|
||||
"pezpallet-message-queue/runtime-benchmarks",
|
||||
"pezpallet-migrations/runtime-benchmarks",
|
||||
"pezpallet-mmr/runtime-benchmarks",
|
||||
"pezpallet-multisig/runtime-benchmarks",
|
||||
"pezpallet-offences-benchmarking/runtime-benchmarks",
|
||||
"pezpallet-offences/runtime-benchmarks",
|
||||
"pezpallet-parameters/runtime-benchmarks",
|
||||
"pezpallet-preimage/runtime-benchmarks",
|
||||
"pezpallet-proxy/runtime-benchmarks",
|
||||
"pezpallet-recovery/runtime-benchmarks",
|
||||
"pezpallet-referenda/runtime-benchmarks",
|
||||
"pezpallet-root-offences/runtime-benchmarks",
|
||||
"pezpallet-root-testing/runtime-benchmarks",
|
||||
"pezpallet-scheduler/runtime-benchmarks",
|
||||
"pezpallet-session-benchmarking/runtime-benchmarks",
|
||||
"pezpallet-session/runtime-benchmarks",
|
||||
"pezpallet-staking-async-ah-client/runtime-benchmarks",
|
||||
"pezpallet-staking-async-preset-store/runtime-benchmarks",
|
||||
"pezpallet-staking-async-rc-client/runtime-benchmarks",
|
||||
"pezpallet-staking-async-rc-runtime-constants/runtime-benchmarks",
|
||||
"pezpallet-staking/runtime-benchmarks",
|
||||
"pezpallet-sudo/runtime-benchmarks",
|
||||
"pezpallet-timestamp/runtime-benchmarks",
|
||||
"pezpallet-transaction-payment-rpc-runtime-api/runtime-benchmarks",
|
||||
"pezpallet-transaction-payment/runtime-benchmarks",
|
||||
"pezpallet-treasury/runtime-benchmarks",
|
||||
"pezpallet-utility/runtime-benchmarks",
|
||||
"pezpallet-vesting/runtime-benchmarks",
|
||||
"pezpallet-whitelist/runtime-benchmarks",
|
||||
"pezpallet-xcm-benchmarks/runtime-benchmarks",
|
||||
"pezpallet-xcm/runtime-benchmarks",
|
||||
"pezkuwi-primitives/runtime-benchmarks",
|
||||
"pezkuwi-runtime-common/runtime-benchmarks",
|
||||
"pezkuwi-runtime-teyrchains/runtime-benchmarks",
|
||||
"pezkuwi-teyrchain-primitives/runtime-benchmarks",
|
||||
"remote-externalities/runtime-benchmarks",
|
||||
"pezsp-api/runtime-benchmarks",
|
||||
"pezsp-authority-discovery/runtime-benchmarks",
|
||||
"pezsp-block-builder/runtime-benchmarks",
|
||||
"pezsp-consensus-babe/runtime-benchmarks",
|
||||
"pezsp-consensus-beefy/runtime-benchmarks",
|
||||
"pezsp-consensus-grandpa/runtime-benchmarks",
|
||||
"pezsp-genesis-builder/runtime-benchmarks",
|
||||
"pezsp-inherents/runtime-benchmarks",
|
||||
"pezsp-io/runtime-benchmarks",
|
||||
"pezsp-keyring/runtime-benchmarks",
|
||||
"pezsp-mmr-primitives/runtime-benchmarks",
|
||||
"pezsp-npos-elections/runtime-benchmarks",
|
||||
"pezsp-offchain/runtime-benchmarks",
|
||||
"pezsp-runtime/runtime-benchmarks",
|
||||
"pezsp-session/runtime-benchmarks",
|
||||
"pezsp-staking/runtime-benchmarks",
|
||||
"pezsp-transaction-pool/runtime-benchmarks",
|
||||
"pezsp-version/runtime-benchmarks",
|
||||
"bizinikiwi-wasm-builder/runtime-benchmarks",
|
||||
"xcm-builder/runtime-benchmarks",
|
||||
"xcm-executor/runtime-benchmarks",
|
||||
"xcm-runtime-apis/runtime-benchmarks",
|
||||
"xcm/runtime-benchmarks",
|
||||
]
|
||||
try-runtime = [
|
||||
"pezframe-election-provider-support/try-runtime",
|
||||
"pezframe-executive/try-runtime",
|
||||
"pezframe-support/try-runtime",
|
||||
"pezframe-system/try-runtime",
|
||||
"pezframe-try-runtime",
|
||||
"pezframe-try-runtime/try-runtime",
|
||||
"pezpallet-asset-rate/try-runtime",
|
||||
"pezpallet-authority-discovery/try-runtime",
|
||||
"pezpallet-authorship/try-runtime",
|
||||
"pezpallet-babe/try-runtime",
|
||||
"pezpallet-bags-list/try-runtime",
|
||||
"pezpallet-balances/try-runtime",
|
||||
"pezpallet-beefy-mmr/try-runtime",
|
||||
"pezpallet-beefy/try-runtime",
|
||||
"pezpallet-conviction-voting/try-runtime",
|
||||
"pezpallet-election-provider-multi-phase/try-runtime",
|
||||
"pezpallet-fast-unstake/try-runtime",
|
||||
"pezpallet-grandpa/try-runtime",
|
||||
"pezpallet-identity/try-runtime",
|
||||
"pezpallet-indices/try-runtime",
|
||||
"pezpallet-message-queue/try-runtime",
|
||||
"pezpallet-migrations/try-runtime",
|
||||
"pezpallet-mmr/try-runtime",
|
||||
"pezpallet-multisig/try-runtime",
|
||||
"pezpallet-offences/try-runtime",
|
||||
"pezpallet-parameters/try-runtime",
|
||||
"pezpallet-preimage/try-runtime",
|
||||
"pezpallet-proxy/try-runtime",
|
||||
"pezpallet-recovery/try-runtime",
|
||||
"pezpallet-referenda/try-runtime",
|
||||
"pezpallet-root-offences/try-runtime",
|
||||
"pezpallet-root-testing/try-runtime",
|
||||
"pezpallet-scheduler/try-runtime",
|
||||
"pezpallet-session/try-runtime",
|
||||
"pezpallet-staking-async-ah-client/try-runtime",
|
||||
"pezpallet-staking-async-rc-client/try-runtime",
|
||||
"pezpallet-staking/try-runtime",
|
||||
"pezpallet-sudo/try-runtime",
|
||||
"pezpallet-timestamp/try-runtime",
|
||||
"pezpallet-transaction-payment/try-runtime",
|
||||
"pezpallet-treasury/try-runtime",
|
||||
"pezpallet-utility/try-runtime",
|
||||
"pezpallet-vesting/try-runtime",
|
||||
"pezpallet-whitelist/try-runtime",
|
||||
"pezpallet-xcm/try-runtime",
|
||||
"pezkuwi-runtime-common/try-runtime",
|
||||
"pezkuwi-runtime-teyrchains/try-runtime",
|
||||
"pezsp-runtime/try-runtime",
|
||||
]
|
||||
|
||||
# Enable the metadata hash generation in the wasm builder.
|
||||
metadata-hash = ["bizinikiwi-wasm-builder/metadata-hash"]
|
||||
|
||||
# Set timing constants (e.g. session period) to faster versions to speed up testing.
|
||||
fast-runtime = []
|
||||
|
||||
runtime-metrics = [
|
||||
"pezkuwi-runtime-teyrchains/runtime-metrics",
|
||||
"pezsp-io/with-tracing",
|
||||
]
|
||||
|
||||
# A feature that should be enabled when the runtime should be built for on-chain
|
||||
# deployment. This will disable stuff that shouldn't be part of the on-chain wasm
|
||||
# to make it smaller, like logging for example.
|
||||
on-chain-release-build = ["metadata-hash"]
|
||||
@@ -0,0 +1,39 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#[cfg(all(not(feature = "metadata-hash"), feature = "std"))]
|
||||
fn main() {
|
||||
bizinikiwi_wasm_builder::WasmBuilder::build_using_defaults();
|
||||
bizinikiwi_wasm_builder::WasmBuilder::init_with_defaults()
|
||||
.set_file_name("fast_runtime_binary.rs")
|
||||
.enable_feature("fast-runtime")
|
||||
.build();
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "metadata-hash", feature = "std"))]
|
||||
fn main() {
|
||||
bizinikiwi_wasm_builder::WasmBuilder::init_with_defaults()
|
||||
.enable_metadata_hash("ZGR", 12)
|
||||
.build();
|
||||
bizinikiwi_wasm_builder::WasmBuilder::init_with_defaults()
|
||||
.set_file_name("fast_runtime_binary.rs")
|
||||
.enable_feature("fast-runtime")
|
||||
.enable_metadata_hash("ZGR", 12)
|
||||
.build();
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
fn main() {}
|
||||
@@ -0,0 +1,52 @@
|
||||
[package]
|
||||
name = "pezpallet-staking-async-rc-runtime-constants"
|
||||
version = "7.0.0"
|
||||
description = "Constants used throughout the Staking Async RC network."
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
homepage.workspace = true
|
||||
repository.workspace = true
|
||||
|
||||
[package.metadata.pezkuwi-sdk]
|
||||
exclude-from-umbrella = true
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
smallvec = { workspace = true, default-features = true }
|
||||
|
||||
pezframe-support = { workspace = true }
|
||||
pezkuwi-primitives = { workspace = true }
|
||||
pezkuwi-runtime-common = { workspace = true }
|
||||
pezsp-core = { workspace = true }
|
||||
pezsp-runtime = { workspace = true }
|
||||
pezsp-weights = { workspace = true }
|
||||
|
||||
xcm = { workspace = true }
|
||||
xcm-builder = { workspace = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"pezframe-support/std",
|
||||
"pezkuwi-primitives/std",
|
||||
"pezkuwi-runtime-common/std",
|
||||
"pezsp-core/std",
|
||||
"pezsp-runtime/std",
|
||||
"pezsp-weights/std",
|
||||
"xcm-builder/std",
|
||||
"xcm/std",
|
||||
]
|
||||
|
||||
# Set timing constants (e.g. session period) to faster versions to speed up testing.
|
||||
fast-runtime = []
|
||||
runtime-benchmarks = [
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"pezkuwi-primitives/runtime-benchmarks",
|
||||
"pezkuwi-runtime-common/runtime-benchmarks",
|
||||
"pezsp-runtime/runtime-benchmarks",
|
||||
"xcm-builder/runtime-benchmarks",
|
||||
"xcm/runtime-benchmarks",
|
||||
]
|
||||
@@ -0,0 +1,178 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
pub mod weights;
|
||||
|
||||
/// Money matters.
|
||||
pub mod currency {
|
||||
use pezkuwi_primitives::Balance;
|
||||
|
||||
/// The existential deposit.
|
||||
pub const EXISTENTIAL_DEPOSIT: Balance = 1 * CENTS;
|
||||
|
||||
pub const UNITS: Balance = 1_000_000_000_000;
|
||||
pub const CENTS: Balance = UNITS / 100;
|
||||
pub const MILLICENTS: Balance = CENTS / 1_000;
|
||||
pub const GRAND: Balance = CENTS * 100_000;
|
||||
|
||||
pub const fn deposit(items: u32, bytes: u32) -> Balance {
|
||||
items as Balance * 100 * CENTS + (bytes as Balance) * 5 * MILLICENTS
|
||||
}
|
||||
}
|
||||
|
||||
/// Time and blocks.
|
||||
pub mod time {
|
||||
use pezkuwi_primitives::{BlockNumber, Moment};
|
||||
use pezkuwi_runtime_common::prod_or_fast;
|
||||
|
||||
pub const MILLISECS_PER_BLOCK: Moment = 6000;
|
||||
pub const SLOT_DURATION: Moment = MILLISECS_PER_BLOCK;
|
||||
pub const EPOCH_DURATION_IN_SLOTS: BlockNumber = prod_or_fast!(1 * HOURS, 1 * MINUTES);
|
||||
|
||||
// These time units are defined in number of blocks.
|
||||
pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber);
|
||||
pub const HOURS: BlockNumber = MINUTES * 60;
|
||||
pub const DAYS: BlockNumber = HOURS * 24;
|
||||
|
||||
// 1 in 4 blocks (on average, not counting collisions) will be primary babe blocks.
|
||||
// The choice of is done in accordance to the slot duration and expected target
|
||||
// block time, for safely resisting network delays of maximum two seconds.
|
||||
// <https://research.web3.foundation/Polkadot/protocols/block-production/Babe#6-practical-results>
|
||||
pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4);
|
||||
}
|
||||
|
||||
/// Fee-related.
|
||||
pub mod fee {
|
||||
use crate::weights::ExtrinsicBaseWeight;
|
||||
use pezframe_support::weights::{
|
||||
WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial,
|
||||
};
|
||||
use pezkuwi_primitives::Balance;
|
||||
use smallvec::smallvec;
|
||||
pub use pezsp_runtime::Perbill;
|
||||
|
||||
/// The block saturation level. Fees will be updates based on this value.
|
||||
pub const TARGET_BLOCK_FULLNESS: Perbill = Perbill::from_percent(25);
|
||||
|
||||
/// Handles converting a weight scalar to a fee value, based on the scale and granularity of the
|
||||
/// node's balance type.
|
||||
///
|
||||
/// This should typically create a mapping between the following ranges:
|
||||
/// - [0,` MAXIMUM_BLOCK_WEIGHT`]
|
||||
/// - [Balance::min, Balance::max]
|
||||
///
|
||||
/// Yet, it can be used for any other sort of change to weight-fee. Some examples being:
|
||||
/// - Setting it to `0` will essentially disable the weight fee.
|
||||
/// - Setting it to `1` will cause the literal `#[weight = x]` values to be charged.
|
||||
pub struct WeightToFee;
|
||||
impl WeightToFeePolynomial for WeightToFee {
|
||||
type Balance = Balance;
|
||||
fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
|
||||
// in Zagros, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT:
|
||||
let p = super::currency::CENTS;
|
||||
let q = 10 * Balance::from(ExtrinsicBaseWeight::get().ref_time());
|
||||
smallvec![WeightToFeeCoefficient {
|
||||
degree: 1,
|
||||
negative: false,
|
||||
coeff_frac: Perbill::from_rational(p % q, q),
|
||||
coeff_integer: p / q,
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// System Teyrchains.
|
||||
pub mod system_teyrchain {
|
||||
use pezkuwi_primitives::Id;
|
||||
use xcm_builder::IsChildSystemTeyrchain;
|
||||
|
||||
/// Network's Asset Hub teyrchain ID.
|
||||
pub const ASSET_HUB_ID: u32 = 1100;
|
||||
/// Collectives teyrchain ID.
|
||||
pub const COLLECTIVES_ID: u32 = 1001;
|
||||
/// BridgeHub teyrchain ID.
|
||||
pub const BRIDGE_HUB_ID: u32 = 1002;
|
||||
/// Encointer teyrchain ID.
|
||||
pub const ENCOINTER_ID: u32 = 1003;
|
||||
/// People Chain teyrchain ID.
|
||||
pub const PEOPLE_ID: u32 = 1004;
|
||||
/// Brokerage teyrchain ID.
|
||||
pub const BROKER_ID: u32 = 1005;
|
||||
|
||||
/// All system teyrchains of Zagros.
|
||||
pub type SystemTeyrchains = IsChildSystemTeyrchain<Id>;
|
||||
|
||||
/// Coretime constants
|
||||
pub mod coretime {
|
||||
/// Coretime timeslice period in blocks
|
||||
/// WARNING: This constant is used accross chains, so additional care should be taken
|
||||
/// when changing it.
|
||||
#[cfg(feature = "fast-runtime")]
|
||||
pub const TIMESLICE_PERIOD: u32 = 20;
|
||||
#[cfg(not(feature = "fast-runtime"))]
|
||||
pub const TIMESLICE_PERIOD: u32 = 80;
|
||||
}
|
||||
}
|
||||
|
||||
/// Zagros Treasury pallet instance.
|
||||
pub const TREASURY_PALLET_ID: u8 = 37;
|
||||
|
||||
/// XCM protocol related constants.
|
||||
pub mod xcm {
|
||||
/// Pluralistic bodies existing within the consensus.
|
||||
pub mod body {
|
||||
// Preallocated for the Root body.
|
||||
#[allow(dead_code)]
|
||||
const ROOT_INDEX: u32 = 0;
|
||||
// The bodies corresponding to the Pezkuwi OpenGov Origins.
|
||||
pub const FELLOWSHIP_ADMIN_INDEX: u32 = 1;
|
||||
#[deprecated = "Will be removed after August 2024; Use `xcm::latest::BodyId::Treasury` \
|
||||
instead"]
|
||||
pub const TREASURER_INDEX: u32 = 2;
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::{
|
||||
currency::{CENTS, MILLICENTS, UNITS},
|
||||
fee::WeightToFee,
|
||||
};
|
||||
use crate::weights::ExtrinsicBaseWeight;
|
||||
use pezframe_support::weights::WeightToFee as WeightToFeeT;
|
||||
use pezkuwi_runtime_common::MAXIMUM_BLOCK_WEIGHT;
|
||||
|
||||
#[test]
|
||||
// Test that the fee for `MAXIMUM_BLOCK_WEIGHT` of weight has sane bounds.
|
||||
fn full_block_fee_is_correct() {
|
||||
// A full block should cost between 10 and 100 UNITS.
|
||||
let full_block = WeightToFee::weight_to_fee(&MAXIMUM_BLOCK_WEIGHT);
|
||||
assert!(full_block >= 10 * UNITS);
|
||||
assert!(full_block <= 100 * UNITS);
|
||||
}
|
||||
|
||||
#[test]
|
||||
// This function tests that the fee for `ExtrinsicBaseWeight` of weight is correct
|
||||
fn extrinsic_base_fee_is_correct() {
|
||||
// `ExtrinsicBaseWeight` should cost 1/10 of a CENT
|
||||
println!("Base: {}", ExtrinsicBaseWeight::get());
|
||||
let x = WeightToFee::weight_to_fee(&ExtrinsicBaseWeight::get());
|
||||
let y = CENTS / 10;
|
||||
assert!(x.max(y) - x.min(y) < MILLICENTS);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-14 (Y/M/D)
|
||||
//! HOSTNAME: `runner--ss9ysm1-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//!
|
||||
//! SHORT-NAME: `block`, LONG-NAME: `BlockExecution`, RUNTIME: `Development`
|
||||
//! WARMUPS: `10`, REPEAT: `100`
|
||||
//! WEIGHT-PATH: `runtime/zagros/constants/src/weights/`
|
||||
//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0`
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/pezkuwi
|
||||
// benchmark
|
||||
// overhead
|
||||
// --chain=zagros-dev
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --weight-path=runtime/zagros/constants/src/weights/
|
||||
// --warmup=10
|
||||
// --repeat=100
|
||||
// --header=./file_header.txt
|
||||
|
||||
use pezsp_core::parameter_types;
|
||||
use pezsp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight};
|
||||
|
||||
parameter_types! {
|
||||
/// Time to execute an empty block.
|
||||
/// Calculated by multiplying the *Average* with `1.0` and adding `0`.
|
||||
///
|
||||
/// Stats nanoseconds:
|
||||
/// Min, Max: 449_093, 498_211
|
||||
/// Average: 461_988
|
||||
/// Median: 459_070
|
||||
/// Std-Dev: 10124.58
|
||||
///
|
||||
/// Percentiles nanoseconds:
|
||||
/// 99th: 493_580
|
||||
/// 95th: 482_929
|
||||
/// 75th: 464_502
|
||||
pub const BlockExecutionWeight: Weight =
|
||||
Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(461_988), 0);
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test_weights {
|
||||
use pezsp_weights::constants;
|
||||
|
||||
/// Checks that the weight exists and is sane.
|
||||
// NOTE: If this test fails but you are sure that the generated values are fine,
|
||||
// you can delete it.
|
||||
#[test]
|
||||
fn sane() {
|
||||
let w = super::BlockExecutionWeight::get();
|
||||
|
||||
// At least 100 µs.
|
||||
assert!(
|
||||
w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS,
|
||||
"Weight should be at least 100 µs."
|
||||
);
|
||||
// At most 50 ms.
|
||||
assert!(
|
||||
w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS,
|
||||
"Weight should be at most 50 ms."
|
||||
);
|
||||
}
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-14 (Y/M/D)
|
||||
//! HOSTNAME: `runner--ss9ysm1-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//!
|
||||
//! SHORT-NAME: `extrinsic`, LONG-NAME: `ExtrinsicBase`, RUNTIME: `Development`
|
||||
//! WARMUPS: `10`, REPEAT: `100`
|
||||
//! WEIGHT-PATH: `runtime/zagros/constants/src/weights/`
|
||||
//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0`
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/pezkuwi
|
||||
// benchmark
|
||||
// overhead
|
||||
// --chain=zagros-dev
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --weight-path=runtime/zagros/constants/src/weights/
|
||||
// --warmup=10
|
||||
// --repeat=100
|
||||
// --header=./file_header.txt
|
||||
|
||||
use pezsp_core::parameter_types;
|
||||
use pezsp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight};
|
||||
|
||||
parameter_types! {
|
||||
/// Time to execute a NO-OP extrinsic, for example `System::remark`.
|
||||
/// Calculated by multiplying the *Average* with `1.0` and adding `0`.
|
||||
///
|
||||
/// Stats nanoseconds:
|
||||
/// Min, Max: 112_202, 116_271
|
||||
/// Average: 113_632
|
||||
/// Median: 113_689
|
||||
/// Std-Dev: 576.31
|
||||
///
|
||||
/// Percentiles nanoseconds:
|
||||
/// 99th: 114_688
|
||||
/// 95th: 114_367
|
||||
/// 75th: 113_969
|
||||
pub const ExtrinsicBaseWeight: Weight =
|
||||
Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(113_632), 0);
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test_weights {
|
||||
use pezsp_weights::constants;
|
||||
|
||||
/// Checks that the weight exists and is sane.
|
||||
// NOTE: If this test fails but you are sure that the generated values are fine,
|
||||
// you can delete it.
|
||||
#[test]
|
||||
fn sane() {
|
||||
let w = super::ExtrinsicBaseWeight::get();
|
||||
|
||||
// At least 10 µs.
|
||||
assert!(
|
||||
w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS,
|
||||
"Weight should be at least 10 µs."
|
||||
);
|
||||
// At most 1 ms.
|
||||
assert!(
|
||||
w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
|
||||
"Weight should be at most 1 ms."
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! Expose the auto generated weight files.
|
||||
|
||||
pub mod block_weights;
|
||||
pub mod extrinsic_weights;
|
||||
pub mod paritydb_weights;
|
||||
pub mod rocksdb_weights;
|
||||
|
||||
pub use block_weights::BlockExecutionWeight;
|
||||
pub use extrinsic_weights::ExtrinsicBaseWeight;
|
||||
pub use paritydb_weights::constants::ParityDbWeight;
|
||||
pub use rocksdb_weights::constants::RocksDbWeight;
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
pub mod constants {
|
||||
use pezframe_support::{
|
||||
parameter_types,
|
||||
weights::{constants, RuntimeDbWeight},
|
||||
};
|
||||
|
||||
parameter_types! {
|
||||
/// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights
|
||||
/// are available for brave runtime engineers who may want to try this out as default.
|
||||
pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight {
|
||||
read: 8_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
|
||||
write: 50_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
|
||||
};
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test_db_weights {
|
||||
use super::constants::ParityDbWeight as W;
|
||||
use pezframe_support::weights::constants;
|
||||
|
||||
/// Checks that all weights exist and have sane values.
|
||||
// NOTE: If this test fails but you are sure that the generated values are fine,
|
||||
// you can delete it.
|
||||
#[test]
|
||||
fn sane() {
|
||||
// At least 1 µs.
|
||||
assert!(
|
||||
W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
|
||||
"Read weight should be at least 1 µs."
|
||||
);
|
||||
assert!(
|
||||
W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
|
||||
"Write weight should be at least 1 µs."
|
||||
);
|
||||
// At most 1 ms.
|
||||
assert!(
|
||||
W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
|
||||
"Read weight should be at most 1 ms."
|
||||
);
|
||||
assert!(
|
||||
W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
|
||||
"Write weight should be at most 1 ms."
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
pub mod constants {
|
||||
use pezframe_support::{
|
||||
parameter_types,
|
||||
weights::{constants, RuntimeDbWeight},
|
||||
};
|
||||
|
||||
parameter_types! {
|
||||
/// By default, Bizinikiwi uses `RocksDB`, so this will be the weight used throughout
|
||||
/// the runtime.
|
||||
pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight {
|
||||
read: 25_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
|
||||
write: 100_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
|
||||
};
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test_db_weights {
|
||||
use super::constants::RocksDbWeight as W;
|
||||
use pezframe_support::weights::constants;
|
||||
|
||||
/// Checks that all weights exist and have sane values.
|
||||
// NOTE: If this test fails but you are sure that the generated values are fine,
|
||||
// you can delete it.
|
||||
#[test]
|
||||
fn sane() {
|
||||
// At least 1 µs.
|
||||
assert!(
|
||||
W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
|
||||
"Read weight should be at least 1 µs."
|
||||
);
|
||||
assert!(
|
||||
W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
|
||||
"Write weight should be at least 1 µs."
|
||||
);
|
||||
// At most 1 ms.
|
||||
assert!(
|
||||
W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
|
||||
"Read weight should be at most 1 ms."
|
||||
);
|
||||
assert!(
|
||||
W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
|
||||
"Write weight should be at most 1 ms."
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,242 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Genesis configs presets for the Zagros runtime
|
||||
|
||||
use crate::{
|
||||
BabeConfig, BalancesConfig, ConfigurationConfig, RegistrarConfig, RuntimeGenesisConfig,
|
||||
SessionConfig, SessionKeys, StakingAhClientConfig, SudoConfig, BABE_GENESIS_EPOCH_CONFIG,
|
||||
};
|
||||
#[cfg(not(feature = "std"))]
|
||||
use alloc::format;
|
||||
use alloc::{string::ToString, vec, vec::Vec};
|
||||
use core::panic;
|
||||
use pezframe_support::build_struct_json_patch;
|
||||
use pezpallet_staking_async_rc_runtime_constants::currency::UNITS as ZGR;
|
||||
use pezkuwi_primitives::{AccountId, AssignmentId, SchedulerParams, ValidatorId};
|
||||
use pezsp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
|
||||
use pezsp_consensus_babe::AuthorityId as BabeId;
|
||||
use pezsp_consensus_beefy::ecdsa_crypto::AuthorityId as BeefyId;
|
||||
use pezsp_consensus_grandpa::AuthorityId as GrandpaId;
|
||||
use pezsp_core::{crypto::get_public_from_string_or_panic, sr25519};
|
||||
use pezsp_genesis_builder::PresetId;
|
||||
use pezsp_keyring::Sr25519Keyring;
|
||||
|
||||
/// Helper function to generate stash, controller and session key from seed
|
||||
fn get_authority_keys_from_seed(
|
||||
seed: &str,
|
||||
) -> (
|
||||
AccountId,
|
||||
AccountId,
|
||||
BabeId,
|
||||
GrandpaId,
|
||||
ValidatorId,
|
||||
AssignmentId,
|
||||
AuthorityDiscoveryId,
|
||||
BeefyId,
|
||||
) {
|
||||
let keys = get_authority_keys_from_seed_no_beefy(seed);
|
||||
(
|
||||
keys.0,
|
||||
keys.1,
|
||||
keys.2,
|
||||
keys.3,
|
||||
keys.4,
|
||||
keys.5,
|
||||
keys.6,
|
||||
get_public_from_string_or_panic::<BeefyId>(seed),
|
||||
)
|
||||
}
|
||||
|
||||
/// Helper function to generate stash, controller and session key from seed
|
||||
fn get_authority_keys_from_seed_no_beefy(
|
||||
seed: &str,
|
||||
) -> (AccountId, AccountId, BabeId, GrandpaId, ValidatorId, AssignmentId, AuthorityDiscoveryId) {
|
||||
(
|
||||
get_public_from_string_or_panic::<sr25519::Public>(&format!("{}//stash", seed)).into(),
|
||||
get_public_from_string_or_panic::<sr25519::Public>(seed).into(),
|
||||
get_public_from_string_or_panic::<BabeId>(seed),
|
||||
get_public_from_string_or_panic::<GrandpaId>(seed),
|
||||
get_public_from_string_or_panic::<ValidatorId>(seed),
|
||||
get_public_from_string_or_panic::<AssignmentId>(seed),
|
||||
get_public_from_string_or_panic::<AuthorityDiscoveryId>(seed),
|
||||
)
|
||||
}
|
||||
|
||||
fn zagros_session_keys(
|
||||
babe: BabeId,
|
||||
grandpa: GrandpaId,
|
||||
para_validator: ValidatorId,
|
||||
para_assignment: AssignmentId,
|
||||
authority_discovery: AuthorityDiscoveryId,
|
||||
beefy: BeefyId,
|
||||
) -> SessionKeys {
|
||||
SessionKeys { babe, grandpa, para_validator, para_assignment, authority_discovery, beefy }
|
||||
}
|
||||
|
||||
fn default_teyrchains_host_configuration(
|
||||
) -> pezkuwi_runtime_teyrchains::configuration::HostConfiguration<pezkuwi_primitives::BlockNumber> {
|
||||
use pezkuwi_primitives::{
|
||||
node_features::FeatureIndex, ApprovalVotingParams, AsyncBackingParams, MAX_CODE_SIZE,
|
||||
MAX_POV_SIZE,
|
||||
};
|
||||
|
||||
pezkuwi_runtime_teyrchains::configuration::HostConfiguration {
|
||||
// Important configs are equal to what is on Pezkuwi. These configs can be tweaked to mimic
|
||||
// different VMP congestion scenarios.
|
||||
max_downward_message_size: 51200,
|
||||
max_upward_message_size: 65531,
|
||||
max_upward_message_num_per_candidate: 16,
|
||||
max_upward_queue_count: 174762,
|
||||
max_upward_queue_size: 1048576,
|
||||
|
||||
validation_upgrade_cooldown: 2u32,
|
||||
validation_upgrade_delay: 2,
|
||||
code_retention_period: 1200,
|
||||
max_code_size: MAX_CODE_SIZE,
|
||||
max_pov_size: MAX_POV_SIZE,
|
||||
max_head_data_size: 32 * 1024,
|
||||
hrmp_sender_deposit: 0,
|
||||
hrmp_recipient_deposit: 0,
|
||||
hrmp_channel_max_capacity: 8,
|
||||
hrmp_channel_max_total_size: 8 * 1024,
|
||||
hrmp_max_teyrchain_inbound_channels: 4,
|
||||
hrmp_channel_max_message_size: 1024 * 1024,
|
||||
hrmp_max_teyrchain_outbound_channels: 4,
|
||||
hrmp_max_message_num_per_candidate: 5,
|
||||
dispute_period: 6,
|
||||
no_show_slots: 2,
|
||||
n_delay_tranches: 25,
|
||||
needed_approvals: 2,
|
||||
relay_vrf_modulo_samples: 2,
|
||||
zeroth_delay_tranche_width: 0,
|
||||
minimum_validation_upgrade_delay: 5,
|
||||
async_backing_params: AsyncBackingParams {
|
||||
max_candidate_depth: 0,
|
||||
allowed_ancestry_len: 0,
|
||||
},
|
||||
node_features: bitvec::vec::BitVec::from_element(
|
||||
(1u8 << (FeatureIndex::ElasticScalingMVP as usize)) |
|
||||
(1u8 << (FeatureIndex::EnableAssignmentsV2 as usize)) |
|
||||
(1u8 << (FeatureIndex::CandidateReceiptV2 as usize)),
|
||||
),
|
||||
scheduler_params: SchedulerParams {
|
||||
lookahead: 3,
|
||||
group_rotation_frequency: 20,
|
||||
paras_availability_period: 4,
|
||||
..Default::default()
|
||||
},
|
||||
approval_voting_params: ApprovalVotingParams { max_approval_coalesce_count: 5 },
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn default_teyrchains_host_configuration_is_consistent() {
|
||||
default_teyrchains_host_configuration().panic_if_not_consistent();
|
||||
}
|
||||
|
||||
/// Helper function to create zagros runtime `GenesisConfig` patch for testing
|
||||
fn zagros_testnet_genesis(
|
||||
initial_authorities: Vec<(
|
||||
AccountId,
|
||||
AccountId,
|
||||
BabeId,
|
||||
GrandpaId,
|
||||
ValidatorId,
|
||||
AssignmentId,
|
||||
AuthorityDiscoveryId,
|
||||
BeefyId,
|
||||
)>,
|
||||
root_key: AccountId,
|
||||
preset: alloc::string::String,
|
||||
) -> serde_json::Value {
|
||||
let endowed_accounts =
|
||||
Sr25519Keyring::well_known().map(|k| k.to_account_id()).collect::<Vec<_>>();
|
||||
|
||||
const ENDOWMENT: u128 = 1_000_000 * ZGR;
|
||||
|
||||
build_struct_json_patch!(RuntimeGenesisConfig {
|
||||
balances: BalancesConfig {
|
||||
balances: endowed_accounts.iter().map(|k| (k.clone(), ENDOWMENT)).collect::<Vec<_>>(),
|
||||
},
|
||||
session: SessionConfig {
|
||||
keys: initial_authorities
|
||||
.iter()
|
||||
.map(|x| {
|
||||
(
|
||||
x.0.clone(),
|
||||
x.0.clone(),
|
||||
zagros_session_keys(
|
||||
x.2.clone(),
|
||||
x.3.clone(),
|
||||
x.4.clone(),
|
||||
x.5.clone(),
|
||||
x.6.clone(),
|
||||
x.7.clone(),
|
||||
),
|
||||
)
|
||||
})
|
||||
.collect::<Vec<_>>(),
|
||||
},
|
||||
babe: BabeConfig { epoch_config: BABE_GENESIS_EPOCH_CONFIG },
|
||||
sudo: SudoConfig { key: Some(root_key) },
|
||||
configuration: ConfigurationConfig { config: default_teyrchains_host_configuration() },
|
||||
registrar: RegistrarConfig { next_free_para_id: pezkuwi_primitives::LOWEST_PUBLIC_ID },
|
||||
preset_store: crate::PresetStoreConfig { preset, ..Default::default() },
|
||||
staking_ah_client: StakingAhClientConfig {
|
||||
operating_mode: pezpallet_staking_async_ah_client::OperatingMode::Active,
|
||||
..Default::default()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/// Provides the JSON representation of predefined genesis config for given `id`.
|
||||
pub fn get_preset(id: &PresetId) -> Option<Vec<u8>> {
|
||||
let patch = match id.as_ref() {
|
||||
"real-m" => zagros_testnet_genesis(
|
||||
vec![
|
||||
get_authority_keys_from_seed("Alice"),
|
||||
get_authority_keys_from_seed("Bob"),
|
||||
get_authority_keys_from_seed("Eve"),
|
||||
get_authority_keys_from_seed("Dave"),
|
||||
],
|
||||
Sr25519Keyring::Alice.to_account_id(),
|
||||
id.to_string(),
|
||||
),
|
||||
"real-s" => zagros_testnet_genesis(
|
||||
vec![get_authority_keys_from_seed("Alice"), get_authority_keys_from_seed("Bob")],
|
||||
Sr25519Keyring::Alice.to_account_id(),
|
||||
id.to_string(),
|
||||
),
|
||||
"fake-s" => zagros_testnet_genesis(
|
||||
vec![get_authority_keys_from_seed("Alice"), get_authority_keys_from_seed("Bob")],
|
||||
Sr25519Keyring::Alice.to_account_id(),
|
||||
id.to_string(),
|
||||
),
|
||||
_ => panic!("Unknown preset ID: {}", id),
|
||||
};
|
||||
Some(
|
||||
serde_json::to_string(&patch)
|
||||
.expect("serialization to json is expected to work. qed.")
|
||||
.into_bytes(),
|
||||
)
|
||||
}
|
||||
|
||||
/// List of supported presets.
|
||||
pub fn preset_names() -> Vec<PresetId> {
|
||||
vec![PresetId::from("real-m"), PresetId::from("real-s"), PresetId::from("fake-s")]
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! New governance configurations for the Kusama runtime.
|
||||
|
||||
use super::*;
|
||||
use crate::xcm_config::Collectives;
|
||||
use pezframe_support::{parameter_types, traits::EitherOf};
|
||||
use pezframe_system::EnsureRootWithSuccess;
|
||||
use pezpallet_xcm::{EnsureXcm, IsVoiceOfBody};
|
||||
use xcm::latest::BodyId;
|
||||
|
||||
mod origins;
|
||||
pub use origins::{
|
||||
pezpallet_custom_origins, AuctionAdmin, FellowshipAdmin, GeneralAdmin, LeaseAdmin,
|
||||
ReferendumCanceller, ReferendumKiller, Spender, StakingAdmin, Treasurer, WhitelistedCaller,
|
||||
};
|
||||
mod tracks;
|
||||
pub use tracks::TracksInfo;
|
||||
|
||||
parameter_types! {
|
||||
pub const VoteLockingPeriod: BlockNumber = 7 * DAYS;
|
||||
}
|
||||
|
||||
impl pezpallet_conviction_voting::Config for Runtime {
|
||||
type WeightInfo = weights::pezpallet_conviction_voting::WeightInfo<Self>;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Currency = Balances;
|
||||
type VoteLockingPeriod = VoteLockingPeriod;
|
||||
type MaxVotes = ConstU32<512>;
|
||||
type MaxTurnout =
|
||||
pezframe_support::traits::tokens::currency::ActiveIssuanceOf<Balances, Self::AccountId>;
|
||||
type Polls = Referenda;
|
||||
type BlockNumberProvider = System;
|
||||
type VotingHooks = ();
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const AlarmInterval: BlockNumber = 1;
|
||||
pub const SubmissionDeposit: Balance = 1 * 3 * CENTS;
|
||||
pub const UndecidingTimeout: BlockNumber = 14 * DAYS;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const MaxBalance: Balance = Balance::max_value();
|
||||
}
|
||||
pub type TreasurySpender = EitherOf<EnsureRootWithSuccess<AccountId, MaxBalance>, Spender>;
|
||||
|
||||
impl origins::pezpallet_custom_origins::Config for Runtime {}
|
||||
|
||||
parameter_types! {
|
||||
// Fellows pluralistic body.
|
||||
pub const FellowsBodyId: BodyId = BodyId::Technical;
|
||||
}
|
||||
|
||||
impl pezpallet_whitelist::Config for Runtime {
|
||||
type WeightInfo = weights::pezpallet_whitelist::WeightInfo<Self>;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type WhitelistOrigin = EitherOfDiverse<
|
||||
EnsureRoot<Self::AccountId>,
|
||||
EnsureXcm<IsVoiceOfBody<Collectives, FellowsBodyId>>,
|
||||
>;
|
||||
type DispatchWhitelistedOrigin = EitherOf<EnsureRoot<Self::AccountId>, WhitelistedCaller>;
|
||||
type Preimages = Preimage;
|
||||
}
|
||||
|
||||
impl pezpallet_referenda::Config for Runtime {
|
||||
type WeightInfo = weights::pezpallet_referenda_referenda::WeightInfo<Self>;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Scheduler = Scheduler;
|
||||
type Currency = Balances;
|
||||
type SubmitOrigin = pezframe_system::EnsureSigned<AccountId>;
|
||||
type CancelOrigin = EitherOf<EnsureRoot<AccountId>, ReferendumCanceller>;
|
||||
type KillOrigin = EitherOf<EnsureRoot<AccountId>, ReferendumKiller>;
|
||||
type Slash = Treasury;
|
||||
type Votes = pezpallet_conviction_voting::VotesOf<Runtime>;
|
||||
type Tally = pezpallet_conviction_voting::TallyOf<Runtime>;
|
||||
type SubmissionDeposit = SubmissionDeposit;
|
||||
type MaxQueued = ConstU32<100>;
|
||||
type UndecidingTimeout = UndecidingTimeout;
|
||||
type AlarmInterval = AlarmInterval;
|
||||
type Tracks = TracksInfo;
|
||||
type Preimages = Preimage;
|
||||
type BlockNumberProvider = System;
|
||||
}
|
||||
@@ -0,0 +1,205 @@
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! Custom origins for governance interventions.
|
||||
|
||||
pub use pezpallet_custom_origins::*;
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
pub mod pezpallet_custom_origins {
|
||||
use crate::{Balance, CENTS, GRAND};
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
|
||||
#[derive(
|
||||
PartialEq,
|
||||
Eq,
|
||||
Clone,
|
||||
MaxEncodedLen,
|
||||
Encode,
|
||||
Decode,
|
||||
DecodeWithMemTracking,
|
||||
TypeInfo,
|
||||
RuntimeDebug,
|
||||
)]
|
||||
#[pallet::origin]
|
||||
pub enum Origin {
|
||||
/// Origin for cancelling slashes.
|
||||
StakingAdmin,
|
||||
/// Origin for spending (any amount of) funds.
|
||||
Treasurer,
|
||||
/// Origin for managing the composition of the fellowship.
|
||||
FellowshipAdmin,
|
||||
/// Origin for managing the registrar.
|
||||
GeneralAdmin,
|
||||
/// Origin for starting auctions.
|
||||
AuctionAdmin,
|
||||
/// Origin able to force slot leases.
|
||||
LeaseAdmin,
|
||||
/// Origin able to cancel referenda.
|
||||
ReferendumCanceller,
|
||||
/// Origin able to kill referenda.
|
||||
ReferendumKiller,
|
||||
/// Origin able to spend up to 1 KSM from the treasury at once.
|
||||
SmallTipper,
|
||||
/// Origin able to spend up to 5 KSM from the treasury at once.
|
||||
BigTipper,
|
||||
/// Origin able to spend up to 50 KSM from the treasury at once.
|
||||
SmallSpender,
|
||||
/// Origin able to spend up to 500 KSM from the treasury at once.
|
||||
MediumSpender,
|
||||
/// Origin able to spend up to 5,000 KSM from the treasury at once.
|
||||
BigSpender,
|
||||
/// Origin able to dispatch a whitelisted call.
|
||||
WhitelistedCaller,
|
||||
/// Origin commanded by any members of the Pezkuwi Fellowship (no Dan grade needed).
|
||||
FellowshipInitiates,
|
||||
/// Origin commanded by Pezkuwi Fellows (3rd Dan fellows or greater).
|
||||
Fellows,
|
||||
/// Origin commanded by Pezkuwi Experts (5th Dan fellows or greater).
|
||||
FellowshipExperts,
|
||||
/// Origin commanded by Pezkuwi Masters (7th Dan fellows of greater).
|
||||
FellowshipMasters,
|
||||
/// Origin commanded by rank 1 of the Pezkuwi Fellowship and with a success of 1.
|
||||
Fellowship1Dan,
|
||||
/// Origin commanded by rank 2 of the Pezkuwi Fellowship and with a success of 2.
|
||||
Fellowship2Dan,
|
||||
/// Origin commanded by rank 3 of the Pezkuwi Fellowship and with a success of 3.
|
||||
Fellowship3Dan,
|
||||
/// Origin commanded by rank 4 of the Pezkuwi Fellowship and with a success of 4.
|
||||
Fellowship4Dan,
|
||||
/// Origin commanded by rank 5 of the Pezkuwi Fellowship and with a success of 5.
|
||||
Fellowship5Dan,
|
||||
/// Origin commanded by rank 6 of the Pezkuwi Fellowship and with a success of 6.
|
||||
Fellowship6Dan,
|
||||
/// Origin commanded by rank 7 of the Pezkuwi Fellowship and with a success of 7.
|
||||
Fellowship7Dan,
|
||||
/// Origin commanded by rank 8 of the Pezkuwi Fellowship and with a success of 8.
|
||||
Fellowship8Dan,
|
||||
/// Origin commanded by rank 9 of the Pezkuwi Fellowship and with a success of 9.
|
||||
Fellowship9Dan,
|
||||
}
|
||||
|
||||
macro_rules! decl_unit_ensures {
|
||||
( $name:ident: $success_type:ty = $success:expr ) => {
|
||||
pub struct $name;
|
||||
impl<O: Into<Result<Origin, O>> + From<Origin>>
|
||||
EnsureOrigin<O> for $name
|
||||
{
|
||||
type Success = $success_type;
|
||||
fn try_origin(o: O) -> Result<Self::Success, O> {
|
||||
o.into().and_then(|o| match o {
|
||||
Origin::$name => Ok($success),
|
||||
r => Err(O::from(r)),
|
||||
})
|
||||
}
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
fn try_successful_origin() -> Result<O, ()> {
|
||||
Ok(O::from(Origin::$name))
|
||||
}
|
||||
}
|
||||
};
|
||||
( $name:ident ) => { decl_unit_ensures! { $name : () = () } };
|
||||
( $name:ident: $success_type:ty = $success:expr, $( $rest:tt )* ) => {
|
||||
decl_unit_ensures! { $name: $success_type = $success }
|
||||
decl_unit_ensures! { $( $rest )* }
|
||||
};
|
||||
( $name:ident, $( $rest:tt )* ) => {
|
||||
decl_unit_ensures! { $name }
|
||||
decl_unit_ensures! { $( $rest )* }
|
||||
};
|
||||
() => {}
|
||||
}
|
||||
decl_unit_ensures!(
|
||||
StakingAdmin,
|
||||
Treasurer,
|
||||
FellowshipAdmin,
|
||||
GeneralAdmin,
|
||||
AuctionAdmin,
|
||||
LeaseAdmin,
|
||||
ReferendumCanceller,
|
||||
ReferendumKiller,
|
||||
WhitelistedCaller,
|
||||
FellowshipInitiates: u16 = 0,
|
||||
Fellows: u16 = 3,
|
||||
FellowshipExperts: u16 = 5,
|
||||
FellowshipMasters: u16 = 7,
|
||||
);
|
||||
|
||||
macro_rules! decl_ensure {
|
||||
(
|
||||
$vis:vis type $name:ident: EnsureOrigin<Success = $success_type:ty> {
|
||||
$( $item:ident = $success:expr, )*
|
||||
}
|
||||
) => {
|
||||
$vis struct $name;
|
||||
impl<O: Into<Result<Origin, O>> + From<Origin>>
|
||||
EnsureOrigin<O> for $name
|
||||
{
|
||||
type Success = $success_type;
|
||||
fn try_origin(o: O) -> Result<Self::Success, O> {
|
||||
o.into().and_then(|o| match o {
|
||||
$(
|
||||
Origin::$item => Ok($success),
|
||||
)*
|
||||
r => Err(O::from(r)),
|
||||
})
|
||||
}
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
fn try_successful_origin() -> Result<O, ()> {
|
||||
// By convention the more privileged origins go later, so for greatest chance
|
||||
// of success, we want the last one.
|
||||
let _result: Result<O, ()> = Err(());
|
||||
$(
|
||||
let _result: Result<O, ()> = Ok(O::from(Origin::$item));
|
||||
)*
|
||||
_result
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
decl_ensure! {
|
||||
pub type Spender: EnsureOrigin<Success = Balance> {
|
||||
SmallTipper = 250 * 3 * CENTS,
|
||||
BigTipper = 1 * GRAND,
|
||||
SmallSpender = 10 * GRAND,
|
||||
MediumSpender = 100 * GRAND,
|
||||
BigSpender = 1_000 * GRAND,
|
||||
Treasurer = 10_000 * GRAND,
|
||||
}
|
||||
}
|
||||
|
||||
decl_ensure! {
|
||||
pub type EnsureFellowship: EnsureOrigin<Success = u16> {
|
||||
Fellowship1Dan = 1,
|
||||
Fellowship2Dan = 2,
|
||||
Fellowship3Dan = 3,
|
||||
Fellowship4Dan = 4,
|
||||
Fellowship5Dan = 5,
|
||||
Fellowship6Dan = 6,
|
||||
Fellowship7Dan = 7,
|
||||
Fellowship8Dan = 8,
|
||||
Fellowship9Dan = 9,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,325 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Track configurations for governance.
|
||||
|
||||
use super::*;
|
||||
|
||||
use alloc::borrow::Cow;
|
||||
use pezsp_runtime::str_array as s;
|
||||
|
||||
const fn percent(x: i32) -> pezsp_arithmetic::FixedI64 {
|
||||
pezsp_arithmetic::FixedI64::from_rational(x as u128, 100)
|
||||
}
|
||||
use pezpallet_referenda::Curve;
|
||||
const APP_ROOT: Curve = Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100));
|
||||
const SUP_ROOT: Curve = Curve::make_linear(28, 28, percent(0), percent(50));
|
||||
const APP_STAKING_ADMIN: Curve = Curve::make_linear(17, 28, percent(50), percent(100));
|
||||
const SUP_STAKING_ADMIN: Curve =
|
||||
Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50));
|
||||
const APP_TREASURER: Curve = Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100));
|
||||
const SUP_TREASURER: Curve = Curve::make_linear(28, 28, percent(0), percent(50));
|
||||
const APP_FELLOWSHIP_ADMIN: Curve = Curve::make_linear(17, 28, percent(50), percent(100));
|
||||
const SUP_FELLOWSHIP_ADMIN: Curve =
|
||||
Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50));
|
||||
const APP_GENERAL_ADMIN: Curve =
|
||||
Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100));
|
||||
const SUP_GENERAL_ADMIN: Curve =
|
||||
Curve::make_reciprocal(7, 28, percent(10), percent(0), percent(50));
|
||||
const APP_AUCTION_ADMIN: Curve =
|
||||
Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100));
|
||||
const SUP_AUCTION_ADMIN: Curve =
|
||||
Curve::make_reciprocal(7, 28, percent(10), percent(0), percent(50));
|
||||
const APP_LEASE_ADMIN: Curve = Curve::make_linear(17, 28, percent(50), percent(100));
|
||||
const SUP_LEASE_ADMIN: Curve = Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50));
|
||||
const APP_REFERENDUM_CANCELLER: Curve = Curve::make_linear(17, 28, percent(50), percent(100));
|
||||
const SUP_REFERENDUM_CANCELLER: Curve =
|
||||
Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50));
|
||||
const APP_REFERENDUM_KILLER: Curve = Curve::make_linear(17, 28, percent(50), percent(100));
|
||||
const SUP_REFERENDUM_KILLER: Curve =
|
||||
Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50));
|
||||
const APP_SMALL_TIPPER: Curve = Curve::make_linear(10, 28, percent(50), percent(100));
|
||||
const SUP_SMALL_TIPPER: Curve = Curve::make_reciprocal(1, 28, percent(4), percent(0), percent(50));
|
||||
const APP_BIG_TIPPER: Curve = Curve::make_linear(10, 28, percent(50), percent(100));
|
||||
const SUP_BIG_TIPPER: Curve = Curve::make_reciprocal(8, 28, percent(1), percent(0), percent(50));
|
||||
const APP_SMALL_SPENDER: Curve = Curve::make_linear(17, 28, percent(50), percent(100));
|
||||
const SUP_SMALL_SPENDER: Curve =
|
||||
Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50));
|
||||
const APP_MEDIUM_SPENDER: Curve = Curve::make_linear(23, 28, percent(50), percent(100));
|
||||
const SUP_MEDIUM_SPENDER: Curve =
|
||||
Curve::make_reciprocal(16, 28, percent(1), percent(0), percent(50));
|
||||
const APP_BIG_SPENDER: Curve = Curve::make_linear(28, 28, percent(50), percent(100));
|
||||
const SUP_BIG_SPENDER: Curve = Curve::make_reciprocal(20, 28, percent(1), percent(0), percent(50));
|
||||
const APP_WHITELISTED_CALLER: Curve =
|
||||
Curve::make_reciprocal(16, 28 * 24, percent(96), percent(50), percent(100));
|
||||
const SUP_WHITELISTED_CALLER: Curve =
|
||||
Curve::make_reciprocal(1, 28, percent(20), percent(5), percent(50));
|
||||
|
||||
const TRACKS_DATA: [pezpallet_referenda::Track<u16, Balance, BlockNumber>; 15] = [
|
||||
pezpallet_referenda::Track {
|
||||
id: 0,
|
||||
info: pezpallet_referenda::TrackInfo {
|
||||
name: s("root"),
|
||||
max_deciding: 1,
|
||||
decision_deposit: 100 * GRAND,
|
||||
prepare_period: 8 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 12 * MINUTES,
|
||||
min_enactment_period: 5 * MINUTES,
|
||||
min_approval: APP_ROOT,
|
||||
min_support: SUP_ROOT,
|
||||
},
|
||||
},
|
||||
pezpallet_referenda::Track {
|
||||
id: 1,
|
||||
info: pezpallet_referenda::TrackInfo {
|
||||
name: s("whitelisted_caller"),
|
||||
max_deciding: 100,
|
||||
decision_deposit: 10 * GRAND,
|
||||
prepare_period: 6 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 4 * MINUTES,
|
||||
min_enactment_period: 3 * MINUTES,
|
||||
min_approval: APP_WHITELISTED_CALLER,
|
||||
min_support: SUP_WHITELISTED_CALLER,
|
||||
},
|
||||
},
|
||||
pezpallet_referenda::Track {
|
||||
id: 10,
|
||||
info: pezpallet_referenda::TrackInfo {
|
||||
name: s("staking_admin"),
|
||||
max_deciding: 10,
|
||||
decision_deposit: 5 * GRAND,
|
||||
prepare_period: 8 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 8 * MINUTES,
|
||||
min_enactment_period: 3 * MINUTES,
|
||||
min_approval: APP_STAKING_ADMIN,
|
||||
min_support: SUP_STAKING_ADMIN,
|
||||
},
|
||||
},
|
||||
pezpallet_referenda::Track {
|
||||
id: 11,
|
||||
info: pezpallet_referenda::TrackInfo {
|
||||
name: s("treasurer"),
|
||||
max_deciding: 10,
|
||||
decision_deposit: 1 * GRAND,
|
||||
prepare_period: 8 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 8 * MINUTES,
|
||||
min_enactment_period: 5 * MINUTES,
|
||||
min_approval: APP_TREASURER,
|
||||
min_support: SUP_TREASURER,
|
||||
},
|
||||
},
|
||||
pezpallet_referenda::Track {
|
||||
id: 12,
|
||||
info: pezpallet_referenda::TrackInfo {
|
||||
name: s("lease_admin"),
|
||||
max_deciding: 10,
|
||||
decision_deposit: 5 * GRAND,
|
||||
prepare_period: 8 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 8 * MINUTES,
|
||||
min_enactment_period: 3 * MINUTES,
|
||||
min_approval: APP_LEASE_ADMIN,
|
||||
min_support: SUP_LEASE_ADMIN,
|
||||
},
|
||||
},
|
||||
pezpallet_referenda::Track {
|
||||
id: 13,
|
||||
info: pezpallet_referenda::TrackInfo {
|
||||
name: s("fellowship_admin"),
|
||||
max_deciding: 10,
|
||||
decision_deposit: 5 * GRAND,
|
||||
prepare_period: 8 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 8 * MINUTES,
|
||||
min_enactment_period: 3 * MINUTES,
|
||||
min_approval: APP_FELLOWSHIP_ADMIN,
|
||||
min_support: SUP_FELLOWSHIP_ADMIN,
|
||||
},
|
||||
},
|
||||
pezpallet_referenda::Track {
|
||||
id: 14,
|
||||
info: pezpallet_referenda::TrackInfo {
|
||||
name: s("general_admin"),
|
||||
max_deciding: 10,
|
||||
decision_deposit: 5 * GRAND,
|
||||
prepare_period: 8 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 8 * MINUTES,
|
||||
min_enactment_period: 3 * MINUTES,
|
||||
min_approval: APP_GENERAL_ADMIN,
|
||||
min_support: SUP_GENERAL_ADMIN,
|
||||
},
|
||||
},
|
||||
pezpallet_referenda::Track {
|
||||
id: 15,
|
||||
info: pezpallet_referenda::TrackInfo {
|
||||
name: s("auction_admin"),
|
||||
max_deciding: 10,
|
||||
decision_deposit: 5 * GRAND,
|
||||
prepare_period: 8 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 8 * MINUTES,
|
||||
min_enactment_period: 3 * MINUTES,
|
||||
min_approval: APP_AUCTION_ADMIN,
|
||||
min_support: SUP_AUCTION_ADMIN,
|
||||
},
|
||||
},
|
||||
pezpallet_referenda::Track {
|
||||
id: 20,
|
||||
info: pezpallet_referenda::TrackInfo {
|
||||
name: s("referendum_canceller"),
|
||||
max_deciding: 1_000,
|
||||
decision_deposit: 10 * GRAND,
|
||||
prepare_period: 8 * MINUTES,
|
||||
decision_period: 14 * MINUTES,
|
||||
confirm_period: 8 * MINUTES,
|
||||
min_enactment_period: 3 * MINUTES,
|
||||
min_approval: APP_REFERENDUM_CANCELLER,
|
||||
min_support: SUP_REFERENDUM_CANCELLER,
|
||||
},
|
||||
},
|
||||
pezpallet_referenda::Track {
|
||||
id: 21,
|
||||
info: pezpallet_referenda::TrackInfo {
|
||||
name: s("referendum_killer"),
|
||||
max_deciding: 1_000,
|
||||
decision_deposit: 50 * GRAND,
|
||||
prepare_period: 8 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 8 * MINUTES,
|
||||
min_enactment_period: 3 * MINUTES,
|
||||
min_approval: APP_REFERENDUM_KILLER,
|
||||
min_support: SUP_REFERENDUM_KILLER,
|
||||
},
|
||||
},
|
||||
pezpallet_referenda::Track {
|
||||
id: 30,
|
||||
info: pezpallet_referenda::TrackInfo {
|
||||
name: s("small_tipper"),
|
||||
max_deciding: 200,
|
||||
decision_deposit: 1 * 3 * CENTS,
|
||||
prepare_period: 1 * MINUTES,
|
||||
decision_period: 14 * MINUTES,
|
||||
confirm_period: 4 * MINUTES,
|
||||
min_enactment_period: 1 * MINUTES,
|
||||
min_approval: APP_SMALL_TIPPER,
|
||||
min_support: SUP_SMALL_TIPPER,
|
||||
},
|
||||
},
|
||||
pezpallet_referenda::Track {
|
||||
id: 31,
|
||||
info: pezpallet_referenda::TrackInfo {
|
||||
name: s("big_tipper"),
|
||||
max_deciding: 100,
|
||||
decision_deposit: 10 * 3 * CENTS,
|
||||
prepare_period: 4 * MINUTES,
|
||||
decision_period: 14 * MINUTES,
|
||||
confirm_period: 12 * MINUTES,
|
||||
min_enactment_period: 3 * MINUTES,
|
||||
min_approval: APP_BIG_TIPPER,
|
||||
min_support: SUP_BIG_TIPPER,
|
||||
},
|
||||
},
|
||||
pezpallet_referenda::Track {
|
||||
id: 32,
|
||||
info: pezpallet_referenda::TrackInfo {
|
||||
name: s("small_spender"),
|
||||
max_deciding: 50,
|
||||
decision_deposit: 100 * 3 * CENTS,
|
||||
prepare_period: 10 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 10 * MINUTES,
|
||||
min_enactment_period: 5 * MINUTES,
|
||||
min_approval: APP_SMALL_SPENDER,
|
||||
min_support: SUP_SMALL_SPENDER,
|
||||
},
|
||||
},
|
||||
pezpallet_referenda::Track {
|
||||
id: 33,
|
||||
info: pezpallet_referenda::TrackInfo {
|
||||
name: s("medium_spender"),
|
||||
max_deciding: 50,
|
||||
decision_deposit: 200 * 3 * CENTS,
|
||||
prepare_period: 10 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 12 * MINUTES,
|
||||
min_enactment_period: 5 * MINUTES,
|
||||
min_approval: APP_MEDIUM_SPENDER,
|
||||
min_support: SUP_MEDIUM_SPENDER,
|
||||
},
|
||||
},
|
||||
pezpallet_referenda::Track {
|
||||
id: 34,
|
||||
info: pezpallet_referenda::TrackInfo {
|
||||
name: s("big_spender"),
|
||||
max_deciding: 50,
|
||||
decision_deposit: 400 * 3 * CENTS,
|
||||
prepare_period: 10 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 14 * MINUTES,
|
||||
min_enactment_period: 5 * MINUTES,
|
||||
min_approval: APP_BIG_SPENDER,
|
||||
min_support: SUP_BIG_SPENDER,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
pub struct TracksInfo;
|
||||
impl pezpallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
|
||||
type Id = u16;
|
||||
type RuntimeOrigin = <RuntimeOrigin as pezframe_support::traits::OriginTrait>::PalletsOrigin;
|
||||
|
||||
fn tracks(
|
||||
) -> impl Iterator<Item = Cow<'static, pezpallet_referenda::Track<Self::Id, Balance, BlockNumber>>>
|
||||
{
|
||||
TRACKS_DATA.iter().map(Cow::Borrowed)
|
||||
}
|
||||
fn track_for(id: &Self::RuntimeOrigin) -> Result<Self::Id, ()> {
|
||||
if let Ok(system_origin) = pezframe_system::RawOrigin::try_from(id.clone()) {
|
||||
match system_origin {
|
||||
pezframe_system::RawOrigin::Root => Ok(0),
|
||||
_ => Err(()),
|
||||
}
|
||||
} else if let Ok(custom_origin) = origins::Origin::try_from(id.clone()) {
|
||||
match custom_origin {
|
||||
origins::Origin::WhitelistedCaller => Ok(1),
|
||||
// General admin
|
||||
origins::Origin::StakingAdmin => Ok(10),
|
||||
origins::Origin::Treasurer => Ok(11),
|
||||
origins::Origin::LeaseAdmin => Ok(12),
|
||||
origins::Origin::FellowshipAdmin => Ok(13),
|
||||
origins::Origin::GeneralAdmin => Ok(14),
|
||||
origins::Origin::AuctionAdmin => Ok(15),
|
||||
// Referendum admins
|
||||
origins::Origin::ReferendumCanceller => Ok(20),
|
||||
origins::Origin::ReferendumKiller => Ok(21),
|
||||
// Limited treasury spenders
|
||||
origins::Origin::SmallTipper => Ok(30),
|
||||
origins::Origin::BigTipper => Ok(31),
|
||||
origins::Origin::SmallSpender => Ok(32),
|
||||
origins::Origin::MediumSpender => Ok(33),
|
||||
origins::Origin::BigSpender => Ok(34),
|
||||
_ => Err(()),
|
||||
}
|
||||
} else {
|
||||
Err(())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::xcm_config;
|
||||
use alloc::{boxed::Box, vec};
|
||||
use codec::{Decode, Encode};
|
||||
use core::marker::PhantomData;
|
||||
use pezframe_support::pezpallet_prelude::DispatchResult;
|
||||
use pezframe_system::RawOrigin;
|
||||
use pezpallet_staking_async_rc_runtime_constants::currency::*;
|
||||
use pezkuwi_primitives::Balance;
|
||||
use pezkuwi_runtime_common::identity_migrator::{OnReapIdentity, WeightInfo};
|
||||
use xcm::{latest::prelude::*, VersionedLocation, VersionedXcm};
|
||||
use xcm_executor::traits::TransactAsset;
|
||||
|
||||
/// A type containing the encoding of the People Chain pallets in its runtime. Used to construct any
|
||||
/// remote calls. The codec index must correspond to the index of `IdentityMigrator` in the
|
||||
/// `construct_runtime` of the remote chain.
|
||||
#[derive(Encode, Decode)]
|
||||
enum PeopleRuntimePallets<AccountId: Encode> {
|
||||
#[codec(index = 248)]
|
||||
IdentityMigrator(IdentityMigratorCalls<AccountId>),
|
||||
}
|
||||
|
||||
/// Call encoding for the calls needed from the Identity Migrator pallet.
|
||||
#[derive(Encode, Decode)]
|
||||
enum IdentityMigratorCalls<AccountId: Encode> {
|
||||
#[codec(index = 1)]
|
||||
PokeDeposit(AccountId),
|
||||
}
|
||||
|
||||
/// Type that implements `OnReapIdentity` that will send the deposit needed to store the same
|
||||
/// information on a teyrchain, sends the deposit there, and then updates it.
|
||||
pub struct ToTeyrchainIdentityReaper<Runtime, AccountId>(PhantomData<(Runtime, AccountId)>);
|
||||
impl<Runtime, AccountId> ToTeyrchainIdentityReaper<Runtime, AccountId> {
|
||||
/// Calculate the balance needed on the remote chain based on the `IdentityInfo` and `Subs` on
|
||||
/// this chain. The total includes:
|
||||
///
|
||||
/// - Identity basic deposit
|
||||
/// - `IdentityInfo` byte deposit
|
||||
/// - Sub accounts deposit
|
||||
/// - 2x existential deposit (1 for account existence, 1 such that the user can transact)
|
||||
fn calculate_remote_deposit(bytes: u32, subs: u32) -> Balance {
|
||||
// Remote deposit constants. Teyrchain uses `deposit / 100`
|
||||
// Source:
|
||||
// https://github.com/pezkuwichain/pezkuwi-sdk/blob/a146918/pezcumulus/parachains/common/src/westend.rs#L28
|
||||
//
|
||||
// Teyrchain Deposit Configuration:
|
||||
//
|
||||
// pub const BasicDeposit: Balance = deposit(1, 17);
|
||||
// pub const ByteDeposit: Balance = deposit(0, 1);
|
||||
// pub const SubAccountDeposit: Balance = deposit(1, 53);
|
||||
// pub const EXISTENTIAL_DEPOSIT: Balance = constants::currency::EXISTENTIAL_DEPOSIT / 10;
|
||||
let para_basic_deposit = deposit(1, 17) / 100;
|
||||
let para_byte_deposit = deposit(0, 1) / 100;
|
||||
let para_sub_account_deposit = deposit(1, 53) / 100;
|
||||
let para_existential_deposit = EXISTENTIAL_DEPOSIT / 10;
|
||||
|
||||
// pallet deposits
|
||||
let id_deposit =
|
||||
para_basic_deposit.saturating_add(para_byte_deposit.saturating_mul(bytes as Balance));
|
||||
let subs_deposit = para_sub_account_deposit.saturating_mul(subs as Balance);
|
||||
|
||||
id_deposit
|
||||
.saturating_add(subs_deposit)
|
||||
.saturating_add(para_existential_deposit.saturating_mul(2))
|
||||
}
|
||||
}
|
||||
|
||||
// Note / Warning: This implementation should only be used in a transactional context. If not, then
|
||||
// an error could result in assets being burned.
|
||||
impl<Runtime, AccountId> OnReapIdentity<AccountId> for ToTeyrchainIdentityReaper<Runtime, AccountId>
|
||||
where
|
||||
Runtime: pezframe_system::Config + pezpallet_xcm::Config,
|
||||
AccountId: Into<[u8; 32]> + Clone + Encode,
|
||||
{
|
||||
fn on_reap_identity(who: &AccountId, fields: u32, subs: u32) -> DispatchResult {
|
||||
use crate::{
|
||||
impls::IdentityMigratorCalls::PokeDeposit,
|
||||
weights::pezkuwi_runtime_common_identity_migrator::WeightInfo as MigratorWeights,
|
||||
};
|
||||
|
||||
let total_to_send = Self::calculate_remote_deposit(fields, subs);
|
||||
|
||||
// define asset / destination from relay perspective
|
||||
let wnd = Asset { id: AssetId(Here.into_location()), fun: Fungible(total_to_send) };
|
||||
// People Chain: ParaId 1004
|
||||
let destination: Location = Location::new(0, Teyrchain(1004));
|
||||
|
||||
// Do `check_out` accounting since the XCM Executor's `InitiateTeleport` doesn't support
|
||||
// unpaid teleports.
|
||||
|
||||
// withdraw the asset from `who`
|
||||
let who_origin =
|
||||
Junction::AccountId32 { network: None, id: who.clone().into() }.into_location();
|
||||
let _withdrawn = xcm_config::LocalAssetTransactor::withdraw_asset(&wnd, &who_origin, None)
|
||||
.map_err(|err| {
|
||||
log::error!(
|
||||
target: "runtime::on_reap_identity",
|
||||
"withdraw_asset(what: {:?}, who_origin: {:?}) error: {:?}",
|
||||
wnd, who_origin, err
|
||||
);
|
||||
pezpallet_xcm::Error::<Runtime>::LowBalance
|
||||
})?;
|
||||
|
||||
// check out
|
||||
xcm_config::LocalAssetTransactor::can_check_out(
|
||||
&destination,
|
||||
&wnd,
|
||||
// not used in AssetTransactor
|
||||
&XcmContext { origin: None, message_id: [0; 32], topic: None },
|
||||
)
|
||||
.map_err(|err| {
|
||||
log::error!(
|
||||
target: "runtime::on_reap_identity",
|
||||
"can_check_out(destination: {:?}, asset: {:?}, _) error: {:?}",
|
||||
destination, wnd, err
|
||||
);
|
||||
pezpallet_xcm::Error::<Runtime>::CannotCheckOutTeleport
|
||||
})?;
|
||||
xcm_config::LocalAssetTransactor::check_out(
|
||||
&destination,
|
||||
&wnd,
|
||||
// not used in AssetTransactor
|
||||
&XcmContext { origin: None, message_id: [0; 32], topic: None },
|
||||
);
|
||||
|
||||
// reanchor
|
||||
let wnd_reanchored: Assets =
|
||||
vec![Asset { id: AssetId(Location::new(1, Here)), fun: Fungible(total_to_send) }]
|
||||
.into();
|
||||
|
||||
let poke = PeopleRuntimePallets::<AccountId>::IdentityMigrator(PokeDeposit(who.clone()));
|
||||
let remote_weight_limit = MigratorWeights::<Runtime>::poke_deposit().saturating_mul(2);
|
||||
|
||||
// Actual program to execute on People Chain.
|
||||
let program: Xcm<()> = Xcm(vec![
|
||||
// Unpaid as this is constructed by the system, once per user. The user shouldn't have
|
||||
// their balance reduced by teleport fees for the favor of migrating.
|
||||
UnpaidExecution { weight_limit: Unlimited, check_origin: None },
|
||||
// Receive the asset into holding.
|
||||
ReceiveTeleportedAsset(wnd_reanchored),
|
||||
// Deposit into the user's account.
|
||||
DepositAsset {
|
||||
assets: Wild(AllCounted(1)),
|
||||
beneficiary: Junction::AccountId32 { network: None, id: who.clone().into() }
|
||||
.into_location()
|
||||
.into(),
|
||||
},
|
||||
// Poke the deposit to reserve the appropriate amount on the teyrchain.
|
||||
Transact {
|
||||
origin_kind: OriginKind::Superuser,
|
||||
call: poke.encode().into(),
|
||||
fallback_max_weight: Some(remote_weight_limit),
|
||||
},
|
||||
]);
|
||||
|
||||
// send
|
||||
let _ = <pezpallet_xcm::Pallet<Runtime>>::send(
|
||||
RawOrigin::Root.into(),
|
||||
Box::new(VersionedLocation::from(destination)),
|
||||
Box::new(VersionedXcm::from(program)),
|
||||
)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
fn ensure_successful_identity_reaping(_: &AccountId, _: u32, _: u32) {
|
||||
crate::Dmp::make_teyrchain_reachable(1004);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,215 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Tests for the Zagros Runtime Configuration
|
||||
|
||||
use std::collections::HashSet;
|
||||
|
||||
use crate::{xcm_config::LocationConverter, *};
|
||||
use pezframe_support::traits::WhitelistedStorageKeys;
|
||||
use pezsp_core::{crypto::Ss58Codec, hexdisplay::HexDisplay};
|
||||
use pezsp_keyring::Sr25519Keyring::Alice;
|
||||
use xcm_runtime_apis::conversions::LocationToAccountHelper;
|
||||
|
||||
#[test]
|
||||
fn remove_keys_weight_is_sensible() {
|
||||
use pezkuwi_runtime_common::crowdloan::WeightInfo;
|
||||
let max_weight = <Runtime as crowdloan::Config>::WeightInfo::refund(RemoveKeysLimit::get());
|
||||
// Max remove keys limit should be no more than half the total block weight.
|
||||
assert!((max_weight * 2).all_lt(BlockWeights::get().max_block));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sample_size_is_sensible() {
|
||||
use pezkuwi_runtime_common::auctions::WeightInfo;
|
||||
// Need to clean up all samples at the end of an auction.
|
||||
let samples: BlockNumber = EndingPeriod::get() / SampleLength::get();
|
||||
let max_weight: pezframe_support::weights::Weight =
|
||||
RocksDbWeight::get().reads_writes(samples.into(), samples.into());
|
||||
// Max sample cleanup should be no more than half the total block weight.
|
||||
assert!((max_weight * 2).all_lt(BlockWeights::get().max_block));
|
||||
assert!((<Runtime as auctions::Config>::WeightInfo::on_initialize() * 2)
|
||||
.all_lt(BlockWeights::get().max_block));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn call_size() {
|
||||
RuntimeCall::assert_size_under(256);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sanity_check_teleport_assets_weight() {
|
||||
// This test sanity checks that at least 50 teleports can exist in a block.
|
||||
// Usually when XCM runs into an issue, it will return a weight of `Weight::MAX`,
|
||||
// so this test will certainly ensure that this problem does not occur.
|
||||
use pezframe_support::dispatch::GetDispatchInfo;
|
||||
let weight = pezpallet_xcm::Call::<Runtime>::limited_teleport_assets {
|
||||
dest: Box::new(Here.into()),
|
||||
beneficiary: Box::new(Here.into()),
|
||||
assets: Box::new((Here, 200_000).into()),
|
||||
fee_asset_id: Box::new(Here.into()),
|
||||
weight_limit: Unlimited,
|
||||
}
|
||||
.get_dispatch_info()
|
||||
.call_weight;
|
||||
|
||||
assert!((weight * 50).all_lt(BlockWeights::get().max_block));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn check_whitelist() {
|
||||
let whitelist: HashSet<String> = AllPalletsWithSystem::whitelisted_storage_keys()
|
||||
.iter()
|
||||
.map(|e| HexDisplay::from(&e.key).to_string())
|
||||
.collect();
|
||||
|
||||
// Block number
|
||||
assert!(whitelist.contains("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac"));
|
||||
// Total issuance
|
||||
assert!(whitelist.contains("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80"));
|
||||
// Execution phase
|
||||
assert!(whitelist.contains("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a"));
|
||||
// Event count
|
||||
assert!(whitelist.contains("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850"));
|
||||
// System events
|
||||
assert!(whitelist.contains("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7"));
|
||||
// Configuration ActiveConfig
|
||||
assert!(whitelist.contains("06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385"));
|
||||
// XcmPallet VersionDiscoveryQueue
|
||||
assert!(whitelist.contains("1405f2411d0af5a7ff397e7c9dc68d194a222ba0333561192e474c59ed8e30e1"));
|
||||
// XcmPallet SafeXcmVersion
|
||||
assert!(whitelist.contains("1405f2411d0af5a7ff397e7c9dc68d196323ae84c43568be0d1394d5d0d522c4"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn check_treasury_pallet_id() {
|
||||
assert_eq!(
|
||||
<Treasury as pezframe_support::traits::PalletInfoAccess>::index() as u8,
|
||||
pezpallet_staking_async_rc_runtime_constants::TREASURY_PALLET_ID
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(all(test, feature = "try-runtime"))]
|
||||
mod remote_tests {
|
||||
use super::*;
|
||||
use pezframe_try_runtime::{runtime_decl_for_try_runtime::TryRuntime, UpgradeCheckSelect};
|
||||
use remote_externalities::{
|
||||
Builder, Mode, OfflineConfig, OnlineConfig, SnapshotConfig, Transport,
|
||||
};
|
||||
use std::env::var;
|
||||
|
||||
#[tokio::test]
|
||||
async fn run_migrations() {
|
||||
if var("RUN_MIGRATION_TESTS").is_err() {
|
||||
return;
|
||||
}
|
||||
|
||||
pezsp_tracing::try_init_simple();
|
||||
let transport: Transport =
|
||||
var("WS").unwrap_or("wss://zagros-rpc.pezkuwichain.io:443".to_string()).into();
|
||||
let maybe_state_snapshot: Option<SnapshotConfig> = var("SNAP").map(|s| s.into()).ok();
|
||||
let mut ext = Builder::<Block>::default()
|
||||
.mode(if let Some(state_snapshot) = maybe_state_snapshot {
|
||||
Mode::OfflineOrElseOnline(
|
||||
OfflineConfig { state_snapshot: state_snapshot.clone() },
|
||||
OnlineConfig {
|
||||
transport,
|
||||
state_snapshot: Some(state_snapshot),
|
||||
..Default::default()
|
||||
},
|
||||
)
|
||||
} else {
|
||||
Mode::Online(OnlineConfig { transport, ..Default::default() })
|
||||
})
|
||||
.build()
|
||||
.await
|
||||
.unwrap();
|
||||
ext.execute_with(|| Runtime::on_runtime_upgrade(UpgradeCheckSelect::PreAndPost));
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn location_conversion_works() {
|
||||
// the purpose of hardcoded values is to catch an unintended location conversion logic change.
|
||||
struct TestCase {
|
||||
description: &'static str,
|
||||
location: Location,
|
||||
expected_account_id_str: &'static str,
|
||||
}
|
||||
|
||||
let test_cases = vec![
|
||||
// DescribeTerminus
|
||||
TestCase {
|
||||
description: "DescribeTerminus Child",
|
||||
location: Location::new(0, [Teyrchain(1111)]),
|
||||
expected_account_id_str: "5Ec4AhP4h37t7TFsAZ4HhFq6k92usAAJDUC3ADSZ4H4Acru3",
|
||||
},
|
||||
// DescribePalletTerminal
|
||||
TestCase {
|
||||
description: "DescribePalletTerminal Child",
|
||||
location: Location::new(0, [Teyrchain(1111), PalletInstance(50)]),
|
||||
expected_account_id_str: "5FjEBrKn3STAFsZpQF4jzwxUYHNGnNgzdZqSQfTzeJ82XKp6",
|
||||
},
|
||||
// DescribeAccountId32Terminal
|
||||
TestCase {
|
||||
description: "DescribeAccountId32Terminal Child",
|
||||
location: Location::new(
|
||||
0,
|
||||
[Teyrchain(1111), AccountId32 { network: None, id: AccountId::from(Alice).into() }],
|
||||
),
|
||||
expected_account_id_str: "5EEMro9RRDpne4jn9TuD7cTB6Amv1raVZ3xspSkqb2BF3FJH",
|
||||
},
|
||||
// DescribeAccountKey20Terminal
|
||||
TestCase {
|
||||
description: "DescribeAccountKey20Terminal Child",
|
||||
location: Location::new(
|
||||
0,
|
||||
[Teyrchain(1111), AccountKey20 { network: None, key: [0u8; 20] }],
|
||||
),
|
||||
expected_account_id_str: "5HohjXdjs6afcYcgHHSstkrtGfxgfGKsnZ1jtewBpFiGu4DL",
|
||||
},
|
||||
// DescribeTreasuryVoiceTerminal
|
||||
TestCase {
|
||||
description: "DescribeTreasuryVoiceTerminal Child",
|
||||
location: Location::new(
|
||||
0,
|
||||
[Teyrchain(1111), Plurality { id: BodyId::Treasury, part: BodyPart::Voice }],
|
||||
),
|
||||
expected_account_id_str: "5GenE4vJgHvwYVcD6b4nBvH5HNY4pzpVHWoqwFpNMFT7a2oX",
|
||||
},
|
||||
// DescribeBodyTerminal
|
||||
TestCase {
|
||||
description: "DescribeBodyTerminal Child",
|
||||
location: Location::new(
|
||||
0,
|
||||
[Teyrchain(1111), Plurality { id: BodyId::Unit, part: BodyPart::Voice }],
|
||||
),
|
||||
expected_account_id_str: "5DPgGBFTTYm1dGbtB1VWHJ3T3ScvdrskGGx6vSJZNP1WNStV",
|
||||
},
|
||||
];
|
||||
|
||||
for tc in test_cases {
|
||||
let expected =
|
||||
AccountId::from_string(tc.expected_account_id_str).expect("Invalid AccountId string");
|
||||
|
||||
let got = LocationToAccountHelper::<AccountId, LocationConverter>::convert_location(
|
||||
tc.location.into(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(got, expected, "{}", tc.description);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,172 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezframe_system`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezframe_system
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezframe_system`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezframe_system::WeightInfo for WeightInfo<T> {
|
||||
/// The range of component `b` is `[0, 3932160]`.
|
||||
fn remark(b: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_046_000 picoseconds.
|
||||
Weight::from_parts(2_092_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 160
|
||||
.saturating_add(Weight::from_parts(14_296, 0).saturating_mul(b.into()))
|
||||
}
|
||||
/// The range of component `b` is `[0, 3932160]`.
|
||||
fn remark_with_event(b: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 6_343_000 picoseconds.
|
||||
Weight::from_parts(6_529_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 158
|
||||
.saturating_add(Weight::from_parts(15_724, 0).saturating_mul(b.into()))
|
||||
}
|
||||
/// Storage: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1)
|
||||
/// Proof: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1)
|
||||
fn set_heap_pages() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_611_000 picoseconds.
|
||||
Weight::from_parts(3_856_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `MultiBlockMigrations::Cursor` (r:1 w:0)
|
||||
/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
|
||||
/// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
|
||||
/// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
|
||||
fn set_code() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `4`
|
||||
// Estimated: `67035`
|
||||
// Minimum execution time: 186_708_046_000 picoseconds.
|
||||
Weight::from_parts(188_430_007_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 67035))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Skipped::Metadata` (r:0 w:0)
|
||||
/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// The range of component `i` is `[0, 1000]`.
|
||||
fn set_storage(i: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_067_000 picoseconds.
|
||||
Weight::from_parts(2_183_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 2_517
|
||||
.saturating_add(Weight::from_parts(739_980, 0).saturating_mul(i.into()))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
|
||||
}
|
||||
/// Storage: `Skipped::Metadata` (r:0 w:0)
|
||||
/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// The range of component `i` is `[0, 1000]`.
|
||||
fn kill_storage(i: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 1_996_000 picoseconds.
|
||||
Weight::from_parts(2_130_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 1_375
|
||||
.saturating_add(Weight::from_parts(575_422, 0).saturating_mul(i.into()))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
|
||||
}
|
||||
/// Storage: `Skipped::Metadata` (r:0 w:0)
|
||||
/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// The range of component `p` is `[0, 1000]`.
|
||||
fn kill_prefix(p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `69 + p * (69 ±0)`
|
||||
// Estimated: `81 + p * (70 ±0)`
|
||||
// Minimum execution time: 3_947_000 picoseconds.
|
||||
Weight::from_parts(4_152_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 81))
|
||||
// Standard Error: 2_193
|
||||
.saturating_add(Weight::from_parts(1_392_480, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into())))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into())))
|
||||
.saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into()))
|
||||
}
|
||||
/// Storage: `System::AuthorizedUpgrade` (r:0 w:1)
|
||||
/// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
|
||||
fn authorize_upgrade() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 17_968_000 picoseconds.
|
||||
Weight::from_parts(19_353_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `System::AuthorizedUpgrade` (r:1 w:1)
|
||||
/// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
|
||||
/// Storage: `MultiBlockMigrations::Cursor` (r:1 w:0)
|
||||
/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
|
||||
/// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
|
||||
/// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
|
||||
fn apply_authorized_upgrade() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `26`
|
||||
// Estimated: `67035`
|
||||
// Minimum execution time: 190_893_853_000 picoseconds.
|
||||
Weight::from_parts(193_181_367_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 67035))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! Autogenerated weights for `pezframe_system_extensions`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezframe_system_extensions
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezframe_system_extensions`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezframe_system::ExtensionsWeightInfo for WeightInfo<T> {
|
||||
fn check_genesis() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `30`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_347_000 picoseconds.
|
||||
Weight::from_parts(3_488_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn check_mortality_mortal_transaction() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `68`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 6_549_000 picoseconds.
|
||||
Weight::from_parts(6_749_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn check_mortality_immortal_transaction() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `68`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 6_331_000 picoseconds.
|
||||
Weight::from_parts(6_678_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn check_non_zero_sender() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 503_000 picoseconds.
|
||||
Weight::from_parts(594_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn check_nonce() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `101`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 6_858_000 picoseconds.
|
||||
Weight::from_parts(7_072_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
fn check_spec_version() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 405_000 picoseconds.
|
||||
Weight::from_parts(446_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn check_tx_version() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 405_000 picoseconds.
|
||||
Weight::from_parts(468_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn check_weight() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_806_000 picoseconds.
|
||||
Weight::from_parts(3_935_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn weight_reclaim() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_214_000 picoseconds.
|
||||
Weight::from_parts(2_379_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! A list of the different weight modules for our runtime.
|
||||
|
||||
pub mod pezframe_system;
|
||||
pub mod pezframe_system_extensions;
|
||||
pub mod pezpallet_asset_rate;
|
||||
pub mod pezpallet_balances;
|
||||
pub mod pezpallet_beefy_mmr;
|
||||
pub mod pezpallet_conviction_voting;
|
||||
pub mod pezpallet_identity;
|
||||
pub mod pezpallet_indices;
|
||||
pub mod pezpallet_message_queue;
|
||||
pub mod pezpallet_migrations;
|
||||
pub mod pezpallet_mmr;
|
||||
pub mod pezpallet_multisig;
|
||||
pub mod pezpallet_parameters;
|
||||
pub mod pezpallet_preimage;
|
||||
pub mod pezpallet_proxy;
|
||||
pub mod pezpallet_referenda_referenda;
|
||||
pub mod pezpallet_scheduler;
|
||||
pub mod pezpallet_session;
|
||||
pub mod pezpallet_sudo;
|
||||
pub mod pezpallet_timestamp;
|
||||
pub mod pezpallet_transaction_payment;
|
||||
pub mod pezpallet_treasury;
|
||||
pub mod pezpallet_utility;
|
||||
pub mod pezpallet_vesting;
|
||||
pub mod pezpallet_whitelist;
|
||||
pub mod pezpallet_xcm;
|
||||
pub mod pezkuwi_runtime_common_assigned_slots;
|
||||
pub mod pezkuwi_runtime_common_auctions;
|
||||
pub mod pezkuwi_runtime_common_crowdloan;
|
||||
pub mod pezkuwi_runtime_common_identity_migrator;
|
||||
pub mod pezkuwi_runtime_common_paras_registrar;
|
||||
pub mod pezkuwi_runtime_common_slots;
|
||||
pub mod pezkuwi_runtime_teyrchains_configuration;
|
||||
pub mod pezkuwi_runtime_teyrchains_coretime;
|
||||
pub mod pezkuwi_runtime_teyrchains_disputes;
|
||||
pub mod pezkuwi_runtime_teyrchains_disputes_slashing;
|
||||
pub mod pezkuwi_runtime_teyrchains_hrmp;
|
||||
pub mod pezkuwi_runtime_teyrchains_inclusion;
|
||||
pub mod pezkuwi_runtime_teyrchains_initializer;
|
||||
pub mod pezkuwi_runtime_teyrchains_on_demand;
|
||||
pub mod pezkuwi_runtime_teyrchains_paras;
|
||||
pub mod pezkuwi_runtime_teyrchains_paras_inherent;
|
||||
pub mod xcm;
|
||||
@@ -0,0 +1,90 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_asset_rate`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_asset_rate
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_asset_rate`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_asset_rate::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1)
|
||||
/// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`)
|
||||
fn create() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `142`
|
||||
// Estimated: `4703`
|
||||
// Minimum execution time: 13_141_000 picoseconds.
|
||||
Weight::from_parts(13_549_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4703))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1)
|
||||
/// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`)
|
||||
fn update() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `210`
|
||||
// Estimated: `4703`
|
||||
// Minimum execution time: 16_979_000 picoseconds.
|
||||
Weight::from_parts(17_951_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4703))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1)
|
||||
/// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`)
|
||||
fn remove() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `210`
|
||||
// Estimated: `4703`
|
||||
// Minimum execution time: 18_364_000 picoseconds.
|
||||
Weight::from_parts(19_135_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4703))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_balances`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_balances
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_balances`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_balances::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn transfer_allow_death() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 52_576_000 picoseconds.
|
||||
Weight::from_parts(53_526_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn transfer_keep_alive() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 41_548_000 picoseconds.
|
||||
Weight::from_parts(42_237_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn force_set_balance_creating() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `174`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 19_240_000 picoseconds.
|
||||
Weight::from_parts(20_294_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn force_set_balance_killing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `174`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 27_274_000 picoseconds.
|
||||
Weight::from_parts(28_742_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `System::Account` (r:2 w:2)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn force_transfer() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `103`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 54_887_000 picoseconds.
|
||||
Weight::from_parts(56_002_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn transfer_all() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 51_421_000 picoseconds.
|
||||
Weight::from_parts(52_519_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn force_unreserve() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `174`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 22_311_000 picoseconds.
|
||||
Weight::from_parts(23_026_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `System::Account` (r:999 w:999)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `u` is `[1, 1000]`.
|
||||
fn upgrade_accounts(u: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0 + u * (136 ±0)`
|
||||
// Estimated: `990 + u * (2603 ±0)`
|
||||
// Minimum execution time: 18_042_000 picoseconds.
|
||||
Weight::from_parts(18_172_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 990))
|
||||
// Standard Error: 11_937
|
||||
.saturating_add(Weight::from_parts(15_351_977, 0).saturating_mul(u.into()))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into())))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into())))
|
||||
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into()))
|
||||
}
|
||||
fn force_adjust_total_issuance() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 6_666_000 picoseconds.
|
||||
Weight::from_parts(7_042_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn burn_allow_death() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 32_955_000 picoseconds.
|
||||
Weight::from_parts(33_340_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn burn_keep_alive() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 22_425_000 picoseconds.
|
||||
Weight::from_parts(23_208_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_beefy_mmr`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_beefy_mmr
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_beefy_mmr`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_beefy_mmr::WeightInfo for WeightInfo<T> {
|
||||
/// The range of component `n` is `[2, 512]`.
|
||||
fn n_leafs_proof_is_optimal(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 629_000 picoseconds.
|
||||
Weight::from_parts(1_215_800, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 67
|
||||
.saturating_add(Weight::from_parts(1_275, 0).saturating_mul(n.into()))
|
||||
}
|
||||
/// Storage: `System::BlockHash` (r:1 w:0)
|
||||
/// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
|
||||
fn extract_validation_context() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `68`
|
||||
// Estimated: `3509`
|
||||
// Minimum execution time: 9_629_000 picoseconds.
|
||||
Weight::from_parts(10_234_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3509))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
}
|
||||
/// Storage: `Mmr::Nodes` (r:1 w:0)
|
||||
/// Proof: `Mmr::Nodes` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
|
||||
fn read_peak() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `221`
|
||||
// Estimated: `3505`
|
||||
// Minimum execution time: 6_052_000 picoseconds.
|
||||
Weight::from_parts(6_388_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3505))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
}
|
||||
/// Storage: `Mmr::RootHash` (r:1 w:0)
|
||||
/// Proof: `Mmr::RootHash` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Mmr::NumberOfLeaves` (r:1 w:0)
|
||||
/// Proof: `Mmr::NumberOfLeaves` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
|
||||
/// The range of component `n` is `[2, 512]`.
|
||||
fn n_items_proof_is_non_canonical(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `213`
|
||||
// Estimated: `1517`
|
||||
// Minimum execution time: 12_197_000 picoseconds.
|
||||
Weight::from_parts(25_888_246, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1517))
|
||||
// Standard Error: 2_043
|
||||
.saturating_add(Weight::from_parts(1_304_917, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
}
|
||||
}
|
||||
+204
@@ -0,0 +1,204 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_conviction_voting`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_conviction_voting
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_conviction_voting`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_conviction_voting::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
|
||||
/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
|
||||
/// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(311), added: 2786, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Locks` (r:1 w:1)
|
||||
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Freezes` (r:1 w:0)
|
||||
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:1 w:1)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
fn vote_new() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `13408`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 151_930_000 picoseconds.
|
||||
Weight::from_parts(161_372_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
|
||||
/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
|
||||
/// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(311), added: 2786, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Locks` (r:1 w:1)
|
||||
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Freezes` (r:1 w:0)
|
||||
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:2 w:2)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Retries` (r:0 w:1)
|
||||
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
|
||||
fn vote_existing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `14129`
|
||||
// Estimated: `83866`
|
||||
// Minimum execution time: 176_955_000 picoseconds.
|
||||
Weight::from_parts(185_290_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(7))
|
||||
}
|
||||
/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
|
||||
/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:2 w:2)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Retries` (r:0 w:1)
|
||||
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
|
||||
fn remove_vote() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `13918`
|
||||
// Estimated: `83866`
|
||||
// Minimum execution time: 141_988_000 picoseconds.
|
||||
Weight::from_parts(149_871_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
|
||||
/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:0)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
fn remove_other_vote() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `13005`
|
||||
// Estimated: `30706`
|
||||
// Minimum execution time: 79_917_000 picoseconds.
|
||||
Weight::from_parts(84_349_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 30706))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `ConvictionVoting::VotingFor` (r:2 w:2)
|
||||
/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:512 w:512)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:2 w:2)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
|
||||
/// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(311), added: 2786, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Locks` (r:1 w:1)
|
||||
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Freezes` (r:1 w:0)
|
||||
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Retries` (r:0 w:50)
|
||||
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
|
||||
/// The range of component `r` is `[0, 512]`.
|
||||
fn delegate(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `29603 + r * (365 ±0)`
|
||||
// Estimated: `83866 + r * (3411 ±0)`
|
||||
// Minimum execution time: 75_473_000 picoseconds.
|
||||
Weight::from_parts(873_424_384, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
// Standard Error: 60_903
|
||||
.saturating_add(Weight::from_parts(21_022_118, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(45))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into())))
|
||||
.saturating_add(Weight::from_parts(0, 3411).saturating_mul(r.into()))
|
||||
}
|
||||
/// Storage: `ConvictionVoting::VotingFor` (r:2 w:2)
|
||||
/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:512 w:512)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:2 w:2)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Retries` (r:0 w:50)
|
||||
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
|
||||
/// The range of component `r` is `[0, 512]`.
|
||||
fn undelegate(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `29555 + r * (365 ±0)`
|
||||
// Estimated: `83866 + r * (3411 ±0)`
|
||||
// Minimum execution time: 47_752_000 picoseconds.
|
||||
Weight::from_parts(847_009_624, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
// Standard Error: 62_499
|
||||
.saturating_add(Weight::from_parts(21_293_933, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(43))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into())))
|
||||
.saturating_add(Weight::from_parts(0, 3411).saturating_mul(r.into()))
|
||||
}
|
||||
/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
|
||||
/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
|
||||
/// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(311), added: 2786, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Locks` (r:1 w:1)
|
||||
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Freezes` (r:1 w:0)
|
||||
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||
fn unlock() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `12181`
|
||||
// Estimated: `30706`
|
||||
// Minimum execution time: 107_409_000 picoseconds.
|
||||
Weight::from_parts(114_301_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 30706))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,570 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_identity`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_identity
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_identity`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_identity::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Identity::Registrars` (r:1 w:1)
|
||||
/// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`)
|
||||
/// The range of component `r` is `[1, 19]`.
|
||||
fn add_registrar(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `32 + r * (57 ±0)`
|
||||
// Estimated: `2626`
|
||||
// Minimum execution time: 13_290_000 picoseconds.
|
||||
Weight::from_parts(13_987_666, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2626))
|
||||
// Standard Error: 1_986
|
||||
.saturating_add(Weight::from_parts(118_336, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Identity::IdentityOf` (r:1 w:1)
|
||||
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, mode: `MaxEncodedLen`)
|
||||
/// The range of component `r` is `[1, 20]`.
|
||||
fn set_identity(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `6977 + r * (5 ±0)`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 118_150_000 picoseconds.
|
||||
Weight::from_parts(120_003_906, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 11_614
|
||||
.saturating_add(Weight::from_parts(237_861, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Identity::IdentityOf` (r:1 w:0)
|
||||
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::SubsOf` (r:1 w:1)
|
||||
/// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::SuperOf` (r:100 w:100)
|
||||
/// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[0, 100]`.
|
||||
fn set_subs_new(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `101`
|
||||
// Estimated: `11003 + s * (2589 ±0)`
|
||||
// Minimum execution time: 17_851_000 picoseconds.
|
||||
Weight::from_parts(32_739_674, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 5_669
|
||||
.saturating_add(Weight::from_parts(3_789_127, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(s.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
|
||||
.saturating_add(Weight::from_parts(0, 2589).saturating_mul(s.into()))
|
||||
}
|
||||
/// Storage: `Identity::IdentityOf` (r:1 w:0)
|
||||
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::SubsOf` (r:1 w:1)
|
||||
/// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::SuperOf` (r:0 w:100)
|
||||
/// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
|
||||
/// The range of component `p` is `[0, 100]`.
|
||||
fn set_subs_old(p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `194 + p * (32 ±0)`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 17_896_000 picoseconds.
|
||||
Weight::from_parts(32_581_610, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 4_474
|
||||
.saturating_add(Weight::from_parts(1_511_949, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into())))
|
||||
}
|
||||
/// Storage: `Identity::SubsOf` (r:1 w:1)
|
||||
/// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::IdentityOf` (r:1 w:1)
|
||||
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::SuperOf` (r:0 w:100)
|
||||
/// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
|
||||
/// The range of component `r` is `[1, 20]`.
|
||||
/// The range of component `s` is `[0, 100]`.
|
||||
fn clear_identity(r: u32, s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `7069 + r * (5 ±0) + s * (32 ±0)`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 62_969_000 picoseconds.
|
||||
Weight::from_parts(63_397_496, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 17_822
|
||||
.saturating_add(Weight::from_parts(156_307, 0).saturating_mul(r.into()))
|
||||
// Standard Error: 3_477
|
||||
.saturating_add(Weight::from_parts(1_468_191, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
|
||||
}
|
||||
/// Storage: `Identity::Registrars` (r:1 w:0)
|
||||
/// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::IdentityOf` (r:1 w:1)
|
||||
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, mode: `MaxEncodedLen`)
|
||||
/// The range of component `r` is `[1, 20]`.
|
||||
fn request_judgement(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `6967 + r * (57 ±0)`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 85_331_000 picoseconds.
|
||||
Weight::from_parts(87_149_610, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 7_682
|
||||
.saturating_add(Weight::from_parts(161_766, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Identity::IdentityOf` (r:1 w:1)
|
||||
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, mode: `MaxEncodedLen`)
|
||||
/// The range of component `r` is `[1, 20]`.
|
||||
fn cancel_request(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `6998`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 82_868_000 picoseconds.
|
||||
Weight::from_parts(84_836_576, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 5_840
|
||||
.saturating_add(Weight::from_parts(111_417, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Identity::Registrars` (r:1 w:1)
|
||||
/// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`)
|
||||
/// The range of component `r` is `[1, 19]`.
|
||||
fn set_fee(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `89 + r * (57 ±0)`
|
||||
// Estimated: `2626`
|
||||
// Minimum execution time: 9_998_000 picoseconds.
|
||||
Weight::from_parts(10_559_773, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2626))
|
||||
// Standard Error: 1_526
|
||||
.saturating_add(Weight::from_parts(86_637, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Identity::Registrars` (r:1 w:1)
|
||||
/// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`)
|
||||
/// The range of component `r` is `[1, 19]`.
|
||||
fn set_account_id(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `89 + r * (57 ±0)`
|
||||
// Estimated: `2626`
|
||||
// Minimum execution time: 10_427_000 picoseconds.
|
||||
Weight::from_parts(10_967_798, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2626))
|
||||
// Standard Error: 1_516
|
||||
.saturating_add(Weight::from_parts(64_950, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Identity::Registrars` (r:1 w:1)
|
||||
/// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`)
|
||||
/// The range of component `r` is `[1, 19]`.
|
||||
fn set_fields(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `89 + r * (57 ±0)`
|
||||
// Estimated: `2626`
|
||||
// Minimum execution time: 10_049_000 picoseconds.
|
||||
Weight::from_parts(10_518_238, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2626))
|
||||
// Standard Error: 1_133
|
||||
.saturating_add(Weight::from_parts(70_941, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Identity::Registrars` (r:1 w:0)
|
||||
/// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::IdentityOf` (r:1 w:1)
|
||||
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, mode: `MaxEncodedLen`)
|
||||
/// The range of component `r` is `[1, 19]`.
|
||||
fn provide_judgement(r: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `7045 + r * (57 ±0)`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 106_329_000 picoseconds.
|
||||
Weight::from_parts(108_408_384, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 9_587
|
||||
.saturating_add(Weight::from_parts(73_218, 0).saturating_mul(r.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Identity::SubsOf` (r:1 w:1)
|
||||
/// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::IdentityOf` (r:1 w:1)
|
||||
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::SuperOf` (r:0 w:100)
|
||||
/// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
|
||||
/// The range of component `r` is `[1, 20]`.
|
||||
/// The range of component `s` is `[0, 100]`.
|
||||
fn kill_identity(r: u32, s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `7276 + r * (5 ±0) + s * (32 ±0)`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 68_530_000 picoseconds.
|
||||
Weight::from_parts(71_229_661, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 18_380
|
||||
.saturating_add(Weight::from_parts(193_976, 0).saturating_mul(r.into()))
|
||||
// Standard Error: 3_586
|
||||
.saturating_add(Weight::from_parts(1_446_685, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into())))
|
||||
}
|
||||
/// Storage: `Identity::IdentityOf` (r:1 w:0)
|
||||
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::SuperOf` (r:1 w:1)
|
||||
/// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::SubsOf` (r:1 w:1)
|
||||
/// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[0, 99]`.
|
||||
fn add_sub(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `475 + s * (36 ±0)`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 34_407_000 picoseconds.
|
||||
Weight::from_parts(39_732_661, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 1_673
|
||||
.saturating_add(Weight::from_parts(117_300, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Identity::IdentityOf` (r:1 w:0)
|
||||
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::SuperOf` (r:1 w:1)
|
||||
/// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[1, 100]`.
|
||||
fn rename_sub(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `591 + s * (3 ±0)`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 21_851_000 picoseconds.
|
||||
Weight::from_parts(24_585_489, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 789
|
||||
.saturating_add(Weight::from_parts(70_051, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Identity::IdentityOf` (r:1 w:0)
|
||||
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::SuperOf` (r:1 w:1)
|
||||
/// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::SubsOf` (r:1 w:1)
|
||||
/// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[1, 100]`.
|
||||
fn remove_sub(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `638 + s * (35 ±0)`
|
||||
// Estimated: `11003`
|
||||
// Minimum execution time: 38_427_000 picoseconds.
|
||||
Weight::from_parts(42_500_800, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11003))
|
||||
// Standard Error: 1_267
|
||||
.saturating_add(Weight::from_parts(95_006, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Identity::SuperOf` (r:1 w:1)
|
||||
/// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::SubsOf` (r:1 w:1)
|
||||
/// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:0)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[0, 99]`.
|
||||
fn quit_sub(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `704 + s * (37 ±0)`
|
||||
// Estimated: `6723`
|
||||
// Minimum execution time: 29_425_000 picoseconds.
|
||||
Weight::from_parts(32_022_317, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6723))
|
||||
// Standard Error: 928
|
||||
.saturating_add(Weight::from_parts(106_141, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Identity::AuthorityOf` (r:0 w:1)
|
||||
/// Proof: `Identity::AuthorityOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
|
||||
fn add_username_authority() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 7_523_000 picoseconds.
|
||||
Weight::from_parts(7_722_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Identity::AuthorityOf` (r:1 w:1)
|
||||
/// Proof: `Identity::AuthorityOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
|
||||
fn remove_username_authority() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `79`
|
||||
// Estimated: `3517`
|
||||
// Minimum execution time: 14_255_000 picoseconds.
|
||||
Weight::from_parts(15_084_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3517))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Identity::AuthorityOf` (r:1 w:1)
|
||||
/// Proof: `Identity::AuthorityOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::UsernameInfoOf` (r:1 w:1)
|
||||
/// Proof: `Identity::UsernameInfoOf` (`max_values`: None, `max_size`: Some(98), added: 2573, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::PendingUsernames` (r:1 w:0)
|
||||
/// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(102), added: 2577, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::UsernameOf` (r:1 w:1)
|
||||
/// Proof: `Identity::UsernameOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `p` is `[0, 1]`.
|
||||
fn set_username_for(_p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `219`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 71_739_000 picoseconds.
|
||||
Weight::from_parts(94_823_220, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `Identity::PendingUsernames` (r:1 w:1)
|
||||
/// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(102), added: 2577, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::UsernameOf` (r:1 w:1)
|
||||
/// Proof: `Identity::UsernameOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::UsernameInfoOf` (r:0 w:1)
|
||||
/// Proof: `Identity::UsernameInfoOf` (`max_values`: None, `max_size`: Some(98), added: 2573, mode: `MaxEncodedLen`)
|
||||
fn accept_username() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `116`
|
||||
// Estimated: `3567`
|
||||
// Minimum execution time: 25_721_000 picoseconds.
|
||||
Weight::from_parts(26_422_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3567))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `Identity::PendingUsernames` (r:1 w:1)
|
||||
/// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(102), added: 2577, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::AuthorityOf` (r:1 w:0)
|
||||
/// Proof: `Identity::AuthorityOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `p` is `[0, 1]`.
|
||||
fn remove_expired_approval(_p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `347`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 25_492_000 picoseconds.
|
||||
Weight::from_parts(57_463_718, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Identity::UsernameInfoOf` (r:1 w:0)
|
||||
/// Proof: `Identity::UsernameInfoOf` (`max_values`: None, `max_size`: Some(98), added: 2573, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::UsernameOf` (r:0 w:1)
|
||||
/// Proof: `Identity::UsernameOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
fn set_primary_username() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `172`
|
||||
// Estimated: `3563`
|
||||
// Minimum execution time: 17_653_000 picoseconds.
|
||||
Weight::from_parts(18_274_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3563))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Identity::UsernameInfoOf` (r:1 w:0)
|
||||
/// Proof: `Identity::UsernameInfoOf` (`max_values`: None, `max_size`: Some(98), added: 2573, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::AuthorityOf` (r:1 w:0)
|
||||
/// Proof: `Identity::AuthorityOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::UnbindingUsernames` (r:1 w:1)
|
||||
/// Proof: `Identity::UnbindingUsernames` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`)
|
||||
fn unbind_username() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `236`
|
||||
// Estimated: `3563`
|
||||
// Minimum execution time: 22_190_000 picoseconds.
|
||||
Weight::from_parts(23_093_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3563))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Identity::UnbindingUsernames` (r:1 w:1)
|
||||
/// Proof: `Identity::UnbindingUsernames` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::UsernameInfoOf` (r:1 w:1)
|
||||
/// Proof: `Identity::UsernameInfoOf` (`max_values`: None, `max_size`: Some(98), added: 2573, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::UsernameOf` (r:1 w:1)
|
||||
/// Proof: `Identity::UsernameOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::AuthorityOf` (r:1 w:0)
|
||||
/// Proof: `Identity::AuthorityOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
|
||||
fn remove_username() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `297`
|
||||
// Estimated: `3563`
|
||||
// Minimum execution time: 27_024_000 picoseconds.
|
||||
Weight::from_parts(28_770_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3563))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `Identity::UsernameInfoOf` (r:1 w:1)
|
||||
/// Proof: `Identity::UsernameInfoOf` (`max_values`: None, `max_size`: Some(98), added: 2573, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::UsernameOf` (r:1 w:1)
|
||||
/// Proof: `Identity::UsernameOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::UnbindingUsernames` (r:1 w:1)
|
||||
/// Proof: `Identity::UnbindingUsernames` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::AuthorityOf` (r:1 w:0)
|
||||
/// Proof: `Identity::AuthorityOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `p` is `[0, 1]`.
|
||||
fn kill_username(_p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `508`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 24_819_000 picoseconds.
|
||||
Weight::from_parts(49_501_024, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: UNKNOWN KEY `0x2aeddc77fe58c98d50bd37f1b90840f99622d1423cdd16f5c33e2b531c34a53d` (r:2 w:0)
|
||||
/// Proof: UNKNOWN KEY `0x2aeddc77fe58c98d50bd37f1b90840f99622d1423cdd16f5c33e2b531c34a53d` (r:2 w:0)
|
||||
/// Storage: `Identity::AuthorityOf` (r:0 w:1)
|
||||
/// Proof: `Identity::AuthorityOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
|
||||
fn migration_v2_authority_step() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `147`
|
||||
// Estimated: `6087`
|
||||
// Minimum execution time: 9_126_000 picoseconds.
|
||||
Weight::from_parts(9_633_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6087))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: UNKNOWN KEY `0x2aeddc77fe58c98d50bd37f1b90840f97c182fead9255863460affdd63116be3` (r:2 w:0)
|
||||
/// Proof: UNKNOWN KEY `0x2aeddc77fe58c98d50bd37f1b90840f97c182fead9255863460affdd63116be3` (r:2 w:0)
|
||||
/// Storage: `Identity::UsernameInfoOf` (r:0 w:1)
|
||||
/// Proof: `Identity::UsernameInfoOf` (`max_values`: None, `max_size`: Some(98), added: 2573, mode: `MaxEncodedLen`)
|
||||
fn migration_v2_username_step() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `159`
|
||||
// Estimated: `6099`
|
||||
// Minimum execution time: 8_795_000 picoseconds.
|
||||
Weight::from_parts(9_249_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6099))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Identity::IdentityOf` (r:2 w:1)
|
||||
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Identity::UsernameOf` (r:0 w:1)
|
||||
/// Proof: `Identity::UsernameOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
|
||||
fn migration_v2_identity_step() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `7062`
|
||||
// Estimated: `21016`
|
||||
// Minimum execution time: 66_496_000 picoseconds.
|
||||
Weight::from_parts(67_500_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 21016))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Identity::PendingUsernames` (r:2 w:1)
|
||||
/// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(102), added: 2577, mode: `MaxEncodedLen`)
|
||||
fn migration_v2_pending_username_step() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `201`
|
||||
// Estimated: `6144`
|
||||
// Minimum execution time: 11_523_000 picoseconds.
|
||||
Weight::from_parts(12_151_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6144))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Identity::AuthorityOf` (r:2 w:0)
|
||||
/// Proof: `Identity::AuthorityOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
|
||||
/// Storage: UNKNOWN KEY `0x2aeddc77fe58c98d50bd37f1b90840f99622d1423cdd16f5c33e2b531c34a53d` (r:1 w:1)
|
||||
/// Proof: UNKNOWN KEY `0x2aeddc77fe58c98d50bd37f1b90840f99622d1423cdd16f5c33e2b531c34a53d` (r:1 w:1)
|
||||
fn migration_v2_cleanup_authority_step() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `288`
|
||||
// Estimated: `6044`
|
||||
// Minimum execution time: 15_382_000 picoseconds.
|
||||
Weight::from_parts(15_984_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6044))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Identity::UsernameInfoOf` (r:2 w:0)
|
||||
/// Proof: `Identity::UsernameInfoOf` (`max_values`: None, `max_size`: Some(98), added: 2573, mode: `MaxEncodedLen`)
|
||||
/// Storage: UNKNOWN KEY `0x2aeddc77fe58c98d50bd37f1b90840f97c182fead9255863460affdd63116be3` (r:1 w:1)
|
||||
/// Proof: UNKNOWN KEY `0x2aeddc77fe58c98d50bd37f1b90840f97c182fead9255863460affdd63116be3` (r:1 w:1)
|
||||
fn migration_v2_cleanup_username_step() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `290`
|
||||
// Estimated: `6136`
|
||||
// Minimum execution time: 14_213_000 picoseconds.
|
||||
Weight::from_parts(14_935_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6136))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_indices`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_indices
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_indices`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_indices::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Proxy::Proxies` (r:1 w:1)
|
||||
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Proxy::Announcements` (r:1 w:1)
|
||||
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
|
||||
fn poke_deposit() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `487`
|
||||
// Estimated: `5698`
|
||||
// Minimum execution time: 47_219_000 picoseconds.
|
||||
Weight::from_parts(48_694_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5698))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `Indices::Accounts` (r:1 w:1)
|
||||
/// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
|
||||
fn claim() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `4`
|
||||
// Estimated: `3534`
|
||||
// Minimum execution time: 26_421_000 picoseconds.
|
||||
Weight::from_parts(27_302_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3534))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Indices::Accounts` (r:1 w:1)
|
||||
/// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn transfer() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `203`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 39_565_000 picoseconds.
|
||||
Weight::from_parts(40_741_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Indices::Accounts` (r:1 w:1)
|
||||
/// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
|
||||
fn free() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `100`
|
||||
// Estimated: `3534`
|
||||
// Minimum execution time: 28_046_000 picoseconds.
|
||||
Weight::from_parts(28_775_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3534))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Indices::Accounts` (r:1 w:1)
|
||||
/// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn force_transfer() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `203`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 29_411_000 picoseconds.
|
||||
Weight::from_parts(30_698_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Indices::Accounts` (r:1 w:1)
|
||||
/// Proof: `Indices::Accounts` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
|
||||
fn freeze() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `100`
|
||||
// Estimated: `3534`
|
||||
// Minimum execution time: 30_839_000 picoseconds.
|
||||
Weight::from_parts(31_621_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3534))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,213 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_message_queue`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_message_queue
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_message_queue`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_message_queue::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `MessageQueue::ServiceHead` (r:1 w:0)
|
||||
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(6), added: 501, mode: `MaxEncodedLen`)
|
||||
/// Storage: `MessageQueue::BookStateFor` (r:2 w:2)
|
||||
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
|
||||
fn ready_ring_knit() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `281`
|
||||
// Estimated: `6050`
|
||||
// Minimum execution time: 16_991_000 picoseconds.
|
||||
Weight::from_parts(17_813_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6050))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `MessageQueue::BookStateFor` (r:2 w:2)
|
||||
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
|
||||
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
|
||||
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(6), added: 501, mode: `MaxEncodedLen`)
|
||||
fn ready_ring_unknit() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `281`
|
||||
// Estimated: `6050`
|
||||
// Minimum execution time: 16_268_000 picoseconds.
|
||||
Weight::from_parts(16_659_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6050))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
|
||||
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
|
||||
fn service_queue_base() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `42`
|
||||
// Estimated: `3520`
|
||||
// Minimum execution time: 4_901_000 picoseconds.
|
||||
Weight::from_parts(5_262_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3520))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `MessageQueue::Pages` (r:1 w:1)
|
||||
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(131122), added: 133597, mode: `MaxEncodedLen`)
|
||||
fn service_page_base_completion() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `115`
|
||||
// Estimated: `134587`
|
||||
// Minimum execution time: 10_587_000 picoseconds.
|
||||
Weight::from_parts(11_040_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 134587))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `MessageQueue::Pages` (r:1 w:1)
|
||||
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(131122), added: 133597, mode: `MaxEncodedLen`)
|
||||
fn service_page_base_no_completion() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `115`
|
||||
// Estimated: `134587`
|
||||
// Minimum execution time: 10_729_000 picoseconds.
|
||||
Weight::from_parts(11_263_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 134587))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `MessageQueue::BookStateFor` (r:0 w:1)
|
||||
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
|
||||
/// Storage: `MessageQueue::Pages` (r:0 w:1)
|
||||
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(131122), added: 133597, mode: `MaxEncodedLen`)
|
||||
fn service_page_item() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 381_300_000 picoseconds.
|
||||
Weight::from_parts(390_220_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
|
||||
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(6), added: 501, mode: `MaxEncodedLen`)
|
||||
/// Storage: `MessageQueue::BookStateFor` (r:1 w:0)
|
||||
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
|
||||
fn bump_service_head() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `220`
|
||||
// Estimated: `3520`
|
||||
// Minimum execution time: 12_503_000 picoseconds.
|
||||
Weight::from_parts(12_909_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3520))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `MessageQueue::BookStateFor` (r:1 w:0)
|
||||
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
|
||||
/// Storage: `MessageQueue::ServiceHead` (r:0 w:1)
|
||||
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(6), added: 501, mode: `MaxEncodedLen`)
|
||||
fn set_service_head() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `220`
|
||||
// Estimated: `3520`
|
||||
// Minimum execution time: 11_071_000 picoseconds.
|
||||
Weight::from_parts(11_553_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3520))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
|
||||
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
|
||||
/// Storage: `MessageQueue::Pages` (r:1 w:1)
|
||||
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(131122), added: 133597, mode: `MaxEncodedLen`)
|
||||
/// Storage: UNKNOWN KEY `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1)
|
||||
/// Proof: UNKNOWN KEY `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1)
|
||||
/// Storage: UNKNOWN KEY `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1)
|
||||
/// Proof: UNKNOWN KEY `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1)
|
||||
fn reap_page() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `131252`
|
||||
// Estimated: `134587`
|
||||
// Minimum execution time: 162_710_000 picoseconds.
|
||||
Weight::from_parts(166_261_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 134587))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
|
||||
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
|
||||
/// Storage: `MessageQueue::Pages` (r:1 w:1)
|
||||
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(131122), added: 133597, mode: `MaxEncodedLen`)
|
||||
/// Storage: UNKNOWN KEY `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1)
|
||||
/// Proof: UNKNOWN KEY `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1)
|
||||
/// Storage: UNKNOWN KEY `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1)
|
||||
/// Proof: UNKNOWN KEY `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1)
|
||||
fn execute_overweight_page_removed() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `131252`
|
||||
// Estimated: `134587`
|
||||
// Minimum execution time: 200_138_000 picoseconds.
|
||||
Weight::from_parts(210_177_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 134587))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
|
||||
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
|
||||
/// Storage: `MessageQueue::Pages` (r:1 w:1)
|
||||
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(131122), added: 133597, mode: `MaxEncodedLen`)
|
||||
/// Storage: UNKNOWN KEY `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1)
|
||||
/// Proof: UNKNOWN KEY `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1)
|
||||
/// Storage: UNKNOWN KEY `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1)
|
||||
/// Proof: UNKNOWN KEY `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1)
|
||||
fn execute_overweight_page_updated() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `131252`
|
||||
// Estimated: `134587`
|
||||
// Minimum execution time: 275_951_000 picoseconds.
|
||||
Weight::from_parts(284_857_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 134587))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,225 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_migrations`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_migrations
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_migrations`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_migrations::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `MultiBlockMigrations::Cursor` (r:1 w:1)
|
||||
/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
|
||||
/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
|
||||
/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
|
||||
fn onboard_new_mbms() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `133`
|
||||
// Estimated: `67035`
|
||||
// Minimum execution time: 8_277_000 picoseconds.
|
||||
Weight::from_parts(8_720_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 67035))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `MultiBlockMigrations::Cursor` (r:1 w:0)
|
||||
/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
|
||||
fn progress_mbms_none() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `4`
|
||||
// Estimated: `67035`
|
||||
// Minimum execution time: 2_126_000 picoseconds.
|
||||
Weight::from_parts(2_267_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 67035))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
}
|
||||
/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
|
||||
/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
|
||||
/// Storage: `MultiBlockMigrations::Cursor` (r:0 w:1)
|
||||
/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
|
||||
fn exec_migration_completed() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `129`
|
||||
// Estimated: `3594`
|
||||
// Minimum execution time: 6_651_000 picoseconds.
|
||||
Weight::from_parts(6_996_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3594))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
|
||||
/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
|
||||
/// Storage: `MultiBlockMigrations::Historic` (r:1 w:0)
|
||||
/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
|
||||
fn exec_migration_skipped_historic() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `187`
|
||||
// Estimated: `3731`
|
||||
// Minimum execution time: 15_181_000 picoseconds.
|
||||
Weight::from_parts(15_509_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3731))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
}
|
||||
/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
|
||||
/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
|
||||
/// Storage: `MultiBlockMigrations::Historic` (r:1 w:0)
|
||||
/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
|
||||
fn exec_migration_advance() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `133`
|
||||
// Estimated: `3731`
|
||||
// Minimum execution time: 11_200_000 picoseconds.
|
||||
Weight::from_parts(11_718_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3731))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
}
|
||||
/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
|
||||
/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
|
||||
/// Storage: `MultiBlockMigrations::Historic` (r:1 w:1)
|
||||
/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
|
||||
fn exec_migration_complete() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `133`
|
||||
// Estimated: `3731`
|
||||
// Minimum execution time: 12_857_000 picoseconds.
|
||||
Weight::from_parts(13_172_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3731))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
|
||||
/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
|
||||
/// Storage: `MultiBlockMigrations::Historic` (r:1 w:0)
|
||||
/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
|
||||
/// Storage: `MultiBlockMigrations::Cursor` (r:0 w:1)
|
||||
/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
|
||||
fn exec_migration_fail() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `133`
|
||||
// Estimated: `3731`
|
||||
// Minimum execution time: 13_892_000 picoseconds.
|
||||
Weight::from_parts(14_323_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3731))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
fn on_init_loop() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 190_000 picoseconds.
|
||||
Weight::from_parts(230_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// Storage: `MultiBlockMigrations::Cursor` (r:0 w:1)
|
||||
/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
|
||||
fn force_set_cursor() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_820_000 picoseconds.
|
||||
Weight::from_parts(2_944_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `MultiBlockMigrations::Cursor` (r:0 w:1)
|
||||
/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
|
||||
fn force_set_active_cursor() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_222_000 picoseconds.
|
||||
Weight::from_parts(3_478_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `MultiBlockMigrations::Cursor` (r:1 w:0)
|
||||
/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
|
||||
/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
|
||||
/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
|
||||
fn force_onboard_mbms() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `109`
|
||||
// Estimated: `67035`
|
||||
// Minimum execution time: 5_853_000 picoseconds.
|
||||
Weight::from_parts(6_097_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 67035))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
}
|
||||
/// Storage: `MultiBlockMigrations::Historic` (r:256 w:256)
|
||||
/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
|
||||
/// The range of component `n` is `[0, 256]`.
|
||||
fn clear_historic(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `984 + n * (271 ±0)`
|
||||
// Estimated: `3834 + n * (2740 ±0)`
|
||||
// Minimum execution time: 20_676_000 picoseconds.
|
||||
Weight::from_parts(19_067_906, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3834))
|
||||
// Standard Error: 3_366
|
||||
.saturating_add(Weight::from_parts(1_469_069, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
|
||||
.saturating_add(Weight::from_parts(0, 2740).saturating_mul(n.into()))
|
||||
}
|
||||
/// Storage: `Skipped::Metadata` (r:0 w:0)
|
||||
/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// The range of component `n` is `[0, 2048]`.
|
||||
fn reset_pallet_migration(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1676 + n * (38 ±0)`
|
||||
// Estimated: `754 + n * (39 ±0)`
|
||||
// Minimum execution time: 1_916_000 picoseconds.
|
||||
Weight::from_parts(2_009_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 754))
|
||||
// Standard Error: 798
|
||||
.saturating_add(Weight::from_parts(880_656, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
|
||||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
|
||||
.saturating_add(Weight::from_parts(0, 39).saturating_mul(n.into()))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_mmr`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_mmr
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_mmr`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_mmr::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Mmr::NumberOfLeaves` (r:1 w:1)
|
||||
/// Proof: `Mmr::NumberOfLeaves` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::ParentHash` (r:1 w:0)
|
||||
/// Proof: `System::ParentHash` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Paras::Heads` (r:1025 w:0)
|
||||
/// Proof: `Paras::Heads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `BeefyMmrLeaf::BeefyNextAuthorities` (r:1 w:0)
|
||||
/// Proof: `BeefyMmrLeaf::BeefyNextAuthorities` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Mmr::Nodes` (r:7 w:1)
|
||||
/// Proof: `Mmr::Nodes` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Mmr::UseLocalStorage` (r:1 w:0)
|
||||
/// Proof: `Mmr::UseLocalStorage` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Mmr::RootHash` (r:0 w:1)
|
||||
/// Proof: `Mmr::RootHash` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
|
||||
/// The range of component `x` is `[1, 1000]`.
|
||||
fn on_initialize(x: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1071075`
|
||||
// Estimated: `3608924 + x * (8 ±0)`
|
||||
// Minimum execution time: 9_274_662_000 picoseconds.
|
||||
Weight::from_parts(9_403_577_378, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3608924))
|
||||
// Standard Error: 3_804
|
||||
.saturating_add(Weight::from_parts(97_770, 0).saturating_mul(x.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1032))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
.saturating_add(Weight::from_parts(0, 8).saturating_mul(x.into()))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_multisig`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_multisig
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_multisig`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_multisig::WeightInfo for WeightInfo<T> {
|
||||
fn poke_deposit(_s: u32, ) -> Weight {
|
||||
Default::default()
|
||||
}
|
||||
/// The range of component `z` is `[0, 10000]`.
|
||||
fn as_multi_threshold_1(z: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 15_742_000 picoseconds.
|
||||
Weight::from_parts(16_689_158, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 4
|
||||
.saturating_add(Weight::from_parts(425, 0).saturating_mul(z.into()))
|
||||
}
|
||||
/// Storage: `Multisig::Multisigs` (r:1 w:1)
|
||||
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[2, 100]`.
|
||||
/// The range of component `z` is `[0, 10000]`.
|
||||
fn as_multi_create(s: u32, z: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `267 + s * (2 ±0)`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 51_695_000 picoseconds.
|
||||
Weight::from_parts(39_502_473, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 1_991
|
||||
.saturating_add(Weight::from_parts(149_722, 0).saturating_mul(s.into()))
|
||||
// Standard Error: 19
|
||||
.saturating_add(Weight::from_parts(1_920, 0).saturating_mul(z.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Multisig::Multisigs` (r:1 w:1)
|
||||
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[3, 100]`.
|
||||
/// The range of component `z` is `[0, 10000]`.
|
||||
fn as_multi_approve(s: u32, z: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `286`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 36_027_000 picoseconds.
|
||||
Weight::from_parts(23_708_974, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 886
|
||||
.saturating_add(Weight::from_parts(135_578, 0).saturating_mul(s.into()))
|
||||
// Standard Error: 8
|
||||
.saturating_add(Weight::from_parts(1_977, 0).saturating_mul(z.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Multisig::Multisigs` (r:1 w:1)
|
||||
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[2, 100]`.
|
||||
/// The range of component `z` is `[0, 10000]`.
|
||||
fn as_multi_complete(s: u32, z: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `392 + s * (33 ±0)`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 57_964_000 picoseconds.
|
||||
Weight::from_parts(41_322_769, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 1_938
|
||||
.saturating_add(Weight::from_parts(187_486, 0).saturating_mul(s.into()))
|
||||
// Standard Error: 18
|
||||
.saturating_add(Weight::from_parts(2_132, 0).saturating_mul(z.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Multisig::Multisigs` (r:1 w:1)
|
||||
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[2, 100]`.
|
||||
fn approve_as_multi_create(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `267 + s * (2 ±0)`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 35_875_000 picoseconds.
|
||||
Weight::from_parts(37_310_784, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 1_591
|
||||
.saturating_add(Weight::from_parts(162_975, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Multisig::Multisigs` (r:1 w:1)
|
||||
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[2, 100]`.
|
||||
fn approve_as_multi_approve(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `286`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 21_526_000 picoseconds.
|
||||
Weight::from_parts(22_387_339, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 706
|
||||
.saturating_add(Weight::from_parts(146_192, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Multisig::Multisigs` (r:1 w:1)
|
||||
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[2, 100]`.
|
||||
fn cancel_as_multi(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `458 + s * (1 ±0)`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 36_493_000 picoseconds.
|
||||
Weight::from_parts(38_162_969, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 1_164
|
||||
.saturating_add(Weight::from_parts(153_723, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_offences`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_offences
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_offences`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_offences::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Offences::ConcurrentReportsIndex` (r:1 w:1)
|
||||
/// Proof: `Offences::ConcurrentReportsIndex` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Offences::Reports` (r:1 w:1)
|
||||
/// Proof: `Offences::Reports` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Staking::ActiveEra` (r:1 w:0)
|
||||
/// Proof: `Staking::ActiveEra` (`max_values`: Some(1), `max_size`: Some(13), added: 508, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Staking::ErasStartSessionIndex` (r:1 w:0)
|
||||
/// Proof: `Staking::ErasStartSessionIndex` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Staking::Invulnerables` (r:1 w:0)
|
||||
/// Proof: `Staking::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Staking::ErasStakersOverview` (r:1 w:0)
|
||||
/// Proof: `Staking::ErasStakersOverview` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Session::DisabledValidators` (r:1 w:1)
|
||||
/// Proof: `Session::DisabledValidators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Session::Validators` (r:1 w:0)
|
||||
/// Proof: `Session::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Staking::ValidatorSlashInEra` (r:1 w:1)
|
||||
/// Proof: `Staking::ValidatorSlashInEra` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Staking::OffenceQueue` (r:1 w:1)
|
||||
/// Proof: `Staking::OffenceQueue` (`max_values`: None, `max_size`: Some(101), added: 2576, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Staking::OffenceQueueEras` (r:1 w:1)
|
||||
/// Proof: `Staking::OffenceQueueEras` (`max_values`: Some(1), `max_size`: Some(9), added: 504, mode: `MaxEncodedLen`)
|
||||
/// The range of component `n` is `[0, 16]`.
|
||||
fn report_offence_grandpa(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `987`
|
||||
// Estimated: `4452`
|
||||
// Minimum execution time: 59_530_000 picoseconds.
|
||||
Weight::from_parts(63_406_319, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4452))
|
||||
// Standard Error: 9_603
|
||||
.saturating_add(Weight::from_parts(530_243, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(11))
|
||||
.saturating_add(T::DbWeight::get().writes(6))
|
||||
}
|
||||
/// Storage: `Offences::ConcurrentReportsIndex` (r:1 w:1)
|
||||
/// Proof: `Offences::ConcurrentReportsIndex` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Offences::Reports` (r:1 w:1)
|
||||
/// Proof: `Offences::Reports` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Staking::ActiveEra` (r:1 w:0)
|
||||
/// Proof: `Staking::ActiveEra` (`max_values`: Some(1), `max_size`: Some(13), added: 508, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Staking::ErasStartSessionIndex` (r:1 w:0)
|
||||
/// Proof: `Staking::ErasStartSessionIndex` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Staking::Invulnerables` (r:1 w:0)
|
||||
/// Proof: `Staking::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Staking::ErasStakersOverview` (r:1 w:0)
|
||||
/// Proof: `Staking::ErasStakersOverview` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Session::DisabledValidators` (r:1 w:1)
|
||||
/// Proof: `Session::DisabledValidators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Session::Validators` (r:1 w:0)
|
||||
/// Proof: `Session::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Staking::ValidatorSlashInEra` (r:1 w:1)
|
||||
/// Proof: `Staking::ValidatorSlashInEra` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Staking::OffenceQueue` (r:1 w:1)
|
||||
/// Proof: `Staking::OffenceQueue` (`max_values`: None, `max_size`: Some(101), added: 2576, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Staking::OffenceQueueEras` (r:1 w:1)
|
||||
/// Proof: `Staking::OffenceQueueEras` (`max_values`: Some(1), `max_size`: Some(9), added: 504, mode: `MaxEncodedLen`)
|
||||
/// The range of component `n` is `[0, 16]`.
|
||||
fn report_offence_babe(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `987`
|
||||
// Estimated: `4452`
|
||||
// Minimum execution time: 59_407_000 picoseconds.
|
||||
Weight::from_parts(62_842_539, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4452))
|
||||
// Standard Error: 7_722
|
||||
.saturating_add(Weight::from_parts(546_569, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(11))
|
||||
.saturating_add(T::DbWeight::get().writes(6))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_parameters`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_parameters
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_parameters`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_parameters::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Parameters::Parameters` (r:1 w:1)
|
||||
/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
|
||||
fn set_parameter() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `4`
|
||||
// Estimated: `3493`
|
||||
// Minimum execution time: 8_918_000 picoseconds.
|
||||
Weight::from_parts(9_567_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3493))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,269 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_preimage`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_preimage
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_preimage`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_preimage::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Preimage::StatusFor` (r:1 w:0)
|
||||
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
|
||||
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Holds` (r:1 w:1)
|
||||
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::PreimageFor` (r:0 w:1)
|
||||
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[0, 4194304]`.
|
||||
fn note_preimage(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `97`
|
||||
// Estimated: `3568`
|
||||
// Minimum execution time: 53_384_000 picoseconds.
|
||||
Weight::from_parts(54_357_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3568))
|
||||
// Standard Error: 169
|
||||
.saturating_add(Weight::from_parts(17_382, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `Preimage::StatusFor` (r:1 w:0)
|
||||
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
|
||||
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::PreimageFor` (r:0 w:1)
|
||||
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[0, 4194304]`.
|
||||
fn note_requested_preimage(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `106`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 21_147_000 picoseconds.
|
||||
Weight::from_parts(21_420_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
// Standard Error: 169
|
||||
.saturating_add(Weight::from_parts(17_415, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Preimage::StatusFor` (r:1 w:0)
|
||||
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
|
||||
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::PreimageFor` (r:0 w:1)
|
||||
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[0, 4194304]`.
|
||||
fn note_no_deposit_preimage(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `106`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 20_034_000 picoseconds.
|
||||
Weight::from_parts(20_458_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
// Standard Error: 170
|
||||
.saturating_add(Weight::from_parts(17_397, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Preimage::StatusFor` (r:1 w:0)
|
||||
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
|
||||
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Holds` (r:1 w:1)
|
||||
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::PreimageFor` (r:0 w:1)
|
||||
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
|
||||
fn unnote_preimage() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `281`
|
||||
// Estimated: `3568`
|
||||
// Minimum execution time: 72_904_000 picoseconds.
|
||||
Weight::from_parts(75_167_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3568))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `Preimage::StatusFor` (r:1 w:0)
|
||||
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
|
||||
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::PreimageFor` (r:0 w:1)
|
||||
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
|
||||
fn unnote_no_deposit_preimage() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `144`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 43_235_000 picoseconds.
|
||||
Weight::from_parts(47_464_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Preimage::StatusFor` (r:1 w:0)
|
||||
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
|
||||
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
fn request_preimage() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `188`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 35_314_000 picoseconds.
|
||||
Weight::from_parts(38_994_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Preimage::StatusFor` (r:1 w:0)
|
||||
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
|
||||
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
fn request_no_deposit_preimage() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `144`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 32_514_000 picoseconds.
|
||||
Weight::from_parts(34_566_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Preimage::StatusFor` (r:1 w:0)
|
||||
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
|
||||
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
fn request_unnoted_preimage() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `42`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 24_339_000 picoseconds.
|
||||
Weight::from_parts(26_465_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Preimage::StatusFor` (r:1 w:0)
|
||||
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
|
||||
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
fn request_requested_preimage() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `106`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 24_256_000 picoseconds.
|
||||
Weight::from_parts(25_363_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Preimage::StatusFor` (r:1 w:0)
|
||||
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
|
||||
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::PreimageFor` (r:0 w:1)
|
||||
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
|
||||
fn unrequest_preimage() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `144`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 42_454_000 picoseconds.
|
||||
Weight::from_parts(46_055_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Preimage::StatusFor` (r:1 w:0)
|
||||
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
|
||||
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
fn unrequest_unnoted_preimage() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `106`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 24_498_000 picoseconds.
|
||||
Weight::from_parts(26_934_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Preimage::StatusFor` (r:1 w:0)
|
||||
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
|
||||
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
fn unrequest_multi_referenced_preimage() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `106`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 24_328_000 picoseconds.
|
||||
Weight::from_parts(25_802_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Preimage::StatusFor` (r:1023 w:1023)
|
||||
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1023 w:1023)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Holds` (r:1023 w:1023)
|
||||
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::RequestStatusFor` (r:0 w:1023)
|
||||
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// The range of component `n` is `[1, 1024]`.
|
||||
fn ensure_updated(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0 + n * (227 ±0)`
|
||||
// Estimated: `990 + n * (2603 ±0)`
|
||||
// Minimum execution time: 60_700_000 picoseconds.
|
||||
Weight::from_parts(61_580_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 990))
|
||||
// Standard Error: 73_173
|
||||
.saturating_add(Weight::from_parts(60_030_952, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into())))
|
||||
.saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(n.into())))
|
||||
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(n.into()))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,230 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_proxy`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_proxy
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_proxy`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_proxy::WeightInfo for WeightInfo<T> {
|
||||
fn poke_deposit() -> Weight {
|
||||
Default::default()
|
||||
}
|
||||
/// Storage: `Proxy::Proxies` (r:1 w:0)
|
||||
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
|
||||
/// The range of component `p` is `[1, 31]`.
|
||||
fn proxy(p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `89 + p * (37 ±0)`
|
||||
// Estimated: `4706`
|
||||
// Minimum execution time: 17_743_000 picoseconds.
|
||||
Weight::from_parts(18_436_629, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4706))
|
||||
// Standard Error: 2_056
|
||||
.saturating_add(Weight::from_parts(43_916, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
}
|
||||
/// Storage: `Proxy::Proxies` (r:1 w:0)
|
||||
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Proxy::Announcements` (r:1 w:1)
|
||||
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `a` is `[0, 31]`.
|
||||
/// The range of component `p` is `[1, 31]`.
|
||||
fn proxy_announced(a: u32, p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `416 + a * (68 ±0) + p * (37 ±0)`
|
||||
// Estimated: `5698`
|
||||
// Minimum execution time: 41_728_000 picoseconds.
|
||||
Weight::from_parts(42_605_142, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5698))
|
||||
// Standard Error: 2_675
|
||||
.saturating_add(Weight::from_parts(173_815, 0).saturating_mul(a.into()))
|
||||
// Standard Error: 2_764
|
||||
.saturating_add(Weight::from_parts(29_849, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Proxy::Announcements` (r:1 w:1)
|
||||
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `a` is `[0, 31]`.
|
||||
/// The range of component `p` is `[1, 31]`.
|
||||
fn remove_announcement(a: u32, p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `331 + a * (68 ±0)`
|
||||
// Estimated: `5698`
|
||||
// Minimum execution time: 29_396_000 picoseconds.
|
||||
Weight::from_parts(31_069_465, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5698))
|
||||
// Standard Error: 2_248
|
||||
.saturating_add(Weight::from_parts(134_192, 0).saturating_mul(a.into()))
|
||||
// Standard Error: 2_322
|
||||
.saturating_add(Weight::from_parts(7_479, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Proxy::Announcements` (r:1 w:1)
|
||||
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `a` is `[0, 31]`.
|
||||
/// The range of component `p` is `[1, 31]`.
|
||||
fn reject_announcement(a: u32, p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `331 + a * (68 ±0)`
|
||||
// Estimated: `5698`
|
||||
// Minimum execution time: 28_816_000 picoseconds.
|
||||
Weight::from_parts(30_383_460, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5698))
|
||||
// Standard Error: 2_128
|
||||
.saturating_add(Weight::from_parts(157_895, 0).saturating_mul(a.into()))
|
||||
// Standard Error: 2_198
|
||||
.saturating_add(Weight::from_parts(10_169, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Proxy::Proxies` (r:1 w:0)
|
||||
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Proxy::Announcements` (r:1 w:1)
|
||||
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `a` is `[0, 31]`.
|
||||
/// The range of component `p` is `[1, 31]`.
|
||||
fn announce(a: u32, p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `348 + a * (68 ±0) + p * (37 ±0)`
|
||||
// Estimated: `5698`
|
||||
// Minimum execution time: 37_628_000 picoseconds.
|
||||
Weight::from_parts(39_513_043, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5698))
|
||||
// Standard Error: 2_451
|
||||
.saturating_add(Weight::from_parts(149_654, 0).saturating_mul(a.into()))
|
||||
// Standard Error: 2_533
|
||||
.saturating_add(Weight::from_parts(17_215, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Proxy::Proxies` (r:1 w:1)
|
||||
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
|
||||
/// The range of component `p` is `[1, 31]`.
|
||||
fn add_proxy(p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `89 + p * (37 ±0)`
|
||||
// Estimated: `4706`
|
||||
// Minimum execution time: 28_284_000 picoseconds.
|
||||
Weight::from_parts(29_549_215, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4706))
|
||||
// Standard Error: 4_083
|
||||
.saturating_add(Weight::from_parts(61_848, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Proxy::Proxies` (r:1 w:1)
|
||||
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
|
||||
/// The range of component `p` is `[1, 31]`.
|
||||
fn remove_proxy(p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `89 + p * (37 ±0)`
|
||||
// Estimated: `4706`
|
||||
// Minimum execution time: 28_231_000 picoseconds.
|
||||
Weight::from_parts(29_589_594, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4706))
|
||||
// Standard Error: 1_950
|
||||
.saturating_add(Weight::from_parts(54_339, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Proxy::Proxies` (r:1 w:1)
|
||||
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
|
||||
/// The range of component `p` is `[1, 31]`.
|
||||
fn remove_proxies(p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `89 + p * (37 ±0)`
|
||||
// Estimated: `4706`
|
||||
// Minimum execution time: 25_116_000 picoseconds.
|
||||
Weight::from_parts(26_314_944, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4706))
|
||||
// Standard Error: 1_968
|
||||
.saturating_add(Weight::from_parts(39_294, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Proxy::Proxies` (r:1 w:1)
|
||||
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
|
||||
/// The range of component `p` is `[1, 31]`.
|
||||
fn create_pure(p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `101`
|
||||
// Estimated: `4706`
|
||||
// Minimum execution time: 29_742_000 picoseconds.
|
||||
Weight::from_parts(31_063_206, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4706))
|
||||
// Standard Error: 2_575
|
||||
.saturating_add(Weight::from_parts(22_471, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Proxy::Proxies` (r:1 w:1)
|
||||
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
|
||||
/// The range of component `p` is `[0, 30]`.
|
||||
fn kill_pure(p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `126 + p * (37 ±0)`
|
||||
// Estimated: `4706`
|
||||
// Minimum execution time: 26_141_000 picoseconds.
|
||||
Weight::from_parts(27_309_074, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4706))
|
||||
// Standard Error: 1_808
|
||||
.saturating_add(Weight::from_parts(37_564, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,187 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_recovery`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_recovery
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_recovery`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_recovery::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Recovery::Proxy` (r:1 w:0)
|
||||
/// Proof: `Recovery::Proxy` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)
|
||||
fn as_recovered() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `182`
|
||||
// Estimated: `3545`
|
||||
// Minimum execution time: 13_838_000 picoseconds.
|
||||
Weight::from_parts(14_446_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3545))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
}
|
||||
/// Storage: `Recovery::Proxy` (r:0 w:1)
|
||||
/// Proof: `Recovery::Proxy` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)
|
||||
fn set_recovered() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 7_795_000 picoseconds.
|
||||
Weight::from_parts(8_019_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Recovery::Recoverable` (r:1 w:1)
|
||||
/// Proof: `Recovery::Recoverable` (`max_values`: None, `max_size`: Some(351), added: 2826, mode: `MaxEncodedLen`)
|
||||
/// The range of component `n` is `[1, 9]`.
|
||||
fn create_recovery(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `76`
|
||||
// Estimated: `3816`
|
||||
// Minimum execution time: 28_263_000 picoseconds.
|
||||
Weight::from_parts(29_693_842, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3816))
|
||||
// Standard Error: 6_528
|
||||
.saturating_add(Weight::from_parts(122_020, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Recovery::Recoverable` (r:1 w:0)
|
||||
/// Proof: `Recovery::Recoverable` (`max_values`: None, `max_size`: Some(351), added: 2826, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Recovery::ActiveRecoveries` (r:1 w:1)
|
||||
/// Proof: `Recovery::ActiveRecoveries` (`max_values`: None, `max_size`: Some(389), added: 2864, mode: `MaxEncodedLen`)
|
||||
fn initiate_recovery() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `173`
|
||||
// Estimated: `3854`
|
||||
// Minimum execution time: 33_442_000 picoseconds.
|
||||
Weight::from_parts(35_142_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3854))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Recovery::Recoverable` (r:1 w:0)
|
||||
/// Proof: `Recovery::Recoverable` (`max_values`: None, `max_size`: Some(351), added: 2826, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Recovery::ActiveRecoveries` (r:1 w:1)
|
||||
/// Proof: `Recovery::ActiveRecoveries` (`max_values`: None, `max_size`: Some(389), added: 2864, mode: `MaxEncodedLen`)
|
||||
/// The range of component `n` is `[1, 9]`.
|
||||
fn vouch_recovery(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `261 + n * (64 ±0)`
|
||||
// Estimated: `3854`
|
||||
// Minimum execution time: 22_866_000 picoseconds.
|
||||
Weight::from_parts(23_906_291, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3854))
|
||||
// Standard Error: 4_647
|
||||
.saturating_add(Weight::from_parts(182_215, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Recovery::Recoverable` (r:1 w:0)
|
||||
/// Proof: `Recovery::Recoverable` (`max_values`: None, `max_size`: Some(351), added: 2826, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Recovery::ActiveRecoveries` (r:1 w:0)
|
||||
/// Proof: `Recovery::ActiveRecoveries` (`max_values`: None, `max_size`: Some(389), added: 2864, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Recovery::Proxy` (r:1 w:1)
|
||||
/// Proof: `Recovery::Proxy` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)
|
||||
/// The range of component `n` is `[1, 9]`.
|
||||
fn claim_recovery(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `293 + n * (64 ±0)`
|
||||
// Estimated: `3854`
|
||||
// Minimum execution time: 27_549_000 picoseconds.
|
||||
Weight::from_parts(28_695_066, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3854))
|
||||
// Standard Error: 6_024
|
||||
.saturating_add(Weight::from_parts(122_957, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Recovery::ActiveRecoveries` (r:1 w:1)
|
||||
/// Proof: `Recovery::ActiveRecoveries` (`max_values`: None, `max_size`: Some(389), added: 2864, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `n` is `[1, 9]`.
|
||||
fn close_recovery(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `414 + n * (32 ±0)`
|
||||
// Estimated: `3854`
|
||||
// Minimum execution time: 38_880_000 picoseconds.
|
||||
Weight::from_parts(40_901_189, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3854))
|
||||
// Standard Error: 8_408
|
||||
.saturating_add(Weight::from_parts(130_066, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Recovery::ActiveRecoveries` (r:1 w:0)
|
||||
/// Proof: `Recovery::ActiveRecoveries` (`max_values`: None, `max_size`: Some(389), added: 2864, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Recovery::Recoverable` (r:1 w:1)
|
||||
/// Proof: `Recovery::Recoverable` (`max_values`: None, `max_size`: Some(351), added: 2826, mode: `MaxEncodedLen`)
|
||||
/// The range of component `n` is `[1, 9]`.
|
||||
fn remove_recovery(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `170 + n * (32 ±0)`
|
||||
// Estimated: `3854`
|
||||
// Minimum execution time: 32_722_000 picoseconds.
|
||||
Weight::from_parts(34_426_673, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3854))
|
||||
// Standard Error: 7_747
|
||||
.saturating_add(Weight::from_parts(63_348, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Recovery::Proxy` (r:1 w:1)
|
||||
/// Proof: `Recovery::Proxy` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)
|
||||
fn cancel_recovered() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `182`
|
||||
// Estimated: `3545`
|
||||
// Minimum execution time: 15_521_000 picoseconds.
|
||||
Weight::from_parts(15_984_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3545))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,518 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_referenda`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_referenda
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_referenda`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_referenda::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Referenda::ReferendumCount` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:1 w:1)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:0 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
fn submit() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `185`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 40_477_000 picoseconds.
|
||||
Weight::from_parts(41_732_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:2 w:2)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Retries` (r:0 w:1)
|
||||
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
|
||||
fn place_decision_deposit_preparing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `438`
|
||||
// Estimated: `83866`
|
||||
// Minimum execution time: 54_199_000 picoseconds.
|
||||
Weight::from_parts(56_479_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Referenda::DecidingCount` (r:1 w:0)
|
||||
/// Proof: `Referenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Referenda::TrackQueue` (r:1 w:1)
|
||||
/// Proof: `Referenda::TrackQueue` (`max_values`: None, `max_size`: Some(2012), added: 4487, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:1 w:1)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Retries` (r:0 w:1)
|
||||
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
|
||||
fn place_decision_deposit_queued() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `3225`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 68_778_000 picoseconds.
|
||||
Weight::from_parts(71_611_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Referenda::DecidingCount` (r:1 w:0)
|
||||
/// Proof: `Referenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Referenda::TrackQueue` (r:1 w:1)
|
||||
/// Proof: `Referenda::TrackQueue` (`max_values`: None, `max_size`: Some(2012), added: 4487, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:1 w:1)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Retries` (r:0 w:1)
|
||||
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
|
||||
fn place_decision_deposit_not_queued() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `3245`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 67_009_000 picoseconds.
|
||||
Weight::from_parts(69_038_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Referenda::DecidingCount` (r:1 w:1)
|
||||
/// Proof: `Referenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:2 w:2)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Retries` (r:0 w:1)
|
||||
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
|
||||
fn place_decision_deposit_passing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `438`
|
||||
// Estimated: `83866`
|
||||
// Minimum execution time: 64_226_000 picoseconds.
|
||||
Weight::from_parts(66_127_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Referenda::DecidingCount` (r:1 w:1)
|
||||
/// Proof: `Referenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:2 w:2)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Retries` (r:0 w:1)
|
||||
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
|
||||
fn place_decision_deposit_failing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `438`
|
||||
// Estimated: `83866`
|
||||
// Minimum execution time: 62_319_000 picoseconds.
|
||||
Weight::from_parts(63_894_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
fn refund_decision_deposit() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `279`
|
||||
// Estimated: `4401`
|
||||
// Minimum execution time: 32_005_000 picoseconds.
|
||||
Weight::from_parts(32_773_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4401))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
fn refund_submission_deposit() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `269`
|
||||
// Estimated: `4401`
|
||||
// Minimum execution time: 32_438_000 picoseconds.
|
||||
Weight::from_parts(33_359_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4401))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:2 w:2)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Retries` (r:0 w:1)
|
||||
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
|
||||
fn cancel() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `346`
|
||||
// Estimated: `83866`
|
||||
// Minimum execution time: 38_216_000 picoseconds.
|
||||
Weight::from_parts(39_246_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:2 w:2)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Referenda::MetadataOf` (r:1 w:0)
|
||||
/// Proof: `Referenda::MetadataOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Retries` (r:0 w:1)
|
||||
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
|
||||
fn kill() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `690`
|
||||
// Estimated: `83866`
|
||||
// Minimum execution time: 99_147_000 picoseconds.
|
||||
Weight::from_parts(101_951_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: `Referenda::TrackQueue` (r:1 w:0)
|
||||
/// Proof: `Referenda::TrackQueue` (`max_values`: None, `max_size`: Some(2012), added: 4487, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Referenda::DecidingCount` (r:1 w:1)
|
||||
/// Proof: `Referenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
|
||||
fn one_fewer_deciding_queue_empty() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `102`
|
||||
// Estimated: `5477`
|
||||
// Minimum execution time: 10_746_000 picoseconds.
|
||||
Weight::from_parts(11_142_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5477))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Referenda::TrackQueue` (r:1 w:1)
|
||||
/// Proof: `Referenda::TrackQueue` (`max_values`: None, `max_size`: Some(2012), added: 4487, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:1 w:1)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
fn one_fewer_deciding_failing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `3115`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 47_103_000 picoseconds.
|
||||
Weight::from_parts(47_665_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `Referenda::TrackQueue` (r:1 w:1)
|
||||
/// Proof: `Referenda::TrackQueue` (`max_values`: None, `max_size`: Some(2012), added: 4487, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:1 w:1)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
fn one_fewer_deciding_passing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `3115`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 48_466_000 picoseconds.
|
||||
Weight::from_parts(50_411_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:0)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Referenda::TrackQueue` (r:1 w:1)
|
||||
/// Proof: `Referenda::TrackQueue` (`max_values`: None, `max_size`: Some(2012), added: 4487, mode: `MaxEncodedLen`)
|
||||
fn nudge_referendum_requeued_insertion() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `2939`
|
||||
// Estimated: `5477`
|
||||
// Minimum execution time: 22_115_000 picoseconds.
|
||||
Weight::from_parts(22_942_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5477))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:0)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Referenda::TrackQueue` (r:1 w:1)
|
||||
/// Proof: `Referenda::TrackQueue` (`max_values`: None, `max_size`: Some(2012), added: 4487, mode: `MaxEncodedLen`)
|
||||
fn nudge_referendum_requeued_slide() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `2939`
|
||||
// Estimated: `5477`
|
||||
// Minimum execution time: 21_919_000 picoseconds.
|
||||
Weight::from_parts(23_171_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5477))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Referenda::DecidingCount` (r:1 w:0)
|
||||
/// Proof: `Referenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Referenda::TrackQueue` (r:1 w:1)
|
||||
/// Proof: `Referenda::TrackQueue` (`max_values`: None, `max_size`: Some(2012), added: 4487, mode: `MaxEncodedLen`)
|
||||
fn nudge_referendum_queued() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `2943`
|
||||
// Estimated: `5477`
|
||||
// Minimum execution time: 28_236_000 picoseconds.
|
||||
Weight::from_parts(29_173_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5477))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Referenda::DecidingCount` (r:1 w:0)
|
||||
/// Proof: `Referenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Referenda::TrackQueue` (r:1 w:1)
|
||||
/// Proof: `Referenda::TrackQueue` (`max_values`: None, `max_size`: Some(2012), added: 4487, mode: `MaxEncodedLen`)
|
||||
fn nudge_referendum_not_queued() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `2963`
|
||||
// Estimated: `5477`
|
||||
// Minimum execution time: 27_496_000 picoseconds.
|
||||
Weight::from_parts(28_821_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5477))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:1 w:1)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
fn nudge_referendum_no_deposit() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `298`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 27_704_000 picoseconds.
|
||||
Weight::from_parts(28_725_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:1 w:1)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
fn nudge_referendum_preparing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `346`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 27_023_000 picoseconds.
|
||||
Weight::from_parts(27_790_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
fn nudge_referendum_timed_out() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `206`
|
||||
// Estimated: `4401`
|
||||
// Minimum execution time: 17_950_000 picoseconds.
|
||||
Weight::from_parts(18_748_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4401))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Referenda::DecidingCount` (r:1 w:1)
|
||||
/// Proof: `Referenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:1 w:1)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
fn nudge_referendum_begin_deciding_failing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `346`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 34_445_000 picoseconds.
|
||||
Weight::from_parts(35_513_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Referenda::DecidingCount` (r:1 w:1)
|
||||
/// Proof: `Referenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:1 w:1)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
fn nudge_referendum_begin_deciding_passing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `346`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 36_060_000 picoseconds.
|
||||
Weight::from_parts(37_467_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:1 w:1)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
fn nudge_referendum_begin_confirming() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `399`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 28_267_000 picoseconds.
|
||||
Weight::from_parts(29_089_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:1 w:1)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
fn nudge_referendum_end_confirming() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `382`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 28_121_000 picoseconds.
|
||||
Weight::from_parts(28_786_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:1 w:1)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
fn nudge_referendum_continue_not_confirming() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `399`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 26_833_000 picoseconds.
|
||||
Weight::from_parts(27_752_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:1 w:1)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
fn nudge_referendum_continue_confirming() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `403`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 25_584_000 picoseconds.
|
||||
Weight::from_parts(26_368_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:2 w:2)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Lookup` (r:1 w:1)
|
||||
/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||
fn nudge_referendum_approved() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `403`
|
||||
// Estimated: `83866`
|
||||
// Minimum execution time: 39_108_000 picoseconds.
|
||||
Weight::from_parts(40_227_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:1 w:1)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
fn nudge_referendum_rejected() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `399`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 28_038_000 picoseconds.
|
||||
Weight::from_parts(28_536_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:0)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::StatusFor` (r:1 w:0)
|
||||
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::RequestStatusFor` (r:1 w:0)
|
||||
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Referenda::MetadataOf` (r:0 w:1)
|
||||
/// Proof: `Referenda::MetadataOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
|
||||
fn set_some_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `350`
|
||||
// Estimated: `4401`
|
||||
// Minimum execution time: 25_211_000 picoseconds.
|
||||
Weight::from_parts(26_519_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4401))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:0)
|
||||
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Referenda::MetadataOf` (r:1 w:1)
|
||||
/// Proof: `Referenda::MetadataOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
|
||||
fn clear_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `283`
|
||||
// Estimated: `4401`
|
||||
// Minimum execution time: 20_464_000 picoseconds.
|
||||
Weight::from_parts(21_232_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4401))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
+523
@@ -0,0 +1,523 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_referenda`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/pezkuwi
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pezpallet_referenda
|
||||
// --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)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_referenda`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_referenda::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: Referenda ReferendumCount (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
/// Storage: Referenda ReferendumInfoFor (r:0 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
fn submit() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `186`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 39_146_000 picoseconds.
|
||||
Weight::from_parts(40_383_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:2 w:2)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn place_decision_deposit_preparing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `439`
|
||||
// Estimated: `83866`
|
||||
// Minimum execution time: 51_385_000 picoseconds.
|
||||
Weight::from_parts(52_701_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Referenda DecidingCount (r:1 w:0)
|
||||
/// Proof: Referenda DecidingCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: Referenda TrackQueue (r:1 w:1)
|
||||
/// Proof: Referenda TrackQueue (max_values: None, max_size: Some(2012), added: 4487, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn place_decision_deposit_queued() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `3196`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 70_018_000 picoseconds.
|
||||
Weight::from_parts(75_868_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Referenda DecidingCount (r:1 w:0)
|
||||
/// Proof: Referenda DecidingCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: Referenda TrackQueue (r:1 w:1)
|
||||
/// Proof: Referenda TrackQueue (max_values: None, max_size: Some(2012), added: 4487, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn place_decision_deposit_not_queued() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `3216`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 69_311_000 picoseconds.
|
||||
Weight::from_parts(72_425_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Referenda DecidingCount (r:1 w:1)
|
||||
/// Proof: Referenda DecidingCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: Balances InactiveIssuance (r:1 w:0)
|
||||
/// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:2 w:2)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn place_decision_deposit_passing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `439`
|
||||
// Estimated: `83866`
|
||||
// Minimum execution time: 64_385_000 picoseconds.
|
||||
Weight::from_parts(66_178_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Referenda DecidingCount (r:1 w:1)
|
||||
/// Proof: Referenda DecidingCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: Balances InactiveIssuance (r:1 w:0)
|
||||
/// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:2 w:2)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn place_decision_deposit_failing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `439`
|
||||
// Estimated: `83866`
|
||||
// Minimum execution time: 62_200_000 picoseconds.
|
||||
Weight::from_parts(63_782_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
fn refund_decision_deposit() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `279`
|
||||
// Estimated: `4401`
|
||||
// Minimum execution time: 29_677_000 picoseconds.
|
||||
Weight::from_parts(30_603_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4401))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
fn refund_submission_deposit() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `269`
|
||||
// Estimated: `4401`
|
||||
// Minimum execution time: 29_897_000 picoseconds.
|
||||
Weight::from_parts(30_618_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4401))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:2 w:2)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn cancel() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `347`
|
||||
// Estimated: `83866`
|
||||
// Minimum execution time: 37_697_000 picoseconds.
|
||||
Weight::from_parts(38_953_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:2 w:2)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
/// Storage: Referenda MetadataOf (r:1 w:0)
|
||||
/// Proof: Referenda MetadataOf (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen)
|
||||
fn kill() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `588`
|
||||
// Estimated: `83866`
|
||||
// Minimum execution time: 106_001_000 picoseconds.
|
||||
Weight::from_parts(107_102_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: Referenda TrackQueue (r:1 w:0)
|
||||
/// Proof: Referenda TrackQueue (max_values: None, max_size: Some(2012), added: 4487, mode: MaxEncodedLen)
|
||||
/// Storage: Referenda DecidingCount (r:1 w:1)
|
||||
/// Proof: Referenda DecidingCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
fn one_fewer_deciding_queue_empty() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `102`
|
||||
// Estimated: `5477`
|
||||
// Minimum execution time: 8_987_000 picoseconds.
|
||||
Weight::from_parts(9_431_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5477))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Referenda TrackQueue (r:1 w:1)
|
||||
/// Proof: Referenda TrackQueue (max_values: None, max_size: Some(2012), added: 4487, mode: MaxEncodedLen)
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Balances InactiveIssuance (r:1 w:0)
|
||||
/// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn one_fewer_deciding_failing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `3116`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 55_344_000 picoseconds.
|
||||
Weight::from_parts(58_026_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: Referenda TrackQueue (r:1 w:1)
|
||||
/// Proof: Referenda TrackQueue (max_values: None, max_size: Some(2012), added: 4487, mode: MaxEncodedLen)
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Balances InactiveIssuance (r:1 w:0)
|
||||
/// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn one_fewer_deciding_passing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `3116`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 57_003_000 picoseconds.
|
||||
Weight::from_parts(60_347_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:0)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Referenda TrackQueue (r:1 w:1)
|
||||
/// Proof: Referenda TrackQueue (max_values: None, max_size: Some(2012), added: 4487, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_requeued_insertion() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `2939`
|
||||
// Estimated: `5477`
|
||||
// Minimum execution time: 23_001_000 picoseconds.
|
||||
Weight::from_parts(24_812_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5477))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:0)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Referenda TrackQueue (r:1 w:1)
|
||||
/// Proof: Referenda TrackQueue (max_values: None, max_size: Some(2012), added: 4487, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_requeued_slide() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `2939`
|
||||
// Estimated: `5477`
|
||||
// Minimum execution time: 23_299_000 picoseconds.
|
||||
Weight::from_parts(24_465_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5477))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Referenda DecidingCount (r:1 w:0)
|
||||
/// Proof: Referenda DecidingCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: Referenda TrackQueue (r:1 w:1)
|
||||
/// Proof: Referenda TrackQueue (max_values: None, max_size: Some(2012), added: 4487, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_queued() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `2943`
|
||||
// Estimated: `5477`
|
||||
// Minimum execution time: 28_223_000 picoseconds.
|
||||
Weight::from_parts(29_664_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5477))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Referenda DecidingCount (r:1 w:0)
|
||||
/// Proof: Referenda DecidingCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: Referenda TrackQueue (r:1 w:1)
|
||||
/// Proof: Referenda TrackQueue (max_values: None, max_size: Some(2012), added: 4487, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_not_queued() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `2963`
|
||||
// Estimated: `5477`
|
||||
// Minimum execution time: 27_474_000 picoseconds.
|
||||
Weight::from_parts(29_072_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5477))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_no_deposit() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `299`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 24_405_000 picoseconds.
|
||||
Weight::from_parts(25_184_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_preparing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `347`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 24_572_000 picoseconds.
|
||||
Weight::from_parts(25_287_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_timed_out() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `206`
|
||||
// Estimated: `4401`
|
||||
// Minimum execution time: 16_042_000 picoseconds.
|
||||
Weight::from_parts(16_610_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4401))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Referenda DecidingCount (r:1 w:1)
|
||||
/// Proof: Referenda DecidingCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: Balances InactiveIssuance (r:1 w:0)
|
||||
/// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_begin_deciding_failing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `347`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 33_639_000 picoseconds.
|
||||
Weight::from_parts(34_749_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Referenda DecidingCount (r:1 w:1)
|
||||
/// Proof: Referenda DecidingCount (max_values: None, max_size: Some(14), added: 2489, mode: MaxEncodedLen)
|
||||
/// Storage: Balances InactiveIssuance (r:1 w:0)
|
||||
/// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_begin_deciding_passing() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `347`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 36_467_000 picoseconds.
|
||||
Weight::from_parts(37_693_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Balances InactiveIssuance (r:1 w:0)
|
||||
/// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_begin_confirming() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `400`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 29_857_000 picoseconds.
|
||||
Weight::from_parts(30_840_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Balances InactiveIssuance (r:1 w:0)
|
||||
/// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_end_confirming() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `383`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 31_028_000 picoseconds.
|
||||
Weight::from_parts(32_154_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Balances InactiveIssuance (r:1 w:0)
|
||||
/// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_continue_not_confirming() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `400`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 28_594_000 picoseconds.
|
||||
Weight::from_parts(29_092_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Balances InactiveIssuance (r:1 w:0)
|
||||
/// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_continue_confirming() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `404`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 27_246_000 picoseconds.
|
||||
Weight::from_parts(28_003_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Balances InactiveIssuance (r:1 w:0)
|
||||
/// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:2 w:2)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Lookup (r:1 w:1)
|
||||
/// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_approved() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `404`
|
||||
// Estimated: `83866`
|
||||
// Minimum execution time: 43_426_000 picoseconds.
|
||||
Weight::from_parts(44_917_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 83866))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:1)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Balances InactiveIssuance (r:1 w:0)
|
||||
/// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: Scheduler Agenda (r:1 w:1)
|
||||
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(38963), added: 41438, mode: MaxEncodedLen)
|
||||
fn nudge_referendum_rejected() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `400`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 30_285_000 picoseconds.
|
||||
Weight::from_parts(31_575_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:0)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Preimage StatusFor (r:1 w:0)
|
||||
/// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen)
|
||||
/// Storage: Referenda MetadataOf (r:0 w:1)
|
||||
/// Proof: Referenda MetadataOf (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen)
|
||||
fn set_some_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `350`
|
||||
// Estimated: `4401`
|
||||
// Minimum execution time: 19_254_000 picoseconds.
|
||||
Weight::from_parts(19_855_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4401))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: Referenda ReferendumInfoFor (r:1 w:0)
|
||||
/// Proof: Referenda ReferendumInfoFor (max_values: None, max_size: Some(936), added: 3411, mode: MaxEncodedLen)
|
||||
/// Storage: Referenda MetadataOf (r:1 w:1)
|
||||
/// Proof: Referenda MetadataOf (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen)
|
||||
fn clear_metadata() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `283`
|
||||
// Estimated: `4401`
|
||||
// Minimum execution time: 16_957_000 picoseconds.
|
||||
Weight::from_parts(17_556_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4401))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,291 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_scheduler`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_scheduler
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_scheduler`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_scheduler::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Scheduler::IncompleteSince` (r:1 w:1)
|
||||
/// Proof: `Scheduler::IncompleteSince` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
fn service_agendas_base() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `68`
|
||||
// Estimated: `1489`
|
||||
// Minimum execution time: 4_441_000 picoseconds.
|
||||
Weight::from_parts(4_623_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1489))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Scheduler::Agenda` (r:1 w:1)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[0, 50]`.
|
||||
fn service_agenda_base(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `115 + s * (177 ±0)`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 4_664_000 picoseconds.
|
||||
Weight::from_parts(11_471_926, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
// Standard Error: 3_126
|
||||
.saturating_add(Weight::from_parts(360_894, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
fn service_task_base() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_795_000 picoseconds.
|
||||
Weight::from_parts(4_029_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// Storage: `Preimage::PreimageFor` (r:1 w:1)
|
||||
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`)
|
||||
/// Storage: `Preimage::StatusFor` (r:1 w:0)
|
||||
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
|
||||
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[128, 4194304]`.
|
||||
fn service_task_fetched(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `179 + s * (1 ±0)`
|
||||
// Estimated: `3644 + s * (1 ±0)`
|
||||
// Minimum execution time: 24_224_000 picoseconds.
|
||||
Weight::from_parts(24_784_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3644))
|
||||
// Standard Error: 343
|
||||
.saturating_add(Weight::from_parts(30_390, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
.saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into()))
|
||||
}
|
||||
/// Storage: `Scheduler::Lookup` (r:0 w:1)
|
||||
/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||
fn service_task_named() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 5_459_000 picoseconds.
|
||||
Weight::from_parts(5_847_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
fn service_task_periodic() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_816_000 picoseconds.
|
||||
Weight::from_parts(3_937_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn execute_dispatch_signed() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_306_000 picoseconds.
|
||||
Weight::from_parts(2_511_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn execute_dispatch_unsigned() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_296_000 picoseconds.
|
||||
Weight::from_parts(2_431_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// Storage: `Scheduler::Agenda` (r:1 w:1)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[0, 49]`.
|
||||
fn schedule(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `115 + s * (177 ±0)`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 12_204_000 picoseconds.
|
||||
Weight::from_parts(18_541_327, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
// Standard Error: 3_093
|
||||
.saturating_add(Weight::from_parts(407_367, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Scheduler::Agenda` (r:1 w:1)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Retries` (r:0 w:1)
|
||||
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Lookup` (r:0 w:1)
|
||||
/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[1, 50]`.
|
||||
fn cancel(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `115 + s * (177 ±0)`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 20_962_000 picoseconds.
|
||||
Weight::from_parts(21_273_113, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
// Standard Error: 1_869
|
||||
.saturating_add(Weight::from_parts(593_800, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `Scheduler::Lookup` (r:1 w:1)
|
||||
/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:1 w:1)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[0, 49]`.
|
||||
fn schedule_named(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `292 + s * (185 ±0)`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 15_672_000 picoseconds.
|
||||
Weight::from_parts(23_639_859, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
// Standard Error: 4_219
|
||||
.saturating_add(Weight::from_parts(467_925, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Scheduler::Lookup` (r:1 w:1)
|
||||
/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:1 w:1)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Retries` (r:0 w:1)
|
||||
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[1, 50]`.
|
||||
fn cancel_named(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `318 + s * (185 ±0)`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 23_671_000 picoseconds.
|
||||
Weight::from_parts(24_871_802, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
// Standard Error: 1_859
|
||||
.saturating_add(Weight::from_parts(629_450, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `Scheduler::Agenda` (r:1 w:1)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Retries` (r:0 w:1)
|
||||
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[1, 50]`.
|
||||
fn schedule_retry(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `155`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 14_919_000 picoseconds.
|
||||
Weight::from_parts(15_402_950, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
// Standard Error: 751
|
||||
.saturating_add(Weight::from_parts(30_479, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Scheduler::Agenda` (r:1 w:0)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Retries` (r:0 w:1)
|
||||
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
|
||||
fn set_retry() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `8965`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 30_185_000 picoseconds.
|
||||
Weight::from_parts(31_937_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Scheduler::Lookup` (r:1 w:0)
|
||||
/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:1 w:0)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Retries` (r:0 w:1)
|
||||
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
|
||||
fn set_retry_named() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `9643`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 38_375_000 picoseconds.
|
||||
Weight::from_parts(39_701_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Scheduler::Agenda` (r:1 w:0)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Retries` (r:0 w:1)
|
||||
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
|
||||
fn cancel_retry() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `8977`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 29_797_000 picoseconds.
|
||||
Weight::from_parts(30_298_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Scheduler::Lookup` (r:1 w:0)
|
||||
/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Agenda` (r:1 w:0)
|
||||
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Scheduler::Retries` (r:0 w:1)
|
||||
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
|
||||
fn cancel_retry_named() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `9655`
|
||||
// Estimated: `42428`
|
||||
// Minimum execution time: 37_375_000 picoseconds.
|
||||
Weight::from_parts(38_679_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 42428))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_session`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_session
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_session`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_session::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Staking::Ledger` (r:1 w:0)
|
||||
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Session::NextKeys` (r:1 w:1)
|
||||
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Session::KeyOwner` (r:6 w:6)
|
||||
/// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn set_keys() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1899`
|
||||
// Estimated: `17739`
|
||||
// Minimum execution time: 71_274_000 picoseconds.
|
||||
Weight::from_parts(73_693_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 17739))
|
||||
.saturating_add(T::DbWeight::get().reads(8))
|
||||
.saturating_add(T::DbWeight::get().writes(7))
|
||||
}
|
||||
/// Storage: `Staking::Ledger` (r:1 w:0)
|
||||
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Session::NextKeys` (r:1 w:1)
|
||||
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Session::KeyOwner` (r:0 w:6)
|
||||
/// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn purge_keys() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1814`
|
||||
// Estimated: `5279`
|
||||
// Minimum execution time: 52_441_000 picoseconds.
|
||||
Weight::from_parts(55_437_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5279))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(7))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_sudo`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_sudo
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_sudo`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_sudo::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Sudo::Key` (r:1 w:1)
|
||||
/// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
|
||||
fn set_key() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `165`
|
||||
// Estimated: `1517`
|
||||
// Minimum execution time: 14_510_000 picoseconds.
|
||||
Weight::from_parts(15_008_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1517))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Sudo::Key` (r:1 w:0)
|
||||
/// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
|
||||
fn sudo() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `165`
|
||||
// Estimated: `1517`
|
||||
// Minimum execution time: 15_250_000 picoseconds.
|
||||
Weight::from_parts(15_782_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1517))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
}
|
||||
/// Storage: `Sudo::Key` (r:1 w:0)
|
||||
/// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
|
||||
fn sudo_as() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `165`
|
||||
// Estimated: `1517`
|
||||
// Minimum execution time: 15_455_000 picoseconds.
|
||||
Weight::from_parts(16_025_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1517))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
}
|
||||
/// Storage: `Sudo::Key` (r:1 w:1)
|
||||
/// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
|
||||
fn remove_key() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `165`
|
||||
// Estimated: `1517`
|
||||
// Minimum execution time: 13_514_000 picoseconds.
|
||||
Weight::from_parts(14_155_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1517))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Sudo::Key` (r:1 w:0)
|
||||
/// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
|
||||
fn check_only_sudo_account() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `165`
|
||||
// Estimated: `1517`
|
||||
// Minimum execution time: 7_772_000 picoseconds.
|
||||
Weight::from_parts(8_189_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1517))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_timestamp`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_timestamp
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_timestamp`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_timestamp::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Timestamp::Now` (r:1 w:1)
|
||||
/// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Babe::CurrentSlot` (r:1 w:0)
|
||||
/// Proof: `Babe::CurrentSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
|
||||
fn set() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `173`
|
||||
// Estimated: `1493`
|
||||
// Minimum execution time: 12_078_000 picoseconds.
|
||||
Weight::from_parts(12_823_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1493))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
fn on_finalize() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `94`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 4_639_000 picoseconds.
|
||||
Weight::from_parts(4_786_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_transaction_payment`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_transaction_payment
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_transaction_payment`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_transaction_payment::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn charge_transaction_payment() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `101`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 42_713_000 picoseconds.
|
||||
Weight::from_parts(43_379_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_treasury`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_treasury
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_treasury`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_treasury::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Treasury::ProposalCount` (r:1 w:1)
|
||||
/// Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Treasury::Approvals` (r:1 w:1)
|
||||
/// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Treasury::Proposals` (r:0 w:1)
|
||||
/// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`)
|
||||
fn spend_local() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `142`
|
||||
// Estimated: `1887`
|
||||
// Minimum execution time: 13_064_000 picoseconds.
|
||||
Weight::from_parts(13_610_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1887))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `Treasury::Approvals` (r:1 w:1)
|
||||
/// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
|
||||
fn remove_approval() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `227`
|
||||
// Estimated: `1887`
|
||||
// Minimum execution time: 7_097_000 picoseconds.
|
||||
Weight::from_parts(7_538_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1887))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `System::Account` (r:1 w:0)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Treasury::Deactivated` (r:1 w:1)
|
||||
/// Proof: `Treasury::Deactivated` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Treasury::LastSpendPeriod` (r:1 w:1)
|
||||
/// Proof: `Treasury::LastSpendPeriod` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
/// The range of component `p` is `[0, 99]`.
|
||||
fn on_initialize_proposals(p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `350 + p * (1 ±0)`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 17_293_000 picoseconds.
|
||||
Weight::from_parts(20_649_783, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
// Standard Error: 1_076
|
||||
.saturating_add(Weight::from_parts(61_157, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `AssetRate::ConversionRateToNative` (r:1 w:0)
|
||||
/// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Treasury::SpendCount` (r:1 w:1)
|
||||
/// Proof: `Treasury::SpendCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Treasury::Spends` (r:0 w:1)
|
||||
/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`)
|
||||
fn spend() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `214`
|
||||
// Estimated: `4703`
|
||||
// Minimum execution time: 23_796_000 picoseconds.
|
||||
Weight::from_parts(24_793_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4703))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Treasury::Spends` (r:1 w:1)
|
||||
/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`)
|
||||
/// Storage: `XcmPallet::QueryCounter` (r:1 w:1)
|
||||
/// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
|
||||
/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Paras::Heads` (r:1 w:0)
|
||||
/// Proof: `Paras::Heads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::Queries` (r:0 w:1)
|
||||
/// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn payout() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `489`
|
||||
// Estimated: `5318`
|
||||
// Minimum execution time: 60_562_000 picoseconds.
|
||||
Weight::from_parts(62_867_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5318))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: `Treasury::Spends` (r:1 w:1)
|
||||
/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`)
|
||||
/// Storage: `XcmPallet::Queries` (r:1 w:1)
|
||||
/// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn check_status() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `305`
|
||||
// Estimated: `5318`
|
||||
// Minimum execution time: 28_594_000 picoseconds.
|
||||
Weight::from_parts(29_512_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5318))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Treasury::Spends` (r:1 w:1)
|
||||
/// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`)
|
||||
fn void_spend() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `277`
|
||||
// Estimated: `5318`
|
||||
// Minimum execution time: 18_432_000 picoseconds.
|
||||
Weight::from_parts(19_026_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5318))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_utility`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_utility
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_utility`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_utility::WeightInfo for WeightInfo<T> {
|
||||
/// The range of component `c` is `[0, 1000]`.
|
||||
fn batch(c: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 5_587_000 picoseconds.
|
||||
Weight::from_parts(5_743_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 1_917
|
||||
.saturating_add(Weight::from_parts(3_621_902, 0).saturating_mul(c.into()))
|
||||
}
|
||||
fn as_derivative() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 4_464_000 picoseconds.
|
||||
Weight::from_parts(4_707_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// The range of component `c` is `[0, 1000]`.
|
||||
fn batch_all(c: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 5_481_000 picoseconds.
|
||||
Weight::from_parts(5_555_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 2_110
|
||||
.saturating_add(Weight::from_parts(3_847_534, 0).saturating_mul(c.into()))
|
||||
}
|
||||
fn dispatch_as() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 7_415_000 picoseconds.
|
||||
Weight::from_parts(7_617_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// The range of component `c` is `[0, 1000]`.
|
||||
fn force_batch(c: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 5_332_000 picoseconds.
|
||||
Weight::from_parts(5_576_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 2_069
|
||||
.saturating_add(Weight::from_parts(3_625_441, 0).saturating_mul(c.into()))
|
||||
}
|
||||
fn dispatch_as_fallible() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 7_330_000 picoseconds.
|
||||
Weight::from_parts(7_583_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn if_else() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 8_846_000 picoseconds.
|
||||
Weight::from_parts(9_337_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,262 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_vesting`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_vesting
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_vesting`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_vesting::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Vesting::Vesting` (r:1 w:1)
|
||||
/// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Locks` (r:1 w:1)
|
||||
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Freezes` (r:1 w:0)
|
||||
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||
/// The range of component `l` is `[0, 49]`.
|
||||
/// The range of component `s` is `[1, 28]`.
|
||||
fn vest_locked(l: u32, s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `345 + l * (25 ±0) + s * (36 ±0)`
|
||||
// Estimated: `4764`
|
||||
// Minimum execution time: 38_225_000 picoseconds.
|
||||
Weight::from_parts(37_860_470, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4764))
|
||||
// Standard Error: 1_479
|
||||
.saturating_add(Weight::from_parts(41_149, 0).saturating_mul(l.into()))
|
||||
// Standard Error: 2_631
|
||||
.saturating_add(Weight::from_parts(76_064, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Vesting::Vesting` (r:1 w:1)
|
||||
/// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Locks` (r:1 w:1)
|
||||
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Freezes` (r:1 w:0)
|
||||
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||
/// The range of component `l` is `[0, 49]`.
|
||||
/// The range of component `s` is `[1, 28]`.
|
||||
fn vest_unlocked(l: u32, s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `345 + l * (25 ±0) + s * (36 ±0)`
|
||||
// Estimated: `4764`
|
||||
// Minimum execution time: 40_682_000 picoseconds.
|
||||
Weight::from_parts(40_558_815, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4764))
|
||||
// Standard Error: 1_473
|
||||
.saturating_add(Weight::from_parts(35_138, 0).saturating_mul(l.into()))
|
||||
// Standard Error: 2_620
|
||||
.saturating_add(Weight::from_parts(72_425, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Vesting::Vesting` (r:1 w:1)
|
||||
/// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Locks` (r:1 w:1)
|
||||
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Freezes` (r:1 w:0)
|
||||
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `l` is `[0, 49]`.
|
||||
/// The range of component `s` is `[1, 28]`.
|
||||
fn vest_other_locked(l: u32, s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `448 + l * (25 ±0) + s * (36 ±0)`
|
||||
// Estimated: `4764`
|
||||
// Minimum execution time: 40_813_000 picoseconds.
|
||||
Weight::from_parts(40_248_990, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4764))
|
||||
// Standard Error: 1_925
|
||||
.saturating_add(Weight::from_parts(47_778, 0).saturating_mul(l.into()))
|
||||
// Standard Error: 3_425
|
||||
.saturating_add(Weight::from_parts(88_421, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `Vesting::Vesting` (r:1 w:1)
|
||||
/// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Locks` (r:1 w:1)
|
||||
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Freezes` (r:1 w:0)
|
||||
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `l` is `[0, 49]`.
|
||||
/// The range of component `s` is `[1, 28]`.
|
||||
fn vest_other_unlocked(l: u32, s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `448 + l * (25 ±0) + s * (36 ±0)`
|
||||
// Estimated: `4764`
|
||||
// Minimum execution time: 43_330_000 picoseconds.
|
||||
Weight::from_parts(43_588_745, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4764))
|
||||
// Standard Error: 2_075
|
||||
.saturating_add(Weight::from_parts(35_838, 0).saturating_mul(l.into()))
|
||||
// Standard Error: 3_693
|
||||
.saturating_add(Weight::from_parts(73_951, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `Vesting::Vesting` (r:1 w:1)
|
||||
/// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Locks` (r:1 w:1)
|
||||
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Freezes` (r:1 w:0)
|
||||
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||
/// The range of component `l` is `[0, 49]`.
|
||||
/// The range of component `s` is `[0, 27]`.
|
||||
fn vested_transfer(l: u32, s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `519 + l * (25 ±0) + s * (36 ±0)`
|
||||
// Estimated: `4764`
|
||||
// Minimum execution time: 80_026_000 picoseconds.
|
||||
Weight::from_parts(82_148_674, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4764))
|
||||
// Standard Error: 3_243
|
||||
.saturating_add(Weight::from_parts(30_866, 0).saturating_mul(l.into()))
|
||||
// Standard Error: 5_770
|
||||
.saturating_add(Weight::from_parts(99_755, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `Vesting::Vesting` (r:1 w:1)
|
||||
/// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:2 w:2)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Locks` (r:1 w:1)
|
||||
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Freezes` (r:1 w:0)
|
||||
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||
/// The range of component `l` is `[0, 49]`.
|
||||
/// The range of component `s` is `[0, 27]`.
|
||||
fn force_vested_transfer(l: u32, s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `622 + l * (25 ±0) + s * (36 ±0)`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 81_979_000 picoseconds.
|
||||
Weight::from_parts(83_373_383, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
// Standard Error: 3_069
|
||||
.saturating_add(Weight::from_parts(49_002, 0).saturating_mul(l.into()))
|
||||
// Standard Error: 5_460
|
||||
.saturating_add(Weight::from_parts(105_265, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `Vesting::Vesting` (r:1 w:1)
|
||||
/// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Locks` (r:1 w:1)
|
||||
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Freezes` (r:1 w:0)
|
||||
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||
/// The range of component `l` is `[0, 49]`.
|
||||
/// The range of component `s` is `[2, 28]`.
|
||||
fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `345 + l * (25 ±0) + s * (36 ±0)`
|
||||
// Estimated: `4764`
|
||||
// Minimum execution time: 39_190_000 picoseconds.
|
||||
Weight::from_parts(38_673_517, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4764))
|
||||
// Standard Error: 1_789
|
||||
.saturating_add(Weight::from_parts(38_146, 0).saturating_mul(l.into()))
|
||||
// Standard Error: 3_305
|
||||
.saturating_add(Weight::from_parts(97_870, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Vesting::Vesting` (r:1 w:1)
|
||||
/// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Locks` (r:1 w:1)
|
||||
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Freezes` (r:1 w:0)
|
||||
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||
/// The range of component `l` is `[0, 49]`.
|
||||
/// The range of component `s` is `[2, 28]`.
|
||||
fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `345 + l * (25 ±0) + s * (36 ±0)`
|
||||
// Estimated: `4764`
|
||||
// Minimum execution time: 42_229_000 picoseconds.
|
||||
Weight::from_parts(42_040_081, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4764))
|
||||
// Standard Error: 1_659
|
||||
.saturating_add(Weight::from_parts(38_531, 0).saturating_mul(l.into()))
|
||||
// Standard Error: 3_065
|
||||
.saturating_add(Weight::from_parts(76_527, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Vesting::Vesting` (r:1 w:1)
|
||||
/// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Locks` (r:1 w:1)
|
||||
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Balances::Freezes` (r:1 w:0)
|
||||
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `l` is `[0, 49]`.
|
||||
/// The range of component `s` is `[2, 28]`.
|
||||
fn force_remove_vesting_schedule(l: u32, s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `519 + l * (25 ±0) + s * (36 ±0)`
|
||||
// Estimated: `4764`
|
||||
// Minimum execution time: 46_474_000 picoseconds.
|
||||
Weight::from_parts(46_105_020, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4764))
|
||||
// Standard Error: 1_706
|
||||
.saturating_add(Weight::from_parts(39_879, 0).saturating_mul(l.into()))
|
||||
// Standard Error: 3_151
|
||||
.saturating_add(Weight::from_parts(87_824, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_whitelist`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_whitelist
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_whitelist`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_whitelist::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
|
||||
/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::StatusFor` (r:1 w:0)
|
||||
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
|
||||
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
fn whitelist_call() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `118`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 23_699_000 picoseconds.
|
||||
Weight::from_parts(24_759_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
|
||||
/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::StatusFor` (r:1 w:0)
|
||||
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
|
||||
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
fn remove_whitelisted_call() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `247`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 24_245_000 picoseconds.
|
||||
Weight::from_parts(25_258_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
|
||||
/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::PreimageFor` (r:1 w:1)
|
||||
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`)
|
||||
/// Storage: `Preimage::StatusFor` (r:1 w:0)
|
||||
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
|
||||
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// The range of component `n` is `[1, 4194294]`.
|
||||
fn dispatch_whitelisted_call(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `323 + n * (1 ±0)`
|
||||
// Estimated: `3787 + n * (1 ±0)`
|
||||
// Minimum execution time: 35_734_000 picoseconds.
|
||||
Weight::from_parts(36_868_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3787))
|
||||
// Standard Error: 344
|
||||
.saturating_add(Weight::from_parts(31_003, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
|
||||
}
|
||||
/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
|
||||
/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::StatusFor` (r:1 w:0)
|
||||
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
|
||||
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
|
||||
/// The range of component `n` is `[1, 10000]`.
|
||||
fn dispatch_whitelisted_call_with_preimage(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `247`
|
||||
// Estimated: `3556`
|
||||
// Minimum execution time: 27_147_000 picoseconds.
|
||||
Weight::from_parts(28_547_069, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3556))
|
||||
// Standard Error: 7
|
||||
.saturating_add(Weight::from_parts(1_405, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,390 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezpallet_xcm`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezpallet_xcm
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezpallet_xcm`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezpallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
|
||||
/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Paras::Heads` (r:1 w:0)
|
||||
/// Proof: `Paras::Heads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn send() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `212`
|
||||
// Estimated: `3677`
|
||||
// Minimum execution time: 41_335_000 picoseconds.
|
||||
Weight::from_parts(42_659_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3677))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `System::Account` (r:2 w:2)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `XcmPallet::ShouldRecordXcm` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
|
||||
/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Paras::Heads` (r:1 w:0)
|
||||
/// Proof: `Paras::Heads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn teleport_assets() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `315`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 146_685_000 picoseconds.
|
||||
Weight::from_parts(152_738_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
.saturating_add(T::DbWeight::get().reads(8))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `XcmPallet::ShouldRecordXcm` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `System::Account` (r:2 w:2)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
|
||||
/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Paras::Heads` (r:1 w:0)
|
||||
/// Proof: `Paras::Heads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn reserve_transfer_assets() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `367`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 145_601_000 picoseconds.
|
||||
Weight::from_parts(153_228_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
.saturating_add(T::DbWeight::get().reads(8))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `System::Account` (r:2 w:2)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `XcmPallet::ShouldRecordXcm` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
|
||||
/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Paras::Heads` (r:1 w:0)
|
||||
/// Proof: `Paras::Heads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn transfer_assets() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `315`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 148_866_000 picoseconds.
|
||||
Weight::from_parts(152_293_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
.saturating_add(T::DbWeight::get().reads(8))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `XcmPallet::ShouldRecordXcm` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn execute() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `1485`
|
||||
// Minimum execution time: 9_855_000 picoseconds.
|
||||
Weight::from_parts(10_341_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1485))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
}
|
||||
/// Storage: `XcmPallet::SupportedVersion` (r:0 w:1)
|
||||
/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn force_xcm_version() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 8_483_000 picoseconds.
|
||||
Weight::from_parts(8_898_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
fn force_default_xcm_version() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_570_000 picoseconds.
|
||||
Weight::from_parts(2_709_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// Storage: `XcmPallet::VersionNotifiers` (r:1 w:1)
|
||||
/// Proof: `XcmPallet::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::QueryCounter` (r:1 w:1)
|
||||
/// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
|
||||
/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Paras::Heads` (r:1 w:0)
|
||||
/// Proof: `Paras::Heads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::Queries` (r:0 w:1)
|
||||
/// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn force_subscribe_version_notify() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `212`
|
||||
// Estimated: `3677`
|
||||
// Minimum execution time: 48_311_000 picoseconds.
|
||||
Weight::from_parts(49_878_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3677))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: `XcmPallet::VersionNotifiers` (r:1 w:1)
|
||||
/// Proof: `XcmPallet::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
|
||||
/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Paras::Heads` (r:1 w:0)
|
||||
/// Proof: `Paras::Heads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::Queries` (r:0 w:1)
|
||||
/// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn force_unsubscribe_version_notify() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `392`
|
||||
// Estimated: `3857`
|
||||
// Minimum execution time: 53_270_000 picoseconds.
|
||||
Weight::from_parts(55_216_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3857))
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `XcmPallet::XcmExecutionSuspended` (r:0 w:1)
|
||||
/// Proof: `XcmPallet::XcmExecutionSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn force_suspension() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_538_000 picoseconds.
|
||||
Weight::from_parts(2_717_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `XcmPallet::SupportedVersion` (r:6 w:2)
|
||||
/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn migrate_supported_version() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `22`
|
||||
// Estimated: `15862`
|
||||
// Minimum execution time: 22_579_000 picoseconds.
|
||||
Weight::from_parts(22_973_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 15862))
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `XcmPallet::VersionNotifiers` (r:6 w:2)
|
||||
/// Proof: `XcmPallet::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn migrate_version_notifiers() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `26`
|
||||
// Estimated: `15866`
|
||||
// Minimum execution time: 22_803_000 picoseconds.
|
||||
Weight::from_parts(23_241_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 15866))
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `XcmPallet::VersionNotifyTargets` (r:7 w:0)
|
||||
/// Proof: `XcmPallet::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn already_notified_target() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `40`
|
||||
// Estimated: `18355`
|
||||
// Minimum execution time: 25_760_000 picoseconds.
|
||||
Weight::from_parts(26_511_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 18355))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
}
|
||||
/// Storage: `XcmPallet::VersionNotifyTargets` (r:2 w:1)
|
||||
/// Proof: `XcmPallet::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
|
||||
/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:0)
|
||||
/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Paras::Heads` (r:1 w:0)
|
||||
/// Proof: `Paras::Heads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn notify_current_targets() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `211`
|
||||
// Estimated: `6151`
|
||||
// Minimum execution time: 36_850_000 picoseconds.
|
||||
Weight::from_parts(38_086_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6151))
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `XcmPallet::VersionNotifyTargets` (r:5 w:0)
|
||||
/// Proof: `XcmPallet::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn notify_target_migration_fail() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `40`
|
||||
// Estimated: `13405`
|
||||
// Minimum execution time: 17_893_000 picoseconds.
|
||||
Weight::from_parts(18_327_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 13405))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
}
|
||||
/// Storage: `XcmPallet::VersionNotifyTargets` (r:6 w:2)
|
||||
/// Proof: `XcmPallet::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn migrate_version_notify_targets() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `33`
|
||||
// Estimated: `15873`
|
||||
// Minimum execution time: 22_807_000 picoseconds.
|
||||
Weight::from_parts(23_148_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 15873))
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `XcmPallet::VersionNotifyTargets` (r:6 w:1)
|
||||
/// Proof: `XcmPallet::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
|
||||
/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:0)
|
||||
/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Paras::Heads` (r:1 w:0)
|
||||
/// Proof: `Paras::Heads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn migrate_and_notify_old_targets() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `211`
|
||||
// Estimated: `16051`
|
||||
// Minimum execution time: 48_558_000 picoseconds.
|
||||
Weight::from_parts(50_046_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 16051))
|
||||
.saturating_add(T::DbWeight::get().reads(10))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `XcmPallet::QueryCounter` (r:1 w:1)
|
||||
/// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::Queries` (r:0 w:1)
|
||||
/// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn new_query() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `1485`
|
||||
// Minimum execution time: 2_757_000 picoseconds.
|
||||
Weight::from_parts(2_981_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1485))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `XcmPallet::Queries` (r:1 w:1)
|
||||
/// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn take_response() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `7576`
|
||||
// Estimated: `11041`
|
||||
// Minimum execution time: 27_384_000 picoseconds.
|
||||
Weight::from_parts(27_705_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11041))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `XcmPallet::ShouldRecordXcm` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::AssetTraps` (r:1 w:1)
|
||||
/// Proof: `XcmPallet::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn claim_assets() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `23`
|
||||
// Estimated: `3488`
|
||||
// Minimum execution time: 40_784_000 picoseconds.
|
||||
Weight::from_parts(42_298_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3488))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
fn add_authorized_alias() -> Weight {
|
||||
Weight::from_parts(100_000, 0)
|
||||
}
|
||||
fn remove_authorized_alias() -> Weight {
|
||||
Weight::from_parts(100_000, 0)
|
||||
}
|
||||
|
||||
fn weigh_message() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 7_785_000 picoseconds.
|
||||
Weight::from_parts(8_077_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
}
|
||||
+154
@@ -0,0 +1,154 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezkuwi_runtime_common::assigned_slots`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezkuwi_runtime_common::assigned_slots
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezkuwi_runtime_common::assigned_slots`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezkuwi_runtime_common::assigned_slots::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Registrar::Paras` (r:1 w:0)
|
||||
/// Proof: `Registrar::Paras` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Paras::ParaLifecycles` (r:1 w:1)
|
||||
/// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `AssignedSlots::PermanentSlots` (r:1 w:1)
|
||||
/// Proof: `AssignedSlots::PermanentSlots` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
|
||||
/// Storage: `AssignedSlots::TemporarySlots` (r:1 w:0)
|
||||
/// Proof: `AssignedSlots::TemporarySlots` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Slots::Leases` (r:1 w:1)
|
||||
/// Proof: `Slots::Leases` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `AssignedSlots::PermanentSlotCount` (r:1 w:1)
|
||||
/// Proof: `AssignedSlots::PermanentSlotCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
/// Storage: `AssignedSlots::MaxPermanentSlots` (r:1 w:0)
|
||||
/// Proof: `AssignedSlots::MaxPermanentSlots` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ParasShared::CurrentSessionIndex` (r:1 w:0)
|
||||
/// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Paras::ActionsQueue` (r:1 w:1)
|
||||
/// Proof: `Paras::ActionsQueue` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn assign_perm_teyrchain_slot() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `660`
|
||||
// Estimated: `4125`
|
||||
// Minimum execution time: 81_431_000 picoseconds.
|
||||
Weight::from_parts(84_673_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4125))
|
||||
.saturating_add(T::DbWeight::get().reads(9))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: `Registrar::Paras` (r:1 w:0)
|
||||
/// Proof: `Registrar::Paras` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Paras::ParaLifecycles` (r:1 w:1)
|
||||
/// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `AssignedSlots::PermanentSlots` (r:1 w:0)
|
||||
/// Proof: `AssignedSlots::PermanentSlots` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
|
||||
/// Storage: `AssignedSlots::TemporarySlots` (r:1 w:1)
|
||||
/// Proof: `AssignedSlots::TemporarySlots` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Slots::Leases` (r:1 w:1)
|
||||
/// Proof: `Slots::Leases` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `AssignedSlots::TemporarySlotCount` (r:1 w:1)
|
||||
/// Proof: `AssignedSlots::TemporarySlotCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
/// Storage: `AssignedSlots::MaxTemporarySlots` (r:1 w:0)
|
||||
/// Proof: `AssignedSlots::MaxTemporarySlots` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
/// Storage: `AssignedSlots::ActiveTemporarySlotCount` (r:1 w:1)
|
||||
/// Proof: `AssignedSlots::ActiveTemporarySlotCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
/// Storage: `ParasShared::CurrentSessionIndex` (r:1 w:0)
|
||||
/// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Paras::ActionsQueue` (r:1 w:1)
|
||||
/// Proof: `Paras::ActionsQueue` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn assign_temp_teyrchain_slot() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `660`
|
||||
// Estimated: `4125`
|
||||
// Minimum execution time: 87_650_000 picoseconds.
|
||||
Weight::from_parts(91_880_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4125))
|
||||
.saturating_add(T::DbWeight::get().reads(10))
|
||||
.saturating_add(T::DbWeight::get().writes(6))
|
||||
}
|
||||
/// Storage: `AssignedSlots::PermanentSlots` (r:1 w:0)
|
||||
/// Proof: `AssignedSlots::PermanentSlots` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
|
||||
/// Storage: `AssignedSlots::TemporarySlots` (r:1 w:1)
|
||||
/// Proof: `AssignedSlots::TemporarySlots` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Paras::ParaLifecycles` (r:1 w:0)
|
||||
/// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Slots::Leases` (r:1 w:1)
|
||||
/// Proof: `Slots::Leases` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `AssignedSlots::TemporarySlotCount` (r:1 w:1)
|
||||
/// Proof: `AssignedSlots::TemporarySlotCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
fn unassign_teyrchain_slot() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `626`
|
||||
// Estimated: `4091`
|
||||
// Minimum execution time: 56_736_000 picoseconds.
|
||||
Weight::from_parts(60_568_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4091))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `AssignedSlots::MaxPermanentSlots` (r:0 w:1)
|
||||
/// Proof: `AssignedSlots::MaxPermanentSlots` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
fn set_max_permanent_slots() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 5_879_000 picoseconds.
|
||||
Weight::from_parts(6_200_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `AssignedSlots::MaxTemporarySlots` (r:0 w:1)
|
||||
/// Proof: `AssignedSlots::MaxTemporarySlots` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
fn set_max_temporary_slots() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 5_840_000 picoseconds.
|
||||
Weight::from_parts(6_113_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
+142
@@ -0,0 +1,142 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezkuwi_runtime_common::auctions`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezkuwi_runtime_common::auctions
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezkuwi_runtime_common::auctions`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezkuwi_runtime_common::auctions::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Auctions::AuctionInfo` (r:1 w:1)
|
||||
/// Proof: `Auctions::AuctionInfo` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Auctions::AuctionCounter` (r:1 w:1)
|
||||
/// Proof: `Auctions::AuctionCounter` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
fn new_auction() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `4`
|
||||
// Estimated: `1493`
|
||||
// Minimum execution time: 9_527_000 picoseconds.
|
||||
Weight::from_parts(9_961_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1493))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `Paras::ParaLifecycles` (r:1 w:0)
|
||||
/// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Auctions::AuctionCounter` (r:1 w:0)
|
||||
/// Proof: `Auctions::AuctionCounter` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Auctions::AuctionInfo` (r:1 w:0)
|
||||
/// Proof: `Auctions::AuctionInfo` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Slots::Leases` (r:1 w:0)
|
||||
/// Proof: `Slots::Leases` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Auctions::Winning` (r:1 w:1)
|
||||
/// Proof: `Auctions::Winning` (`max_values`: None, `max_size`: Some(1920), added: 4395, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Auctions::ReservedAmounts` (r:2 w:2)
|
||||
/// Proof: `Auctions::ReservedAmounts` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn bid() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `767`
|
||||
// Estimated: `6060`
|
||||
// Minimum execution time: 85_758_000 picoseconds.
|
||||
Weight::from_parts(91_279_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6060))
|
||||
.saturating_add(T::DbWeight::get().reads(8))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `Auctions::AuctionInfo` (r:1 w:1)
|
||||
/// Proof: `Auctions::AuctionInfo` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Babe::NextRandomness` (r:1 w:0)
|
||||
/// Proof: `Babe::NextRandomness` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Babe::EpochStart` (r:1 w:0)
|
||||
/// Proof: `Babe::EpochStart` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Auctions::AuctionCounter` (r:1 w:0)
|
||||
/// Proof: `Auctions::AuctionCounter` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Auctions::Winning` (r:3600 w:3600)
|
||||
/// Proof: `Auctions::Winning` (`max_values`: None, `max_size`: Some(1920), added: 4395, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Auctions::ReservedAmounts` (r:37 w:36)
|
||||
/// Proof: `Auctions::ReservedAmounts` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:36 w:36)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Slots::Leases` (r:7 w:7)
|
||||
/// Proof: `Slots::Leases` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Paras::ParaLifecycles` (r:1 w:1)
|
||||
/// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ParasShared::CurrentSessionIndex` (r:1 w:0)
|
||||
/// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Paras::ActionsQueue` (r:1 w:1)
|
||||
/// Proof: `Paras::ActionsQueue` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn on_initialize() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `6947156`
|
||||
// Estimated: `15822990`
|
||||
// Minimum execution time: 8_791_793_000 picoseconds.
|
||||
Weight::from_parts(8_956_541_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 15822990))
|
||||
.saturating_add(T::DbWeight::get().reads(3687))
|
||||
.saturating_add(T::DbWeight::get().writes(3682))
|
||||
}
|
||||
/// Storage: `Auctions::ReservedAmounts` (r:37 w:36)
|
||||
/// Proof: `Auctions::ReservedAmounts` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:36 w:36)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Auctions::Winning` (r:3600 w:3600)
|
||||
/// Proof: `Auctions::Winning` (`max_values`: None, `max_size`: Some(1920), added: 4395, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Auctions::AuctionInfo` (r:0 w:1)
|
||||
/// Proof: `Auctions::AuctionInfo` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
|
||||
fn cancel_auction() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `177903`
|
||||
// Estimated: `15822990`
|
||||
// Minimum execution time: 6_680_245_000 picoseconds.
|
||||
Weight::from_parts(6_821_440_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 15822990))
|
||||
.saturating_add(T::DbWeight::get().reads(3673))
|
||||
.saturating_add(T::DbWeight::get().writes(3673))
|
||||
}
|
||||
}
|
||||
+222
@@ -0,0 +1,222 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Bizinikiwi.
|
||||
|
||||
// Bizinikiwi 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.
|
||||
|
||||
// Bizinikiwi 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 Bizinikiwi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pezkuwi_runtime_common::crowdloan`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-02-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/zagros-runtime/zagros_runtime.wasm
|
||||
// --pallet=pezkuwi_runtime_common::crowdloan
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezkuwi/file_header.txt
|
||||
// --output=./pezkuwi/runtime/zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --heap-pages=4096
|
||||
// --no-storage-info
|
||||
// --no-min-squares
|
||||
// --no-median-slopes
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use pezframe_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pezkuwi_runtime_common::crowdloan`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> pezkuwi_runtime_common::crowdloan::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `Crowdloan::Funds` (r:1 w:1)
|
||||
/// Proof: `Crowdloan::Funds` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Registrar::Paras` (r:1 w:0)
|
||||
/// Proof: `Registrar::Paras` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Paras::ParaLifecycles` (r:1 w:0)
|
||||
/// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Crowdloan::NextFundIndex` (r:1 w:1)
|
||||
/// Proof: `Crowdloan::NextFundIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn create() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `400`
|
||||
// Estimated: `3865`
|
||||
// Minimum execution time: 76_586_000 picoseconds.
|
||||
Weight::from_parts(81_924_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3865))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `Crowdloan::Funds` (r:1 w:1)
|
||||
/// Proof: `Crowdloan::Funds` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Slots::Leases` (r:1 w:0)
|
||||
/// Proof: `Slots::Leases` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Auctions::AuctionInfo` (r:1 w:0)
|
||||
/// Proof: `Auctions::AuctionInfo` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Crowdloan::EndingsCount` (r:1 w:0)
|
||||
/// Proof: `Crowdloan::EndingsCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Crowdloan::NewRaise` (r:1 w:1)
|
||||
/// Proof: `Crowdloan::NewRaise` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: UNKNOWN KEY `0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291` (r:1 w:1)
|
||||
/// Proof: UNKNOWN KEY `0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291` (r:1 w:1)
|
||||
fn contribute() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `530`
|
||||
// Estimated: `3995`
|
||||
// Minimum execution time: 160_999_000 picoseconds.
|
||||
Weight::from_parts(168_997_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3995))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `Crowdloan::Funds` (r:1 w:1)
|
||||
/// Proof: `Crowdloan::Funds` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `System::Account` (r:2 w:2)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: UNKNOWN KEY `0xc85982571aa615c788ef9b2c16f54f25773fd439e8ee1ed2aa3ae43d48e880f0` (r:1 w:1)
|
||||
/// Proof: UNKNOWN KEY `0xc85982571aa615c788ef9b2c16f54f25773fd439e8ee1ed2aa3ae43d48e880f0` (r:1 w:1)
|
||||
fn withdraw() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `687`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 108_145_000 picoseconds.
|
||||
Weight::from_parts(114_236_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `Skipped::Metadata` (r:0 w:0)
|
||||
/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// The range of component `k` is `[0, 500]`.
|
||||
fn refund(k: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `316 + k * (189 ±0)`
|
||||
// Estimated: `325 + k * (190 ±0)`
|
||||
// Minimum execution time: 60_609_000 picoseconds.
|
||||
Weight::from_parts(63_614_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 325))
|
||||
// Standard Error: 17_663
|
||||
.saturating_add(Weight::from_parts(45_128_820, 0).saturating_mul(k.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(k.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(k.into())))
|
||||
.saturating_add(Weight::from_parts(0, 190).saturating_mul(k.into()))
|
||||
}
|
||||
/// Storage: `Crowdloan::Funds` (r:1 w:1)
|
||||
/// Proof: `Crowdloan::Funds` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `System::Account` (r:2 w:2)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
fn dissolve() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `514`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 69_115_000 picoseconds.
|
||||
Weight::from_parts(73_853_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `Crowdloan::Funds` (r:1 w:1)
|
||||
/// Proof: `Crowdloan::Funds` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn edit() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `234`
|
||||
// Estimated: `3699`
|
||||
// Minimum execution time: 37_142_000 picoseconds.
|
||||
Weight::from_parts(39_142_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3699))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Crowdloan::Funds` (r:1 w:0)
|
||||
/// Proof: `Crowdloan::Funds` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: UNKNOWN KEY `0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291` (r:1 w:1)
|
||||
/// Proof: UNKNOWN KEY `0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291` (r:1 w:1)
|
||||
fn add_memo() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `412`
|
||||
// Estimated: `3877`
|
||||
// Minimum execution time: 41_654_000 picoseconds.
|
||||
Weight::from_parts(44_008_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3877))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Crowdloan::Funds` (r:1 w:0)
|
||||
/// Proof: `Crowdloan::Funds` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Crowdloan::NewRaise` (r:1 w:1)
|
||||
/// Proof: `Crowdloan::NewRaise` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn poke() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `238`
|
||||
// Estimated: `3703`
|
||||
// Minimum execution time: 28_066_000 picoseconds.
|
||||
Weight::from_parts(30_228_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3703))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Auctions::AuctionInfo` (r:1 w:0)
|
||||
/// Proof: `Auctions::AuctionInfo` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Crowdloan::EndingsCount` (r:1 w:1)
|
||||
/// Proof: `Crowdloan::EndingsCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Crowdloan::NewRaise` (r:1 w:1)
|
||||
/// Proof: `Crowdloan::NewRaise` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Crowdloan::Funds` (r:100 w:0)
|
||||
/// Proof: `Crowdloan::Funds` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Auctions::AuctionCounter` (r:1 w:0)
|
||||
/// Proof: `Auctions::AuctionCounter` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Paras::ParaLifecycles` (r:100 w:0)
|
||||
/// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Slots::Leases` (r:100 w:0)
|
||||
/// Proof: `Slots::Leases` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Auctions::Winning` (r:1 w:1)
|
||||
/// Proof: `Auctions::Winning` (`max_values`: None, `max_size`: Some(1920), added: 4395, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Auctions::ReservedAmounts` (r:100 w:100)
|
||||
/// Proof: `Auctions::ReservedAmounts` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:100 w:100)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// The range of component `n` is `[2, 100]`.
|
||||
fn on_initialize(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `233 + n * (360 ±0)`
|
||||
// Estimated: `5385 + n * (2835 ±0)`
|
||||
// Minimum execution time: 154_127_000 picoseconds.
|
||||
Weight::from_parts(19_026_689, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5385))
|
||||
// Standard Error: 57_680
|
||||
.saturating_add(Weight::from_parts(65_569_682, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(n.into())))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into())))
|
||||
.saturating_add(Weight::from_parts(0, 2835).saturating_mul(n.into()))
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user