Fixes PoV over-estimation (#13766)

* Align log

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Use max instead of sum

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Make comment ordering deterministic

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Dont add Pov overhead when all is ignored

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update test pallet weights

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Re-run weights on bm2

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix test

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Actually use new weights

Fucked up the merge for this file...

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update contract weights

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
Oliver Tale-Yazdi
2023-04-13 15:11:58 +02:00
committed by GitHub
parent 46e2d3e5f8
commit ebfe00d590
54 changed files with 5526 additions and 5534 deletions
+76 -75
View File
@@ -18,9 +18,9 @@
//! Autogenerated weights for pallet_bounties
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-03-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-04-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
// Executed Command:
@@ -31,9 +31,6 @@
// --steps=50
// --repeat=20
// --pallet=pallet_bounties
// --no-storage-info
// --no-median-slopes
// --no-min-squares
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
@@ -76,12 +73,14 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Storage: Bounties Bounties (r:0 w:1)
/// Proof: Bounties Bounties (max_values: None, max_size: Some(177), added: 2652, mode: MaxEncodedLen)
/// The range of component `d` is `[0, 300]`.
fn propose_bounty(_d: u32, ) -> Weight {
fn propose_bounty(d: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `276`
// Estimated: `5082`
// Minimum execution time: 26_271_000 picoseconds.
Weight::from_parts(28_048_901, 5082)
// Estimated: `3593`
// Minimum execution time: 30_793_000 picoseconds.
Weight::from_parts(31_509_544, 3593)
// Standard Error: 168
.saturating_add(Weight::from_parts(2_219, 0).saturating_mul(d.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
@@ -92,9 +91,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn approve_bounty() -> Weight {
// Proof Size summary in bytes:
// Measured: `368`
// Estimated: `5529`
// Minimum execution time: 12_573_000 picoseconds.
Weight::from_parts(12_827_000, 5529)
// Estimated: `3642`
// Minimum execution time: 12_471_000 picoseconds.
Weight::from_parts(12_677_000, 3642)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -104,8 +103,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `388`
// Estimated: `3642`
// Minimum execution time: 10_555_000 picoseconds.
Weight::from_parts(10_857_000, 3642)
// Minimum execution time: 10_560_000 picoseconds.
Weight::from_parts(10_744_000, 3642)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -116,9 +115,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn unassign_curator() -> Weight {
// Proof Size summary in bytes:
// Measured: `564`
// Estimated: `7235`
// Minimum execution time: 26_003_000 picoseconds.
Weight::from_parts(26_291_000, 7235)
// Estimated: `3642`
// Minimum execution time: 30_980_000 picoseconds.
Weight::from_parts(31_354_000, 3642)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -129,9 +128,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn accept_curator() -> Weight {
// Proof Size summary in bytes:
// Measured: `560`
// Estimated: `7235`
// Minimum execution time: 24_371_000 picoseconds.
Weight::from_parts(24_781_000, 7235)
// Estimated: `3642`
// Minimum execution time: 29_257_000 picoseconds.
Weight::from_parts(29_656_000, 3642)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -142,9 +141,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn award_bounty() -> Weight {
// Proof Size summary in bytes:
// Measured: `538`
// Estimated: `7123`
// Minimum execution time: 20_688_000 picoseconds.
Weight::from_parts(20_909_000, 7123)
// Estimated: `3642`
// Minimum execution time: 20_662_000 picoseconds.
Weight::from_parts(20_956_000, 3642)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -159,9 +158,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn claim_bounty() -> Weight {
// Proof Size summary in bytes:
// Measured: `902`
// Estimated: `15934`
// Minimum execution time: 78_933_000 picoseconds.
Weight::from_parts(79_884_000, 15934)
// Estimated: `8799`
// Minimum execution time: 119_287_000 picoseconds.
Weight::from_parts(121_468_000, 8799)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(6_u64))
}
@@ -176,9 +175,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn close_bounty_proposed() -> Weight {
// Proof Size summary in bytes:
// Measured: `582`
// Estimated: `10716`
// Minimum execution time: 32_332_000 picoseconds.
Weight::from_parts(32_833_000, 10716)
// Estimated: `3642`
// Minimum execution time: 37_759_000 picoseconds.
Weight::from_parts(38_185_000, 3642)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
@@ -193,9 +192,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn close_bounty_active() -> Weight {
// Proof Size summary in bytes:
// Measured: `818`
// Estimated: `13319`
// Minimum execution time: 55_686_000 picoseconds.
Weight::from_parts(56_271_000, 13319)
// Estimated: `6196`
// Minimum execution time: 80_332_000 picoseconds.
Weight::from_parts(81_328_000, 6196)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
@@ -205,8 +204,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `424`
// Estimated: `3642`
// Minimum execution time: 16_414_000 picoseconds.
Weight::from_parts(16_681_000, 3642)
// Minimum execution time: 16_301_000 picoseconds.
Weight::from_parts(16_611_000, 3642)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -220,16 +219,16 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn spend_funds(b: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `4 + b * (297 ±0)`
// Estimated: `3867 + b * (7858 ±0)`
// Minimum execution time: 5_398_000 picoseconds.
Weight::from_parts(4_478_947, 3867)
// Standard Error: 41_860
.saturating_add(Weight::from_parts(33_082_606, 0).saturating_mul(b.into()))
// Estimated: `1887 + b * (5206 ±0)`
// Minimum execution time: 5_430_000 picoseconds.
Weight::from_parts(4_463_976, 1887)
// Standard Error: 43_695
.saturating_add(Weight::from_parts(39_370_113, 0).saturating_mul(b.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(b.into())))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(b.into())))
.saturating_add(Weight::from_parts(0, 7858).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(0, 5206).saturating_mul(b.into()))
}
}
@@ -244,12 +243,14 @@ impl WeightInfo for () {
/// Storage: Bounties Bounties (r:0 w:1)
/// Proof: Bounties Bounties (max_values: None, max_size: Some(177), added: 2652, mode: MaxEncodedLen)
/// The range of component `d` is `[0, 300]`.
fn propose_bounty(_d: u32, ) -> Weight {
fn propose_bounty(d: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `276`
// Estimated: `5082`
// Minimum execution time: 26_271_000 picoseconds.
Weight::from_parts(28_048_901, 5082)
// Estimated: `3593`
// Minimum execution time: 30_793_000 picoseconds.
Weight::from_parts(31_509_544, 3593)
// Standard Error: 168
.saturating_add(Weight::from_parts(2_219, 0).saturating_mul(d.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
@@ -260,9 +261,9 @@ impl WeightInfo for () {
fn approve_bounty() -> Weight {
// Proof Size summary in bytes:
// Measured: `368`
// Estimated: `5529`
// Minimum execution time: 12_573_000 picoseconds.
Weight::from_parts(12_827_000, 5529)
// Estimated: `3642`
// Minimum execution time: 12_471_000 picoseconds.
Weight::from_parts(12_677_000, 3642)
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -272,8 +273,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `388`
// Estimated: `3642`
// Minimum execution time: 10_555_000 picoseconds.
Weight::from_parts(10_857_000, 3642)
// Minimum execution time: 10_560_000 picoseconds.
Weight::from_parts(10_744_000, 3642)
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -284,9 +285,9 @@ impl WeightInfo for () {
fn unassign_curator() -> Weight {
// Proof Size summary in bytes:
// Measured: `564`
// Estimated: `7235`
// Minimum execution time: 26_003_000 picoseconds.
Weight::from_parts(26_291_000, 7235)
// Estimated: `3642`
// Minimum execution time: 30_980_000 picoseconds.
Weight::from_parts(31_354_000, 3642)
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -297,9 +298,9 @@ impl WeightInfo for () {
fn accept_curator() -> Weight {
// Proof Size summary in bytes:
// Measured: `560`
// Estimated: `7235`
// Minimum execution time: 24_371_000 picoseconds.
Weight::from_parts(24_781_000, 7235)
// Estimated: `3642`
// Minimum execution time: 29_257_000 picoseconds.
Weight::from_parts(29_656_000, 3642)
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -310,9 +311,9 @@ impl WeightInfo for () {
fn award_bounty() -> Weight {
// Proof Size summary in bytes:
// Measured: `538`
// Estimated: `7123`
// Minimum execution time: 20_688_000 picoseconds.
Weight::from_parts(20_909_000, 7123)
// Estimated: `3642`
// Minimum execution time: 20_662_000 picoseconds.
Weight::from_parts(20_956_000, 3642)
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -327,9 +328,9 @@ impl WeightInfo for () {
fn claim_bounty() -> Weight {
// Proof Size summary in bytes:
// Measured: `902`
// Estimated: `15934`
// Minimum execution time: 78_933_000 picoseconds.
Weight::from_parts(79_884_000, 15934)
// Estimated: `8799`
// Minimum execution time: 119_287_000 picoseconds.
Weight::from_parts(121_468_000, 8799)
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(6_u64))
}
@@ -344,9 +345,9 @@ impl WeightInfo for () {
fn close_bounty_proposed() -> Weight {
// Proof Size summary in bytes:
// Measured: `582`
// Estimated: `10716`
// Minimum execution time: 32_332_000 picoseconds.
Weight::from_parts(32_833_000, 10716)
// Estimated: `3642`
// Minimum execution time: 37_759_000 picoseconds.
Weight::from_parts(38_185_000, 3642)
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
@@ -361,9 +362,9 @@ impl WeightInfo for () {
fn close_bounty_active() -> Weight {
// Proof Size summary in bytes:
// Measured: `818`
// Estimated: `13319`
// Minimum execution time: 55_686_000 picoseconds.
Weight::from_parts(56_271_000, 13319)
// Estimated: `6196`
// Minimum execution time: 80_332_000 picoseconds.
Weight::from_parts(81_328_000, 6196)
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
@@ -373,8 +374,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `424`
// Estimated: `3642`
// Minimum execution time: 16_414_000 picoseconds.
Weight::from_parts(16_681_000, 3642)
// Minimum execution time: 16_301_000 picoseconds.
Weight::from_parts(16_611_000, 3642)
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -388,15 +389,15 @@ impl WeightInfo for () {
fn spend_funds(b: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `4 + b * (297 ±0)`
// Estimated: `3867 + b * (7858 ±0)`
// Minimum execution time: 5_398_000 picoseconds.
Weight::from_parts(4_478_947, 3867)
// Standard Error: 41_860
.saturating_add(Weight::from_parts(33_082_606, 0).saturating_mul(b.into()))
// Estimated: `1887 + b * (5206 ±0)`
// Minimum execution time: 5_430_000 picoseconds.
Weight::from_parts(4_463_976, 1887)
// Standard Error: 43_695
.saturating_add(Weight::from_parts(39_370_113, 0).saturating_mul(b.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(b.into())))
.saturating_add(RocksDbWeight::get().writes(1_u64))
.saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(b.into())))
.saturating_add(Weight::from_parts(0, 7858).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(0, 5206).saturating_mul(b.into()))
}
}