BondsPenalty

Storage Map v233 → v490 · 1 shape change

Penalty factor applied to bonds per subnet .

Explore chain
Queried by: validatorssubnet ownersdevelopers

The Big Picture

Bonds represent accumulated trust between validators and miners. The penalty factor controls how quickly bonds degrade. Higher penalty = faster bond decay = more responsive to recent behavior.

Use Cases

  • Understand bond dynamics for a subnet
  • Compare penalty rates across subnets
  • Research consensus parameter effects

From Chain Metadata

MAP ( netuid ) --> bonds_penalty

Purpose & Usage

Purpose

Control bond degradation rate for consensus mechanics.

Common Query Patterns

  • Query by netuid

Migration Notes

v424 v432 Breaking

key type changed from u16 to NetUid

Update decoders: SCALE encoding is positional, so any signature change (added, removed, or type-changed fields, or storage shape changes) shifts byte offsets and existing decoders will misparse this item. Re-derive types from the new metadata.

Query Keys

#NameTypeDescription
1
netuid
NetUid u16netuid (NetUid, hashed key component)

Stored Value

bonds_penalty (u16)

Default Value

65535 0xffff

Absent keys read as this value — querying a key that has never been written returns this default, not an error or empty result.

Default changed

  • v233 → 0
  • v257 → 65535 Current

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 BondsPenalty storage
const netuid = 1;

const result = await api.query.SubtensorModule.BondsPenalty.getValue(netuid);
console.log("BondsPenalty:", result);

On-Chain Activity

Write Frequency
●●○○○○ Minimal <10K est. writes

Fewer than 10K writes

#295 most written storage item

Write Source Calls + Hooks

Modified by both user extrinsics and runtime hooks

As of block 9,385,000

Version History

v233 block 4,920,350 Added
v425–v431 · runtime versions skipped on chain (never deployed)
v432 block 8,636,190 Shape changed Current
  • key : u16 → NetUid

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Map
First Version
v233
Current Version
v490