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 { 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 enter call (no parameters)
const tx = api.tx.SafeMode.enter();

Runtime Info

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