BlockWeights
Constant Re-added v101 → v107, v108 → v148, v149 → v202, v205 → v277, v290 → current BlockWeightsControls computational resources per block .
Current Value
0xc2a0e766000b00409452a30313ffffffffffffffff2261c91900010bb837a1555d021366666666666666a6010b0030ef7dba0213ffffffffffffffbf0100002261c91900010bb847462a46031366666666666666e6010b00409452a30313ffffffffffffffff01070010a5d4e81300000000000000402261c91900000000Relevant for: validatorsdevelopersanalytics
The Big Picture
Substrate measures computation in 'weight' (roughly = execution time). Blocks have weight limits to ensure they can be produced and validated within the target block time. Fees are partially based on weight consumed.
Why This Matters
Transaction fees are partly based on weight. Heavy computations cost more. Understanding weight helps you estimate costs and optimize transactions.
Example
set_weights uses more computational weight than a simple transfer. Your fee for set_weights will be higher due to the weight component.
Common Questions
- Weight vs bytes - what's the difference?
- Bytes measure data size; weight measures computation time. Both are limited per block.
From Chain Metadata
Block & extrinsics weights: base values and limits.
Use Cases
- Block building
- Fee calculation
- Capacity planning
Value History
| Version | Block | Change | Value |
|---|---|---|---|
| v101 | #1 | Added | 0x624fd75a000b00204aa9d10113ffffffffffffffff02c0cd1700010b005816a82e011366666666666666a6010b0098f73e5d0113ffffffffffffffbf01000002c0cd1700010b00e06812a3011366666666666666e6010b00204aa9d10113ffffffffffffffff01070088526a7413000000000000004002c0cd1700000000 |
| v108 | #14,109 | Changed | 0x624fd75a000b00204aa9d10113ffffffffffffffff02c0cd1700010b005816a82e011366666666666666a6010b0098f73e5d0113ffffffffffffffbf01000002c0cd1700010b00e06812a3011366666666666666e6010b00204aa9d10113ffffffffffffffff01070088526a7413000000000000004002c0cd1700000000 → 0x624fd75a000b00409452a30313ffffffffffffffff02c0cd1700010b002020565d021366666666666666a6010b0030ef7dba0213ffffffffffffffbf01000002c0cd1700010b0030c52a46031366666666666666e6010b00409452a30313ffffffffffffffff01070010a5d4e813000000000000004002c0cd1700000000 |
| v149 | #3,014,339 | Changed | 0x624fd75a000b00409452a30313ffffffffffffffff02c0cd1700010b002020565d021366666666666666a6010b0030ef7dba0213ffffffffffffffbf01000002c0cd1700010b0030c52a46031366666666666666e6010b00409452a30313ffffffffffffffff01070010a5d4e813000000000000004002c0cd1700000000 → 0x025b1f5d000b00409452a30313ffffffffffffffffc2a0a91d00010bd027a9545d021366666666666666a6010b0030ef7dba0213ffffffffffffffbf010000c2a0a91d00010bd0374e2946031366666666666666e6010b00409452a30313ffffffffffffffff01070010a5d4e8130000000000000040c2a0a91d00000000 |
| v205 | #4,209,446 | Changed | 0x025b1f5d000b00409452a30313ffffffffffffffffc2a0a91d00010bd027a9545d021366666666666666a6010b0030ef7dba0213ffffffffffffffbf010000c2a0a91d00010bd0374e2946031366666666666666e6010b00409452a30313ffffffffffffffff01070010a5d4e8130000000000000040c2a0a91d00000000 → 0x624d186c000b00409452a30313ffffffffffffffff4247871900010b30beb1555d021366666666666666a6010b0030ef7dba0213ffffffffffffffbf0100004247871900010b30ce562a46031366666666666666e6010b00409452a30313ffffffffffffffff01070010a5d4e81300000000000000404247871900000000 |
| v290 | #5,947,548 | Changed | 0x624d186c000b00409452a30313ffffffffffffffff4247871900010b30beb1555d021366666666666666a6010b0030ef7dba0213ffffffffffffffbf0100004247871900010b30ce562a46031366666666666666e6010b00409452a30313ffffffffffffffff01070010a5d4e81300000000000000404247871900000000 → 0xc2a0e766000b00409452a30313ffffffffffffffff2261c91900010bb837a1555d021366666666666666a6010b0030ef7dba0213ffffffffffffffbf0100002261c91900010bb847462a46031366666666666666e6010b00409452a30313ffffffffffffffff01070010a5d4e81300000000000000402261c91900000000 |
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 BlockWeights constant
const value = api.consts[stringCamelCase("System")][stringCamelCase("BlockWeights")];
console.log("BlockWeights:", value.toHuman());Type Information
- Type
- BlockWeights
- Byte Size
- variable bytes
- Encoding
- composite
- Raw Hex
- 0xc2a0e766000b004094...
Version History
v101 block 1 Added
v108 block 14,109 Re-added
v149 block 3,014,339 Re-added
v205 block 4,209,446 Re-added
v290 block 5,947,548 Re-added Current
Runtime Info
- Pallet
- System
- First Version
- v101
- Latest Version
- v101
- Current Runtime
- v393