mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 09:21:04 +00:00
Add Child Bounties to Polkadot and Kusama (#4863)
* add to kusama * polkadot too * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet_child_bounties --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/ * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet_child_bounties --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/ * Update Cargo.lock * Update runtime/kusama/src/lib.rs * Update runtime/polkadot/src/lib.rs * import Co-authored-by: Parity Bot <admin@parity.io>
This commit is contained in:
Generated
+183
-162
File diff suppressed because it is too large
Load Diff
@@ -41,6 +41,7 @@ pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "maste
|
|||||||
pallet-bags-list = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-bags-list = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-bounties = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-bounties = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
|
pallet-child-bounties = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
@@ -129,6 +130,7 @@ std = [
|
|||||||
"pallet-bags-list/std",
|
"pallet-bags-list/std",
|
||||||
"pallet-balances/std",
|
"pallet-balances/std",
|
||||||
"pallet-bounties/std",
|
"pallet-bounties/std",
|
||||||
|
"pallet-child-bounties/std",
|
||||||
"pallet-transaction-payment/std",
|
"pallet-transaction-payment/std",
|
||||||
"pallet-transaction-payment-rpc-runtime-api/std",
|
"pallet-transaction-payment-rpc-runtime-api/std",
|
||||||
"pallet-collective/std",
|
"pallet-collective/std",
|
||||||
@@ -190,6 +192,7 @@ runtime-benchmarks = [
|
|||||||
"pallet-babe/runtime-benchmarks",
|
"pallet-babe/runtime-benchmarks",
|
||||||
"pallet-balances/runtime-benchmarks",
|
"pallet-balances/runtime-benchmarks",
|
||||||
"pallet-bounties/runtime-benchmarks",
|
"pallet-bounties/runtime-benchmarks",
|
||||||
|
"pallet-child-bounties/runtime-benchmarks",
|
||||||
"pallet-collective/runtime-benchmarks",
|
"pallet-collective/runtime-benchmarks",
|
||||||
"pallet-democracy/runtime-benchmarks",
|
"pallet-democracy/runtime-benchmarks",
|
||||||
"pallet-elections-phragmen/runtime-benchmarks",
|
"pallet-elections-phragmen/runtime-benchmarks",
|
||||||
@@ -229,6 +232,7 @@ try-runtime = [
|
|||||||
"pallet-authorship/try-runtime",
|
"pallet-authorship/try-runtime",
|
||||||
"pallet-balances/try-runtime",
|
"pallet-balances/try-runtime",
|
||||||
"pallet-bounties/try-runtime",
|
"pallet-bounties/try-runtime",
|
||||||
|
"pallet-child-bounties/try-runtime",
|
||||||
"pallet-transaction-payment/try-runtime",
|
"pallet-transaction-payment/try-runtime",
|
||||||
"pallet-collective/try-runtime",
|
"pallet-collective/try-runtime",
|
||||||
"pallet-elections-phragmen/try-runtime",
|
"pallet-elections-phragmen/try-runtime",
|
||||||
|
|||||||
@@ -785,13 +785,28 @@ impl pallet_bounties::Config for Runtime {
|
|||||||
type BountyUpdatePeriod = BountyUpdatePeriod;
|
type BountyUpdatePeriod = BountyUpdatePeriod;
|
||||||
type BountyCuratorDeposit = BountyCuratorDeposit;
|
type BountyCuratorDeposit = BountyCuratorDeposit;
|
||||||
type BountyValueMinimum = BountyValueMinimum;
|
type BountyValueMinimum = BountyValueMinimum;
|
||||||
type ChildBountyManager = ();
|
type ChildBountyManager = ChildBounties;
|
||||||
type DataDepositPerByte = DataDepositPerByte;
|
type DataDepositPerByte = DataDepositPerByte;
|
||||||
type Event = Event;
|
type Event = Event;
|
||||||
type MaximumReasonLength = MaximumReasonLength;
|
type MaximumReasonLength = MaximumReasonLength;
|
||||||
type WeightInfo = weights::pallet_bounties::WeightInfo<Runtime>;
|
type WeightInfo = weights::pallet_bounties::WeightInfo<Runtime>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
parameter_types! {
|
||||||
|
pub const MaxActiveChildBountyCount: u32 = 100;
|
||||||
|
pub const ChildBountyValueMinimum: Balance = BountyValueMinimum::get() / 10;
|
||||||
|
// This will be 1% of the bounty value.
|
||||||
|
pub const ChildBountyCuratorDepositBase: Permill = Permill::from_percent(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
impl pallet_child_bounties::Config for Runtime {
|
||||||
|
type Event = Event;
|
||||||
|
type MaxActiveChildBountyCount = MaxActiveChildBountyCount;
|
||||||
|
type ChildBountyValueMinimum = ChildBountyValueMinimum;
|
||||||
|
type ChildBountyCuratorDepositBase = ChildBountyCuratorDepositBase;
|
||||||
|
type WeightInfo = weights::pallet_child_bounties::WeightInfo<Runtime>;
|
||||||
|
}
|
||||||
|
|
||||||
impl pallet_tips::Config for Runtime {
|
impl pallet_tips::Config for Runtime {
|
||||||
type MaximumReasonLength = MaximumReasonLength;
|
type MaximumReasonLength = MaximumReasonLength;
|
||||||
type DataDepositPerByte = DataDepositPerByte;
|
type DataDepositPerByte = DataDepositPerByte;
|
||||||
@@ -1109,6 +1124,7 @@ impl InstanceFilter<Call> for ProxyType {
|
|||||||
Call::TechnicalMembership(..) |
|
Call::TechnicalMembership(..) |
|
||||||
Call::Treasury(..) |
|
Call::Treasury(..) |
|
||||||
Call::Bounties(..) |
|
Call::Bounties(..) |
|
||||||
|
Call::ChildBounties(..) |
|
||||||
Call::Tips(..) |
|
Call::Tips(..) |
|
||||||
Call::Claims(..) |
|
Call::Claims(..) |
|
||||||
Call::Utility(..) |
|
Call::Utility(..) |
|
||||||
@@ -1143,7 +1159,8 @@ impl InstanceFilter<Call> for ProxyType {
|
|||||||
Call::Council(..) | Call::TechnicalCommittee(..) |
|
Call::Council(..) | Call::TechnicalCommittee(..) |
|
||||||
Call::PhragmenElection(..) |
|
Call::PhragmenElection(..) |
|
||||||
Call::Treasury(..) | Call::Bounties(..) |
|
Call::Treasury(..) | Call::Bounties(..) |
|
||||||
Call::Tips(..) | Call::Utility(..)
|
Call::Tips(..) | Call::Utility(..) |
|
||||||
|
Call::ChildBounties(..)
|
||||||
),
|
),
|
||||||
ProxyType::Staking => {
|
ProxyType::Staking => {
|
||||||
matches!(c, Call::Staking(..) | Call::Session(..) | Call::Utility(..))
|
matches!(c, Call::Staking(..) | Call::Session(..) | Call::Utility(..))
|
||||||
@@ -1427,8 +1444,9 @@ construct_runtime! {
|
|||||||
// Preimage registrar.
|
// Preimage registrar.
|
||||||
Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>} = 32,
|
Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>} = 32,
|
||||||
|
|
||||||
// Bounties module.
|
// Bounties modules.
|
||||||
Bounties: pallet_bounties::{Pallet, Call, Storage, Event<T>} = 35,
|
Bounties: pallet_bounties::{Pallet, Call, Storage, Event<T>} = 35,
|
||||||
|
ChildBounties: pallet_child_bounties = 40,
|
||||||
|
|
||||||
// Tips module.
|
// Tips module.
|
||||||
Tips: pallet_tips::{Pallet, Call, Storage, Event<T>} = 36,
|
Tips: pallet_tips::{Pallet, Call, Storage, Event<T>} = 36,
|
||||||
@@ -1547,6 +1565,7 @@ mod benches {
|
|||||||
[pallet_bags_list, BagsList]
|
[pallet_bags_list, BagsList]
|
||||||
[frame_benchmarking::baseline, Baseline::<Runtime>]
|
[frame_benchmarking::baseline, Baseline::<Runtime>]
|
||||||
[pallet_bounties, Bounties]
|
[pallet_bounties, Bounties]
|
||||||
|
[pallet_child_bounties, ChildBounties]
|
||||||
[pallet_collective, Council]
|
[pallet_collective, Council]
|
||||||
[pallet_collective, TechnicalCommittee]
|
[pallet_collective, TechnicalCommittee]
|
||||||
[pallet_democracy, Democracy]
|
[pallet_democracy, Democracy]
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ pub mod frame_system;
|
|||||||
pub mod pallet_bags_list;
|
pub mod pallet_bags_list;
|
||||||
pub mod pallet_balances;
|
pub mod pallet_balances;
|
||||||
pub mod pallet_bounties;
|
pub mod pallet_bounties;
|
||||||
|
pub mod pallet_child_bounties;
|
||||||
pub mod pallet_collective_council;
|
pub mod pallet_collective_council;
|
||||||
pub mod pallet_collective_technical_committee;
|
pub mod pallet_collective_technical_committee;
|
||||||
pub mod pallet_democracy;
|
pub mod pallet_democracy;
|
||||||
|
|||||||
@@ -0,0 +1,121 @@
|
|||||||
|
// Copyright 2017-2021 Parity Technologies (UK) Ltd.
|
||||||
|
// This file is part of Polkadot.
|
||||||
|
|
||||||
|
// Polkadot is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
|
||||||
|
// Polkadot is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//! Autogenerated weights for `pallet_child_bounties`
|
||||||
|
//!
|
||||||
|
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||||
|
//! DATE: 2022-02-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||||
|
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||||
|
|
||||||
|
// Executed Command:
|
||||||
|
// target/production/polkadot
|
||||||
|
// benchmark
|
||||||
|
// --chain=kusama-dev
|
||||||
|
// --steps=50
|
||||||
|
// --repeat=20
|
||||||
|
// --pallet=pallet_child_bounties
|
||||||
|
// --extrinsic=*
|
||||||
|
// --execution=wasm
|
||||||
|
// --wasm-execution=compiled
|
||||||
|
// --heap-pages=4096
|
||||||
|
// --header=./file_header.txt
|
||||||
|
// --output=./runtime/kusama/src/weights/
|
||||||
|
|
||||||
|
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||||
|
#![allow(unused_parens)]
|
||||||
|
#![allow(unused_imports)]
|
||||||
|
|
||||||
|
use frame_support::{traits::Get, weights::Weight};
|
||||||
|
use sp_std::marker::PhantomData;
|
||||||
|
|
||||||
|
/// Weight functions for `pallet_child_bounties`.
|
||||||
|
pub struct WeightInfo<T>(PhantomData<T>);
|
||||||
|
impl<T: frame_system::Config> pallet_child_bounties::WeightInfo for WeightInfo<T> {
|
||||||
|
// Storage: ChildBounties ParentChildBounties (r:1 w:1)
|
||||||
|
// Storage: Bounties Bounties (r:1 w:0)
|
||||||
|
// Storage: System Account (r:2 w:2)
|
||||||
|
// Storage: ChildBounties ChildBountyCount (r:1 w:1)
|
||||||
|
// Storage: ChildBounties ChildBountyDescriptions (r:0 w:1)
|
||||||
|
// Storage: ChildBounties ChildBounties (r:0 w:1)
|
||||||
|
fn add_child_bounty(d: u32, ) -> Weight {
|
||||||
|
(39_877_000 as Weight)
|
||||||
|
// Standard Error: 0
|
||||||
|
.saturating_add((1_000 as Weight).saturating_mul(d as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: Bounties Bounties (r:1 w:0)
|
||||||
|
// Storage: ChildBounties ChildBounties (r:1 w:1)
|
||||||
|
// Storage: ChildBounties ChildrenCuratorFees (r:1 w:1)
|
||||||
|
fn propose_curator() -> Weight {
|
||||||
|
(10_422_000 as Weight)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: Bounties Bounties (r:1 w:0)
|
||||||
|
// Storage: ChildBounties ChildBounties (r:1 w:1)
|
||||||
|
// Storage: System Account (r:1 w:1)
|
||||||
|
fn accept_curator() -> Weight {
|
||||||
|
(21_245_000 as Weight)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: ChildBounties ChildBounties (r:1 w:1)
|
||||||
|
// Storage: Bounties Bounties (r:1 w:0)
|
||||||
|
// Storage: System Account (r:1 w:1)
|
||||||
|
fn unassign_curator() -> Weight {
|
||||||
|
(31_414_000 as Weight)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: Bounties Bounties (r:1 w:0)
|
||||||
|
// Storage: ChildBounties ChildBounties (r:1 w:1)
|
||||||
|
fn award_child_bounty() -> Weight {
|
||||||
|
(16_218_000 as Weight)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: ChildBounties ChildBounties (r:1 w:1)
|
||||||
|
// Storage: System Account (r:3 w:3)
|
||||||
|
// Storage: ChildBounties ParentChildBounties (r:1 w:1)
|
||||||
|
// Storage: ChildBounties ChildBountyDescriptions (r:0 w:1)
|
||||||
|
fn claim_child_bounty() -> Weight {
|
||||||
|
(53_246_000 as Weight)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: Bounties Bounties (r:1 w:0)
|
||||||
|
// Storage: ChildBounties ChildBounties (r:1 w:1)
|
||||||
|
// Storage: ChildBounties ChildrenCuratorFees (r:1 w:1)
|
||||||
|
// Storage: ChildBounties ParentChildBounties (r:1 w:1)
|
||||||
|
// Storage: System Account (r:2 w:2)
|
||||||
|
// Storage: ChildBounties ChildBountyDescriptions (r:0 w:1)
|
||||||
|
fn close_child_bounty_added() -> Weight {
|
||||||
|
(38_171_000 as Weight)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(6 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: Bounties Bounties (r:1 w:0)
|
||||||
|
// Storage: ChildBounties ChildBounties (r:1 w:1)
|
||||||
|
// Storage: System Account (r:3 w:3)
|
||||||
|
// Storage: ChildBounties ChildrenCuratorFees (r:1 w:1)
|
||||||
|
// Storage: ChildBounties ParentChildBounties (r:1 w:1)
|
||||||
|
// Storage: ChildBounties ChildBountyDescriptions (r:0 w:1)
|
||||||
|
fn close_child_bounty_active() -> Weight {
|
||||||
|
(45_927_000 as Weight)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(7 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(7 as Weight))
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -39,6 +39,7 @@ pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "maste
|
|||||||
pallet-bags-list = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-bags-list = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-bounties = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-bounties = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
|
pallet-child-bounties = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
@@ -125,6 +126,7 @@ std = [
|
|||||||
"pallet-bags-list/std",
|
"pallet-bags-list/std",
|
||||||
"pallet-balances/std",
|
"pallet-balances/std",
|
||||||
"pallet-bounties/std",
|
"pallet-bounties/std",
|
||||||
|
"pallet-child-bounties/std",
|
||||||
"pallet-transaction-payment/std",
|
"pallet-transaction-payment/std",
|
||||||
"pallet-transaction-payment-rpc-runtime-api/std",
|
"pallet-transaction-payment-rpc-runtime-api/std",
|
||||||
"pallet-collective/std",
|
"pallet-collective/std",
|
||||||
@@ -198,6 +200,7 @@ runtime-benchmarks = [
|
|||||||
"pallet-timestamp/runtime-benchmarks",
|
"pallet-timestamp/runtime-benchmarks",
|
||||||
"pallet-treasury/runtime-benchmarks",
|
"pallet-treasury/runtime-benchmarks",
|
||||||
"pallet-bounties/runtime-benchmarks",
|
"pallet-bounties/runtime-benchmarks",
|
||||||
|
"pallet-child-bounties/runtime-benchmarks",
|
||||||
"pallet-tips/runtime-benchmarks",
|
"pallet-tips/runtime-benchmarks",
|
||||||
"pallet-utility/runtime-benchmarks",
|
"pallet-utility/runtime-benchmarks",
|
||||||
"pallet-vesting/runtime-benchmarks",
|
"pallet-vesting/runtime-benchmarks",
|
||||||
@@ -218,6 +221,7 @@ try-runtime = [
|
|||||||
"pallet-authorship/try-runtime",
|
"pallet-authorship/try-runtime",
|
||||||
"pallet-balances/try-runtime",
|
"pallet-balances/try-runtime",
|
||||||
"pallet-bounties/try-runtime",
|
"pallet-bounties/try-runtime",
|
||||||
|
"pallet-child-bounties/try-runtime",
|
||||||
"pallet-transaction-payment/try-runtime",
|
"pallet-transaction-payment/try-runtime",
|
||||||
"pallet-collective/try-runtime",
|
"pallet-collective/try-runtime",
|
||||||
"pallet-elections-phragmen/try-runtime",
|
"pallet-elections-phragmen/try-runtime",
|
||||||
|
|||||||
@@ -160,6 +160,7 @@ impl Contains<Call> for BaseFilter {
|
|||||||
Call::Proxy(_) |
|
Call::Proxy(_) |
|
||||||
Call::Multisig(_) |
|
Call::Multisig(_) |
|
||||||
Call::Bounties(_) |
|
Call::Bounties(_) |
|
||||||
|
Call::ChildBounties(_) |
|
||||||
Call::Tips(_) |
|
Call::Tips(_) |
|
||||||
Call::ElectionProviderMultiPhase(_) |
|
Call::ElectionProviderMultiPhase(_) |
|
||||||
Call::Configuration(_) |
|
Call::Configuration(_) |
|
||||||
@@ -817,12 +818,27 @@ impl pallet_bounties::Config for Runtime {
|
|||||||
type BountyUpdatePeriod = BountyUpdatePeriod;
|
type BountyUpdatePeriod = BountyUpdatePeriod;
|
||||||
type BountyCuratorDeposit = BountyCuratorDeposit;
|
type BountyCuratorDeposit = BountyCuratorDeposit;
|
||||||
type BountyValueMinimum = BountyValueMinimum;
|
type BountyValueMinimum = BountyValueMinimum;
|
||||||
type ChildBountyManager = ();
|
type ChildBountyManager = ChildBounties;
|
||||||
type DataDepositPerByte = DataDepositPerByte;
|
type DataDepositPerByte = DataDepositPerByte;
|
||||||
type MaximumReasonLength = MaximumReasonLength;
|
type MaximumReasonLength = MaximumReasonLength;
|
||||||
type WeightInfo = weights::pallet_bounties::WeightInfo<Runtime>;
|
type WeightInfo = weights::pallet_bounties::WeightInfo<Runtime>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
parameter_types! {
|
||||||
|
pub const MaxActiveChildBountyCount: u32 = 100;
|
||||||
|
pub const ChildBountyValueMinimum: Balance = BountyValueMinimum::get() / 10;
|
||||||
|
// This will be 1% of the bounty value.
|
||||||
|
pub const ChildBountyCuratorDepositBase: Permill = Permill::from_percent(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
impl pallet_child_bounties::Config for Runtime {
|
||||||
|
type Event = Event;
|
||||||
|
type MaxActiveChildBountyCount = MaxActiveChildBountyCount;
|
||||||
|
type ChildBountyValueMinimum = ChildBountyValueMinimum;
|
||||||
|
type ChildBountyCuratorDepositBase = ChildBountyCuratorDepositBase;
|
||||||
|
type WeightInfo = weights::pallet_child_bounties::WeightInfo<Runtime>;
|
||||||
|
}
|
||||||
|
|
||||||
impl pallet_tips::Config for Runtime {
|
impl pallet_tips::Config for Runtime {
|
||||||
type Event = Event;
|
type Event = Event;
|
||||||
type DataDepositPerByte = DataDepositPerByte;
|
type DataDepositPerByte = DataDepositPerByte;
|
||||||
@@ -1105,6 +1121,7 @@ impl InstanceFilter<Call> for ProxyType {
|
|||||||
Call::TechnicalMembership(..) |
|
Call::TechnicalMembership(..) |
|
||||||
Call::Treasury(..) |
|
Call::Treasury(..) |
|
||||||
Call::Bounties(..) |
|
Call::Bounties(..) |
|
||||||
|
Call::ChildBounties(..) |
|
||||||
Call::Tips(..) |
|
Call::Tips(..) |
|
||||||
Call::Claims(..) |
|
Call::Claims(..) |
|
||||||
Call::Vesting(pallet_vesting::Call::vest{..}) |
|
Call::Vesting(pallet_vesting::Call::vest{..}) |
|
||||||
@@ -1129,7 +1146,8 @@ impl InstanceFilter<Call> for ProxyType {
|
|||||||
Call::Council(..) | Call::TechnicalCommittee(..) |
|
Call::Council(..) | Call::TechnicalCommittee(..) |
|
||||||
Call::PhragmenElection(..) |
|
Call::PhragmenElection(..) |
|
||||||
Call::Treasury(..) | Call::Bounties(..) |
|
Call::Treasury(..) | Call::Bounties(..) |
|
||||||
Call::Tips(..) | Call::Utility(..)
|
Call::Tips(..) | Call::Utility(..) |
|
||||||
|
Call::ChildBounties(..)
|
||||||
),
|
),
|
||||||
ProxyType::Staking => {
|
ProxyType::Staking => {
|
||||||
matches!(c, Call::Staking(..) | Call::Session(..) | Call::Utility(..))
|
matches!(c, Call::Staking(..) | Call::Session(..) | Call::Utility(..))
|
||||||
@@ -1382,8 +1400,9 @@ construct_runtime! {
|
|||||||
// Multisig dispatch. Late addition.
|
// Multisig dispatch. Late addition.
|
||||||
Multisig: pallet_multisig::{Pallet, Call, Storage, Event<T>} = 30,
|
Multisig: pallet_multisig::{Pallet, Call, Storage, Event<T>} = 30,
|
||||||
|
|
||||||
// Bounties module.
|
// Bounties modules.
|
||||||
Bounties: pallet_bounties::{Pallet, Call, Storage, Event<T>} = 34,
|
Bounties: pallet_bounties::{Pallet, Call, Storage, Event<T>} = 34,
|
||||||
|
ChildBounties: pallet_child_bounties = 38,
|
||||||
|
|
||||||
// Tips module.
|
// Tips module.
|
||||||
Tips: pallet_tips::{Pallet, Call, Storage, Event<T>} = 35,
|
Tips: pallet_tips::{Pallet, Call, Storage, Event<T>} = 35,
|
||||||
@@ -1692,6 +1711,7 @@ mod benches {
|
|||||||
[pallet_balances, Balances]
|
[pallet_balances, Balances]
|
||||||
[frame_benchmarking::baseline, Baseline::<Runtime>]
|
[frame_benchmarking::baseline, Baseline::<Runtime>]
|
||||||
[pallet_bounties, Bounties]
|
[pallet_bounties, Bounties]
|
||||||
|
[pallet_child_bounties, ChildBounties]
|
||||||
[pallet_collective, Council]
|
[pallet_collective, Council]
|
||||||
[pallet_collective, TechnicalCommittee]
|
[pallet_collective, TechnicalCommittee]
|
||||||
[pallet_democracy, Democracy]
|
[pallet_democracy, Democracy]
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ pub mod frame_system;
|
|||||||
pub mod pallet_bags_list;
|
pub mod pallet_bags_list;
|
||||||
pub mod pallet_balances;
|
pub mod pallet_balances;
|
||||||
pub mod pallet_bounties;
|
pub mod pallet_bounties;
|
||||||
|
pub mod pallet_child_bounties;
|
||||||
pub mod pallet_collective_council;
|
pub mod pallet_collective_council;
|
||||||
pub mod pallet_collective_technical_committee;
|
pub mod pallet_collective_technical_committee;
|
||||||
pub mod pallet_democracy;
|
pub mod pallet_democracy;
|
||||||
|
|||||||
@@ -0,0 +1,121 @@
|
|||||||
|
// Copyright 2017-2021 Parity Technologies (UK) Ltd.
|
||||||
|
// This file is part of Polkadot.
|
||||||
|
|
||||||
|
// Polkadot is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
|
||||||
|
// Polkadot is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//! Autogenerated weights for `pallet_child_bounties`
|
||||||
|
//!
|
||||||
|
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||||
|
//! DATE: 2022-02-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||||
|
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024
|
||||||
|
|
||||||
|
// Executed Command:
|
||||||
|
// target/production/polkadot
|
||||||
|
// benchmark
|
||||||
|
// --chain=polkadot-dev
|
||||||
|
// --steps=50
|
||||||
|
// --repeat=20
|
||||||
|
// --pallet=pallet_child_bounties
|
||||||
|
// --extrinsic=*
|
||||||
|
// --execution=wasm
|
||||||
|
// --wasm-execution=compiled
|
||||||
|
// --heap-pages=4096
|
||||||
|
// --header=./file_header.txt
|
||||||
|
// --output=./runtime/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_child_bounties`.
|
||||||
|
pub struct WeightInfo<T>(PhantomData<T>);
|
||||||
|
impl<T: frame_system::Config> pallet_child_bounties::WeightInfo for WeightInfo<T> {
|
||||||
|
// Storage: ChildBounties ParentChildBounties (r:1 w:1)
|
||||||
|
// Storage: Bounties Bounties (r:1 w:0)
|
||||||
|
// Storage: System Account (r:2 w:2)
|
||||||
|
// Storage: ChildBounties ChildBountyCount (r:1 w:1)
|
||||||
|
// Storage: ChildBounties ChildBountyDescriptions (r:0 w:1)
|
||||||
|
// Storage: ChildBounties ChildBounties (r:0 w:1)
|
||||||
|
fn add_child_bounty(d: u32, ) -> Weight {
|
||||||
|
(39_510_000 as Weight)
|
||||||
|
// Standard Error: 0
|
||||||
|
.saturating_add((1_000 as Weight).saturating_mul(d as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: Bounties Bounties (r:1 w:0)
|
||||||
|
// Storage: ChildBounties ChildBounties (r:1 w:1)
|
||||||
|
// Storage: ChildBounties ChildrenCuratorFees (r:1 w:1)
|
||||||
|
fn propose_curator() -> Weight {
|
||||||
|
(10_560_000 as Weight)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: Bounties Bounties (r:1 w:0)
|
||||||
|
// Storage: ChildBounties ChildBounties (r:1 w:1)
|
||||||
|
// Storage: System Account (r:1 w:1)
|
||||||
|
fn accept_curator() -> Weight {
|
||||||
|
(21_301_000 as Weight)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: ChildBounties ChildBounties (r:1 w:1)
|
||||||
|
// Storage: Bounties Bounties (r:1 w:0)
|
||||||
|
// Storage: System Account (r:1 w:1)
|
||||||
|
fn unassign_curator() -> Weight {
|
||||||
|
(32_009_000 as Weight)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: Bounties Bounties (r:1 w:0)
|
||||||
|
// Storage: ChildBounties ChildBounties (r:1 w:1)
|
||||||
|
fn award_child_bounty() -> Weight {
|
||||||
|
(16_213_000 as Weight)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: ChildBounties ChildBounties (r:1 w:1)
|
||||||
|
// Storage: System Account (r:3 w:3)
|
||||||
|
// Storage: ChildBounties ParentChildBounties (r:1 w:1)
|
||||||
|
// Storage: ChildBounties ChildBountyDescriptions (r:0 w:1)
|
||||||
|
fn claim_child_bounty() -> Weight {
|
||||||
|
(53_674_000 as Weight)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: Bounties Bounties (r:1 w:0)
|
||||||
|
// Storage: ChildBounties ChildBounties (r:1 w:1)
|
||||||
|
// Storage: ChildBounties ChildrenCuratorFees (r:1 w:1)
|
||||||
|
// Storage: ChildBounties ParentChildBounties (r:1 w:1)
|
||||||
|
// Storage: System Account (r:2 w:2)
|
||||||
|
// Storage: ChildBounties ChildBountyDescriptions (r:0 w:1)
|
||||||
|
fn close_child_bounty_added() -> Weight {
|
||||||
|
(38_482_000 as Weight)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(6 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: Bounties Bounties (r:1 w:0)
|
||||||
|
// Storage: ChildBounties ChildBounties (r:1 w:1)
|
||||||
|
// Storage: System Account (r:3 w:3)
|
||||||
|
// Storage: ChildBounties ChildrenCuratorFees (r:1 w:1)
|
||||||
|
// Storage: ChildBounties ParentChildBounties (r:1 w:1)
|
||||||
|
// Storage: ChildBounties ChildBountyDescriptions (r:0 w:1)
|
||||||
|
fn close_child_bounty_active() -> Weight {
|
||||||
|
(46_611_000 as Weight)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(7 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(7 as Weight))
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user