Useful for: validatorsdevelopersanalytics
The Big Picture
When a security incident takes longer to resolve than initially anticipated, safe-mode can be extended. This event tells you the new expected end block, helping you adjust your downtime estimates and user communications.
Use Cases
- Track safe-mode extensions during prolonged incidents
- Update estimated downtime in dashboards
- Monitor community response to ongoing threats
How to Use This Event
- → Update 'until' tracking when extensions occur
- → Alert when safe-mode is extended unexpectedly
From Chain Metadata
The safe-mode was extended until inclusively this block.
Triggers
Emitted by
Preconditions
- Safe-mode is currently entered
- Either: caller provided extend deposit or caller is ForceExtendOrigin
Effects
Storage Modified
Postconditions
- EnteredUntil updated to new later block
- Safe-mode remains active longer
Side Effects
- Additional deposit reserved if permissionless extension
Event Data
| # | Name | Type | Description |
|---|---|---|---|
| 0 | until | u32 BlockNumberFor<T> | New 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 Extended events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.SafeMode.Extended.get(block.hash);
for (const evt of events) {
console.log("Extended:", evt.payload);
}
});Runtime Info
- Pallet Index
- 20
- Event Index
- 1
- First Version
- v154
- Current Version
- v411