Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

v0.9.12-rc2 #4108

Merged
merged 4 commits into from
Oct 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
322 changes: 161 additions & 161 deletions Cargo.lock

Large diffs are not rendered by default.

178 changes: 1 addition & 177 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ use frame_support::{
construct_runtime, parameter_types,
traits::{
Contains, Everything, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, Nothing,
OnRuntimeUpgrade,
},
weights::Weight,
PalletId, RuntimeDebug,
Expand Down Expand Up @@ -1557,186 +1556,11 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPallets,
(
CouncilStoragePrefixMigration,
TechnicalCommitteeStoragePrefixMigration,
TechnicalMembershipStoragePrefixMigration,
MigrateTipsPalletPrefix,
BountiesPrefixMigration,
StakingBagsListMigrationV8,
),
(),
>;
/// The payload being signed in the transactions.
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;

const BOUNTIES_OLD_PREFIX: &str = "Treasury";

/// Migrate from 'Treasury' to the new prefix 'Bounties'
pub struct BountiesPrefixMigration;

impl OnRuntimeUpgrade for BountiesPrefixMigration {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
use frame_support::traits::PalletInfo;
let name = <Runtime as frame_system::Config>::PalletInfo::name::<Bounties>()
.expect("Bounties is part of runtime, so it has a name; qed");
pallet_bounties::migrations::v4::migrate::<Runtime, Bounties, _>(BOUNTIES_OLD_PREFIX, name)
}
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<(), &'static str> {
use frame_support::traits::PalletInfo;
let name = <Runtime as frame_system::Config>::PalletInfo::name::<Bounties>()
.expect("Bounties is part of runtime, so it has a name; qed");
pallet_bounties::migrations::v4::pre_migration::<Runtime, Bounties, _>(
BOUNTIES_OLD_PREFIX,
name,
);
Ok(())
}

#[cfg(feature = "try-runtime")]
fn post_upgrade() -> Result<(), &'static str> {
use frame_support::traits::PalletInfo;
let name = <Runtime as frame_system::Config>::PalletInfo::name::<Bounties>()
.expect("Bounties is part of runtime, so it has a name; qed");
pallet_bounties::migrations::v4::post_migration::<Runtime, Bounties, _>(
BOUNTIES_OLD_PREFIX,
name,
);
Ok(())
}
}

const COUNCIL_OLD_PREFIX: &str = "Instance1Collective";
/// Migrate from `Instance1Collective` to the new pallet prefix `Council`
pub struct CouncilStoragePrefixMigration;

impl OnRuntimeUpgrade for CouncilStoragePrefixMigration {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
pallet_collective::migrations::v4::migrate::<Runtime, Council, _>(COUNCIL_OLD_PREFIX)
}

#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<(), &'static str> {
pallet_collective::migrations::v4::pre_migrate::<Council, _>(COUNCIL_OLD_PREFIX);
Ok(())
}

#[cfg(feature = "try-runtime")]
fn post_upgrade() -> Result<(), &'static str> {
pallet_collective::migrations::v4::post_migrate::<Council, _>(COUNCIL_OLD_PREFIX);
Ok(())
}
}

const TECHNICAL_COMMITTEE_OLD_PREFIX: &str = "Instance2Collective";
/// Migrate from `Instance2Collective` to the new pallet prefix `TechnicalCommittee`
pub struct TechnicalCommitteeStoragePrefixMigration;

impl OnRuntimeUpgrade for TechnicalCommitteeStoragePrefixMigration {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
pallet_collective::migrations::v4::migrate::<Runtime, TechnicalCommittee, _>(
TECHNICAL_COMMITTEE_OLD_PREFIX,
)
}

#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<(), &'static str> {
pallet_collective::migrations::v4::pre_migrate::<TechnicalCommittee, _>(
TECHNICAL_COMMITTEE_OLD_PREFIX,
);
Ok(())
}

#[cfg(feature = "try-runtime")]
fn post_upgrade() -> Result<(), &'static str> {
pallet_collective::migrations::v4::post_migrate::<TechnicalCommittee, _>(
TECHNICAL_COMMITTEE_OLD_PREFIX,
);
Ok(())
}
}

const TECHNICAL_MEMBERSHIP_OLD_PREFIX: &str = "Instance1Membership";
/// Migrate from `Instance1Membership` to the new pallet prefix `TechnicalMembership`
pub struct TechnicalMembershipStoragePrefixMigration;

impl OnRuntimeUpgrade for TechnicalMembershipStoragePrefixMigration {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
use frame_support::traits::PalletInfo;
let name = <Runtime as frame_system::Config>::PalletInfo::name::<TechnicalMembership>()
.expect("TechnicalMembership is part of runtime, so it has a name; qed");
pallet_membership::migrations::v4::migrate::<Runtime, TechnicalMembership, _>(
TECHNICAL_MEMBERSHIP_OLD_PREFIX,
name,
)
}

#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<(), &'static str> {
use frame_support::traits::PalletInfo;
let name = <Runtime as frame_system::Config>::PalletInfo::name::<TechnicalMembership>()
.expect("TechnicalMembership is part of runtime, so it has a name; qed");
pallet_membership::migrations::v4::pre_migrate::<TechnicalMembership, _>(
TECHNICAL_MEMBERSHIP_OLD_PREFIX,
name,
);
Ok(())
}

#[cfg(feature = "try-runtime")]
fn post_upgrade() -> Result<(), &'static str> {
use frame_support::traits::PalletInfo;
let name = <Runtime as frame_system::Config>::PalletInfo::name::<TechnicalMembership>()
.expect("TechnicalMembership is part of runtime, so it has a name; qed");
pallet_membership::migrations::v4::post_migrate::<TechnicalMembership, _>(
TECHNICAL_MEMBERSHIP_OLD_PREFIX,
name,
);
Ok(())
}
}

const TIPS_OLD_PREFIX: &str = "Treasury";
/// Migrate pallet-tips from `Treasury` to the new pallet prefix `Tips`
pub struct MigrateTipsPalletPrefix;

impl OnRuntimeUpgrade for MigrateTipsPalletPrefix {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
pallet_tips::migrations::v4::migrate::<Runtime, Tips, _>(TIPS_OLD_PREFIX)
}

#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<(), &'static str> {
pallet_tips::migrations::v4::pre_migrate::<Runtime, Tips, _>(TIPS_OLD_PREFIX);
Ok(())
}

#[cfg(feature = "try-runtime")]
fn post_upgrade() -> Result<(), &'static str> {
pallet_tips::migrations::v4::post_migrate::<Runtime, Tips, _>(TIPS_OLD_PREFIX);
Ok(())
}
}

// Migration to generate pallet staking's `SortedListProvider` from pre-existing nominators.
pub struct StakingBagsListMigrationV8;

impl OnRuntimeUpgrade for StakingBagsListMigrationV8 {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
pallet_staking::migrations::v8::migrate::<Runtime>()
}

#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<(), &'static str> {
pallet_staking::migrations::v8::pre_migrate::<Runtime>()
}

#[cfg(feature = "try-runtime")]
fn post_upgrade() -> Result<(), &'static str> {
pallet_staking::migrations::v8::post_migrate::<Runtime>()
}
}

#[cfg(not(feature = "disable-runtime-api"))]
sp_api::impl_runtime_apis! {
impl sp_api::Core<Block> for Runtime {
Expand Down
8 changes: 4 additions & 4 deletions runtime/kusama/src/weights/pallet_bags_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//! Autogenerated weights for `pallet_bags_list`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2021-09-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2021-10-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128

// Executed Command:
Expand All @@ -31,7 +31,7 @@
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/kusama/src/weights/
// --output=./runtime/kusama/src/weights/pallet_bags_list.rs


#![cfg_attr(rustfmt, rustfmt_skip)]
Expand All @@ -49,7 +49,7 @@ impl<T: frame_system::Config> pallet_bags_list::WeightInfo for WeightInfo<T> {
// Storage: BagsList ListNodes (r:4 w:4)
// Storage: BagsList ListBags (r:1 w:1)
fn rebag_non_terminal() -> Weight {
(65_491_000 as Weight)
(61_524_000 as Weight)
.saturating_add(T::DbWeight::get().reads(7 as Weight))
.saturating_add(T::DbWeight::get().writes(5 as Weight))
}
Expand All @@ -58,7 +58,7 @@ impl<T: frame_system::Config> pallet_bags_list::WeightInfo for WeightInfo<T> {
// Storage: BagsList ListNodes (r:3 w:3)
// Storage: BagsList ListBags (r:2 w:2)
fn rebag_terminal() -> Weight {
(64_253_000 as Weight)
(60_683_000 as Weight)
.saturating_add(T::DbWeight::get().reads(7 as Weight))
.saturating_add(T::DbWeight::get().writes(5 as Weight))
}
Expand Down
30 changes: 19 additions & 11 deletions runtime/kusama/src/weights/pallet_balances.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2020 Parity Technologies (UK) Ltd.
// Copyright 2017-2021 Parity Technologies (UK) Ltd.
// This file is part of Polkadot.

// Polkadot is free software: you can redistribute it and/or modify
Expand All @@ -15,8 +15,8 @@
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_balances`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2021-10-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128

// Executed Command:
Expand All @@ -31,8 +31,10 @@
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/kusama/src/weights/
// --output=./runtime/kusama/src/weights/pallet_balances.rs


#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

Expand All @@ -42,39 +44,45 @@ use sp_std::marker::PhantomData;
/// Weight functions for `pallet_balances`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Storage: System Account (r:1 w:1)
fn transfer() -> Weight {
(73_559_000 as Weight)
(61_594_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:1 w:1)
fn transfer_keep_alive() -> Weight {
(54_667_000 as Weight)
(47_561_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:1 w:1)
fn set_balance_creating() -> Weight {
(29_203_000 as Weight)
(26_561_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:1 w:1)
fn set_balance_killing() -> Weight {
(35_128_000 as Weight)
(31_893_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:2 w:2)
fn force_transfer() -> Weight {
(72_833_000 as Weight)
(63_220_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: System Account (r:1 w:1)
fn transfer_all() -> Weight {
(67_554_000 as Weight)
(58_215_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:1 w:1)
fn force_unreserve() -> Weight {
(27_766_000 as Weight)
(25_173_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
Expand Down
Loading