Entered

Event v154 → current #0

Emitted when safe-mode is entered, pausing certain network operations.

View events on chain
Useful for: validatorsdevelopersanalytics

The Big Picture

Safe-mode is Bittensor's emergency brake. When this event fires, the network has entered a protected state where certain critical operations are paused. This happens during security incidents or when vulnerabilities are being exploited. The 'until' field tells you when safe-mode will auto-exit if not extended or force-exited earlier.

Why This Matters

When safe-mode activates, your dApp may be affected. Knowing immediately lets you inform users and pause dependent operations. The 'until' field helps you estimate downtime duration.

Example Scenario

You run a staking dashboard. When Entered fires with until=1000500, you display a banner: 'Network in safe-mode until block 1000500. Some operations temporarily disabled.'

Common Questions

How long does safe-mode typically last?
Depends on EnterDuration constant and any extensions. Check the 'until' field for the expected end block. It can end earlier via force_exit.
What operations are affected?
Depends on runtime configuration. Typically includes value transfers, registrations, and other critical operations. Check runtime docs for specifics.

Use Cases

  • Monitor for network emergency events
  • Alert systems when safe-mode activates
  • Track safe-mode history and patterns
  • Coordinate incident response

How to Use This Event

  • Subscribe to all Entered events for network-wide alerting
  • Track the 'until' block to know when normal operations resume
  • Correlate with other security events for incident analysis

From Chain Metadata

The safe-mode was entered until inclusively this block.

Triggers

Emitted by

Preconditions

  • Safe-mode was not already entered
  • Either: caller provided deposit (permissionless) or caller is ForceEnterOrigin

Effects

Storage Modified

Postconditions

  • Safe-mode is active until the specified block
  • EnteredUntil storage is set
  • Certain network operations are blocked

Side Effects

  • If permissionless entry, deposit is reserved from caller
  • Network throughput may be reduced

Event Data

#NameTypeDescription
0
until
u32 BlockNumberFor<T>Block number when safe-mode will auto-exit

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

// Subscribe to Entered events
client.finalizedBlock$.subscribe(async (block) => {
  const events = await api.event.SafeMode.Entered.get(block.hash);
  for (const evt of events) {
    console.log("Entered:", evt.payload);
  }
});

Runtime Info

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