force_exit

Call v154 → current #4

Force-exit safe-mode immediately (privileged origin only).

View calls on chain

Click items to navigate. Pan and zoom to explore.

Used by: validatorsdevelopers

The Big Picture

Safe-mode auto-exits when EnteredUntil block is reached, but governance can end it early to minimize disruption once a threat is resolved.

Use Cases

  • End safe-mode early once threat is mitigated
  • Resume normal operations after fix is deployed

From Chain Metadata

Exit safe-mode by force. Emits an [`Event::Exited`] with [`ExitReason::Force`] event on success. Errors with [`Error::Exited`] if the safe-mode is inactive. Note: `safe-mode` will be automatically deactivated by [`Pallet::on_initialize`] hook after the block height is greater than the [`EnteredUntil`] storage item. Emits an [`Event::Exited`] with [`ExitReason::Timeout`] event when deactivated in the hook.

This call takes no parameters.

Permissions

Origin
Unknown
Required Role

Permission data inferred from metadata. May be incomplete.

Requirements

  • Caller is ForceExitOrigin
  • Safe-mode is currently entered

Effects

Events Emitted

Storage Modified

Postconditions

  • Safe-mode is exited (EnteredUntil cleared)
  • Normal network operations resume
  • Exited event emitted with Force reason

Side Effects

  • Deposits remain reserved until ReleaseDelay passes

Code Examples

import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443

const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);

// Build force_exit call (no parameters)
const tx = api.tx.SafeMode.force_exit();

Runtime Info

Pallet Index
20
Call Index
4
First Version
v154
Current Version
v411