• ABOUT

  • WHITEPAPER

  • DOCS

  • DISCORD

  • WALLET

  • EXPLORE

The V495 Upgrade

16 Null mechanisms · 2,500 UIDs · weight-row cap · shared Null epoch · gamma emission deposits · root claim weight · with the V494 changes · Proposed upgrade

Scope, versions, and compatibility

The proposed runtime specification version is 495. The transaction version stays 2. This page describes a proposed upgrade. It does not give an activation time and it is not a deployment instruction. Governance schedules each deployment and each sudo call separately. All times on this page are in UTC.

This guide gives one picture of two releases. V494 is the release before this one: channel commitment burns, weight delegation for one mechanism, basket trade controls, and a shorter Etao owner limit. V495 adds the changes for Null consensus and for gamma emission deposits. Each section names its release. The V494 release page has the original V494 notes.

Wallets, indexers, SDK users, and other signers must refresh runtime metadata for spec 495. Do not reuse a signed payload that you prepared for another runtime version.

Python packages

The Python packages for both releases are bittensor 11.3.6 and bittensor-core 0.1.13. V494 published no Python packages, so 11.3.6 is the first SDK release with the V494 calls, reads, and commands. bittensor-core 0.1.13 has the same code as 0.1.12.

uv pip install "bittensor==11.3.6"
btcli --version

What changes on chain

V495 adds one SubtensorModule error, TooManyWeightsForNullMechanism, at error index 209, and two SubtensorModule storage items, BasketRowsOpenedAt and BasketRowsCountedAt. It adds no call, no event, and no migration. Mechanism storage keeps the index netuid + mecid * 4096.

Each of the two storage items is a map from a validator hotkey to a block number and an extrinsic index. BasketRowsCountedAt also has a count of the rows and the queued credits of the fund. The chain uses both only in the transaction that wrote them. The root claim section explains them. The error RootClaimTooHeavy keeps its index and gets one more cause.

V494 added these calls. Regenerate metadata; do not hard-code call indices.

PalletCallIndexSigner
Commitmentsset_commitment_to3Coldkey
SubtensorModuleset_mech_weight_delegate170Validator hotkey
SubtensorModuleset_mechanism_weights_for171Delegate
SubtensorModulecommit_mechanism_weights_for172Delegate
SubtensorModulereveal_mechanism_weights_for173Delegate
SubtensorModulecommit_timelocked_mechanism_weights_for174Delegate
AdminUtilssudo_set_commit_burn_enabled, _min, _max, _half_life, _increase_mult123–127Root or subnet owner
AdminUtilssudo_set_basket_trade_max_slippage_bps, _refill_blocks, _price_reference128–130Root
AdminUtilssudo_set_subnet_emission_weights_rate_limit131Root

What changes, at a glance

SubjectReleaseBeforeAfter
UID capacity of a Null subnetV495MaxAllowedUids * mechanism_count at most 2,500MaxAllowedUids at most 2,500 for any mechanism count
Mechanisms on a Null subnetV495More mechanisms meant fewer UIDsUp to 16 mechanisms with the full UID capacity, when root raises the global limit
Length of a new Null weight rowV495At most the registered UID countmax(1, floor(2500 / mechanism_count)) entries
Null epoch workV495One complete epoch for each mechanismSubnet-wide state is read once; results are identical
Block weight of a Null epochV495Inside one fixed hook weightThe hook adds a weight for each Null epoch that runs
Deposit that gamma emission opensV495Daily spend cap of 0: paused until the owner coldkey sets a capNo cap: the owner hotkey can spend at once
Block weight that claim_root_with_hotkey reservesV495The same 2,093 ms for every validatorSized to the validator's fund: 482 ms for a fund with 129 rows and no queued credits
Largest fund that one claim_root_with_hotkey admitsV495130 claim units: rows on 128 subnets258 claim units: rows on 256 subnets
Owner limit for subnet emission weights (Etao)V494Constant of 50,400 blocksStorage value, 360 blocks by default; root can change it
Basket trade band, price reference, refillV494ConstantsStorage values with the same defaults; root can change them
Channel commitments with an optional burnV494Not availableOne commitment for each hotkey, mechanism, and channel
Weight delegationV494Not availableA validator hotkey authorizes one delegate for one mechanism

V495: Null UID capacity for any mechanism count

A Null subnet allows MaxAllowedUids up to 2,500. The mechanism count does not change that limit. A Yuma subnet keeps its rule: MaxAllowedUids * mechanism_count is at most 256. Before V495, a Null subnet had to keep MaxAllowedUids * mechanism_count at or below 2,500, so each added mechanism lowered the UID capacity.

The global maximum mechanism count still defaults to 2. Root can raise it to the hard maximum of 16 with the existing call sudo_set_max_mechanism_count. The upgrade does not make that call and does not change the mechanism count of a subnet.

# The subnet owner selects Null and sets the capacity.
btcli hparams set --netuid 1 --name epoch_consensus --value Null -w subnet_owner
btcli hparams set --netuid 1 --name max_allowed_uids --value 2500 -w subnet_owner
btcli hparams get --netuid 1 --name max_allowed_uids
import bittensor as bt

async with bt.Client(network="finney") as client:
    await client.execute(
        bt.SetHyperparameter(netuid=1, name="epoch_consensus", value="Null"),
        owner_wallet,
    )
    await client.execute(
        bt.SetHyperparameter(netuid=1, name="max_allowed_uids", value=2500),
        owner_wallet,
    )

    # Raw forms. The owner signs them; they are not sudo calls.
    await client.submit_call(
        bt.calls.AdminUtils.sudo_set_epoch_consensus(netuid=1, mode="Null"),
        owner_wallet,
    )
    await client.submit_call(
        bt.calls.AdminUtils.sudo_set_max_allowed_uids(netuid=1, max_allowed_uids=2500),
        owner_wallet,
    )

A capacity above the limit fails with TooManyUIDsPerMechanism. See the Null consensus guide.

V495: weight rows and the row cap

A weight row is the list of UIDs and weights that one validator sets on one mechanism. On a Null subnet, a new row holds at most max(1, floor(2500 / current_mechanism_count)) entries. The budget of 2,500 entries is fixed. No sudo call changes it. Yuma rows have no such cap.

MechanismsEntries in one new Null weight row
12,500
21,250
3833
4625
8312
16156

With one mechanism, nothing changes. With more mechanisms, a row cannot name every UID of a full subnet: at 16 mechanisms a row names at most 156 of up to 2,500 UIDs. UIDs that a row does not name receive no miner reward from that mechanism in that epoch.

  • The cap applies to direct weights, delegated *_for calls, legacy hash reveals, timelocked reveals, and batch calls. The error is TooManyWeightsForNullMechanism.
  • The chain cannot read the row length of a timelocked commit. It checks the length at the reveal and skips a row above the cap. The block hook does not stop.
  • Rows that are in storage stay as they are when the mechanism count changes. The cap applies to new rows.
  • A Null row that is not a single self-weight needs at least min(MinAllowedWeights, row cap, registered UIDs) entries. The stored MinAllowedWeights value does not change.
# Mechanism 15 of a Null subnet with 16 mechanisms: at most 156 entries.
btcli misc weights set --netuid 1 --mechid 15 --raw-u16 --weights-file weights.json \
  -w my_coldkey -H my_hotkey

# weights.json maps each UID to an integer weight, for example {"2": 65534, "3": 1}
# From bittensor 11.3.6 the SDK reads the cap and refuses a longer row
# before it signs or encrypts anything.
intent = bt.SetWeights(netuid=1, mechid=15, weights={2: 65534, 3: 1}, raw_u16=True)
try:
    result = await client.execute(intent, wallet)
except bt.ChainError as error:
    if error.code == bt.ErrorCode.LIMIT_EXCEEDED:
        print(error.name, error.message)

# Raw direct call, signed by the validator hotkey.
raw = bt.calls.SubtensorModule.set_mechanism_weights(
    netuid=1, mecid=15, dests=[2, 3], weights=[65534, 1], version_key=0,
)
await client.submit_call(raw, wallet, signer="hotkey")

btcli weights is a hidden alias of btcli misc weights.

Guide: run several mechanisms on a subnet

A mechanism is one scoring track inside a subnet. It has its own weights and its own share of the emission. Miners and validators keep one UID for all mechanisms. The complete guide, with every error, is Run multiple mechanisms.

Rules for the owner calls

  • Rate limits. The owner can change the mechanism count once per 7,200 blocks for each subnet. The emission split has its own limit of 7,200 blocks. The first change is always allowed. Root is exempt. The error is TxRateLimitExceeded.
  • Admin freeze window. The chain refuses owner changes in the last blocks before the epoch of the subnet (AdminFreezeWindow, 10 blocks by default), and while an epoch that the owner triggered is pending. The error is AdminActionProhibitedDuringWeightsWindow.
  • Pending commits on a Null subnet. The count cannot change while a timelocked commit or a legacy hash commit is pending on any mechanism.

Step 1. Read the current state

btcli hparams mechanisms count --netuid 1
btcli hparams mechanisms emissions --netuid 1
btcli query epoch-status --netuid 1
btcli query timelocked-weight-commits --netuid 1 --mechid 0
count = await client.subnets.mechanism_count(netuid=1)
split = await client.subnets.mechanism_emission_split(netuid=1)
limit = await client.query(bt.storage.SubtensorModule.MaxMechanismCount)

Step 2. Root: raise the global limit, if necessary

A count above MaxMechanismCount fails with InvalidValue. This root call is a separate governance decision.

btcli call AdminUtils.sudo_set_max_mechanism_count \
  --args '{"max_mechanism_count": 16}' --sudo -w sudo_key
inner = await client.compose(
    bt.calls.AdminUtils.sudo_set_max_mechanism_count(max_mechanism_count=16)
)
await client.submit_call(bt.calls.Sudo.sudo(call=inner), sudo_wallet)

Step 3. Owner: set the mechanism count

btcli hparams mechanisms count --netuid 1 --value 4 -w subnet_owner

# The generated command does the same and can show a preview.
btcli tx set-mechanism-count --netuid 1 --mechanism-count 4 --dry-run
await client.execute(bt.SetMechanismCount(netuid=1, mechanism_count=4), owner_wallet)

# Raw form, AdminUtils call index 76. The owner signs it.
await client.submit_call(
    bt.calls.AdminUtils.sudo_set_mechanism_count(netuid=1, mechanism_count=4),
    owner_wallet,
)

New mechanisms start without weights. A lower count deletes the state of the removed mechanisms: weights, incentive, bonds, and pending commits. The chain then removes their weight delegates and channel commitments in bounded steps, and the count cannot change again until that work is complete. Each change of the count resets the emission split to an equal split.

Step 4. Owner: set the emission split

The split is a list of 16-bit shares, one for each mechanism in order. The shares must add up to exactly 65,535. The SDK has no intent for this call, so use the raw call, AdminUtils call index 77.

# 40%, 30%, 20% and 10% for mechanisms 0 to 3
btcli call AdminUtils.sudo_set_mechanism_emission_split \
  --args '{"netuid": 1, "maybe_split": [26214, 19661, 13107, 6553]}' -w subnet_owner

# Back to an equal split
btcli call AdminUtils.sudo_set_mechanism_emission_split \
  --args '{"netuid": 1, "maybe_split": null}' -w subnet_owner
call = bt.calls.AdminUtils.sudo_set_mechanism_emission_split(
    netuid=1, maybe_split=[26214, 19661, 13107, 6553],
)
await client.submit_call(call, owner_wallet)

A mechanism receives floor(emission * share / 65535). Mechanism 0 also receives the units that rounding leaves.

Step 5. Check the result

btcli hparams mechanisms count --netuid 1
btcli query mechanism-emission-split --netuid 1 --json

Guide: commit pipelines for one mechanism

Each mechanism has its own pipelines. Name the mechanism with --mechid, or mechid in Python. The default is 0.

PipelineCommandIntentChain call
Direct weightsbtcli misc weights set, when commit-reveal is offSetWeightsset_mechanism_weights
Timelocked commitbtcli misc weights set, when commit-reveal is on, or btcli misc weights commitSetWeights, CommitWeightscommit_timelocked_mechanism_weights
Legacy hash commitbtcli misc weights hashCommitWeightHashcommit_mechanism_weights
Legacy revealbtcli misc weights revealRevealWeightsreveal_weights on mechanism 0, reveal_mechanism_weights on the others
Channel commitment (V494)btcli commitments commitSetChannelCommitmentCommitments.set_commitment_to

Direct weights and timelocked commits

set selects the path that the subnet runs. commit always sends a timelocked commit. The chain decrypts a timelocked commit at its drand round. No reveal call is necessary.

btcli misc weights set --netuid 1 --mechid 2 \
  --uids 0,1,2 --weights 0.5,0.3,0.2 -w my_coldkey -H my_hotkey
btcli misc weights commit --netuid 1 --mechid 2 \
  --uids 0,1,2 --weights 0.5,0.3,0.2 -w my_coldkey -H my_hotkey
btcli query timelocked-weight-commits --netuid 1 --mechid 2
await client.execute(
    bt.SetWeights(netuid=1, mechid=2, weights={0: 0.5, 1: 0.3, 2: 0.2}), wallet,
)
await client.execute(
    bt.CommitWeights(netuid=1, mechid=2, weights={0: 0.5, 1: 0.3, 2: 0.2}), wallet,
)
pending = await client.weights.timelocked_weight_commits(netuid=1, mechid=2)

On a Null subnet, one ciphertext has at most floor(32 KiB / mechanism_count) bytes. All mechanisms of the subnet share one queue for each epoch: 64 commits and 64 KiB. A hotkey has one pending row for each mechanism, and a new commit replaces it. On a Yuma subnet the limit stays 5,000 bytes.

Legacy hash commit and reveal

btcli misc weights hash --netuid 1 --mechid 2 --hash 0xCOMMIT_HASH \
  -w my_coldkey -H my_hotkey
btcli misc weights reveal --netuid 1 --mechid 2 \
  --uids 0,1,2 --weights 0.5,0.3,0.2 --salt 1,2,3 -w my_coldkey -H my_hotkey
await client.execute(
    bt.CommitWeightHash(netuid=1, mechid=2, commit_hash="0x" + "11" * 32), wallet,
)
await client.execute(
    bt.RevealWeights(
        netuid=1, mechid=2, uids=[0, 1, 2], weights=[0.5, 0.3, 0.2], salt=[1, 2, 3],
    ),
    wallet,
)

V494: channel commitments with an optional burn

A channel commitment is a payload that a coldkey publishes for a registered hotkey that it owns, at one (netuid, mechid, channel). It is separate from the legacy commitment and from each other channel. The coldkey signs and pays. With no burn configuration, the commitment costs only the transaction fee.

The subnet owner can turn on a burn for each channel. Each paid commitment raises the price of that channel. The price falls to its minimum over its half-life. max_burn is a price limit, not an extra payment. The chain does not refund burned TAO.

# Read the live price, publish, and read the commitment.
btcli commitments price --netuid 1 --mechid 1 --channel 7
btcli commitments commit --netuid 1 --mechid 1 --channel 7 \
  --data "model endpoint and metadata" --max-burn 0.25 -w my_coldkey -H my_hotkey
btcli commitments show --netuid 1 --mechid 1 --channel 7 --hotkey HOTKEY

# The subnet owner configures one channel. Set max before min.
btcli commitments burn-config --netuid 1 --mechid 1 --channel 7 \
  --name max_burn --value 10 -w subnet_owner
btcli commitments burn-config --netuid 1 --mechid 1 --channel 7 \
  --name min_burn --value 0.1 -w subnet_owner
btcli commitments burn-config --netuid 1 --mechid 1 --channel 7 \
  --name half_life --value 360 -w subnet_owner
btcli commitments burn-config --netuid 1 --mechid 1 --channel 7 \
  --name increase_mult --value 1.26 -w subnet_owner
btcli commitments burn-config --netuid 1 --mechid 1 --channel 7 \
  --name enabled --value true -w subnet_owner
intent = bt.SetChannelCommitment(
    netuid=1, mechid=1, channel=7,
    data="model endpoint and metadata", max_burn_tao="0.25",
)
result = await client.execute(intent, wallet)

price = await client.identity.commit_burn(netuid=1, mechid=1, channel=7)
commitment = await client.identity.channel_commitment(
    netuid=1, mechid=1, channel=7, hotkey_ss58=hotkey,
)

# Owner configuration through the intent.
await client.execute(
    bt.SetCommitBurn(netuid=1, mechid=1, channel=7, name="enabled", value=True),
    owner_wallet,
)

# Raw form, Commitments call index 3. The coldkey signs it; it is not a sudo call.
raw = bt.calls.Call("Commitments", "set_commitment_to", {
    "netuid": 1,
    "mecid": 1,
    "channel": 7,
    "hotkey": hotkey,
    "info": {"fields": [{"Raw3": b"abc"}]},
    "max_burn": 250_000_000,
})
result = await client.submit_call(raw, wallet)

For a timelocked payload, use --reveal-round or the reveal_round field of the intent. Raw plaintext has at most 512 bytes. New writes to a channel wait while a hotkey swap or a purge of that hotkey is pending. See the channel commitment guide.

V494 guide: delegate weights for one mechanism

A registered validator hotkey can authorize one account as its delegate on exactly one subnet and one mechanism. The delegate pays the normal transaction fee. It sends direct weights, legacy hash commits and reveals, or timelocked commits for that validator. The registration, stake, permit, rate limit, and row rules of the validator still apply. The grant does not move stake or ownership, and it does not apply to another mechanism.

# The validator hotkey signs the grant and the revocation.
btcli misc weights delegate set --netuid 1 --mechid 1 --delegate OPERATOR_HOTKEY \
  -w validator_coldkey -H validator_hotkey
btcli misc weights delegate show --netuid 1 --mechid 1 --hotkey VALIDATOR_HOTKEY
btcli misc weights delegate revoke --netuid 1 --mechid 1 \
  -w validator_coldkey -H validator_hotkey

# The delegate signs. --for-hotkey names the validator.
btcli misc weights set --netuid 1 --mechid 1 --for-hotkey VALIDATOR_HOTKEY \
  --uids 0,1,2 --weights 0.5,0.3,0.2 -w operator_coldkey -H operator_hotkey
btcli misc weights commit --netuid 1 --mechid 1 --for-hotkey VALIDATOR_HOTKEY \
  --uids 0,1,2 --weights 0.5,0.3,0.2 -w operator_coldkey -H operator_hotkey
btcli misc weights hash --netuid 1 --mechid 1 --for-hotkey VALIDATOR_HOTKEY \
  --hash 0xCOMMIT_HASH -w operator_coldkey -H operator_hotkey
btcli misc weights reveal --netuid 1 --mechid 1 --for-hotkey VALIDATOR_HOTKEY \
  --uids 0,1,2 --weights 0.5,0.3,0.2 --salt 1,2,3 \
  -w operator_coldkey -H operator_hotkey
# The validator grants one mechanism. delegate=None revokes the grant.
await client.execute(
    bt.SetMechWeightDelegate(netuid=1, mechid=1, delegate=operator_hotkey),
    validator_wallet,
)
delegate = await client.weights.mech_weight_delegate(
    netuid=1, mechid=1, hotkey_ss58=validator_hotkey,
)

# The SDK selects the direct or the timelocked *_for call from chain state.
await client.execute(
    bt.SetWeights(
        netuid=1, mechid=1, weights={0: 0.5, 1: 0.3, 2: 0.2},
        for_hotkey=validator_hotkey,
    ),
    operator_wallet,
)

# Raw grant, SubtensorModule call index 170, signed by the validator hotkey.
raw = bt.calls.Call("SubtensorModule", "set_mech_weight_delegate", {
    "netuid": 1, "mecid": 1, "delegate": operator_hotkey,
})
await client.submit_call(raw, validator_wallet, signer="hotkey")

# Raw direct weights, index 171, signed by the delegate hotkey.
raw = bt.calls.Call("SubtensorModule", "set_mechanism_weights_for", {
    "netuid": 1,
    "mecid": 1,
    "hotkey": validator_hotkey,
    "dests": [0, 1, 2],
    "weights": [65_535, 39_321, 26_214],
    "version_key": 0,
})
await client.submit_call(raw, operator_wallet, signer="hotkey")

# Legacy delegated commit and reveal: indices 172 and 173.
commit = bt.calls.Call("SubtensorModule", "commit_mechanism_weights_for", {
    "netuid": 1, "mecid": 1, "hotkey": validator_hotkey,
    "commit_hash": commit_hash,
})
reveal = bt.calls.Call("SubtensorModule", "reveal_mechanism_weights_for", {
    "netuid": 1, "mecid": 1, "hotkey": validator_hotkey,
    "uids": [0, 1, 2], "values": [65_535, 39_321, 26_214],
    "salt": [1, 2, 3], "version_key": 0,
})

# Timelocked delegated commit: index 174.
sealed = bt.calls.Call("SubtensorModule", "commit_timelocked_mechanism_weights_for", {
    "netuid": 1, "mecid": 1, "hotkey": validator_hotkey,
    "commit": ciphertext, "reveal_round": reveal_round, "commit_reveal_version": 4,
})

Give the grant to a fresh operational hotkey, and revoke it when you no longer need it. A hotkey that registers again does not get an old grant. A hotkey swap moves a grant only while the destination owns the former UID of the validator. A lower mechanism count removes the grants of the removed mechanisms.

V495: one Null epoch for all mechanisms

Before V495, a Null subnet ran one complete epoch for each mechanism. Each run read every hotkey, registration block, and stake value again. V495 reads that subnet-wide state once for the subnet. Each mechanism then adds only its own work: its last-update blocks, the weight row of the elected validator, and its pending commits.

The results are identical: storage, events, emissions, dividends, incentive, and permits. Tests run the old path and the new path on the same state and compare the complete state. Yuma epochs do not change.

MechanismsUIDsEpoch time beforeEpoch time after
12569.3 ms9.3 ms
1610035.6 ms4.9 ms
16256130.7 ms11.4 ms
162,5001,632.7 ms119.5 ms

These numbers are from one development machine, with a release build. They are not reference weights. At 16 mechanisms and 2,500 UIDs the epoch made 603,107 storage reads before and 40,330 after.

Block weight

The block hook had one fixed weight for every block. From V495 it adds a weight for each Null epoch that runs in the block. That weight has two inputs: the mechanism count and the UID count. Until reference hardware measures it, the weight reserves one more fixed hook envelope for each Null epoch, about 0.83 seconds of block weight. A block with a Null epoch therefore has less room for transactions. The scheduler already runs a Null epoch as the only epoch of its block.

Node operators do not configure anything. No event, storage value, or reward changes.

V495: a deposit that gamma emission opens has no cap

A subnet can pay shares of its emission into the gamma of another subnet. The chain credits that gamma to the deposit of the subnet owner, at the subnet owner hotkey, on the target subnet. Since V493 a deposit that this opened had a daily spend cap of 0. The owner hotkey could spend only after the owner coldkey set a cap.

From V495 a deposit that gamma emission opens has no cap. The owner hotkey can spend the minted gamma at once.

  • An existing deposit keeps its cap. A deposit that is paused today stays paused until its coldkey sets or removes the cap.
  • No migration changes existing deposits.
  • Only this case changes. A deposit that you open with a mint (btcli gamma mint, mint_gamma, mint_gamma_with_stake) has the cap that the mint names, or no cap when the mint names none, as before.
  • The pause after a hotkey swap, the rules for cap values, and the cap call of the coldkey do not change.
  • The event GammaEmissionMinted does not change. It has no cap field.
# Read the deposit of the owner hotkey on the target subnet.
btcli gamma show --netuid 3 --hotkey OWNER_HOTKEY

# The owner coldkey sets a cap of 20 gamma a day, pauses the deposit, or removes the cap.
btcli gamma set-cap --netuid 3 --hotkey OWNER_HOTKEY --daily-spend-cap-gamma 20
btcli gamma set-cap --netuid 3 --hotkey OWNER_HOTKEY --daily-spend-cap-gamma 0
btcli gamma set-cap --netuid 3 --hotkey OWNER_HOTKEY --remove-cap

# To have a cap from the first credit, open the deposit with a cap before
# the first emission arrives. Sign with the owner coldkey.
btcli gamma mint --netuid 3 --hotkey OWNER_HOTKEY --amount-tao 1 --daily-spend-cap-gamma 0
deposit = await client.gamma.gamma_deposit(netuid=3, hotkey_ss58=owner_hotkey)

await client.execute(
    bt.SetGammaDepositDailySpendCap(
        netuid=3, hotkey_ss58=owner_hotkey, daily_spend_cap_gamma=20,
    ),
    owner_wallet,
)
await client.execute(
    bt.SetGammaDepositDailySpendCap(netuid=3, hotkey_ss58=owner_hotkey, remove_cap=True),
    owner_wallet,
)

# Raw form, SubtensorModule call index 163. Amounts have 10^9 units for each gamma;
# None removes the cap.
raw = bt.calls.SubtensorModule.set_gamma_deposit_daily_spend_cap(
    hotkey=owner_hotkey, netuid=3, daily_spend_cap=20_000_000_000,
)
await client.submit_call(raw, owner_wallet)

The cap belongs to the deposit, not to the hotkey. The chain removes a deposit when its coldkey closes it, moves its whole balance to another hotkey, or swaps its hotkey while it holds gamma. If gamma emission credits the same hotkey after that, it opens a new deposit without a cap. Before V495 that deposit opened paused. To keep a cap or a pause on the owner hotkey, do not close its deposit and do not move its whole balance out.

Gamma emission credits the owner hotkey of the subnet that pays the share. A hotkey swap on the target subnet only moves the deposit to the new hotkey, but the paying subnet keeps the old owner hotkey. Later credits then open a new deposit at the old hotkey, without a cap. To replace an owner hotkey, swap it on the paying subnet too, or on all subnets.

Protect the owner hotkey. Without a cap, a person who controls that hotkey can spend all the gamma in its deposit. See the gamma guide.

V495: a root claim reserves the weight of its fund

claim_root_with_hotkey redeems your root dividends from the fund (the basket) of one validator. A fund has one row for each subnet where it holds alpha, and one row for its TAO. Before a transaction runs, it reserves block weight: the compute time that the block keeps for it. After the transaction, the chain returns the part that the transaction did not use.

Until V494 this claim reserved the same weight for every validator: about 2,093 ms. A block had room for only one such claim. From V495 the claim reserves the weight of the validator's own fund. The chain counts two things before the claim runs: the stored rows of the fund, and its queued dividend credits. A queued dividend credit is a dividend that the fund has earned but that the chain has not yet put into the fund. The claim settles these credits first.

Fund of the validatorReserved in V494Reserved in V495
Up to 8 rows, no queued credits2,093 ms67 ms
129 rows, no queued credits2,093 ms482 ms
129 rows, 128 queued credits2,093 ms1,280 ms
161 rows, no queued creditsClaim refused591 ms
161 rows, 160 queued creditsClaim refused1,578 ms
257 rows, no queued creditsClaim refused920 ms
257 rows, 256 queued creditsClaim refused2,472 ms

These numbers come from the weight formula of the runtime. They are the reserved weight, not a measured time. The chain still returns the unused part after the claim.

Each number includes a fixed 32 ms for one more task of the claim. Sometimes a dividend credit must wait before it can go into the fund. If your root stake changes while a credit waits, the chain writes a correction for your account, so that the change does not move dividends between stakers. The correction stays until your next claim, also after the credit is in the fund. The claim settles these corrections first. The chain reserves the weight before it knows your account. Thus it reserves the weight for the most corrections that one account can have on one validator: 256.

Each number also includes the reads with which the chain counts the rows and the queued credits of the fund. A transaction counts a fund one time and keeps the count in the new storage item BasketRowsCountedAt. The fee logic, a batch, and a proxy read that count; they do not count the fund again. Only the first transaction of a block counts two times, so the reserved weight has two counts: 13 ms for a fund with 129 rows and 128 queued credits. The chain keeps a count only for a validator whose fund has a row or a queued credit. A claim that names an account without a fund writes no record, and a hotkey swap removes the count of the old hotkey.

Waiting credits: less work, the same result

A claimant can sell their own part of a waiting credit in the claim. In V494, each of these sales went through all waiting credits of the validator again, so the work grew with the square of their number. In V495, the claim reads the waiting credits and the corrections of the claimant one time, and it writes the corrections one time. The payout, the corrections, and the errors are the same as in V494.

The limit: 258 claim units

One claim admits a fund of at most 258 claim units. The validator is one unit. Each stored row of the fund is one unit. Each queued credit on a subnet where the fund has no row is one unit, because the claim can open that row. The limit was 130 units: a fund with rows on 128 subnets. 258 units is a fund with rows on 256 subnets. The chain refuses a claim on a larger fund with RootClaimTooHeavy.

The largest weight that a claim can reserve is 2,478 ms. That is 95.3% of the largest transaction that a block accepts, 2,599.9 ms. Only a fund with rows on 256 subnets and a queued credit for each row comes near this value.

One new rule for batches

A batch computes the weight of all its calls before it runs the first call. If an earlier call in the batch gives the fund a new row, the weight of a later claim in the same batch is too small. The chain therefore refuses claim_root_with_hotkey with RootClaimTooHeavy when one of these calls ran earlier in the same transaction, for the same validator:

  • A swap_basket or swap_basket_many trade that bought alpha on a subnet where the fund had no row.
  • A hotkey swap that moved a fund, or queued credits, to this validator hotkey.

Send the claim in a later transaction. The same block is sufficient. The chain records the block and the transaction index of such a trade or swap in the new storage item BasketRowsOpenedAt. A trade that buys more of a subnet that the fund already holds, or that sells into TAO, does not stop a claim.

The fee of a small claim

After a claim, the chain charges the work that the claim reports, up to four claim units. This rule does not change. With V495 a claim reports two more parts of its work: the counts of the fund, and the corrections of the claimant. A claim that does more work than four claim units pays the same as before. A smaller claim also pays for these two parts. Example: for a fund with 30 rows and a claimant with 12 corrections, the two parts are 3.8 ms. That is about 0.001 TAO.

What does not change

  • The fee quote and the largest fee. The chain charges a claim for at most four claim units, for every fund size. That is about 0.0082 TAO of weight fee. A fee quote returns the same fee, and a weight that now depends on the fund.
  • The payout, the claim threshold, and the dust rules.
  • The claim for all validators of a coldkey, claim_root. It keeps its limit of 256 units and its weight.
  • The subnet limit. V495 does not change it. With V495, a fund with a row on each of 256 subnets stays claimable with one single-validator claim.
# Preview the claim: the reserved fee, the fee that will settle, and the claim-unit check.
btcli root claim --hotkey VALIDATOR_HOTKEY --dry-run -w my_wallet

# Send the claim.
btcli root claim --hotkey VALIDATOR_HOTKEY -w my_wallet
# The rows of the fund, and its queued dividend credits.
rows = await client.read("validator_basket", hotkey_ss58=validator_hotkey)
queued = await client.query_map(
    bt.storage.SubtensorModule.PendingBasketDeposits, [validator_hotkey],
)

# The plan stops a claim on a fund above the limit of the connected runtime before it
# signs: 258 claim units from runtime 495, 130 before.
plan = await client.plan(bt.ClaimRootWithHotkey(hotkey_ss58=validator_hotkey), wallet)
await client.execute(bt.ClaimRootWithHotkey(hotkey_ss58=validator_hotkey), wallet)

# Raw form, SubtensorModule call index 148.
raw = bt.calls.SubtensorModule.claim_root_with_hotkey(hotkey=validator_hotkey)
await client.submit_call(raw, wallet)

# The last trade or hotkey swap that opened a row: (block, transaction index), or None.
opened = await client.query(
    bt.storage.SubtensorModule.BasketRowsOpenedAt, [validator_hotkey],
)

See the root guide.

V494: Etao owner updates once per 360 blocks

A subnet owner changes the emission weight vector of the subnet with a rate limit. The limit was a constant of 50,400 blocks. From V494 it is the storage value SubnetEmissionWeightsRateLimit, with a default of 360 blocks, one default tempo. Root can change it through AdminUtils call index 131. A value of 0 removes the wait. The limit is for each subnet. Root is exempt, and the first owner change of a subnet is always allowed.

# The status view reads the limit from the chain and shows the next owner change.
btcli subnets emission show --netuid 1

# The owner changes one slot; the other slots are rescaled.
btcli subnets emission set-value --netuid 1 --slot validator --value 30% -w subnet_owner

# Root changes the limit for all subnets.
btcli call AdminUtils.sudo_set_subnet_emission_weights_rate_limit \
  --args '{"rate_limit": 360}' --sudo -w sudo_key
info = await client.subnets.subnet_emission_weights(netuid=1)
print(info.rate_limit_blocks, info.rate_limit())

limit = await client.query(bt.storage.SubtensorModule.SubnetEmissionWeightsRateLimit)

# Root-only raw call, AdminUtils call index 131.
inner = await client.compose(bt.calls.Call(
    "AdminUtils", "sudo_set_subnet_emission_weights_rate_limit", {"rate_limit": 360},
))
await client.submit_call(bt.calls.Sudo.sudo(call=inner), sudo_wallet)

bittensor 11.3.6 reads the limit from the chain. Earlier SDK versions assume 50,400 blocks: they show a later block for the next owner change, and their check before signing stops an owner change that the chain accepts. The limit applies to the emission weight vector of the owner, not to the weights of validators.

V494: basket trade controls with the old defaults

Root can set the trade band for each leg of a basket trade, the price reference, and the refill period of the turnover bucket. Without a root call, the values are the same as before: a band of 200 basis points (2%), the reference StrictestEmaAndSpot, and a refill over 7,200 blocks. No migration is necessary to keep those values.

# Root-only calls. Add --dry-run to see a preview.
btcli call AdminUtils.sudo_set_basket_trade_max_slippage_bps \
  --args '{"bps": 500}' --sudo -w sudo_key
btcli call AdminUtils.sudo_set_basket_trade_refill_blocks \
  --args '{"blocks": 7200}' --sudo -w sudo_key
btcli call AdminUtils.sudo_set_basket_trade_price_reference \
  --args '{"reference": "SpotOnly"}' --sudo -w sudo_key
# Root-only raw call, AdminUtils call index 128.
inner = await client.compose(bt.calls.Call(
    "AdminUtils", "sudo_set_basket_trade_max_slippage_bps", {"bps": 500},
))
await client.submit_call(bt.calls.Sudo.sudo(call=inner), sudo_wallet)

# Read the three values.
band = await client.query(bt.storage.SubtensorModule.BasketTradeMaxSlippageBps)
reference = await client.query(bt.storage.SubtensorModule.BasketTradePriceReferenceMode)
refill = await client.query(bt.storage.SubtensorModule.BasketTradeRefillBlocks)

See the basket governance guide.

Compatibility and migration notes

Node operators

  • Wait for the final tag that governance selects. Build it from a clean checkout.
  • Neither release runs a storage migration at the upgrade. V494 moves and removes channel commitments and weight delegates in bounded steps, in the idle time of blocks.
  • A block with a Null epoch reserves more hook weight than before. You do not configure anything.

Validators

  • Upgrade to bittensor 11.3.6 before you use V494 or V495 features.
  • On a Null subnet with several mechanisms, keep each new row inside the row cap. A timelocked row above the cap is skipped at its reveal.
  • The size limit of one timelocked commit on a Null subnet is floor(32 KiB / mechanism_count).
  • Grant a weight delegate for each mechanism separately (V494).
  • Do not put a swap_basket buy on a new subnet, or a hotkey swap, in one batch with a claim_root_with_hotkey on the same fund. The claim fails with RootClaimTooHeavy. Send it in a later transaction.

Miners

  • No migration is necessary. One UID serves all mechanisms.
  • With several mechanisms, the reward of a miner is the sum of its rewards in each mechanism. A lower mechanism count deletes the state of the removed mechanisms.
  • Channel commitments are optional. If a channel has a burn, read the live price before you publish (V494).

Subnet owners

  • More than two mechanisms need a root call first. Then use the steps in the guide above. The count and the split each have a limit of 7,200 blocks.
  • A deposit that gamma emission opens after the upgrade has no cap. Set a cap, or open the deposit with a cap first, if you want a limit. Deposits that exist keep their cap.
  • The owner limit for emission weights is 360 blocks by default (V494).
  • Channel burns are off until you configure them (V494).

SDK users

  • Use bittensor 11.3.6 and bittensor-core 0.1.13. Earlier versions do not have the V494 intents, reads, and commands.
  • SetWeights and CommitWeights can now raise ChainError with the code LIMIT_EXCEEDED before they sign.
  • The subnet_emission_weights read has the new field rate_limit_blocks.
  • The channel_commitment read and btcli commitments show decode a commitment that the node returns as text. In earlier versions the read failed with ValueError in that case. Revealed text that starts with 0x is shown as the node returns it; earlier versions decoded it a second time.
  • The check before ClaimRootWithHotkey uses the rules of the connected runtime. It reads the runtime version at the block from which it reads the fund. On a runtime before 495 the limit is 130 claim units. From runtime 495 the limit is 258 claim units, and the check also counts queued credits on subnets where the fund has no row. Thus the SDK does not sign a claim that the chain refuses with RootClaimTooHeavy.
  • For a raw call, use client.submit_call(call, wallet). Add signer="hotkey" for a call that the hotkey signs. A client with a policy needs bt.Policy(allow_raw_calls=True).

Wallets and indexers

  • Regenerate metadata for spec 495. The transaction version stays 2. V495 appends one error at index 209 and two storage items, BasketRowsOpenedAt and BasketRowsCountedAt. It changes no call, no event, and no type of an existing storage item.
  • The weight in a fee quote for claim_root_with_hotkey now depends on the fund of the validator. The fee in the quote does not. Do not use a fixed weight for this call.
  • A claim inside a multisig has no fee cap. Its max_weight must be at least the weight that the claim reserves. That was the fixed 2,093 ms. Now it is the weight of the fund, which is lower for the funds of today. Take max_weight from a current fee quote.
  • If you did not update for V494, also add its calls, storage items, events, and errors.
  • If you derive the cap of a gamma deposit from events: a deposit that GammaEmissionMinted opens has no cap from spec 495. It had a cap of 0 before.
  • Null epochs emit the same events as before, one IncentiveAlphaEmittedToMiners for each mechanism.

Accepted risks and open items

  • Parent stake reads (accepted). The Null epoch reads the stake of every parent of every UID. A hotkey can have up to 100 parents, and older lists can be longer. The weight of the epoch does not grow with the number of parents. In a local test with 100 parents for each of 2,500 UIDs, one epoch took about 1.9 seconds. The project accepts this risk for V495: live subnets do not have such parent lists. V495 adds no parent cap and no charge for each parent.
  • Lower mechanism count (accepted). When an owner lowers the mechanism count, the call deletes the weight rows of each removed mechanism at once, and the weight of the call is fixed. A Null subnet can now hold up to 2,500 weight rows for each mechanism, so a change from 16 mechanisms to 1 can delete up to 37,500 rows in one call. Only the elected validator can set a row, so rows collect only as the elected validator changes. The project accepts this risk for V495.
  • Null UID trimming (accepted). The owner of a Null subnet can remove UIDs in batches (sudo_trim_null_uids_batch). The call has a small fixed weight, about 0.34 ms. A batch reads the weight rows of every mechanism and deletes the rows of UIDs without a validator permit. With 16 mechanisms and 2,500 rows for each, one batch can need about 5 seconds by the database weights. That is more than the compute time of one block. Rows collect only as the elected validator changes. The project accepts this risk for V495.
  • Interim weight (open). The weight of a Null epoch is a placeholder until reference hardware measures it. It does not include the payout to hotkeys that follows the epoch.
  • Gamma spending (accepted). The owner hotkey can spend emission gamma without a call from the owner coldkey. This is the purpose of the change.
  • Gamma cap after a removed deposit (accepted). A cap or a pause does not stay when the chain removes the deposit: after a close, a move of the whole balance, or a hotkey swap. The next emission credit to that hotkey opens a deposit without a cap. The gamma section gives the details.
  • Largest root claim (to confirm). A single-validator claim on a fund at the limit of 258 claim units, with a queued credit for each row, reserves 2,478 ms. That is 95.3% of the largest transaction. It stays below the limit, and a claim on a real fund reserves much less than before. The project accepted 2,464 ms. The two counts of the fund, which the reserved weight has after an audit, add 13 ms.
  • Trade and deposit weight at 256 subnets (open). swap_basket, swap_basket_many, and stake_into_basket reserve weight for a fund of 256 rows. With 256 subnets a fund can have 257 rows: 256 subnets and its TAO. Review these values before the subnet limit goes above 255.
  • Spot-only basket reference (V494). The reference SpotOnly removes the moving-price anchors. A manipulated spot price inside the band can then be traded against. Root selects it deliberately or not at all.

Sudo calls after the upgrade

The runtime upgrade makes none of these calls. Each call is a separate governance decision with its own schedule, in UTC.

Proposed in the V494 guide, in this order

  1. AdminUtils::sudo_set_basket_trade_max_slippage_bps(500)
  2. AdminUtils::sudo_set_basket_trade_price_reference(SpotOnly)
  3. AdminUtils::sudo_set_basket_concentration_cap(9830)

The third call uses a setter that existed before V494. SpotOnly has the risk that the section above describes.

Not scheduled

V495 proposes no sudo call. These values stay at their defaults until root acts:

  • Global mechanism limit, 2. Subnets can run more than two mechanisms only after root calls AdminUtils::sudo_set_max_mechanism_count(n), with n up to 16. This release does not propose a value or a time.
  • Etao owner limit, 360 blocks. Root can change it with AdminUtils::sudo_set_subnet_emission_weights_rate_limit(blocks).
  • Subnet limit. V495 does not change the subnet limit. A higher limit is a separate root call. From V495 a single-validator root claim admits a fund with rows on 256 subnets, so a limit of up to 256 is safe for claims. Read the open item about trade and deposit weight first.

Upgrade checklist

  • Node operators: build and run the final v495 tag that governance selects. Read the spec version and the transaction version from metadata.
  • Validators: upgrade the SDK, name the mechanism in each weight call, and keep Null rows inside the row cap.
  • Miners: no state migration. Refresh metadata.
  • Subnet owners: decide on the mechanism count and the split, check the cap of your gamma emission deposit, and read the Etao limit from the chain.
  • Root stakers: no action. A single-validator claim reserves less block weight. The fee quote, the largest fee, and the payout do not change. A small claim pays for two more parts of its work (see the root claim section).
  • SDK and indexer operators: regenerate calls, storage, errors, and events for spec 495.
  • Governance: the sudo calls above are separate decisions.

When the release train creates the final tag, build it from a clean checkout:

git fetch https://github.com/RaoFoundation/subtensor.git tag v495
git checkout --detach v495
cargo build --release --locked -p node-subtensor