Rococo: ability to programatically assign slots to teams (#3943)

* Permanent & Temp parachain slots on Rococo - WIP

* Revert test change

* Revert test change

* Fix formatting

* Extract logic to separate assigned_slots pallet

* Formatting

* Parachain downgrade logic

* Pallet doc comment

* Revert unnecessary changes

* Fix few issues, tweak temp slots allocation logic; add a bunch of tests

* Address review comments; track active temp slots

* Update runtime/common/src/assigned_slots.rs

* Update runtime/common/src/assigned_slots.rs

* Remove assigned_slots calls from paras_sudo_wrapper

* Unassign is a perfectly valid verb

* Remove unneeded collect

* Update code following #3980

* Cleanup

* Generate storage info for pallet

* Address review comments

* Add ForceOrigin to slots pallet

* Track permanent slot duration in storage

* Fix tests build

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
This commit is contained in:
Steve Degosserie
2021-12-02 22:23:45 +01:00
committed by GitHub
parent 89ccd18ccb
commit b3d08c0a8e
10 changed files with 1340 additions and 18 deletions
+2 -1
View File
@@ -20,7 +20,7 @@
use sp_std::vec::Vec;
use frame_support::weights::Weight;
use parity_scale_codec::{CompactAs, Decode, Encode};
use parity_scale_codec::{CompactAs, Decode, Encode, MaxEncodedLen};
use scale_info::TypeInfo;
use sp_core::{RuntimeDebug, TypeId};
use sp_runtime::traits::Hash as _;
@@ -139,6 +139,7 @@ pub struct BlockData(#[cfg_attr(feature = "std", serde(with = "bytes"))] pub Vec
Encode,
Eq,
Hash,
MaxEncodedLen,
Ord,
PartialEq,
PartialOrd,