Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FRAME] Introduce force_adjust_total_issuance #3001

Merged
merged 25 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
33986b4
Add force_adjust_total_issuance
ggwpez Jan 19, 2024
e935f53
Fix weight files
ggwpez Jan 19, 2024
a455a8a
Fix weight annotation
ggwpez Jan 19, 2024
d8ae79e
Add proper errors
ggwpez Jan 19, 2024
997fc28
Add prdoc
ggwpez Jan 19, 2024
aa3d804
Merge remote-tracking branch 'origin/master' into oty-adjust-ti
ggwpez Jan 19, 2024
cfb49fc
Fix benchmark
ggwpez Jan 19, 2024
c03e8aa
Merge branch 'master' of https://github.com/paritytech/polkadot-sdk i…
Jan 20, 2024
2ab7158
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
Jan 20, 2024
e3df5ac
".git/.scripts/commands/bench/bench.sh" --subcommand=runtime --runtim…
Jan 20, 2024
3c51c10
Merge branch 'master' of https://github.com/paritytech/polkadot-sdk i…
Jan 20, 2024
cf71bbe
".git/.scripts/commands/bench/bench.sh" --subcommand=runtime --runtim…
Jan 20, 2024
d12e53d
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
Jan 20, 2024
b0f435c
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
Jan 20, 2024
fde5f46
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
Jan 20, 2024
af81253
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
Jan 20, 2024
5f290f7
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
Jan 20, 2024
af0c50b
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
Jan 20, 2024
c104593
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
Jan 20, 2024
6489cd7
Beauty fixes
ggwpez Jan 22, 2024
a92524f
Merge branch 'master' into oty-adjust-ti
ggwpez Jan 29, 2024
8cc1619
Update prdoc/pr_3001.prdoc
bkchr Jan 29, 2024
e679da7
Fix prdoc
ggwpez Jan 30, 2024
0a88ac6
Merge remote-tracking branch 'origin/master' into oty-adjust-ti
ggwpez Jan 30, 2024
086a590
Fix upweights for testnets
ggwpez Jan 30, 2024
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
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,25 @@
//! Autogenerated weights for `pallet_balances`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-01-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024
//! HOSTNAME: `runner-j8vvqcjr-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024

// Executed Command:
// ./target/production/polkadot-parachain
// target/production/polkadot-parachain
// benchmark
// pallet
// --chain=asset-hub-rococo-dev
// --wasm-execution=compiled
// --pallet=pallet_balances
// --no-storage-info
// --no-median-slopes
// --no-min-squares
// --extrinsic=*
// --steps=50
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/asset-hub-rococo/src/weights/
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json
// --pallet=pallet_balances
// --chain=asset-hub-rococo-dev
// --header=./cumulus/file_header.txt
// --output=./cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
Expand All @@ -56,8 +54,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 55_040_000 picoseconds.
Weight::from_parts(56_106_000, 0)
// Minimum execution time: 45_402_000 picoseconds.
Weight::from_parts(46_086_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -68,8 +66,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 41_342_000 picoseconds.
Weight::from_parts(41_890_000, 0)
// Minimum execution time: 35_707_000 picoseconds.
Weight::from_parts(36_107_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -80,8 +78,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `103`
// Estimated: `3593`
// Minimum execution time: 14_723_000 picoseconds.
Weight::from_parts(15_182_000, 0)
// Minimum execution time: 13_538_000 picoseconds.
Weight::from_parts(13_771_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -92,8 +90,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `103`
// Estimated: `3593`
// Minimum execution time: 22_073_000 picoseconds.
Weight::from_parts(22_638_000, 0)
// Minimum execution time: 18_488_000 picoseconds.
Weight::from_parts(19_136_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -104,8 +102,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `103`
// Estimated: `6196`
// Minimum execution time: 57_265_000 picoseconds.
Weight::from_parts(58_222_000, 0)
// Minimum execution time: 48_168_000 picoseconds.
Weight::from_parts(48_874_000, 0)
.saturating_add(Weight::from_parts(0, 6196))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
Expand All @@ -116,8 +114,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 51_485_000 picoseconds.
Weight::from_parts(52_003_000, 0)
// Minimum execution time: 44_463_000 picoseconds.
Weight::from_parts(45_320_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -128,8 +126,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `103`
// Estimated: `3593`
// Minimum execution time: 17_460_000 picoseconds.
Weight::from_parts(17_849_000, 0)
// Minimum execution time: 16_227_000 picoseconds.
Weight::from_parts(16_549_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -141,13 +139,24 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0 + u * (136 ±0)`
// Estimated: `990 + u * (2603 ±0)`
// Minimum execution time: 17_259_000 picoseconds.
Weight::from_parts(17_478_000, 0)
// Minimum execution time: 15_992_000 picoseconds.
Weight::from_parts(16_243_000, 0)
.saturating_add(Weight::from_parts(0, 990))
// Standard Error: 16_756
.saturating_add(Weight::from_parts(15_291_954, 0).saturating_mul(u.into()))
// Standard Error: 12_426
.saturating_add(Weight::from_parts(13_617_673, 0).saturating_mul(u.into()))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into())))
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into()))
}
/// Storage: `Balances::InactiveIssuance` (r:1 w:0)
/// Proof: `Balances::InactiveIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
fn force_adjust_total_issuance() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `1501`
// Minimum execution time: 5_713_000 picoseconds.
Weight::from_parts(6_054_000, 0)
.saturating_add(Weight::from_parts(0, 1501))
.saturating_add(T::DbWeight::get().reads(1))
}
}
Original file line number Diff line number Diff line change
@@ -1,42 +1,41 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// This file is part of Cumulus.

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Cumulus is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Cumulus is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for `pallet_balances`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-01-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-westend-dev")`, DB CACHE: 1024
//! HOSTNAME: `runner-j8vvqcjr-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-westend-dev")`, DB CACHE: 1024

// Executed Command:
// ./target/production/polkadot-parachain
// target/production/polkadot-parachain
// benchmark
// pallet
// --chain=asset-hub-westend-dev
// --wasm-execution=compiled
// --pallet=pallet_balances
// --no-storage-info
// --no-median-slopes
// --no-min-squares
// --extrinsic=*
// --steps=50
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/asset-hub-westend/src/weights/
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json
// --pallet=pallet_balances
// --chain=asset-hub-westend-dev
// --header=./cumulus/file_header.txt
// --output=./cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
Expand All @@ -55,8 +54,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 54_422_000 picoseconds.
Weight::from_parts(55_477_000, 0)
// Minimum execution time: 42_658_000 picoseconds.
Weight::from_parts(43_649_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -67,8 +66,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 39_850_000 picoseconds.
Weight::from_parts(41_026_000, 0)
// Minimum execution time: 33_810_000 picoseconds.
Weight::from_parts(34_322_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -79,8 +78,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `103`
// Estimated: `3593`
// Minimum execution time: 14_554_000 picoseconds.
Weight::from_parts(14_800_000, 0)
// Minimum execution time: 11_825_000 picoseconds.
Weight::from_parts(12_258_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -91,8 +90,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `103`
// Estimated: `3593`
// Minimum execution time: 21_586_000 picoseconds.
Weight::from_parts(22_297_000, 0)
// Minimum execution time: 16_540_000 picoseconds.
Weight::from_parts(17_058_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -103,8 +102,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `103`
// Estimated: `6196`
// Minimum execution time: 57_042_000 picoseconds.
Weight::from_parts(58_251_000, 0)
// Minimum execution time: 45_138_000 picoseconds.
Weight::from_parts(45_481_000, 0)
.saturating_add(Weight::from_parts(0, 6196))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
Expand All @@ -115,8 +114,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 51_587_000 picoseconds.
Weight::from_parts(52_275_000, 0)
// Minimum execution time: 42_147_000 picoseconds.
Weight::from_parts(43_120_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -127,8 +126,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `103`
// Estimated: `3593`
// Minimum execution time: 17_201_000 picoseconds.
Weight::from_parts(17_613_000, 0)
// Minimum execution time: 14_730_000 picoseconds.
Weight::from_parts(14_867_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -140,13 +139,24 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0 + u * (136 ±0)`
// Estimated: `990 + u * (2603 ±0)`
// Minimum execution time: 16_608_000 picoseconds.
Weight::from_parts(16_808_000, 0)
// Minimum execution time: 14_425_000 picoseconds.
Weight::from_parts(14_590_000, 0)
.saturating_add(Weight::from_parts(0, 990))
// Standard Error: 15_291
.saturating_add(Weight::from_parts(15_154_407, 0).saturating_mul(u.into()))
// Standard Error: 12_643
.saturating_add(Weight::from_parts(13_203_227, 0).saturating_mul(u.into()))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into())))
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into()))
}
/// Storage: `Balances::InactiveIssuance` (r:1 w:0)
/// Proof: `Balances::InactiveIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
fn force_adjust_total_issuance() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `1501`
// Minimum execution time: 5_397_000 picoseconds.
Weight::from_parts(5_689_000, 0)
.saturating_add(Weight::from_parts(0, 1501))
.saturating_add(T::DbWeight::get().reads(1))
}
}
Loading
Loading