BlockWeight

Storage Plain v101 → v411

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

Version History

v101 block 1 Added
v149 block 3,014,339 Internal re-bind
v151 block 3,157,274 Internal re-bind Current

Runtime Info

Pallet
System
Storage Kind
Plain
First Version
v101
Current Version
v411