mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 00:31:02 +00:00
Add Collectives Parachain (#1346)
* add new runtime and remove unnecessary pallets * make runtime build * add collectives to collator node * sketch alliance config in runtime * Slash handler was supposed to be commented out (for now) * correct signature * move to impls * add alliance to runtime * rustfmt * IsReserve, remove Ping, update fn deposit * add transaction_payment event * Update parachains/runtimes/collectives/collectives-polkadot/src/lib.rs Co-authored-by: Squirrel <gilescope@gmail.com> * fmt * add genesis config to chain spec * fix merge * local and dev configs only (for now) * remove duplicate imports * Collectives polkadot runtime to cargo workspace members (#1397) * Collectives polkadot runtime: use unit type impl for identity verifier (#1398) * apply fn rename * fmt * one less todo * Less code in magic macros (#1407) * Less code in magic macros * cargo fmt * Bench alliance (#1427) * add benchmarks * call one script from the other * shebang changes so works on nixos too. * bench in parallel as separate jobs * hyphens can turn into underscores * remove workaround to trigger bench Co-authored-by: alvicsam <alvicsam@gmail.com> Co-authored-by: paritytech-ci <paritytech-ci@parity.io> * enable ci jobs * fix publish bench results jobs * chainspecs for collectives-westend (#1441) * initial chainspecs for collections relay chain * plumb in the collectives-westend chainspec * add Runtime::CollectivesWestend * lock * Collectives: teleport slashed assets (#1433) * Collectives: teleport slashed assets * fmt * Cargo.lock > polkadot-parachain 0.9.25 * create temp account for imbalance * treasury acc id from pallet id * move accounts into constants, use here junction for assets * assets location is relay chain, accounts as parameters * fix typos * fix typo * Update parachains/runtimes/collectives/collectives-polkadot/src/constants.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Move alliance proposal provider to impls.rs (#1464) * Move to impls alliance proposal provider * rustfmt * Bumping spec version (so that we can redeploy with slashing change.) * cargo lock * slurp collectives digest to make appear in release notes (#1473) * add slurp * Slurp better :) * Bring some order Co-authored-by: Chevdor <chevdor@users.noreply.github.com> Co-authored-by: Wilfried Kopp <wilfried@parity.io> * reorder barrier * Update parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> * address review * clean construct runtime * fmt * looks pretty but brings in too much Co-authored-by: Squirrel <gilescope@gmail.com> Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com> Co-authored-by: alvicsam <alvicsam@gmail.com> Co-authored-by: paritytech-ci <paritytech-ci@parity.io> Co-authored-by: Chevdor <chevdor@users.noreply.github.com> Co-authored-by: Wilfried Kopp <wilfried@parity.io> Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
This commit is contained in:
@@ -0,0 +1,279 @@
|
||||
// Copyright 2021 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Cumulus.
|
||||
|
||||
// Cumulus 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.
|
||||
|
||||
// Cumulus 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 Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_alliance`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2022-07-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("collectives-polkadot-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./artifacts/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=collectives-polkadot-dev
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_alliance
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/collectives/collectives-polkadot/src/weights
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_alliance`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_alliance::WeightInfo for WeightInfo<T> {
|
||||
// Storage: Alliance Members (r:1 w:0)
|
||||
// Storage: AllianceMotion ProposalOf (r:1 w:1)
|
||||
// Storage: AllianceMotion Proposals (r:1 w:1)
|
||||
// Storage: AllianceMotion ProposalCount (r:1 w:1)
|
||||
// Storage: AllianceMotion Voting (r:0 w:1)
|
||||
/// The range of component `b` is `[1, 1024]`.
|
||||
/// The range of component `x` is `[2, 10]`.
|
||||
/// The range of component `y` is `[0, 90]`.
|
||||
/// The range of component `p` is `[1, 100]`.
|
||||
fn propose_proposed(_b: u32, _x: u32, _y: u32, p: u32, ) -> Weight {
|
||||
(53_023_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((132_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Alliance Members (r:2 w:0)
|
||||
// Storage: AllianceMotion Voting (r:1 w:1)
|
||||
/// The range of component `x` is `[3, 10]`.
|
||||
/// The range of component `y` is `[2, 90]`.
|
||||
fn vote(x: u32, y: u32, ) -> Weight {
|
||||
(33_003_000 as Weight)
|
||||
// Standard Error: 106_000
|
||||
.saturating_add((312_000 as Weight).saturating_mul(x as Weight))
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((82_000 as Weight).saturating_mul(y as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Alliance Members (r:1 w:0)
|
||||
// Storage: AllianceMotion ProposalOf (r:1 w:1)
|
||||
// Storage: AllianceMotion Proposals (r:1 w:1)
|
||||
// Storage: AllianceMotion Voting (r:0 w:1)
|
||||
/// The range of component `p` is `[1, 100]`.
|
||||
fn veto(p: u32, ) -> Weight {
|
||||
(27_289_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((131_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Alliance Members (r:1 w:0)
|
||||
// Storage: AllianceMotion Voting (r:1 w:1)
|
||||
// Storage: AllianceMotion Members (r:1 w:0)
|
||||
// Storage: AllianceMotion Proposals (r:1 w:1)
|
||||
// Storage: AllianceMotion ProposalOf (r:0 w:1)
|
||||
/// The range of component `x` is `[2, 10]`.
|
||||
/// The range of component `y` is `[2, 90]`.
|
||||
/// The range of component `p` is `[1, 100]`.
|
||||
fn close_early_disapproved(x: u32, y: u32, p: u32, ) -> Weight {
|
||||
(31_884_000 as Weight)
|
||||
// Standard Error: 72_000
|
||||
.saturating_add((358_000 as Weight).saturating_mul(x as Weight))
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((109_000 as Weight).saturating_mul(y as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((109_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Alliance Members (r:1 w:0)
|
||||
// Storage: AllianceMotion Voting (r:1 w:1)
|
||||
// Storage: AllianceMotion Members (r:1 w:0)
|
||||
// Storage: AllianceMotion ProposalOf (r:1 w:1)
|
||||
// Storage: AllianceMotion Proposals (r:1 w:1)
|
||||
/// The range of component `b` is `[1, 1024]`.
|
||||
/// The range of component `x` is `[2, 10]`.
|
||||
/// The range of component `y` is `[2, 90]`.
|
||||
/// The range of component `p` is `[1, 100]`.
|
||||
fn close_early_approved(b: u32, x: u32, y: u32, p: u32, ) -> Weight {
|
||||
(43_205_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(b as Weight))
|
||||
// Standard Error: 73_000
|
||||
.saturating_add((123_000 as Weight).saturating_mul(x as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((91_000 as Weight).saturating_mul(y as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((114_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Alliance Members (r:1 w:0)
|
||||
// Storage: AllianceMotion Voting (r:1 w:1)
|
||||
// Storage: AllianceMotion Members (r:1 w:0)
|
||||
// Storage: AllianceMotion Prime (r:1 w:0)
|
||||
// Storage: AllianceMotion ProposalOf (r:1 w:1)
|
||||
// Storage: AllianceMotion Proposals (r:1 w:1)
|
||||
// Storage: Alliance Rule (r:0 w:1)
|
||||
/// The range of component `x` is `[2, 10]`.
|
||||
/// The range of component `y` is `[2, 90]`.
|
||||
/// The range of component `p` is `[1, 100]`.
|
||||
fn close_disapproved(x: u32, y: u32, p: u32, ) -> Weight {
|
||||
(49_769_000 as Weight)
|
||||
// Standard Error: 69_000
|
||||
.saturating_add((352_000 as Weight).saturating_mul(x as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((81_000 as Weight).saturating_mul(y as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((100_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Alliance Members (r:1 w:0)
|
||||
// Storage: AllianceMotion Voting (r:1 w:1)
|
||||
// Storage: AllianceMotion Members (r:1 w:0)
|
||||
// Storage: AllianceMotion Prime (r:1 w:0)
|
||||
// Storage: AllianceMotion Proposals (r:1 w:1)
|
||||
// Storage: AllianceMotion ProposalOf (r:0 w:1)
|
||||
/// The range of component `b` is `[1, 1024]`.
|
||||
/// The range of component `x` is `[2, 10]`.
|
||||
/// The range of component `y` is `[2, 90]`.
|
||||
/// The range of component `p` is `[1, 100]`.
|
||||
fn close_approved(b: u32, _x: u32, y: u32, p: u32, ) -> Weight {
|
||||
(40_901_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((3_000 as Weight).saturating_mul(b as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((79_000 as Weight).saturating_mul(y as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((102_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Alliance Members (r:3 w:3)
|
||||
// Storage: AllianceMotion Members (r:1 w:1)
|
||||
/// The range of component `x` is `[2, 10]`.
|
||||
/// The range of component `y` is `[0, 90]`.
|
||||
/// The range of component `z` is `[0, 100]`.
|
||||
fn init_members(_x: u32, y: u32, z: u32, ) -> Weight {
|
||||
(39_647_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((123_000 as Weight).saturating_mul(y as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((116_000 as Weight).saturating_mul(z as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Alliance Rule (r:0 w:1)
|
||||
fn set_rule() -> Weight {
|
||||
(14_689_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Alliance Announcements (r:1 w:1)
|
||||
fn announce() -> Weight {
|
||||
(15_988_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Alliance Announcements (r:1 w:1)
|
||||
fn remove_announcement() -> Weight {
|
||||
(16_823_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Alliance UnscrupulousAccounts (r:1 w:0)
|
||||
// Storage: Alliance Members (r:4 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: Alliance DepositOf (r:0 w:1)
|
||||
fn join_alliance() -> Weight {
|
||||
(46_340_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: Alliance Members (r:4 w:1)
|
||||
// Storage: Alliance UnscrupulousAccounts (r:1 w:0)
|
||||
fn nominate_ally() -> Weight {
|
||||
(36_225_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Alliance Members (r:3 w:2)
|
||||
// Storage: AllianceMotion Proposals (r:1 w:0)
|
||||
// Storage: AllianceMotion Members (r:0 w:1)
|
||||
// Storage: AllianceMotion Prime (r:0 w:1)
|
||||
fn elevate_ally() -> Weight {
|
||||
(30_236_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
// Storage: Alliance UpForKicking (r:1 w:0)
|
||||
// Storage: Alliance Members (r:3 w:1)
|
||||
// Storage: AllianceMotion Proposals (r:1 w:0)
|
||||
// Storage: Alliance DepositOf (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: AllianceMotion Members (r:0 w:1)
|
||||
// Storage: AllianceMotion Prime (r:0 w:1)
|
||||
fn retire() -> Weight {
|
||||
(44_311_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(7 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(5 as Weight))
|
||||
}
|
||||
// Storage: Alliance Members (r:3 w:1)
|
||||
// Storage: AllianceMotion Proposals (r:1 w:0)
|
||||
// Storage: Alliance DepositOf (r:1 w:1)
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: AllianceMotion Members (r:0 w:1)
|
||||
// Storage: AllianceMotion Prime (r:0 w:1)
|
||||
// Storage: Alliance UpForKicking (r:0 w:1)
|
||||
fn kick_member() -> Weight {
|
||||
(46_112_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(6 as Weight))
|
||||
}
|
||||
// Storage: Alliance UnscrupulousAccounts (r:1 w:1)
|
||||
// Storage: Alliance UnscrupulousWebsites (r:1 w:1)
|
||||
/// The range of component `n` is `[1, 100]`.
|
||||
/// The range of component `l` is `[1, 255]`.
|
||||
fn add_unscrupulous_items(n: u32, l: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((1_300_000 as Weight).saturating_mul(n as Weight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((125_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Alliance UnscrupulousAccounts (r:1 w:1)
|
||||
// Storage: Alliance UnscrupulousWebsites (r:1 w:1)
|
||||
/// The range of component `n` is `[1, 100]`.
|
||||
/// The range of component `l` is `[1, 255]`.
|
||||
fn remove_unscrupulous_items(n: u32, l: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 197_000
|
||||
.saturating_add((34_156_000 as Weight).saturating_mul(n as Weight))
|
||||
// Standard Error: 87_000
|
||||
.saturating_add((7_042_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user