LiquidAlphaConsensusModeSet

Event v446 → current #146

Emitted when a subnet 's liquid-alpha consensus mode was updated.

View events on chain
Useful for: validatorssubnet ownersanalytics

The Big Picture

Liquid alpha decides how fast validator bonds follow the weights being set, and the mode decides which consensus vector it reads. Moving between Current, Previous and Auto changes how quickly bonds react without touching any other hyperparameter, so this event is the only notice that bond behaviour on the subnet has changed.

Why This Matters

If your model of a subnet bond movement stops matching the chain, a mode change is one of the few things that would do that quietly.

Example Scenario

A subnet owner moves subnet 1 from the default Auto to Current. The event carries the netuid and the new mode, and from the next epoch bonds are priced against the consensus computed in that epoch rather than the previous one.

Common Questions

Is this a tuple event?
Yes. It carries the netuid and the mode positionally, appended in that order to preserve the existing SCALE event indices.
Does this turn liquid alpha on?
No. SubtensorModule.LiquidAlphaOn controls whether liquid alpha runs. This only selects which consensus it reads once it does.

Use Cases

  • Detect that a subnet changed how reactive its bonds are
  • Re-run a bond simulation against the consensus vector now in force
  • Audit subnet-owner hyperparameter changes
  • Alert delegators that bond dynamics on a subnet have shifted

How to Use This Event

  • → Subscribe and invalidate any cached assumption about which consensus a subnet uses
  • → Index by netuid to build a history of the subnet bond configuration

From Chain Metadata

A subnet's liquid-alpha consensus mode was updated. Appended to preserve existing SCALE event indices.

Triggers

Preconditions

  • The caller is the subnet owner or root
  • The subnet's admin window is open
  • The owner rate limit for this hyperparameter allows the change

Effects

Postconditions

  • SubtensorModule.LiquidAlphaConsensusMode holds the new mode for that subnet
  • Subsequent epochs price bonds against the consensus vector the new mode selects

Side Effects

  • The owner rate-limit clock for this hyperparameter is stamped, so a further change is refused until it clears

Event Data

#NameTypeDescription
0
arg0
→ netuid
NetUid Subnet whose liquid-alpha consensus mode changed
1
arg1
→ mode
ConsensusMode New consensus mode. Current uses the consensus calculated this epoch, Previous the one the last epoch persisted in ConsensusByMechanism, Auto the previous value at maximum bond penalty and the current value otherwise.

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);

// Subscribe to LiquidAlphaConsensusModeSet events
client.finalizedBlock$.subscribe(async (block) => {
  const events = await api.event.SubtensorModule.LiquidAlphaConsensusModeSet.get(block.hash);
  for (const evt of events) {
    console.log("LiquidAlphaConsensusModeSet:", evt.payload);
  }
});

Runtime Info

View Source
Pallet Index
7
Event Index
146
First Version
v446
Current Version
v490