BlockWeight

Storage Plain v101 → current

Current weight consumption for the block being built.

Explore chain
Queried by: validatorsdevelopers

The Big Picture

Substrate blocks have weight limits. This tracks consumption during building.

Use Cases

  • Monitor block capacity
  • Transaction ordering optimization

From Chain Metadata

The current weight for the block.

Purpose & Usage

Purpose

Track computational resources used in current block.

Common Query Patterns

  • Query during block building

Stored Value

value (PerDispatchClass)

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 BlockWeight storage (no keys - plain value)
const result = await api.query
  [stringCamelCase("System")]
  [stringCamelCase("BlockWeight")]();
console.log("BlockWeight:", result.toHuman());

Runtime Info

Pallet
System
Storage Kind
Plain
First Version
v101
Current Version
v393