mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 04:41:03 +00:00
Don't allow bids for a ParaId where there is an overlapping lease period (#3361)
* add already leased Co-Authored-By: parity-processbot <> * add unit test Co-Authored-By: parity-processbot <> * add integration test and fix Co-Authored-By: parity-processbot <> * better doc Co-Authored-By: parity-processbot <> * Update runtime/common/src/slots.rs * Update runtime/common/src/slots.rs * Apply suggestions from code review Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update runtime/common/src/integration_tests.rs * Update runtime/common/src/integration_tests.rs * cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_common::auctions --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_common_auctions.rs * cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_common::auctions --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_common_auctions.rs * cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_common::crowdloan --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_common_crowdloan.rs * cargo run --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_common::auctions --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_common_auctions.rs * cargo run --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_common::crowdloan --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_common_crowdloan.rs * cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_common::slots --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_common_slots.rs * cargo run --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_common::slots --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_common_slots.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: Parity Bot <admin@parity.io>
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
//! Autogenerated weights for runtime_common::auctions
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! DATE: 2021-06-24, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -31,7 +31,7 @@
|
||||
// --wasm-execution=compiled
|
||||
// --heap-pages=4096
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/westend/src/weights/
|
||||
// --output=./runtime/westend/src/weights/runtime_common_auctions.rs
|
||||
|
||||
|
||||
#![allow(unused_parens)]
|
||||
@@ -44,22 +44,22 @@ use sp_std::marker::PhantomData;
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> runtime_common::auctions::WeightInfo for WeightInfo<T> {
|
||||
fn new_auction() -> Weight {
|
||||
(23_671_000 as Weight)
|
||||
(29_966_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
fn bid() -> Weight {
|
||||
(134_592_000 as Weight)
|
||||
(152_563_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(8 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
fn on_initialize() -> Weight {
|
||||
(23_367_994_000 as Weight)
|
||||
(32_736_787_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(3688 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3683 as Weight))
|
||||
}
|
||||
fn cancel_auction() -> Weight {
|
||||
(4_894_434_000 as Weight)
|
||||
(7_057_595_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(73 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3673 as Weight))
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
//! Autogenerated weights for runtime_common::crowdloan
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! DATE: 2021-06-24, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -31,7 +31,7 @@
|
||||
// --wasm-execution=compiled
|
||||
// --heap-pages=4096
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/westend/src/weights/
|
||||
// --output=./runtime/westend/src/weights/runtime_common_crowdloan.rs
|
||||
|
||||
|
||||
#![allow(unused_parens)]
|
||||
@@ -44,53 +44,53 @@ use sp_std::marker::PhantomData;
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> runtime_common::crowdloan::WeightInfo for WeightInfo<T> {
|
||||
fn create() -> Weight {
|
||||
(84_082_000 as Weight)
|
||||
(95_715_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
fn contribute() -> Weight {
|
||||
(478_991_000 as Weight)
|
||||
(500_788_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(7 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
fn withdraw() -> Weight {
|
||||
(109_723_000 as Weight)
|
||||
(127_448_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
fn refund(k: u32, ) -> Weight {
|
||||
(38_261_000 as Weight)
|
||||
// Standard Error: 39_000
|
||||
.saturating_add((43_247_000 as Weight).saturating_mul(k as Weight))
|
||||
(0 as Weight)
|
||||
// Standard Error: 53_000
|
||||
.saturating_add((56_113_000 as Weight).saturating_mul(k as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(k as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(k as Weight)))
|
||||
}
|
||||
fn dissolve() -> Weight {
|
||||
(64_812_000 as Weight)
|
||||
(71_359_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
fn edit() -> Weight {
|
||||
(40_331_000 as Weight)
|
||||
(43_194_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn add_memo() -> Weight {
|
||||
(58_745_000 as Weight)
|
||||
(65_648_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn poke() -> Weight {
|
||||
(45_385_000 as Weight)
|
||||
(51_082_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn on_initialize(n: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 22_000
|
||||
.saturating_add((103_814_000 as Weight).saturating_mul(n as Weight))
|
||||
// Standard Error: 31_000
|
||||
.saturating_add((134_501_000 as Weight).saturating_mul(n as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
//! Autogenerated weights for runtime_common::slots
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! DATE: 2021-06-25, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -31,7 +31,7 @@
|
||||
// --wasm-execution=compiled
|
||||
// --heap-pages=4096
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/westend/src/weights/
|
||||
// --output=./runtime/westend/src/weights/runtime_common_slots.rs
|
||||
|
||||
|
||||
#![allow(unused_parens)]
|
||||
@@ -44,16 +44,16 @@ use sp_std::marker::PhantomData;
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> runtime_common::slots::WeightInfo for WeightInfo<T> {
|
||||
fn force_lease() -> Weight {
|
||||
(45_514_000 as Weight)
|
||||
(53_939_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
fn manage_lease_period_start(c: u32, t: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 16_000
|
||||
.saturating_add((15_275_000 as Weight).saturating_mul(c as Weight))
|
||||
// Standard Error: 16_000
|
||||
.saturating_add((33_435_000 as Weight).saturating_mul(t as Weight))
|
||||
// Standard Error: 37_000
|
||||
.saturating_add((19_723_000 as Weight).saturating_mul(c as Weight))
|
||||
// Standard Error: 37_000
|
||||
.saturating_add((42_186_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(c as Weight)))
|
||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(t as Weight)))
|
||||
@@ -62,12 +62,12 @@ impl<T: frame_system::Config> runtime_common::slots::WeightInfo for WeightInfo<T
|
||||
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(t as Weight)))
|
||||
}
|
||||
fn clear_all_leases() -> Weight {
|
||||
(195_795_000 as Weight)
|
||||
(249_570_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(9 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(9 as Weight))
|
||||
}
|
||||
fn trigger_onboard() -> Weight {
|
||||
(43_567_000 as Weight)
|
||||
(49_692_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user