Skip to content

Enabling Maintenance Mode

Introduction

The Maintenance pallet is a module that is designed for use only in emergencies that present existential threats to the network. Enabling maintenance mode on your appchain will suspend the processing of all regular transactions, including EVM interactions. Block production continues at a regular cadence and allows governance and staking functions to continue.

Maintenance mode filters (ignores) all calls outside of governance and staking. Once maintenance mode is exited, your chain will process any pending transactions that queued up while your chain was in maintenance mode. Maintenance mode is intended to be used only as a temporary, emergency measure.

For example, imagine discovering a critical exploit on your appchain that could result in significant financial losses if malicious actors exploit it. While you can address the issue by implementing a runtime upgrade, the process takes time—precious time during which your appchain remains vulnerable to attack. One potential solution is to activate maintenance mode on your appchain, complete the runtime upgrade, and exit maintenance mode once the fix has been verified.

Warning

Enabling maintenance mode on a production network can significantly impact the contracts on your chain. While maintenance mode is enabled, no smart contract transactions are processed, so it's critical to consider the potential ramifications before activating it.

Checking Prerequisites

For the examples in this guide, you will need to have the following:

  • A Tanssi appchain (Snap or Dedicated)
  • Your appchain's Sudo account connected to your appchain's Polkadot.js Apps. You can refer to the Managing Sudo guide for instructions on injecting your Sudo account into Polkadot.js Apps

If you're unsure what your Tanssi appchain's Sudo account is, you can find it in your Tanssi Dashboard underneath the Properties section.

Locating your Sudo address on apps.tanssi.network

Warning

It's critical to protect your Sudo account key with the utmost security precautions, as it grants privileged access to your Tanssi appchain.

Enabling Maintenance Mode

As you know, the Sudo account can perform privileged functions, such as enabling and disabling maintenance mode. To enter maintenance mode and stop regular transaction processing, navigate to the Developer tab of Polkadot.js Apps for your Tanssi appchain and click on Sudo. If you do not see Sudo in this menu, you have not associated the Sudo account with Polkadot.js Apps. Make sure that your Sudo account is injected by your wallet and connected to Polkadot.js Apps. Then, take the following steps:

  1. Select the maintenanceMode pallet
  2. Select the enterMaintenanceMode method
  3. Press Submit Sudo and confirm the transaction in the resulting pop-up

Enable maintenance mode

To verify that maintenance mode has been enabled, you can check the Explorer section under the Network tab and review the recent events.

Check maintenance mode is enabled

Exiting Maintenance Mode

To exit maintenance mode and return your appchain to normal operation, navigate to the Developer tab of Polkadot.js Apps for your Tanssi appchain and click on Sudo. If you do not see Sudo in this menu, you have not associated the Sudo account with Polkadot.js Apps. Make sure that your Sudo account is injected by your wallet and connected to Polkadot.js Apps. Then, take the following steps:

  1. Select the maintenanceMode pallet
  2. Select the resumeNormalOperation method
  3. Press Submit Sudo and confirm the transaction in the resulting pop-up

Exit maintenance mode

To verify that maintenance mode has been disabled, you can check in the Explorer section under the Network tab and review the recent events.

Check maintenance mode is disabled

Remember that using maintenance mode is an emergency action that should only be activated when your chain is at dire risk. It may be worthwhile to establish a policy for your appchain that sets specific circuit breaker triggers to determine when maintenance mode will be enabled. Establishing a policy in advance will also streamline decision-making during a potential emergency.

And that's it! The Using Sudo section has plenty more guides on using the Sudo account to manage your Tanssi appchain.

The information presented herein has been provided by third parties and is made available solely for general information purposes. Tanssi does not endorse any project listed and described on the Tanssi Doc Website (https://docs.tanssi.network/). Tanssi Foundation does not warrant the accuracy, completeness or usefulness of this information. Any reliance you place on such information is strictly at your own risk. Tanssi Foundation disclaims all liability and responsibility arising from any reliance placed on this information by you or by anyone who may be informed of any of its contents. All statements and/or opinions expressed in these materials are solely the responsibility of the person or entity providing those materials and do not necessarily represent the opinion of Tanssi Foundation. The information should not be construed as professional or financial advice of any kind. Advice from a suitably qualified professional should always be sought in relation to any particular matter or circumstance. The information herein may link to or integrate with other websites operated or content provided by third parties, and such other websites may link to this website. Tanssi Foundation has no control over any such other websites or their content and will have no liability arising out of or related to such websites or their content. The existence of any such link does not constitute an endorsement of such websites, the content of the websites, or the operators of the websites. These links are being provided to you only as a convenience and you release and hold Tanssi Foundation harmless from any and all liability arising from your use of this information or the information provided by any third-party website or service.
Last update: May 10, 2024
| Created: March 28, 2024