Consensus

Storage Map v101 → current

Consensus scores for neurons on a subnet .

Explore chain
Queried by: validatorsanalytics

The Big Picture

Consensus score measures how well a neuron's weights align with the network consensus. Validators with high consensus are in agreement with others. Low consensus suggests the validator is an outlier - either innovative or potentially malicious.

Why This Matters

Is this validator scoring like everyone else, or going against the grain? High consensus = mainstream views. Low consensus = outlier behavior (could be good or bad).

Example Scenario

Query Consensus(netuid=1, uid=5) returns 0.92. This validator is 92% aligned with network consensus - very mainstream. A score of 0.3 would indicate significant disagreement with other validators.

Common Questions

Is high consensus always good?
Usually, but not always. Very high consensus everywhere could mean validators are lazy/copying. Some healthy disagreement shows independent thinking.
How does this differ from trust?
Trust is about a neuron receiving consistent ratings. Consensus is about a validator giving ratings that align with others.

Use Cases

  • Measure validator's alignment with network consensus
  • Identify outlier validators with unusual scoring
  • Build consensus health monitoring tools
  • Research consensus mechanism dynamics

Purpose & Usage

Purpose

Track consensus participation.

Common Query Patterns

  • Query by netuid-uid
Part of: Yuma ConsensusLiquid Alpha

Query Keys

#NameTypeDescription
1
key1
u16 key1 (u16)

Stored Value

value (Vec<u16>)

Relationships

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

const result = await api.query
  [stringCamelCase("SubtensorModule")]
  [stringCamelCase("Consensus")](
  key1
);

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

On-Chain Activity

Write Frequency
●●●●○○ Medium 100K–1M est. writes

100K–1M estimated writes

#33 most written storage item

Write Source Calls + Hooks

Modified by both user extrinsics and runtime hooks

As of block 7,429,232

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Map
First Version
v101
Current Version
v393