From 7b9328db8ba1ef2183e6ede746c5efd0200882c4 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Wed, 20 Sep 2023 07:20:16 -0500 Subject: [PATCH] Release `v6.4.0-2` (#1280) --- Cargo.lock | 48 +++--- Cargo.toml | 3 +- runtime/crab/Cargo.toml | 4 - runtime/crab/src/lib.rs | 5 +- runtime/crab/src/migration.rs | 7 +- runtime/crab/src/pallets.rs | 2 - runtime/crab/src/pallets/proxy.rs | 1 - runtime/crab/src/pallets/tips.rs | 35 ---- runtime/crab/src/weights.rs | 1 - runtime/crab/src/weights/pallet_tips.rs | 172 -------------------- runtime/darwinia/Cargo.toml | 6 +- runtime/darwinia/src/lib.rs | 5 +- runtime/darwinia/src/migration.rs | 7 +- runtime/darwinia/src/pallets.rs | 2 - runtime/darwinia/src/pallets/proxy.rs | 1 - runtime/darwinia/src/pallets/tips.rs | 35 ---- runtime/darwinia/src/weights.rs | 1 - runtime/darwinia/src/weights/pallet_tips.rs | 172 -------------------- runtime/pangolin/Cargo.toml | 4 - runtime/pangolin/src/lib.rs | 5 +- runtime/pangolin/src/pallets.rs | 2 - runtime/pangolin/src/pallets/proxy.rs | 1 - runtime/pangolin/src/pallets/tips.rs | 35 ---- runtime/pangolin/src/weights.rs | 1 - runtime/pangolin/src/weights/pallet_tips.rs | 172 -------------------- runtime/pangoro/Cargo.toml | 4 - runtime/pangoro/src/lib.rs | 5 +- runtime/pangoro/src/migration.rs | 7 +- runtime/pangoro/src/pallets.rs | 2 - runtime/pangoro/src/pallets/proxy.rs | 1 - runtime/pangoro/src/pallets/tips.rs | 35 ---- runtime/pangoro/src/weights.rs | 1 - runtime/pangoro/src/weights/pallet_tips.rs | 170 ------------------- 33 files changed, 47 insertions(+), 905 deletions(-) delete mode 100644 runtime/crab/src/pallets/tips.rs delete mode 100644 runtime/crab/src/weights/pallet_tips.rs delete mode 100644 runtime/darwinia/src/pallets/tips.rs delete mode 100644 runtime/darwinia/src/weights/pallet_tips.rs delete mode 100644 runtime/pangolin/src/pallets/tips.rs delete mode 100644 runtime/pangolin/src/weights/pallet_tips.rs delete mode 100644 runtime/pangoro/src/pallets/tips.rs delete mode 100644 runtime/pangoro/src/weights/pallet_tips.rs diff --git a/Cargo.lock b/Cargo.lock index 5ef0951dc..98fd359f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1503,7 +1503,7 @@ dependencies = [ [[package]] name = "crab-runtime" -version = "6.4.0-1" +version = "6.4.0-2" dependencies = [ "array-bytes 6.1.0", "bp-darwinia-core", @@ -1572,7 +1572,6 @@ dependencies = [ "pallet-scheduler", "pallet-session", "pallet-timestamp", - "pallet-tips", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "pallet-treasury", @@ -2500,7 +2499,7 @@ dependencies = [ [[package]] name = "darwinia" -version = "6.4.0-1" +version = "6.4.0-2" dependencies = [ "array-bytes 6.1.0", "async-trait", @@ -2578,7 +2577,7 @@ dependencies = [ [[package]] name = "darwinia-account-migration" -version = "6.4.0-1" +version = "6.4.0-2" dependencies = [ "array-bytes 6.1.0", "darwinia-deposit", @@ -2603,7 +2602,7 @@ dependencies = [ [[package]] name = "darwinia-asset-limit" -version = "6.4.0-1" +version = "6.4.0-2" dependencies = [ "frame-support", "frame-system", @@ -2614,7 +2613,7 @@ dependencies = [ [[package]] name = "darwinia-common-runtime" -version = "6.4.0-1" +version = "6.4.0-2" dependencies = [ "bp-darwinia-core", "darwinia-precompile-assets", @@ -2641,7 +2640,7 @@ dependencies = [ [[package]] name = "darwinia-deposit" -version = "6.4.0-1" +version = "6.4.0-2" dependencies = [ "darwinia-staking-traits", "dc-inflation", @@ -2662,7 +2661,7 @@ dependencies = [ [[package]] name = "darwinia-ecdsa-authority" -version = "6.4.0-1" +version = "6.4.0-2" dependencies = [ "array-bytes 6.1.0", "dc-primitives", @@ -2682,7 +2681,7 @@ dependencies = [ [[package]] name = "darwinia-message-gadget" -version = "6.4.0-1" +version = "6.4.0-2" dependencies = [ "array-bytes 6.1.0", "frame-support", @@ -2700,7 +2699,7 @@ dependencies = [ [[package]] name = "darwinia-message-transact" -version = "6.4.0-1" +version = "6.4.0-2" dependencies = [ "array-bytes 6.1.0", "bp-message-dispatch", @@ -2729,7 +2728,7 @@ dependencies = [ [[package]] name = "darwinia-precompile-assets" -version = "6.4.0-1" +version = "6.4.0-2" dependencies = [ "fp-evm", "frame-support", @@ -2750,7 +2749,7 @@ dependencies = [ [[package]] name = "darwinia-precompile-bls12-381" -version = "6.4.0-1" +version = "6.4.0-2" dependencies = [ "ark-bls12-381", "ark-ec", @@ -2768,7 +2767,7 @@ dependencies = [ [[package]] name = "darwinia-precompile-deposit" -version = "6.4.0-1" +version = "6.4.0-2" dependencies = [ "darwinia-deposit", "fp-evm", @@ -2788,7 +2787,7 @@ dependencies = [ [[package]] name = "darwinia-precompile-staking" -version = "6.4.0-1" +version = "6.4.0-2" dependencies = [ "darwinia-deposit", "darwinia-staking", @@ -2809,7 +2808,7 @@ dependencies = [ [[package]] name = "darwinia-precompile-state-storage" -version = "6.4.0-1" +version = "6.4.0-2" dependencies = [ "fp-evm", "frame-support", @@ -2828,7 +2827,7 @@ dependencies = [ [[package]] name = "darwinia-runtime" -version = "6.4.0-1" +version = "6.4.0-2" dependencies = [ "array-bytes 6.1.0", "bp-darwinia-core", @@ -2898,7 +2897,6 @@ dependencies = [ "pallet-scheduler", "pallet-session", "pallet-timestamp", - "pallet-tips", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "pallet-treasury", @@ -2935,7 +2933,7 @@ dependencies = [ [[package]] name = "darwinia-staking" -version = "6.4.0-1" +version = "6.4.0-2" dependencies = [ "darwinia-deposit", "darwinia-staking-traits", @@ -2961,7 +2959,7 @@ dependencies = [ [[package]] name = "darwinia-staking-traits" -version = "6.4.0-1" +version = "6.4.0-2" dependencies = [ "parity-scale-codec", "scale-info", @@ -3009,7 +3007,7 @@ dependencies = [ [[package]] name = "dc-inflation" -version = "6.4.0-1" +version = "6.4.0-2" dependencies = [ "dc-types", "primitive-types", @@ -3019,7 +3017,7 @@ dependencies = [ [[package]] name = "dc-primitives" -version = "6.4.0-1" +version = "6.4.0-2" dependencies = [ "dc-types", "fp-account", @@ -3029,7 +3027,7 @@ dependencies = [ [[package]] name = "dc-types" -version = "6.4.0-1" +version = "6.4.0-2" [[package]] name = "der" @@ -8733,7 +8731,7 @@ dependencies = [ [[package]] name = "pangolin-runtime" -version = "6.4.0-1" +version = "6.4.0-2" dependencies = [ "array-bytes 6.1.0", "bp-darwinia-core", @@ -8808,7 +8806,6 @@ dependencies = [ "pallet-session", "pallet-sudo", "pallet-timestamp", - "pallet-tips", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "pallet-treasury", @@ -8844,7 +8841,7 @@ dependencies = [ [[package]] name = "pangoro-runtime" -version = "6.4.0-1" +version = "6.4.0-2" dependencies = [ "array-bytes 6.1.0", "bp-darwinia-core", @@ -8915,7 +8912,6 @@ dependencies = [ "pallet-session", "pallet-sudo", "pallet-timestamp", - "pallet-tips", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "pallet-treasury", diff --git a/Cargo.toml b/Cargo.toml index 0972db407..27e9ce403 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ edition = "2021" homepage = "https://darwinia.network" license = "GPL-3.0" repository = "https://github.com/darwinia-network/darwinia" -version = "6.4.0-1" +version = "6.4.0-2" [workspace.dependencies] # crates.io @@ -152,7 +152,6 @@ pallet-scheduler = { git = "https://github.com/parityt pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-tips = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } diff --git a/runtime/crab/Cargo.toml b/runtime/crab/Cargo.toml index 0698af8f3..ace8121ec 100644 --- a/runtime/crab/Cargo.toml +++ b/runtime/crab/Cargo.toml @@ -103,7 +103,6 @@ pallet-proxy = { workspace = true } pallet-scheduler = { workspace = true } pallet-session = { workspace = true } pallet-timestamp = { workspace = true } -pallet-tips = { workspace = true } pallet-transaction-payment = { workspace = true } pallet-transaction-payment-rpc-runtime-api = { workspace = true } pallet-treasury = { workspace = true } @@ -228,7 +227,6 @@ std = [ "pallet-scheduler/std", "pallet-session/std", "pallet-timestamp/std", - "pallet-tips/std", "pallet-transaction-payment-rpc-runtime-api/std", "pallet-transaction-payment/std", "pallet-treasury/std", @@ -322,7 +320,6 @@ runtime-benchmarks = [ "pallet-proxy/runtime-benchmarks", "pallet-scheduler/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", - "pallet-tips/runtime-benchmarks", "pallet-treasury/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "pallet-vesting/runtime-benchmarks", @@ -383,7 +380,6 @@ try-runtime = [ "pallet-scheduler/try-runtime", "pallet-session/try-runtime", "pallet-timestamp/try-runtime", - "pallet-tips/try-runtime", "pallet-transaction-payment/try-runtime", "pallet-treasury/try-runtime", "pallet-utility/try-runtime", diff --git a/runtime/crab/src/lib.rs b/runtime/crab/src/lib.rs index 84a000c58..e8e5308df 100644 --- a/runtime/crab/src/lib.rs +++ b/runtime/crab/src/lib.rs @@ -86,7 +86,7 @@ pub const VERSION: sp_version::RuntimeVersion = sp_version::RuntimeVersion { spec_name: sp_runtime::create_runtime_str!("Crab2"), impl_name: sp_runtime::create_runtime_str!("DarwiniaOfficialRust"), authoring_version: 0, - spec_version: 6_4_0_1, + spec_version: 6_4_0_2, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 0, @@ -150,7 +150,7 @@ frame_support::construct_runtime! { PhragmenElection: pallet_elections_phragmen = 21, TechnicalMembership: pallet_membership:: = 22, Treasury: pallet_treasury = 23, - Tips: pallet_tips = 24, + // Tips: pallet_tips = 24, // Utility stuff. // Sudo: pallet_sudo = 25, @@ -208,7 +208,6 @@ frame_benchmarking::define_benchmarks! { [pallet_preimage, Preimage] [pallet_proxy, Proxy] [pallet_scheduler, Scheduler] - [pallet_tips, Tips] [pallet_treasury, Treasury] [pallet_utility, Utility] [pallet_vesting, Vesting] diff --git a/runtime/crab/src/migration.rs b/runtime/crab/src/migration.rs index 12bad0d48..0c6e3b81e 100644 --- a/runtime/crab/src/migration.rs +++ b/runtime/crab/src/migration.rs @@ -41,7 +41,10 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { } fn migrate() -> frame_support::weights::Weight { - frame_support::weights::Weight::zero() - // RuntimeBlockWeights::get().max_block + migration::clear_storage_prefix(b"Tips", b"Tips", &[], None, None); + migration::clear_storage_prefix(b"Tips", b"Reasons", &[], None, None); + + // frame_support::weights::Weight::zero() + RuntimeBlockWeights::get().max_block // ::DbWeight::get().reads_writes(0, 2) } diff --git a/runtime/crab/src/pallets.rs b/runtime/crab/src/pallets.rs index e600bf61b..73a87b88d 100644 --- a/runtime/crab/src/pallets.rs +++ b/runtime/crab/src/pallets.rs @@ -78,8 +78,6 @@ mod membership; mod treasury; -mod tips; - // Utility stuff. mod utility; diff --git a/runtime/crab/src/pallets/proxy.rs b/runtime/crab/src/pallets/proxy.rs index 80720a309..a4f02054e 100644 --- a/runtime/crab/src/pallets/proxy.rs +++ b/runtime/crab/src/pallets/proxy.rs @@ -72,7 +72,6 @@ impl frame_support::traits::InstanceFilter for ProxyType { | RuntimeCall::TechnicalCommittee(..) | RuntimeCall::PhragmenElection(..) | RuntimeCall::Treasury(..) - | RuntimeCall::Tips(..) ), ProxyType::Staking => { matches!( diff --git a/runtime/crab/src/pallets/tips.rs b/runtime/crab/src/pallets/tips.rs deleted file mode 100644 index 295f0f37e..000000000 --- a/runtime/crab/src/pallets/tips.rs +++ /dev/null @@ -1,35 +0,0 @@ -// This file is part of Darwinia. -// -// Copyright (C) 2018-2023 Darwinia Network -// SPDX-License-Identifier: GPL-3.0 -// -// Darwinia 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. -// -// Darwinia 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 Darwinia. If not, see . - -// darwinia -use crate::*; - -frame_support::parameter_types! { - pub const TipFindersFee: sp_runtime::Percent = sp_runtime::Percent::from_percent(20); -} - -impl pallet_tips::Config for Runtime { - type DataDepositPerByte = ConstU128<{ darwinia_deposit(0, 1) }>; - type MaximumReasonLength = ConstU32<16_384>; - type RuntimeEvent = RuntimeEvent; - type TipCountdown = ConstU32; - type TipFindersFee = TipFindersFee; - type TipReportDepositBase = ConstU128<{ 100 * UNIT }>; - type Tippers = PhragmenElection; - type WeightInfo = weights::pallet_tips::WeightInfo; -} diff --git a/runtime/crab/src/weights.rs b/runtime/crab/src/weights.rs index d7dbd9626..11f26dd14 100644 --- a/runtime/crab/src/weights.rs +++ b/runtime/crab/src/weights.rs @@ -47,7 +47,6 @@ pub mod pallet_proxy; pub mod pallet_scheduler; pub mod pallet_session; pub mod pallet_timestamp; -pub mod pallet_tips; pub mod pallet_treasury; pub mod pallet_utility; pub mod pallet_vesting; diff --git a/runtime/crab/src/weights/pallet_tips.rs b/runtime/crab/src/weights/pallet_tips.rs deleted file mode 100644 index 3447ef753..000000000 --- a/runtime/crab/src/weights/pallet_tips.rs +++ /dev/null @@ -1,172 +0,0 @@ -// This file is part of Darwinia. -// -// Copyright (C) 2018-2023 Darwinia Network -// SPDX-License-Identifier: GPL-3.0 -// -// Darwinia 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. -// -// Darwinia 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 Darwinia. If not, see . - -//! Autogenerated weights for `pallet_tips` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-07-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `inv.cafe`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("crab-dev"), DB CACHE: 1024 - -// Executed Command: -// target/release/darwinia -// benchmark -// pallet -// --header -// .maintain/license-header -// --execution -// wasm -// --heap-pages -// 4096 -// --chain -// crab-dev -// --output -// runtime/crab/src/weights -// --extrinsic -// * -// --pallet -// * -// --steps -// 50 -// --repeat -// 20 - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_tips`. -pub struct WeightInfo(PhantomData); -impl pallet_tips::WeightInfo for WeightInfo { - /// Storage: Tips Reasons (r:1 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// The range of component `r` is `[0, 16384]`. - fn report_awesome(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `4` - // Estimated: `3469` - // Minimum execution time: 20_908_000 picoseconds. - Weight::from_parts(22_054_772, 0) - .saturating_add(Weight::from_parts(0, 3469)) - // Standard Error: 6 - .saturating_add(Weight::from_parts(924, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// Storage: Tips Reasons (r:0 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - fn retract_tip() -> Weight { - // Proof Size summary in bytes: - // Measured: `197` - // Estimated: `3662` - // Minimum execution time: 20_147_000 picoseconds. - Weight::from_parts(20_637_000, 0) - .saturating_add(Weight::from_parts(0, 3662)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Tips Reasons (r:1 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - /// Storage: Tips Tips (r:0 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// The range of component `r` is `[0, 16384]`. - /// The range of component `t` is `[1, 7]`. - fn tip_new(r: u32, t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `141 + t * (52 ±0)` - // Estimated: `3605 + t * (52 ±0)` - // Minimum execution time: 12_759_000 picoseconds. - Weight::from_parts(12_151_782, 0) - .saturating_add(Weight::from_parts(0, 3605)) - // Standard Error: 6 - .saturating_add(Weight::from_parts(901, 0).saturating_mul(r.into())) - // Standard Error: 16_230 - .saturating_add(Weight::from_parts(273_958, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 52).saturating_mul(t.into())) - } - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// The range of component `t` is `[1, 7]`. - fn tip(t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `338 + t * (88 ±0)` - // Estimated: `3802 + t * (88 ±0)` - // Minimum execution time: 10_082_000 picoseconds. - Weight::from_parts(10_739_776, 0) - .saturating_add(Weight::from_parts(0, 3802)) - // Standard Error: 4_560 - .saturating_add(Weight::from_parts(131_601, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 88).saturating_mul(t.into())) - } - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (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(116), added: 2591, mode: MaxEncodedLen) - /// Storage: Tips Reasons (r:0 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - /// The range of component `t` is `[1, 7]`. - fn close_tip(t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `506 + t * (88 ±0)` - // Estimated: `6172 + t * (90 ±0)` - // Minimum execution time: 44_890_000 picoseconds. - Weight::from_parts(46_601_045, 0) - .saturating_add(Weight::from_parts(0, 6172)) - // Standard Error: 17_907 - .saturating_add(Weight::from_parts(230_775, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(Weight::from_parts(0, 90).saturating_mul(t.into())) - } - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// Storage: Tips Reasons (r:0 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - /// The range of component `t` is `[1, 7]`. - fn slash_tip(t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `233` - // Estimated: `3698` - // Minimum execution time: 9_474_000 picoseconds. - Weight::from_parts(10_174_342, 0) - .saturating_add(Weight::from_parts(0, 3698)) - // Standard Error: 4_992 - .saturating_add(Weight::from_parts(6_836, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } -} diff --git a/runtime/darwinia/Cargo.toml b/runtime/darwinia/Cargo.toml index e0a4c9c78..5428945d7 100644 --- a/runtime/darwinia/Cargo.toml +++ b/runtime/darwinia/Cargo.toml @@ -104,7 +104,6 @@ pallet-proxy = { workspace = true } pallet-scheduler = { workspace = true } pallet-session = { workspace = true } pallet-timestamp = { workspace = true } -pallet-tips = { workspace = true } pallet-transaction-payment = { workspace = true } pallet-transaction-payment-rpc-runtime-api = { workspace = true } pallet-treasury = { workspace = true } @@ -230,7 +229,6 @@ std = [ "pallet-scheduler/std", "pallet-session/std", "pallet-timestamp/std", - "pallet-tips/std", "pallet-transaction-payment-rpc-runtime-api/std", "pallet-transaction-payment/std", "pallet-treasury/std", @@ -288,7 +286,7 @@ runtime-benchmarks = [ "darwinia-precompile-assets/runtime-benchmarks", "darwinia-precompile-staking/runtime-benchmarks", "darwinia-staking/runtime-benchmarks", - + # darwinia-messages-substrate "bridge-runtime-common/runtime-benchmarks", "pallet-bridge-grandpa/runtime-benchmarks", @@ -325,7 +323,6 @@ runtime-benchmarks = [ "pallet-proxy/runtime-benchmarks", "pallet-scheduler/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", - "pallet-tips/runtime-benchmarks", "pallet-treasury/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "pallet-vesting/runtime-benchmarks", @@ -389,7 +386,6 @@ try-runtime = [ "pallet-scheduler/try-runtime", "pallet-session/try-runtime", "pallet-timestamp/try-runtime", - "pallet-tips/try-runtime", "pallet-transaction-payment/try-runtime", "pallet-treasury/try-runtime", "pallet-utility/try-runtime", diff --git a/runtime/darwinia/src/lib.rs b/runtime/darwinia/src/lib.rs index b06384281..9ac149560 100644 --- a/runtime/darwinia/src/lib.rs +++ b/runtime/darwinia/src/lib.rs @@ -86,7 +86,7 @@ pub const VERSION: sp_version::RuntimeVersion = sp_version::RuntimeVersion { spec_name: sp_runtime::create_runtime_str!("Darwinia2"), impl_name: sp_runtime::create_runtime_str!("DarwiniaOfficialRust"), authoring_version: 0, - spec_version: 6_4_0_1, + spec_version: 6_4_0_2, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 0, @@ -150,7 +150,7 @@ frame_support::construct_runtime! { PhragmenElection: pallet_elections_phragmen = 21, TechnicalMembership: pallet_membership:: = 22, Treasury: pallet_treasury = 23, - Tips: pallet_tips = 24, + // Tips: pallet_tips = 24, // Utility stuff. // Sudo: pallet_sudo = 25, @@ -209,7 +209,6 @@ frame_benchmarking::define_benchmarks! { [pallet_preimage, Preimage] [pallet_proxy, Proxy] [pallet_scheduler, Scheduler] - [pallet_tips, Tips] [pallet_treasury, Treasury] [pallet_utility, Utility] [pallet_vesting, Vesting] diff --git a/runtime/darwinia/src/migration.rs b/runtime/darwinia/src/migration.rs index 3f8edef09..b31460be6 100644 --- a/runtime/darwinia/src/migration.rs +++ b/runtime/darwinia/src/migration.rs @@ -41,7 +41,10 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { } fn migrate() -> frame_support::weights::Weight { - frame_support::weights::Weight::zero() - // RuntimeBlockWeights::get().max_block + migration::clear_storage_prefix(b"Tips", b"Tips", &[], None, None); + migration::clear_storage_prefix(b"Tips", b"Reasons", &[], None, None); + + // frame_support::weights::Weight::zero() + RuntimeBlockWeights::get().max_block // ::DbWeight::get().reads_writes(0, 1) } diff --git a/runtime/darwinia/src/pallets.rs b/runtime/darwinia/src/pallets.rs index 2b3d7db46..f89c86fd5 100644 --- a/runtime/darwinia/src/pallets.rs +++ b/runtime/darwinia/src/pallets.rs @@ -78,8 +78,6 @@ mod membership; mod treasury; -mod tips; - // Utility stuff. mod utility; diff --git a/runtime/darwinia/src/pallets/proxy.rs b/runtime/darwinia/src/pallets/proxy.rs index d622afc5c..804831733 100644 --- a/runtime/darwinia/src/pallets/proxy.rs +++ b/runtime/darwinia/src/pallets/proxy.rs @@ -72,7 +72,6 @@ impl frame_support::traits::InstanceFilter for ProxyType { | RuntimeCall::TechnicalCommittee(..) | RuntimeCall::PhragmenElection(..) | RuntimeCall::Treasury(..) - | RuntimeCall::Tips(..) ), ProxyType::Staking => { matches!( diff --git a/runtime/darwinia/src/pallets/tips.rs b/runtime/darwinia/src/pallets/tips.rs deleted file mode 100644 index e5e1ff68a..000000000 --- a/runtime/darwinia/src/pallets/tips.rs +++ /dev/null @@ -1,35 +0,0 @@ -// This file is part of Darwinia. -// -// Copyright (C) 2018-2023 Darwinia Network -// SPDX-License-Identifier: GPL-3.0 -// -// Darwinia 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. -// -// Darwinia 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 Darwinia. If not, see . - -// darwinia -use crate::*; - -frame_support::parameter_types! { - pub const TipFindersFee: sp_runtime::Percent = sp_runtime::Percent::from_percent(20); -} - -impl pallet_tips::Config for Runtime { - type DataDepositPerByte = ConstU128<{ darwinia_deposit(0, 1) }>; - type MaximumReasonLength = ConstU32<16384>; - type RuntimeEvent = RuntimeEvent; - type TipCountdown = ConstU32; - type TipFindersFee = TipFindersFee; - type TipReportDepositBase = ConstU128<{ 100 * UNIT }>; - type Tippers = PhragmenElection; - type WeightInfo = weights::pallet_tips::WeightInfo; -} diff --git a/runtime/darwinia/src/weights.rs b/runtime/darwinia/src/weights.rs index d7dbd9626..11f26dd14 100644 --- a/runtime/darwinia/src/weights.rs +++ b/runtime/darwinia/src/weights.rs @@ -47,7 +47,6 @@ pub mod pallet_proxy; pub mod pallet_scheduler; pub mod pallet_session; pub mod pallet_timestamp; -pub mod pallet_tips; pub mod pallet_treasury; pub mod pallet_utility; pub mod pallet_vesting; diff --git a/runtime/darwinia/src/weights/pallet_tips.rs b/runtime/darwinia/src/weights/pallet_tips.rs deleted file mode 100644 index 6822bb003..000000000 --- a/runtime/darwinia/src/weights/pallet_tips.rs +++ /dev/null @@ -1,172 +0,0 @@ -// This file is part of Darwinia. -// -// Copyright (C) 2018-2023 Darwinia Network -// SPDX-License-Identifier: GPL-3.0 -// -// Darwinia 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. -// -// Darwinia 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 Darwinia. If not, see . - -//! Autogenerated weights for `pallet_tips` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-07-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `inv.cafe`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("darwinia-dev"), DB CACHE: 1024 - -// Executed Command: -// target/release/darwinia -// benchmark -// pallet -// --header -// .maintain/license-header -// --execution -// wasm -// --heap-pages -// 4096 -// --chain -// darwinia-dev -// --output -// runtime/darwinia/src/weights -// --extrinsic -// * -// --pallet -// * -// --steps -// 50 -// --repeat -// 20 - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_tips`. -pub struct WeightInfo(PhantomData); -impl pallet_tips::WeightInfo for WeightInfo { - /// Storage: Tips Reasons (r:1 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// The range of component `r` is `[0, 16384]`. - fn report_awesome(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `4` - // Estimated: `3469` - // Minimum execution time: 20_260_000 picoseconds. - Weight::from_parts(21_240_211, 0) - .saturating_add(Weight::from_parts(0, 3469)) - // Standard Error: 8 - .saturating_add(Weight::from_parts(950, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// Storage: Tips Reasons (r:0 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - fn retract_tip() -> Weight { - // Proof Size summary in bytes: - // Measured: `197` - // Estimated: `3662` - // Minimum execution time: 19_970_000 picoseconds. - Weight::from_parts(20_829_000, 0) - .saturating_add(Weight::from_parts(0, 3662)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Tips Reasons (r:1 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - /// Storage: Tips Tips (r:0 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// The range of component `r` is `[0, 16384]`. - /// The range of component `t` is `[1, 7]`. - fn tip_new(r: u32, t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `108 + t * (52 ±0)` - // Estimated: `3572 + t * (52 ±0)` - // Minimum execution time: 12_744_000 picoseconds. - Weight::from_parts(12_569_989, 0) - .saturating_add(Weight::from_parts(0, 3572)) - // Standard Error: 5 - .saturating_add(Weight::from_parts(873, 0).saturating_mul(r.into())) - // Standard Error: 13_570 - .saturating_add(Weight::from_parts(172_287, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 52).saturating_mul(t.into())) - } - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// The range of component `t` is `[1, 7]`. - fn tip(t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `305 + t * (88 ±0)` - // Estimated: `3769 + t * (88 ±0)` - // Minimum execution time: 9_959_000 picoseconds. - Weight::from_parts(10_823_861, 0) - .saturating_add(Weight::from_parts(0, 3769)) - // Standard Error: 6_370 - .saturating_add(Weight::from_parts(72_260, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 88).saturating_mul(t.into())) - } - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (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(116), added: 2591, mode: MaxEncodedLen) - /// Storage: Tips Reasons (r:0 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - /// The range of component `t` is `[1, 7]`. - fn close_tip(t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `473 + t * (88 ±0)` - // Estimated: `6172 + t * (90 ±0)` - // Minimum execution time: 43_366_000 picoseconds. - Weight::from_parts(46_817_301, 0) - .saturating_add(Weight::from_parts(0, 6172)) - // Standard Error: 15_434 - .saturating_add(Weight::from_parts(18_089, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(Weight::from_parts(0, 90).saturating_mul(t.into())) - } - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// Storage: Tips Reasons (r:0 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - /// The range of component `t` is `[1, 7]`. - fn slash_tip(t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `233` - // Estimated: `3698` - // Minimum execution time: 8_929_000 picoseconds. - Weight::from_parts(9_865_686, 0) - .saturating_add(Weight::from_parts(0, 3698)) - // Standard Error: 6_875 - .saturating_add(Weight::from_parts(31_951, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } -} diff --git a/runtime/pangolin/Cargo.toml b/runtime/pangolin/Cargo.toml index 0f8103c57..7d52d470d 100644 --- a/runtime/pangolin/Cargo.toml +++ b/runtime/pangolin/Cargo.toml @@ -111,7 +111,6 @@ pallet-scheduler = { workspace = true } pallet-session = { workspace = true } pallet-sudo = { workspace = true } pallet-timestamp = { workspace = true } -pallet-tips = { workspace = true } pallet-transaction-payment = { workspace = true } pallet-transaction-payment-rpc-runtime-api = { workspace = true } pallet-treasury = { workspace = true } @@ -243,7 +242,6 @@ std = [ "pallet-session/std", "pallet-sudo/std", "pallet-timestamp/std", - "pallet-tips/std", "pallet-transaction-payment-rpc-runtime-api/std", "pallet-transaction-payment/std", "pallet-treasury/std", @@ -342,7 +340,6 @@ runtime-benchmarks = [ "pallet-scheduler/runtime-benchmarks", "pallet-sudo/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", - "pallet-tips/runtime-benchmarks", "pallet-treasury/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "sp-runtime/runtime-benchmarks", @@ -411,7 +408,6 @@ try-runtime = [ "pallet-session/try-runtime", "pallet-sudo/try-runtime", "pallet-timestamp/try-runtime", - "pallet-tips/try-runtime", "pallet-transaction-payment/try-runtime", "pallet-treasury/try-runtime", "pallet-utility/try-runtime", diff --git a/runtime/pangolin/src/lib.rs b/runtime/pangolin/src/lib.rs index a25c9050e..51c250681 100644 --- a/runtime/pangolin/src/lib.rs +++ b/runtime/pangolin/src/lib.rs @@ -87,7 +87,7 @@ pub const VERSION: sp_version::RuntimeVersion = sp_version::RuntimeVersion { spec_name: sp_runtime::create_runtime_str!("Pangolin2"), impl_name: sp_runtime::create_runtime_str!("DarwiniaOfficialRust"), authoring_version: 0, - spec_version: 6_4_0_1, + spec_version: 6_4_0_2, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 0, @@ -151,7 +151,7 @@ frame_support::construct_runtime! { PhragmenElection: pallet_elections_phragmen = 21, TechnicalMembership: pallet_membership:: = 22, Treasury: pallet_treasury = 23, - Tips: pallet_tips = 24, + // Tips: pallet_tips = 24, // Utility stuff. Sudo: pallet_sudo = 25, @@ -213,7 +213,6 @@ frame_benchmarking::define_benchmarks! { [pallet_preimage, Preimage] [pallet_proxy, Proxy] [pallet_scheduler, Scheduler] - [pallet_tips, Tips] [pallet_treasury, Treasury] [pallet_utility, Utility] [pallet_session, SessionBench::] diff --git a/runtime/pangolin/src/pallets.rs b/runtime/pangolin/src/pallets.rs index 4fade8be8..54fa3a5c1 100644 --- a/runtime/pangolin/src/pallets.rs +++ b/runtime/pangolin/src/pallets.rs @@ -77,8 +77,6 @@ mod membership; mod treasury; pub use treasury::*; -mod tips; - // Utility stuff. mod sudo; diff --git a/runtime/pangolin/src/pallets/proxy.rs b/runtime/pangolin/src/pallets/proxy.rs index b606cc9a1..0ea3fdb56 100644 --- a/runtime/pangolin/src/pallets/proxy.rs +++ b/runtime/pangolin/src/pallets/proxy.rs @@ -70,7 +70,6 @@ impl frame_support::traits::InstanceFilter for ProxyType { | RuntimeCall::TechnicalCommittee(..) | RuntimeCall::PhragmenElection(..) | RuntimeCall::Treasury(..) - | RuntimeCall::Tips(..) ), ProxyType::Staking => { matches!( diff --git a/runtime/pangolin/src/pallets/tips.rs b/runtime/pangolin/src/pallets/tips.rs deleted file mode 100644 index 7c6f674f9..000000000 --- a/runtime/pangolin/src/pallets/tips.rs +++ /dev/null @@ -1,35 +0,0 @@ -// This file is part of Darwinia. -// -// Copyright (C) 2018-2023 Darwinia Network -// SPDX-License-Identifier: GPL-3.0 -// -// Darwinia 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. -// -// Darwinia 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 Darwinia. If not, see . - -// darwinia -use crate::*; - -frame_support::parameter_types! { - pub const TipFindersFee: sp_runtime::Percent = sp_runtime::Percent::from_percent(20); -} - -impl pallet_tips::Config for Runtime { - type DataDepositPerByte = ConstU128<{ darwinia_deposit(0, 1) }>; - type MaximumReasonLength = ConstU32<16384>; - type RuntimeEvent = RuntimeEvent; - type TipCountdown = ConstU32<{ 10 * MINUTES }>; - type TipFindersFee = TipFindersFee; - type TipReportDepositBase = ConstU128<{ 100 * UNIT }>; - type Tippers = PhragmenElection; - type WeightInfo = weights::pallet_tips::WeightInfo; -} diff --git a/runtime/pangolin/src/weights.rs b/runtime/pangolin/src/weights.rs index ad11c49dd..2b0cc3ec5 100644 --- a/runtime/pangolin/src/weights.rs +++ b/runtime/pangolin/src/weights.rs @@ -47,6 +47,5 @@ pub mod pallet_proxy; pub mod pallet_scheduler; pub mod pallet_session; pub mod pallet_timestamp; -pub mod pallet_tips; pub mod pallet_treasury; pub mod pallet_utility; diff --git a/runtime/pangolin/src/weights/pallet_tips.rs b/runtime/pangolin/src/weights/pallet_tips.rs deleted file mode 100644 index 0207549d0..000000000 --- a/runtime/pangolin/src/weights/pallet_tips.rs +++ /dev/null @@ -1,172 +0,0 @@ -// This file is part of Darwinia. -// -// Copyright (C) 2018-2023 Darwinia Network -// SPDX-License-Identifier: GPL-3.0 -// -// Darwinia 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. -// -// Darwinia 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 Darwinia. If not, see . - -//! Autogenerated weights for `pallet_tips` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-07-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `inv.cafe`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("pangolin-dev"), DB CACHE: 1024 - -// Executed Command: -// target/release/darwinia -// benchmark -// pallet -// --header -// .maintain/license-header -// --execution -// wasm -// --heap-pages -// 4096 -// --chain -// pangolin-dev -// --output -// runtime/pangolin/src/weights -// --extrinsic -// * -// --pallet -// * -// --steps -// 50 -// --repeat -// 20 - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_tips`. -pub struct WeightInfo(PhantomData); -impl pallet_tips::WeightInfo for WeightInfo { - /// Storage: Tips Reasons (r:1 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// The range of component `r` is `[0, 16384]`. - fn report_awesome(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `4` - // Estimated: `3469` - // Minimum execution time: 20_749_000 picoseconds. - Weight::from_parts(21_891_635, 0) - .saturating_add(Weight::from_parts(0, 3469)) - // Standard Error: 6 - .saturating_add(Weight::from_parts(928, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// Storage: Tips Reasons (r:0 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - fn retract_tip() -> Weight { - // Proof Size summary in bytes: - // Measured: `197` - // Estimated: `3662` - // Minimum execution time: 19_812_000 picoseconds. - Weight::from_parts(20_521_000, 0) - .saturating_add(Weight::from_parts(0, 3662)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Tips Reasons (r:1 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - /// Storage: Tips Tips (r:0 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// The range of component `r` is `[0, 16384]`. - /// The range of component `t` is `[1, 7]`. - fn tip_new(r: u32, t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `108 + t * (52 ±0)` - // Estimated: `3572 + t * (52 ±0)` - // Minimum execution time: 12_794_000 picoseconds. - Weight::from_parts(12_218_515, 0) - .saturating_add(Weight::from_parts(0, 3572)) - // Standard Error: 3 - .saturating_add(Weight::from_parts(912, 0).saturating_mul(r.into())) - // Standard Error: 8_531 - .saturating_add(Weight::from_parts(215_224, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 52).saturating_mul(t.into())) - } - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// The range of component `t` is `[1, 7]`. - fn tip(t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `305 + t * (88 ±0)` - // Estimated: `3769 + t * (88 ±0)` - // Minimum execution time: 10_052_000 picoseconds. - Weight::from_parts(10_584_093, 0) - .saturating_add(Weight::from_parts(0, 3769)) - // Standard Error: 4_576 - .saturating_add(Weight::from_parts(138_985, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 88).saturating_mul(t.into())) - } - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (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(116), added: 2591, mode: MaxEncodedLen) - /// Storage: Tips Reasons (r:0 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - /// The range of component `t` is `[1, 7]`. - fn close_tip(t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `473 + t * (88 ±0)` - // Estimated: `6172 + t * (90 ±0)` - // Minimum execution time: 44_967_000 picoseconds. - Weight::from_parts(46_737_803, 0) - .saturating_add(Weight::from_parts(0, 6172)) - // Standard Error: 17_789 - .saturating_add(Weight::from_parts(168_402, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(Weight::from_parts(0, 90).saturating_mul(t.into())) - } - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// Storage: Tips Reasons (r:0 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - /// The range of component `t` is `[1, 7]`. - fn slash_tip(t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `233` - // Estimated: `3698` - // Minimum execution time: 9_404_000 picoseconds. - Weight::from_parts(9_986_151, 0) - .saturating_add(Weight::from_parts(0, 3698)) - // Standard Error: 4_102 - .saturating_add(Weight::from_parts(20_038, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } -} diff --git a/runtime/pangoro/Cargo.toml b/runtime/pangoro/Cargo.toml index 1ef2c4b86..7a1722c06 100644 --- a/runtime/pangoro/Cargo.toml +++ b/runtime/pangoro/Cargo.toml @@ -105,7 +105,6 @@ pallet-scheduler = { workspace = true } pallet-session = { workspace = true } pallet-sudo = { workspace = true } pallet-timestamp = { workspace = true } -pallet-tips = { workspace = true } pallet-transaction-payment = { workspace = true } pallet-transaction-payment-rpc-runtime-api = { workspace = true } pallet-treasury = { workspace = true } @@ -231,7 +230,6 @@ std = [ "pallet-session/std", "pallet-sudo/std", "pallet-timestamp/std", - "pallet-tips/std", "pallet-transaction-payment-rpc-runtime-api/std", "pallet-transaction-payment/std", "pallet-treasury/std", @@ -326,7 +324,6 @@ runtime-benchmarks = [ "pallet-scheduler/runtime-benchmarks", "pallet-sudo/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", - "pallet-tips/runtime-benchmarks", "pallet-treasury/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "sp-runtime/runtime-benchmarks", @@ -390,7 +387,6 @@ try-runtime = [ "pallet-session/try-runtime", "pallet-sudo/try-runtime", "pallet-timestamp/try-runtime", - "pallet-tips/try-runtime", "pallet-transaction-payment/try-runtime", "pallet-treasury/try-runtime", "pallet-utility/try-runtime", diff --git a/runtime/pangoro/src/lib.rs b/runtime/pangoro/src/lib.rs index 29df177c8..0e0f3752c 100644 --- a/runtime/pangoro/src/lib.rs +++ b/runtime/pangoro/src/lib.rs @@ -86,7 +86,7 @@ pub const VERSION: sp_version::RuntimeVersion = sp_version::RuntimeVersion { spec_name: sp_runtime::create_runtime_str!("Pangoro2"), impl_name: sp_runtime::create_runtime_str!("DarwiniaOfficialRust"), authoring_version: 0, - spec_version: 6_4_0_1, + spec_version: 6_4_0_2, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 0, @@ -150,7 +150,7 @@ frame_support::construct_runtime! { PhragmenElection: pallet_elections_phragmen = 21, TechnicalMembership: pallet_membership:: = 22, Treasury: pallet_treasury = 23, - Tips: pallet_tips = 24, + // Tips: pallet_tips = 24, // Utility stuff. Sudo: pallet_sudo = 25, @@ -209,7 +209,6 @@ frame_benchmarking::define_benchmarks! { [pallet_preimage, Preimage] [pallet_proxy, Proxy] [pallet_scheduler, Scheduler] - [pallet_tips, Tips] [pallet_treasury, Treasury] [pallet_utility, Utility] [pallet_session, SessionBench::] diff --git a/runtime/pangoro/src/migration.rs b/runtime/pangoro/src/migration.rs index b12f5bda3..ea0a0ac00 100644 --- a/runtime/pangoro/src/migration.rs +++ b/runtime/pangoro/src/migration.rs @@ -41,7 +41,10 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { } fn migrate() -> frame_support::weights::Weight { - frame_support::weights::Weight::zero() - // RuntimeBlockWeights::get().max_block + migration::clear_storage_prefix(b"Tips", b"Tips", &[], None, None); + migration::clear_storage_prefix(b"Tips", b"Reasons", &[], None, None); + + // frame_support::weights::Weight::zero() + RuntimeBlockWeights::get().max_block // ::DbWeight::get().reads_writes(0, 0) } diff --git a/runtime/pangoro/src/pallets.rs b/runtime/pangoro/src/pallets.rs index 19a6c45a8..b85584aea 100644 --- a/runtime/pangoro/src/pallets.rs +++ b/runtime/pangoro/src/pallets.rs @@ -77,8 +77,6 @@ mod membership; mod treasury; pub use treasury::*; -mod tips; - // Utility stuff. mod sudo; diff --git a/runtime/pangoro/src/pallets/proxy.rs b/runtime/pangoro/src/pallets/proxy.rs index b606cc9a1..0ea3fdb56 100644 --- a/runtime/pangoro/src/pallets/proxy.rs +++ b/runtime/pangoro/src/pallets/proxy.rs @@ -70,7 +70,6 @@ impl frame_support::traits::InstanceFilter for ProxyType { | RuntimeCall::TechnicalCommittee(..) | RuntimeCall::PhragmenElection(..) | RuntimeCall::Treasury(..) - | RuntimeCall::Tips(..) ), ProxyType::Staking => { matches!( diff --git a/runtime/pangoro/src/pallets/tips.rs b/runtime/pangoro/src/pallets/tips.rs deleted file mode 100644 index 7c6f674f9..000000000 --- a/runtime/pangoro/src/pallets/tips.rs +++ /dev/null @@ -1,35 +0,0 @@ -// This file is part of Darwinia. -// -// Copyright (C) 2018-2023 Darwinia Network -// SPDX-License-Identifier: GPL-3.0 -// -// Darwinia 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. -// -// Darwinia 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 Darwinia. If not, see . - -// darwinia -use crate::*; - -frame_support::parameter_types! { - pub const TipFindersFee: sp_runtime::Percent = sp_runtime::Percent::from_percent(20); -} - -impl pallet_tips::Config for Runtime { - type DataDepositPerByte = ConstU128<{ darwinia_deposit(0, 1) }>; - type MaximumReasonLength = ConstU32<16384>; - type RuntimeEvent = RuntimeEvent; - type TipCountdown = ConstU32<{ 10 * MINUTES }>; - type TipFindersFee = TipFindersFee; - type TipReportDepositBase = ConstU128<{ 100 * UNIT }>; - type Tippers = PhragmenElection; - type WeightInfo = weights::pallet_tips::WeightInfo; -} diff --git a/runtime/pangoro/src/weights.rs b/runtime/pangoro/src/weights.rs index ad11c49dd..2b0cc3ec5 100644 --- a/runtime/pangoro/src/weights.rs +++ b/runtime/pangoro/src/weights.rs @@ -47,6 +47,5 @@ pub mod pallet_proxy; pub mod pallet_scheduler; pub mod pallet_session; pub mod pallet_timestamp; -pub mod pallet_tips; pub mod pallet_treasury; pub mod pallet_utility; diff --git a/runtime/pangoro/src/weights/pallet_tips.rs b/runtime/pangoro/src/weights/pallet_tips.rs deleted file mode 100644 index 1ebc32a51..000000000 --- a/runtime/pangoro/src/weights/pallet_tips.rs +++ /dev/null @@ -1,170 +0,0 @@ -// This file is part of Darwinia. -// -// Copyright (C) 2018-2023 Darwinia Network -// SPDX-License-Identifier: GPL-3.0 -// -// Darwinia 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. -// -// Darwinia 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 Darwinia. If not, see . - -//! Autogenerated weights for `pallet_tips` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-07-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `inv.cafe`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("pangoro-dev"), DB CACHE: 1024 - -// Executed Command: -// target/release/darwinia -// benchmark -// pallet -// --header -// .maintain/license-header -// --execution -// wasm -// --heap-pages -// 4096 -// --chain -// pangoro-dev -// --output -// runtime/pangoro/src/weights -// --extrinsic -// * -// --pallet -// * -// --steps -// 50 -// --repeat -// 20 - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_tips`. -pub struct WeightInfo(PhantomData); -impl pallet_tips::WeightInfo for WeightInfo { - /// Storage: Tips Reasons (r:1 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// The range of component `r` is `[0, 16384]`. - fn report_awesome(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `4` - // Estimated: `3469` - // Minimum execution time: 20_456_000 picoseconds. - Weight::from_parts(21_789_357, 0) - .saturating_add(Weight::from_parts(0, 3469)) - // Standard Error: 6 - .saturating_add(Weight::from_parts(918, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// Storage: Tips Reasons (r:0 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - fn retract_tip() -> Weight { - // Proof Size summary in bytes: - // Measured: `197` - // Estimated: `3662` - // Minimum execution time: 20_078_000 picoseconds. - Weight::from_parts(20_542_000, 0) - .saturating_add(Weight::from_parts(0, 3662)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Tips Reasons (r:1 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - /// Storage: Tips Tips (r:0 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// The range of component `r` is `[0, 16384]`. - /// The range of component `t` is `[1, 7]`. - fn tip_new(r: u32, t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `108 + t * (52 ±0)` - // Estimated: `3572 + t * (52 ±0)` - // Minimum execution time: 12_507_000 picoseconds. - Weight::from_parts(13_018_432, 0) - .saturating_add(Weight::from_parts(0, 3572)) - // Standard Error: 7 - .saturating_add(Weight::from_parts(823, 0).saturating_mul(r.into())) - // Standard Error: 19_774 - .saturating_add(Weight::from_parts(296_824, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 52).saturating_mul(t.into())) - } - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// The range of component `t` is `[1, 7]`. - fn tip(t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `305 + t * (88 ±0)` - // Estimated: `3769 + t * (88 ±0)` - // Minimum execution time: 10_046_000 picoseconds. - Weight::from_parts(11_262_389, 0) - .saturating_add(Weight::from_parts(0, 3769)) - // Standard Error: 9_371 - .saturating_add(Weight::from_parts(38_342, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 88).saturating_mul(t.into())) - } - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// Storage: PhragmenElection Members (r:1 w:0) - /// Proof Skipped: PhragmenElection Members (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(116), added: 2591, mode: MaxEncodedLen) - /// Storage: Tips Reasons (r:0 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - /// The range of component `t` is `[1, 7]`. - fn close_tip(t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `473 + t * (88 ±0)` - // Estimated: `6172 + t * (90 ±0)` - // Minimum execution time: 44_785_000 picoseconds. - Weight::from_parts(45_486_496, 0) - .saturating_add(Weight::from_parts(0, 6172)) - // Standard Error: 17_418 - .saturating_add(Weight::from_parts(535_609, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(Weight::from_parts(0, 90).saturating_mul(t.into())) - } - /// Storage: Tips Tips (r:1 w:1) - /// Proof Skipped: Tips Tips (max_values: None, max_size: None, mode: Measured) - /// Storage: Tips Reasons (r:0 w:1) - /// Proof Skipped: Tips Reasons (max_values: None, max_size: None, mode: Measured) - /// The range of component `t` is `[1, 7]`. - fn slash_tip(_t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `233` - // Estimated: `3698` - // Minimum execution time: 9_393_000 picoseconds. - Weight::from_parts(11_519_200, 0) - .saturating_add(Weight::from_parts(0, 3698)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } -}