Background
We want to be able to allow the council to block the functioning of entire pallets on very short notice to deal with 0-day problems. The idea is then that this freezing will be in place until an upgrade can pass. This is an imperfect solution, but its still useful.
Proposal
- Introduce a new pallet
pallet_freezer which simply stores an individual indicator of whether each of our pallets are enabled or not. This means that this pallet is coupled with whatever the set of pallets will be in the full runtime, which is fine. The storage representation can be something simple as BtreeSet<FreezablePallet> where FreezablePallet is an enum representing all the pallets that are freezable. There is no need for any extrinsics, but there does need to be a public getter and setter which can be used by other pallets to check if they are frozen or the proposal to update what pallets are frozen, respectively. Getter can have signature like is_fronze(FreezablePallet) and set_freezer(BTreeMap<FreezablePallet, Bool>).
- Introduce a new proposal in the codex, it takes
BTreeMap<FreezablePallet, Bool> as a proposal parameter.
- Proposal parameters are needed!
- Make sure to add a distinct getter trait that other pallets can use for their runtime configuration to dial out and check if they are frozen.
We can incorporate all pallets that are written as part of Joystream code base, but we don't need to actually implement sensitivity to the freezing off the bat, only really CRT freezing is needed.
┆Issue is synchronized with this Asana task by Unito
Background
We want to be able to allow the council to block the functioning of entire pallets on very short notice to deal with 0-day problems. The idea is then that this freezing will be in place until an upgrade can pass. This is an imperfect solution, but its still useful.
Proposal
pallet_freezerwhich simply stores an individual indicator of whether each of our pallets are enabled or not. This means that this pallet is coupled with whatever the set of pallets will be in the full runtime, which is fine. The storage representation can be something simple asBtreeSet<FreezablePallet>whereFreezablePalletis an enum representing all the pallets that are freezable. There is no need for any extrinsics, but there does need to be a public getter and setter which can be used by other pallets to check if they are frozen or the proposal to update what pallets are frozen, respectively. Getter can have signature likeis_fronze(FreezablePallet)andset_freezer(BTreeMap<FreezablePallet, Bool>).BTreeMap<FreezablePallet, Bool>as a proposal parameter.We can incorporate all pallets that are written as part of Joystream code base, but we don't need to actually implement sensitivity to the freezing off the bat, only really CRT freezing is needed.
┆Issue is synchronized with this Asana task by Unito