Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 1.29 KB

File metadata and controls

51 lines (34 loc) · 1.29 KB
title bonds
description Validator bond rows as `{validator_uid: {miner_uid: bond}}`, scaled to 0..1.

{/* GENERATED by scripts/generate.py from the SDK registries — do not edit. */}

Bonds are the slow EMA of a validator's stake-weighted weights that pays its dividends; unlike weights their magnitude is meaningful, so values are scaled by the u16 maximum (1.0 = the largest bond the chain can store) rather than row-normalized.

Category: Weights & bonds

Parameters

Parameter Type Description
netuid integer Subnet whose bond matrix to fetch.
mechid integer Mechanism index within the subnet; 0 (the default) on ordinary subnets.

CLI

btcli query bonds --netuid <integer> --mechid <integer> --json

Python

Namespace method (autocomplete, signature help):

import bittensor as bt

sub = bt.Subtensor()
result = sub.weights.bonds(netuid=1, mechid=1)

Or dispatch by name, as an agent would:

result = sub.read("bonds", netuid=1, mechid=1)

Async is the same surface awaited: async with bt.Subtensor() as client:.

On-chain implementation

Every file is browsable under /code exactly as built into the runtime.