Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Replace Lockdown Mode pallet by FRAME SafeMode & TxPause pallets #279

Closed
4 tasks
stiiifff opened this issue Sep 11, 2023 · 1 comment · Fixed by #305
Closed
4 tasks

Replace Lockdown Mode pallet by FRAME SafeMode & TxPause pallets #279

stiiifff opened this issue Sep 11, 2023 · 1 comment · Fixed by #305
Assignees
Labels
enhancement New feature or request

Comments

@stiiifff
Copy link
Contributor

Trappist runtime includes a custom built Lockdown Mode pallet that provides the ability to temporarily pause transfers & normal operations on a live parachain, which is a valuable mechanism to have at the team’s disposal when an issue / attack occurs.
The Substrate FRAME library now contains the SafeMode & TxPause pallets which allow implementation of such a mechanism.

We should prefer the new SafeMode pallet over Trappist’s custom-built one as the former has been more extensively reviewed and audited, and thus, replace the Lockdown Mode pallet by the FRAME SafeMode & TxPause pallets.

The Lockdown Mode pallet should be removed from the Trappist repository, and moved to a separate one, and archived.

  • Integrate the FRAME SafeMode & TxPause pallets with sane defaults in both devnet & mainnet runtimes (disabled by default in both runtimes).
  • SafeMode should only allow balance transfers as whitelisted call. Permissionless operations (enter, extend) should be disabled. Only a privileged origin can enable / disable safe mode: ForceEnterOrigin, ForceExtendOrigin & ForceExitOrigin to be configured as the Root origin (Sudo).
  • TxPause PauseOrigin & UnpauseOrigin to be configured as the Root origin (Sudo).
  • Remove the Lockdown Mode pallet from the Trappist repository (move it to a separate new repository, and mark it as archived).

Depends on #278

@stiiifff stiiifff added the enhancement New feature or request label Sep 11, 2023
@stiiifff stiiifff added this to the Trappist M2 / XCM v3 milestone Sep 11, 2023
@Moliholy Moliholy self-assigned this Oct 23, 2023
@Moliholy
Copy link
Contributor

I just added #305 to address this issue.

I also created https://github.com/Moliholy/pallet-lockdown-mode under my GitHub to transfer its ownership to Parity whenever we want.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants