EnterDuration

Constant v154 → current u32

When someone calls enter() with a deposit, safe-mode activates for this many blocks. Defines the initial protection window from a single activation.

Current Value

0
Relevant for: validatorsdevelopers

The Big Picture

This constant balances protection with disruption. Longer durations provide more security but also more downtime. The value gives enough time to assess threats.

From Chain Metadata

For how many blocks the safe-mode will be entered by [`Pallet::enter`].

Use Cases

  • Calculate expected safe-mode end time
  • Estimate downtime from activation

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 });

// Query EnterDuration constant
const value = api.consts[stringCamelCase("SafeMode")][stringCamelCase("EnterDuration")];
console.log("EnterDuration:", value.toHuman());

Type Information

Type
u32
Byte Size
4 bytes
Encoding
fixed
Raw Hex
0x00000000

Runtime Info

Pallet
SafeMode
First Version
v154
Latest Version
v154
Current Runtime
v393