Manual Para Lock (#5451)

* remove para lock check for now

* fmt

* manual para lock

* expose schedule_code_upgrade and set_current_head

* extrinsics and benchmarks

* use zero

* add weights

* fix variable name

* add and fix comments

* fix weights

* add back default lock

Co-authored-by: parity-processbot <>
This commit is contained in:
Shawn Tabrizi
2022-10-11 15:22:38 -04:00
committed by GitHub
parent dc555b9510
commit bccffcad12
7 changed files with 236 additions and 31 deletions
@@ -105,4 +105,28 @@ impl<T: frame_system::Config> runtime_common::paras_registrar::WeightInfo for We
.saturating_add(T::DbWeight::get().reads(10 as u64))
.saturating_add(T::DbWeight::get().writes(8 as u64))
}
// Storage: Paras FutureCodeHash (r:1 w:1)
// Storage: Paras CurrentCodeHash (r:1 w:0)
// Storage: Paras UpgradeCooldowns (r:1 w:1)
// Storage: Paras PvfActiveVoteMap (r:1 w:0)
// Storage: Paras CodeByHash (r:1 w:1)
// Storage: Paras UpcomingUpgrades (r:1 w:1)
// Storage: System Digest (r:1 w:1)
// Storage: Paras CodeByHashRefs (r:1 w:1)
// Storage: Paras FutureCodeUpgrades (r:0 w:1)
// Storage: Paras UpgradeRestrictionSignal (r:0 w:1)
fn schedule_code_upgrade(b: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(3_000 as u64).saturating_mul(b as u64))
.saturating_add(T::DbWeight::get().reads(8 as u64))
.saturating_add(T::DbWeight::get().writes(8 as u64))
}
// Storage: Paras Heads (r:0 w:1)
fn set_current_head(b: u32, ) -> Weight {
Weight::from_ref_time(5_494_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(b as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
}