ExtendDuration

Constant v154 → current u32

When someone calls extend() with a deposit during active safe-mode, this many blocks are added to the current EnteredUntil value. Allows accumulating protection.

Current Value

0
Relevant for: validatorsdevelopers

The Big Picture

Sometimes one EnterDuration isn't enough. Extensions allow continuous safe-mode without governance intervention. Each extension costs another deposit.

From Chain Metadata

For how many blocks the safe-mode can be extended by each [`Pallet::extend`] call. This does not impose a hard limit as the safe-mode can be extended multiple times.

Use Cases

  • Calculate extended safe-mode end time
  • Plan extension timing

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 ExtendDuration constant
const value = api.consts[stringCamelCase("SafeMode")][stringCamelCase("ExtendDuration")];
console.log("ExtendDuration:", 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