enter

Call v154 → current #0

Enter safe-mode permissionlessly by reserving a deposit.

View calls on chain

Click items to navigate. Pan and zoom to explore.

Used by: validatorsdevelopers

The Big Picture

Safe-mode is Bittensor's emergency brake. When enabled, certain network operations are paused to prevent damage during security incidents. Anyone can trigger it by putting up a deposit - this ensures only serious actors activate it.

Use Cases

  • Emergency halt of network activity when security issues detected
  • Temporary pause to investigate anomalous behavior
  • Community-initiated protection measure with skin in the game

From Chain Metadata

Enter safe-mode permissionlessly for [`Config::EnterDuration`] blocks. Reserves [`Config::EnterDepositAmount`] from the caller's account. Emits an [`Event::Entered`] event on success. Errors with [`Error::Entered`] if the safe-mode is already entered. Errors with [`Error::NotConfigured`] if the deposit amount is `None`.

This call takes no parameters.

Permissions

Origin
Unknown
Required Role

Permission data inferred from metadata. May be incomplete.

Requirements

  • Safe-mode is not already entered
  • Caller has sufficient free balance for the deposit
  • EnterDepositAmount is configured (not None)

Effects

Events Emitted

Storage Modified

Postconditions

  • Safe-mode is entered for EnterDuration blocks
  • Deposit amount reserved from caller's account
  • EnteredUntil storage is set

Side Effects

  • Network operations may be restricted during safe-mode
  • Deposit tracked in Deposits storage for this account/block

Code Examples

import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";

const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });

// Build enter call (no parameters)
const call = api.tx[stringCamelCase("SafeMode")][stringCamelCase("enter")]();

Runtime Info

Pallet Index
20
Call Index
0
First Version
v154
Current Version
v393