Skip to content

FreezePallet Proposal and pallet #4897

@bedeho

Description

@bedeho

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

  1. 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>).
  2. Introduce a new proposal in the codex, it takes BTreeMap<FreezablePallet, Bool> as a proposal parameter.
  3. Proposal parameters are needed!
  4. 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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions