LiquidAlphaConsensusMode

Storage Map v446 → current

Which consensus vector liquid alpha uses when it prices bonds on a subnet .

Explore chain
Queried by: validatorssubnet ownersanalytics

The Big Picture

Liquid alpha controls how quickly validator bonds follow the weights being set. Which consensus it reads changes how reactive that is: the current epoch tracks the newest signal, the previous epoch damps it. Exposing the choice per subnet lets owners tune bond responsiveness to their own workload instead of taking one network-wide answer.

Why This Matters

Two subnets can run the same liquid alpha and still move bonds differently, because they are reading consensus from different epochs. This value tells you which.

Example Scenario

A subnet left on the default reads Auto, so bonds use the previous epoch only at maximum bond penalty. An owner who wants bonds to track the newest weights sets Current.

Common Questions

Who can change it?
The subnet owner or root, through AdminUtils.sudo_set_liquid_alpha_consensus_mode. The call is rate limited and requires the subnet admin window to be open.
Does this matter when liquid alpha is off?
No. SubtensorModule.LiquidAlphaOn decides whether liquid alpha runs; this only selects its consensus input once it does.

Use Cases

  • Determine which consensus vector to feed into a bond simulation for a subnet
  • Detect that a subnet owner changed how bonds respond to weight changes
  • Compare bond dynamics across subnets running different modes

From Chain Metadata

Consensus mode used by liquid alpha for each subnet.

Purpose & Usage

Purpose

Selects between the consensus computed in the current epoch and the one persisted by the previous epoch, or lets the runtime pick per case. Set by the subnet owner or root through AdminUtils.sudo_set_liquid_alpha_consensus_mode.

Common Query Patterns

  • Query by netuid before interpreting a bond change
  • Read together with SubtensorModule.LiquidAlphaOn, which decides whether liquid alpha runs at all

Notes

  • Three modes. Current reads the consensus calculated this epoch. Previous reads what the last epoch persisted, from SubtensorModule.ConsensusByMechanism. Auto uses the previous value at maximum bond penalty and the current value otherwise.
  • Auto is the default, so a subnet that has never called the setter reads as Auto.

Query Keys

#NameTypeDescription
1
key1
NetUid u16key1 (NetUid)

Stored Value

value (ConsensusMode)

Default Value

0x02 (raw SCALE bytes)

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

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 LiquidAlphaConsensusMode storage
const key1 = 0;

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

On-Chain Activity

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

Fewer than 10K writes

#347 most written storage item

Write Source Runtime Hook

Modified by runtime hooks (e.g., epoch transitions), not directly by user extrinsics

As of block 9,385,000

Runtime Info

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