ExecutionPhase

Storage Plain v101 → current

Current execution phase of block processing.

Explore chain
Queried by: validatorsdevelopers

The Big Picture

Blocks execute in phases: inherents, extrinsics, then finalize.

Use Cases

  • Runtime internal logic

From Chain Metadata

The execution phase of the block.

Purpose & Usage

Purpose

Track whether in inherent, extrinsic, or finalization phase.

Common Query Patterns

  • Query during execution

Stored Value

value (Phase)

Default Value

None (absent keys return no value)

Optional storage: querying a key that has never been written returns no value (None) — do not assume a zero default.

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

// Query ExecutionPhase storage (no keys - plain value)
const result = await api.query.System.ExecutionPhase.getValue();
console.log("ExecutionPhase:", result);

Runtime Info

Pallet
System
Storage Kind
Plain
First Version
v101
Current Version
v472