Validator List

Validators with commission, uptime and voting power. Flags membership of the smallest set controlling a third of the stake, and sorts ascending by default — the conventional descending sort pushes delegators toward whoever is already largest.

src/components/ui/validator-list.tsx

About

From the component's own source, where it was written.

Validators to delegate to, with commission, uptime and voting power.

Cumulative voting power is the column nobody ships and everybody needs. A chain where the top third of validators control a third of the stake is one where those validators can halt it, and a list sorted by size actively pushes delegators toward the validators that make that worse. Flagging membership of the top-third set is the honest version.

Sorted by voting power ascending by default, deliberately — the conventional descending sort concentrates stake in whoever is already largest.

Install

npx astralyx-ui add validator-list

Usage

import { ValidatorList } from '@/components/ui/validator-list'

<ValidatorList validators={validators} onSelect={delegate} />

Composer

Change the props and the source below follows.

Validator
Halted NodeHalted NodeJailed10.0%42.10%0.10%
NodeifyNodeifyTop third0.0%96.20%0.40%
StakelyStakelyTop third3.0%99.40%2.10%
P2P.orgP2P.orgTop third4.0%99.99%6.60%
FigmentFigmentTop third5.0%99.91%7.40%
Chorus OneChorus OneTop third8.0%99.98%8.10%
Props
tsx
<ValidatorList validators={validators} onSelect={delegate} />

Examples

A validator set

API

Generated from the source, so it cannot fall behind the code. One table per exported component, then hooks, functions and types.

ValidatorList

Extends Omit<ComponentProps<'div'>, 'onSelect'>.

PropTypeDefaultDescription
validatorsValidator[]required{ id, name, avatar?, commission, uptime?, votingPower, jailed? }.
onSelect(id: string) => void—Omit for a read-only table.
validatorHeaderReactNode'Validator'—
commissionHeaderstring'Commission'—
uptimeHeaderstring'Uptime'—
votingPowerHeaderstring'Voting power'—
jailedLabelReactNode'Jailed'Badge on a jailed validator.
concentrationLabelReactNode'Top third'Badge on a validator inside the concentrated top third of stake.

Types

Validator

Validators to delegate to, with commission, uptime and voting power.

FieldTypeDescription
idstring—
nameReactNode—
avatar?ReactNode—
commissionnumberPercentage, e.g. 5 for 5%.
uptime?numberPercentage.
votingPowernumberShare of total stake, 0–1.
stake?ReactNode—
jailed?boolean—
onSelect?() => void—

Behaviour

TopicDetailDescription
concentrationcomputedMarks the validators making up the smallest set that controls a third of the stake — the threshold that matters for halting a chain.
sortascending by defaultDescending by voting power is the conventional order and it pushes delegators toward whoever is already largest.