LastBondsReset

Storage Map v273 → current

Block number of the last bonds reset for an account on a subnet .

Explore chain
Queried by: validatorsdevelopers

The Big Picture

Bonds in Bittensor track accumulated trust between validators and miners. This tracks when resets occur.

Use Cases

  • Track validator bonds reset timing
  • Coordinate weight setting with bonds resets

Purpose & Usage

Purpose

Track bonds reset timing for validator consensus mechanics.

Common Query Patterns

  • Query to check bonds reset status

Query Keys

#NameTypeDescription
1
key1
u16 key1 (u16)
2
key2
AccountId key2 (AccountId) (hex -> SS58)

Stored Value

value (u32)

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 LastBondsReset storage
const key1 = 0;
const key2 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";

const result = await api.query
  [stringCamelCase("Commitments")]
  [stringCamelCase("LastBondsReset")](
  key1,
  key2
);

console.log("LastBondsReset:", result.toHuman());

Runtime Info

View Source
Pallet
Commitments
Storage Kind
Map
First Version
v273
Current Version
v393